diff --git a/go.mod b/go.mod index b46ec096..2cfb5cbf 100644 --- a/go.mod +++ b/go.mod @@ -3,15 +3,16 @@ module github.com/Azure/aztfmigrate go 1.23.0 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1 github.com/gertd/go-pluralize v0.2.1 + github.com/golang-jwt/jwt/v4 v4.5.2 github.com/hashicorp/go-version v1.7.0 github.com/hashicorp/hc-install v0.9.0 github.com/hashicorp/hcl/v2 v2.22.0 github.com/hashicorp/terraform-exec v0.21.0 github.com/hashicorp/terraform-json v0.22.1 github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 - github.com/magodo/aztft v0.3.1-0.20250220225137-662088a9e6d6 + github.com/magodo/aztft v0.3.1-0.20250331004505-d5aff7c777d4 github.com/magodo/tfadd v0.10.1-0.20240902124619-bd18a56f410d github.com/mitchellh/cli v1.1.5 github.com/zclconf/go-cty v1.15.0 @@ -19,51 +20,52 @@ require ( require ( dario.cat/mergo v1.0.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.8.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.10.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement v1.1.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.0.0-beta.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.1.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform v1.1.0-beta.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice v1.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation v0.8.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice v1.1.1 // indirect + 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.0.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 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection v1.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare v1.1.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization v1.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs v1.1.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins v1.1.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices v1.1.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor v1.2.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight v1.1.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs v1.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins v1.2.0 // indirect + 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.1.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault 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.5.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.1.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/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 - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.1.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw v1.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup v1.0.0 // indirect 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.3 // 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.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.7.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 - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool v1.1.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics v1.1.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse v0.7.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights v1.1.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool v1.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics v1.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse v0.8.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights v1.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub v1.3.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 @@ -77,7 +79,6 @@ require ( github.com/cyphar/filepath-securejoin v0.4.1 // indirect github.com/fatih/color v1.17.0 // indirect github.com/go-git/go-git/v5 v5.13.2 // indirect - github.com/golang-jwt/jwt/v5 v5.2.2 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -91,7 +92,7 @@ require ( github.com/hashicorp/terraform-plugin-go v0.23.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect github.com/huandu/xstrings v1.5.0 // indirect - github.com/magodo/armid v0.0.0-20230511151020-27880e5961c3 // indirect + github.com/magodo/armid v0.0.0-20240524082432-7ce06ae46c33 // 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 @@ -105,16 +106,15 @@ require ( github.com/shopspring/decimal v1.4.0 // indirect github.com/skeema/knownhosts v1.3.1 // indirect github.com/spf13/cast v1.7.0 // indirect - github.com/stretchr/testify v1.10.0 // 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 - golang.org/x/crypto v0.35.0 // indirect + golang.org/x/crypto v0.36.0 // indirect golang.org/x/mod v0.23.0 // indirect - golang.org/x/net v0.35.0 // indirect - golang.org/x/sync v0.11.0 // indirect - golang.org/x/sys v0.30.0 // indirect - golang.org/x/text v0.22.0 // indirect + golang.org/x/net v0.38.0 // indirect + golang.org/x/sync v0.12.0 // indirect + golang.org/x/sys v0.31.0 // indirect + golang.org/x/text v0.23.0 // indirect golang.org/x/tools v0.30.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.34.0 // indirect diff --git a/go.sum b/go.sum index f14b7fe1..84f371c4 100644 --- a/go.sum +++ b/go.sum @@ -1,67 +1,69 @@ 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/azure-sdk-for-go/sdk/azcore v1.13.0 h1:GJHeeA2N7xrG3q30L2UXDyuWRzDM900/65j70wcM4Ww= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0= -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= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.8.1 h1:QbJTRu1VHZZpWdXZk4VR03i2HJMTjYGuyNeR0zrFQrw= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.8.1/go.mod h1:aD/gQwtViumQKZqC0Bg8Tk6BbniwVMdFF+R2pUjpdkU= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1 h1:DSDNVxqkoXJiko6x8a90zidoYqnYYa6c1MTzDKzKkTo= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1/go.mod h1:zGqV2R4Cr/k8Uye5w+dgQ06WJtEcbQG/8J7BB6hnCr4= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2 h1:F0gBpfdPLGsw+nsgk6aqqkZS1jiixa5WwFe3fk/T3Ys= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2/go.mod h1:SqINnQ9lVVdRlyC8cd1lCI0SdX4n2paeABd2K8ggfnE= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.0 h1:Bg8m3nq/X1DeePkAbCfb6ml6F3F0IunEhE8TMh+lY48= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.0/go.mod h1:j2chePtV91HrC22tGoRX3sGY42uF13WzmmV80/OdVAA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.10.0 h1:zSc/9W0WKtH/qpFlN1K2pQjMJLMTMJpWyexdjtexHtA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.10.0/go.mod h1:AQQcirAE2A3+knMh7Voguwx+0txBqeDBaWu+ML1aMSc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement v1.1.1 h1:jCkNVNpsEevyic4bmjgVjzVA4tMGSJpXNGirf+S+mDI= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement v1.1.1/go.mod h1:a0Ug1l73Il7EhrCJEEt2dGjlNjvphppZq5KqJdgnwuw= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.0.0-beta.1 h1:5hCJnujXzlQvFMzmVFqBcA78iV5w+vsKL2vrrjqdW2A= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.0.0-beta.1/go.mod h1:Ro3jxA16UFXEpIhlUdrX12kSrOceSrV8rMcmnc0FYI8= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.1.1 h1:hBrFatNIiVAwDb5GzMLjpkQ6l2/waFSvBWMBWZRH8WI= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.1.1/go.mod h1:uxknLoFj+nBXpfGngz0B4ciNur04Y0EX4AREpy2GIvk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.0.0 h1:NYYoOOPGOqUXw/bGIVd6OY/K8J23a18IAlAx1tOHWNo= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.0.0/go.mod h1:LDN3sr8FJ36sY6ZmMes6Q2vHJ+5r1aFsE3wEo7VbXJg= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.2.0 h1:7FX6sHNPamIAyukt6w9Gw5Qa5bu+gVN2Iy70yHc0xns= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.2.0/go.mod h1:S7Ss6Rm0nlKDRHKrO9eL2Be5EnX29Z09CNPWgK7o4+I= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform v1.1.0-beta.1 h1:hQJe8H6ZruSIWEzoNCB/GH9gGa7ntRDqaebxj8UeguI= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform v1.1.0-beta.1/go.mod h1:yGK8WOLcIMXyT84rwf1EL3y5QU4XYYwczK70uWfBFmQ= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice v1.0.0 h1:kRX8I0dWAcpW6Vq0m90CgV+qw4O1vXodgwrhoPr1RWs= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice v1.0.0/go.mod h1:avvc5/7qR4taCvAhOM7KFXuEHhAU0Wek9YX7sh9H3EM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation v0.8.1 h1:X8ju/dwzy4fNFXpjvTId9Z2zDnWl8QqhZ2OdTOMucVI= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation v0.8.1/go.mod h1:89x2rv5BldGtKBj8vjprGdkABDwAaHhvZb2KO+pbkHI= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice v1.1.1 h1:SoKRYni+Y9ckaxUbrqHqV2tu2yUK1i74fe+h61wnvvo= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice v1.1.1/go.mod h1:ojs9TglxCeuWMnDYKzvkpye1rT3w6NKoNcuo4TqzaD4= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation v0.9.0 h1:pzgp0VZDAnmgAkUPeedW1dTd7v3kSrwxFNabFAzB158= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation v0.9.0/go.mod h1:RbDEpcty79BkGei2pfm6duP7QEeWlzpKSJ07XTna6+Y= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice v1.2.0 h1:RsM+VqnIUK6WLmKjIA0tbcZHdjoq9sVKaPTT4RrlnWs= +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.0.0 h1:xHWCrCQT1TUlDZ5yJ2kOilHx1FNSb0Y4vpPDL6EXfmk= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2 v2.0.0/go.mod h1:x3FsIReHYfFFH5ICfUMpF8Fc2PJmnY9AaLCYm4wUU34= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2 v2.1.0 h1:8+KuY4N/1QSlGCsAFnSLs9iLcSYirbyeDDhd6MD9a9c= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2 v2.1.0/go.mod h1:pttKQoqOdBOfgSUaztac9Mk1ZK0SiZhyW9VQPKkW/7s= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7 v7.0.0 h1:0kFVoHWNRGJE5N8dAaSkMaFGp1UhO43ICeZJFcLxHJI= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7 v7.0.0/go.mod h1:7HeBNl53VshGDi84AM31jBKzkTyS6tVzYQ0mdrnQib0= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection v1.0.0 h1:VFqjVi532z3gdltbAkYrPl9Ez0czn3ZPM+bjmvLq6fk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection v1.0.0/go.mod h1:CmZQSRwBPP7KNjDA+PHaoR2m8wgOsbTd9ncqZgSzgHA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare v1.1.0 h1:/76O+KjBwyPVu2IiC1bhkvuWyj9cQSpalJJb63dHjNg= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare v1.1.0/go.mod h1:kayNsQlf93r6ZkopGAdit2YHa6pLDRtMWLC/w7KEsfA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare v1.2.0 h1:5iPF3EaGy/cFiImQvKQFC8SbceEjFLYB4aLoFO1/WN8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare v1.2.0/go.mod h1:yFddSyk5uaKMqOtoqjfdjZM1/lEnsc3btormisxwdAM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization v1.0.0 h1:E404espBxzBWw7BlZa7TONlqMEH7P3P8XCe686PSmZQ= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization v1.0.0/go.mod h1:XM/9J9tLtumXaGIJwbsbm7WlsZwxOtKB34HwmFW9qyU= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs v1.1.1 h1:SkDnlb26047AYVuLG4wc/mLBFmPTOMvhOZNe/ePxhyo= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs v1.1.1/go.mod h1:vmOnh2bxdq3uJX4FhEBvYzRiXa9HS2A5nq4z3yZ3gEI= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins v1.1.0 h1:sNXbeLcpUiFSc/4PPtexBC7gRHhR1waqzrRTSN3LAZE= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins v1.1.0/go.mod h1:HVIuQ25cUPQL6KvwrxfPZUsI3C/in63oJ0C07fxTwxE= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices v1.1.0 h1:btVKK93BU9pfB+DbVnrewH+iMfdDuTGWt+0+U6WBo8E= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices v1.1.0/go.mod h1:FYzCuwWNkyAHBN2gyOwUOxLSEDrhLj/5B1xolqTmdF0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor v1.2.0 h1:HhKwPtmyjCFsSnWJi/C0p7iGqu7E9aXcjCCoNCeWFB4= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor v1.2.0/go.mod h1:xdGj2hF05022FUkPH3B88lkumFNoY3AwJu9b/Q1NLqQ= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight v1.1.1 h1:6ghFnaAk11vxyGn801zsqguqy+RH4Iz3F66dmzMcggY= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight v1.1.1/go.mod h1:u6bw9rYVrSELFGelW3WlH6+LvxvPhgAKOLqpqI2hv6k= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs v1.2.0 h1:y8lZ96aehjdOLj9cyMYaSe+E/WdKD7cgY1jm/b6PrcQ= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs v1.2.0/go.mod h1:flt9Jc9/VQYy/rJymy+NwsObqvrrc6iLY6LlUPxLSuI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins v1.2.0 h1:GD96b78rv9jhShcYcJauisgqyXBFgEaTAvUMaPiFl9w= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins v1.2.0/go.mod h1:ESqbgba0Fl1eop2bwoJ84Vmh+d093eDrYK2TdR9bKEM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices v1.2.0 h1:JKoVKtCdEDYzQpKQJjFcHlImrZ3dDUNRCy8izcKWgCo= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices v1.2.0/go.mod h1:0qixQ1wRIrN0LxhKbkzR7kRIDu1jbNvotTvF8pN/Vss= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor v1.4.0 h1:dz5II+dFuMkrdpIkO9f/Ht3f8hnRUURiQdLj1hwKO5Q= +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= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0/go.mod h1:LRr2FzBTQlONPPa5HREE5+RjSCTXl7BwOvYOaWTqCaI= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.1.1 h1:Dh8SxVXcSyQN76LI4IseKyrnqyTUsx336Axg8zDYSMs= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.1.1/go.mod h1:fqmmortNEICbosf7BfNVO3wWs6Cz/pkxYfExJC97Vy8= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 h1:8d4U82r7ItT1Es91x3eUcAQweih36KWvUha8AZ9X0Rs= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0/go.mod h1:/1bkGperHinQbAHMWivoec/Ucu6//iXo6jn5mhmqCVU= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v3 v3.1.0 h1:2qsIIvxVT+uE6yrNldntJKlLRgxGbZ85kgtz5SNBhMw= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v3 v3.1.0/go.mod h1:AW8VEadnhw9xox+VaVd9sP7NjzOAnaZBLRH6Tq3cJ38= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.3.0 h1:NZP+oPbAVFy7PhQ4PTD3SuGWbEziNhp7lphGkkN707s= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.3.0/go.mod h1:djbLk3ngutFfQ9fSOM29UzywAkcBI1YUsuUnxTQGsqU= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.5.0 h1:nnQ9vXH039UrEFxi08pPuZBE7VfqSJt343uJLw0rhWI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.5.0/go.mod h1:4YIVtzMFVsPwBvitCDX7J9sqthSj43QD1sP6fYc1egc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto v1.3.1 h1:ik0pyYcwUqdiPPXOioZfKL62SVu7iN5eh5zxHEbV3VE= 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.1.1 h1:YqPDzajLbEGiIr1wbj0AINMj54q3LtWzfwASAMGklAQ= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic v1.1.1/go.mod h1:DwT51rZDyLryjioY2lt18MlJ8risPJlt8HaKdciJlMI= +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/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= @@ -72,40 +74,42 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp v1.0.0 h1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp v1.0.0/go.mod h1:bAQDVyOKushEZ1+h7Q157Xn3hpaB/TewYIhiWqAh71U= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 h1:QM6sE5k2ZT/vI5BEe0r7mqjsUSnhVBFbOsVkEuaEfiA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0/go.mod h1:243D9iHbcQXoFUtgHJwL7gl2zx1aDuDMjvBZVGr2uW0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.1.1 h1:2fNJSfRbULkn3BzwWcA5WO1wHDr6E14LkCiWHdkpfR4= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.1.1/go.mod h1:A5GfDiLHjdNwpQ2DLX6QNKt/wJJfOoLz4cB7JyUapxw= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw v1.0.0 h1:IqQ4hSk2c+ukY8np3ta4wMaWZWYvBnAk2uo1m87bTg0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw v1.0.0/go.mod h1:0x6XhaUEGlx5bfqrFsopXuA4B6/GhqD+GZusSeMTgFg= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.2.0 h1:4FlNvfcPu7tTvOgOzXxIbZLvwvmZq1OdhQUdIa9g2N4= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.2.0/go.mod h1:A4nzEXwVd5pAyneR6KOvUAo72svUc5rmCzRHhAbP6lA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw v1.1.0 h1:l7R5KiDnWg6UWIPTJM6IZBEuC8Baggds4fSju8s8jsk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw v1.1.0/go.mod h1:fue9nIyAfRRmBkpwfcPfoorEeQaVzOplTtFJPtAlerE= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup v1.0.0 h1:MgsdbI063vhtsJMMCZSY6TcxFopiEhPMJEJ2L5iDva0= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup v1.0.0/go.mod h1:65T59IeW3MusDYTq3zjvzzipDyct3UbWTZVL31go+Ww= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery v1.1.0 h1:x02t6z6v5+zdGuaMSpKQTn/5ok60bbzX6mPAlaeuuW8= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery v1.1.0/go.mod h1:woN5JsidpzBh+hOMpof6vqutskFi/WtbT4ESGLx2wSo= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts v1.0.0 h1:qd/BfXBy0s/cPn/hVVX+Ps0HolpC1NsHE2p+L2zB4C4= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts v1.0.0/go.mod h1:P1SgXux7JvaLh0fwpYwtY2csL+RYAc033mNha1Txlm8= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1 h1:7CBQ+Ei8SP2c6ydQTGCCrS35bDxgTMfoP2miAwK++OU= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1/go.mod h1:c/wcGeGx5FUPbM/JltUYHZcKmigwyVLJlDq+4HdtXaw= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2 v2.0.0-beta.3 h1:2VnWKecWDUPWV0n28Eyg4njrILLxAE879/uRkxISBtg= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2 v2.0.0-beta.3/go.mod h1:ASXmyoagGzY2vkPZCbrGYjB0wZAMjha3owBXoeVO1rs= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 h1:Dd+RhdJn0OTtVGaeDLZpcumkIVCtA/3/Fo42+eoYvVM= +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.3.0 h1:LcJtQjCXJUm1s7JpUHZvu+bpgURhCatxVNbGADXniX0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.3.0/go.mod h1:+OgGVo0Httq7N5oayfvaLQ/Jq+2gJdqfp++Hyyl7Tws= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.7.0 h1:D3pGIZLYN7MnksIkMkeRylz13YPetz6/H8rc5S9Vllg= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.7.0/go.mod h1:kJn8QL2DCyKnbDFMdi4SZiK0OOetns2eeKv+cJql0Yw= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache v1.0.0 h1:3UQFOxKO93+20/+4mZweaGTbICtgQDRchk946N6/mvI= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache v1.0.0/go.mod h1:3n9xGw4M5LJpJLV62q8elF/XpfC/f4CY0SudWJuQOIQ= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover v1.1.1 h1:g84ADqlA7DmSuRHvK+Z11eSHrG5JP6Bw1/4x5q8uzDw= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover v1.1.1/go.mod h1:G28Xmw989oBiAbSFc1+6eeOSi0qZjB32oD1SLA8KNr4= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool v1.1.1 h1:WdQCVMMcH2k7OYjCrXi/1K1I8JJb04vs3om6PupUXWA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool v1.1.1/go.mod h1:R62238aoJ1kR3mwITZdV8xbt0vGPbsOZEWhVUk82mGk= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics v1.1.1 h1:Wj8xXZ3alRx3cEyT0huPTgwkzLD7i7pLe/G56/H+CxM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics v1.1.1/go.mod h1:3GFzMdGvIWg6Qdie2tuognOW797KDtkC6fvrD+DsYmQ= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse v0.7.1 h1:o8OVEIS1XsYesX92w7rVMdVIeNCE1RD2j+E/rE7dvfk= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse v0.7.1/go.mod h1:/qXm1V20g6thMJPjEP5fPJ0/Dj1UOAXzzGsLpNEWukg= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights v1.1.0 h1:c547eMEBf4l2tUMcV1QLTQNK79nocuWtA1Gc2hzAjSU= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights v1.1.0/go.mod h1:Ae4+zKkPmzlcgVwNIvAfbh9J2pgXqHBG9bdrHYkjr6o= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool v1.2.0 h1:MK3nxxYFtJBW1JLl721V6bVvU3WzAGWVQF49eT7qPDo= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool v1.2.0/go.mod h1:rDzquvMnukruAUAPk0UEcKyTvmFUMqYQcO+IrdHNu5Q= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics v1.2.0 h1:8ehl8bxzEJYOaYZkND13b0j+wuTrkkYo3n4jztCMTuc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics v1.2.0/go.mod h1:yJZJkwBRvEBFS8xdvkbq+p1xTXv8JsnDat+k1Ldrubc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse v0.8.0 h1:IKCilT2DdxjeCXhiCIZb5hywpA1KDGKwpdA1WL20wT0= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse v0.8.0/go.mod h1:IzuvA34YNVnlifc1+KhCouAKEf1VYzV439FOpyfTHzA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights v1.2.0 h1:V6YgkjOvo3b3yTvEL4sHJxkDcBZAL7v1/XaBkTKIivg= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights v1.2.0/go.mod h1:ewCONYPXv4ihgs+VFiJBHXRXjVB1xrxk2qsX+ZHlCnE= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub v1.3.0 h1:NyzzELDBMwCl+jHnUAEzv/4t9tp0vVn78vUou/7yqvM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub v1.3.0/go.mod h1:3cqAZX7JxhdbywHK3b1iaO/VcP9Kv+yvZ/s44EO2+LI= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads v1.1.0 h1:kW9b3n/hV4/JgghAPinYHolJtocM/gPNCaeuqLqXzpc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads v1.1.0/go.mod h1:G2hOQegwo7b7uqWaKRfqt6GG3x/eOnUA3qhT49fQRwA= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 h1:oygO0locgZJe7PpYPXT5A29ZkwJaPqcva7BVeemZOZs= +github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= 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= @@ -156,6 +160,9 @@ github.com/go-git/go-git/v5 v5.13.2 h1:7O7xvsK7K+rZPKW6AQR1YyNhfywkv7B8/FsP3ki6Z 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/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= +github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= @@ -227,10 +234,10 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/magodo/armid v0.0.0-20230511151020-27880e5961c3 h1:ob6vk6PlChZvutcxcLnmPH/VNmJEuwz+TmCYCVtJqeA= -github.com/magodo/armid v0.0.0-20230511151020-27880e5961c3/go.mod h1:rR8E7zfGMbmfnSQvrkFiWYdhrfTqsVSltelnZB09BwA= -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/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.20250331004505-d5aff7c777d4 h1:HMjk/IdemjnBDKdvwdmpq9Vnf+lDCqj0Sa0ffaoPoaI= +github.com/magodo/aztft v0.3.1-0.20250331004505-d5aff7c777d4/go.mod h1:ANoe0gR4AvpwHh3vR99Zg7zTzFynW/ZaD7CJSah9xZ0= 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= @@ -309,8 +316,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= +golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= @@ -318,13 +325,13 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= -golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= +golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -338,8 +345,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc 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= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -347,8 +354,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= diff --git a/main.go b/main.go index 6dfdc743..92dfe912 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,7 @@ import ( "os" "github.com/Azure/aztfmigrate/cmd" + _ "github.com/golang-jwt/jwt/v4" "github.com/mitchellh/cli" ) 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 1a9cedba..bd9667d9 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,54 @@ # Release History +## 1.17.1 (2025-03-20) + +### Other Changes + +* Upgraded to Go 1.23 +* Upgraded dependencies + +## 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 + +* Added field `Attributes` to `runtime.StartSpanOptions` to simplify creating spans with attributes. + +### Other Changes + +* Include the HTTP verb and URL in `log.EventRetryPolicy` log entries so it's clear which operation is being retried. + ## 1.13.0 (2024-07-16) ### 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 00f2d5a0..d9a4e36d 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 765fbc68..8ad3d540 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 17bd50c6..03cb227d 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 08a95458..8aec256b 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 03699fd7..f4963318 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 e5b28a9b..c8929e59 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.13.0" + Version = "v1.17.1" ) 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 8d984535..bb37a5ef 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 b960cff0..c66fc0a9 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 cb2a6952..b26db920 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 3df1c121..f375195c 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,7 +96,10 @@ func (h *httpTracePolicy) Do(req *policy.Request) (resp *http.Response, err erro // StartSpanOptions contains the optional values for StartSpan. type StartSpanOptions struct { - // for future expansion + // Kind indicates the kind of Span. + Kind tracing.SpanKind + // Attributes contains key-value pairs of attributes for the span. + Attributes []tracing.Attribute } // StartSpan starts a new tracing span. @@ -114,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 @@ -126,10 +128,19 @@ func StartSpan(ctx context.Context, name string, tracer tracing.Tracer, options return ctx, func(err error) {} } } + + 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 04d7bb4e..4c3a31fe 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 } @@ -102,7 +122,8 @@ func (p *retryPolicy) Do(req *policy.Request) (resp *http.Response, err error) { try := int32(1) for { resp = nil // reset - log.Writef(log.EventRetryPolicy, "=====> Try=%d", try) + // unfortunately we don't have access to the custom allow-list of query params, so we'll redact everything but the default allowed QPs + log.Writef(log.EventRetryPolicy, "=====> Try=%d for %s %s", try, req.Raw().Method, getSanitizedURL(*req.Raw().URL, getAllowedQueryParams(nil))) // For each try, seek to the beginning of the Body stream. We do this even for the 1st try because // the stream may not be at offset 0 when we first get it and we want the same behavior for the 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 03f76c9a..4f90e447 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/internal/log/log.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/log.go index 4f1dcf1b..76dadf7d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/log.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/log.go @@ -44,7 +44,7 @@ func Should(cls Event) bool { if log.lst == nil { return false } - if log.cls == nil || len(log.cls) == 0 { + if len(log.cls) == 0 { return true } for _, c := range log.cls { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/temporal/resource.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/temporal/resource.go index 238ef42e..02aa1fb3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/temporal/resource.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/temporal/resource.go @@ -11,9 +11,17 @@ import ( "time" ) +// backoff sets a minimum wait time between eager update attempts. It's a variable so tests can manipulate it. +var backoff = func(now, lastAttempt time.Time) bool { + return lastAttempt.Add(30 * time.Second).After(now) +} + // AcquireResource abstracts a method for refreshing a temporal resource. type AcquireResource[TResource, TState any] func(state TState) (newResource TResource, newExpiration time.Time, err error) +// ShouldRefresh abstracts a method for indicating whether a resource should be refreshed before expiration. +type ShouldRefresh[TResource, TState any] func(TResource, TState) bool + // Resource is a temporal resource (usually a credential) that requires periodic refreshing. type Resource[TResource, TState any] struct { // cond is used to synchronize access to the shared resource embodied by the remaining fields @@ -31,24 +39,43 @@ type Resource[TResource, TState any] struct { // lastAttempt indicates when a thread/goroutine last attempted to acquire/update the resource lastAttempt time.Time + // shouldRefresh indicates whether the resource should be refreshed before expiration + shouldRefresh ShouldRefresh[TResource, TState] + // acquireResource is the callback function that actually acquires the resource acquireResource AcquireResource[TResource, TState] } // NewResource creates a new Resource that uses the specified AcquireResource for refreshing. func NewResource[TResource, TState any](ar AcquireResource[TResource, TState]) *Resource[TResource, TState] { - return &Resource[TResource, TState]{cond: sync.NewCond(&sync.Mutex{}), acquireResource: ar} + r := &Resource[TResource, TState]{acquireResource: ar, cond: sync.NewCond(&sync.Mutex{})} + r.shouldRefresh = r.expiringSoon + return r +} + +// ResourceOptions contains optional configuration for Resource +type ResourceOptions[TResource, TState any] struct { + // ShouldRefresh indicates whether [Resource.Get] should acquire an updated resource despite + // the currently held resource not having expired. [Resource.Get] ignores all errors from + // refresh attempts triggered by ShouldRefresh returning true, and doesn't call ShouldRefresh + // when the resource has expired (it unconditionally updates expired resources). When + // ShouldRefresh is nil, [Resource.Get] refreshes the resource if it will expire within 5 + // minutes. + ShouldRefresh ShouldRefresh[TResource, TState] +} + +// NewResourceWithOptions creates a new Resource that uses the specified AcquireResource for refreshing. +func NewResourceWithOptions[TResource, TState any](ar AcquireResource[TResource, TState], opts ResourceOptions[TResource, TState]) *Resource[TResource, TState] { + r := NewResource(ar) + if opts.ShouldRefresh != nil { + r.shouldRefresh = opts.ShouldRefresh + } + return r } // Get returns the underlying resource. // If the resource is fresh, no refresh is performed. func (er *Resource[TResource, TState]) Get(state TState) (TResource, error) { - // If the resource is expiring within this time window, update it eagerly. - // This allows other threads/goroutines to keep running by using the not-yet-expired - // resource value while one thread/goroutine updates the resource. - const window = 5 * time.Minute // This example updates the resource 5 minutes prior to expiration - const backoff = 30 * time.Second // Minimum wait time between eager update attempts - now, acquire, expired := time.Now(), false, false // acquire exclusive lock @@ -65,9 +92,8 @@ func (er *Resource[TResource, TState]) Get(state TState) (TResource, error) { break } // Getting here means that this thread/goroutine will wait for the updated resource - } else if er.expiration.Add(-window).Before(now) { - // The resource is valid but is expiring within the time window - if !er.acquiring && er.lastAttempt.Add(backoff).Before(now) { + } else if er.shouldRefresh(resource, state) { + if !(er.acquiring || backoff(now, er.lastAttempt)) { // If another thread/goroutine is not acquiring/renewing the resource, and none has attempted // to do so within the last 30 seconds, this thread/goroutine will do it er.acquiring, acquire = true, true @@ -121,3 +147,8 @@ func (er *Resource[TResource, TState]) Expire() { // Reset the expiration as if we never got this resource to begin with er.expiration = time.Time{} } + +func (er *Resource[TResource, TState]) expiringSoon(TResource, TState) bool { + // call time.Now() instead of using Get's value so ShouldRefresh doesn't need a time.Time parameter + return er.expiration.Add(-5 * time.Minute).Before(time.Now()) +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/CHANGELOG.md index d66c9c97..9b9abe16 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/CHANGELOG.md @@ -1,5 +1,63 @@ # Release History +## 0.10.0 (2024-03-01) +### Breaking Changes + +- Type of `AlertsClientChangeStateOptions.Comment` has been changed from `*string` to `*Comments` + +### Features Added + +- New function `NewAlertRuleRecommendationsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AlertRuleRecommendationsClient, error)` +- New function `*AlertRuleRecommendationsClient.NewListByResourcePager(string, *AlertRuleRecommendationsClientListByResourceOptions) *runtime.Pager[AlertRuleRecommendationsClientListByResourceResponse]` +- New function `*AlertRuleRecommendationsClient.NewListByTargetTypePager(string, *AlertRuleRecommendationsClientListByTargetTypeOptions) *runtime.Pager[AlertRuleRecommendationsClientListByTargetTypeResponse]` +- New function `*ClientFactory.NewAlertRuleRecommendationsClient() *AlertRuleRecommendationsClient` +- New function `*ClientFactory.NewPrometheusRuleGroupsClient() *PrometheusRuleGroupsClient` +- New function `*ClientFactory.NewTenantActivityLogAlertsClient() *TenantActivityLogAlertsClient` +- New function `NewPrometheusRuleGroupsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*PrometheusRuleGroupsClient, error)` +- New function `*PrometheusRuleGroupsClient.CreateOrUpdate(context.Context, string, string, PrometheusRuleGroupResource, *PrometheusRuleGroupsClientCreateOrUpdateOptions) (PrometheusRuleGroupsClientCreateOrUpdateResponse, error)` +- New function `*PrometheusRuleGroupsClient.Delete(context.Context, string, string, *PrometheusRuleGroupsClientDeleteOptions) (PrometheusRuleGroupsClientDeleteResponse, error)` +- New function `*PrometheusRuleGroupsClient.Get(context.Context, string, string, *PrometheusRuleGroupsClientGetOptions) (PrometheusRuleGroupsClientGetResponse, error)` +- New function `*PrometheusRuleGroupsClient.NewListByResourceGroupPager(string, *PrometheusRuleGroupsClientListByResourceGroupOptions) *runtime.Pager[PrometheusRuleGroupsClientListByResourceGroupResponse]` +- New function `*PrometheusRuleGroupsClient.NewListBySubscriptionPager(*PrometheusRuleGroupsClientListBySubscriptionOptions) *runtime.Pager[PrometheusRuleGroupsClientListBySubscriptionResponse]` +- New function `*PrometheusRuleGroupsClient.Update(context.Context, string, string, PrometheusRuleGroupResourcePatch, *PrometheusRuleGroupsClientUpdateOptions) (PrometheusRuleGroupsClientUpdateResponse, error)` +- New function `NewTenantActivityLogAlertsClient(azcore.TokenCredential, *arm.ClientOptions) (*TenantActivityLogAlertsClient, error)` +- New function `*TenantActivityLogAlertsClient.CreateOrUpdate(context.Context, string, string, TenantActivityLogAlertResource, *TenantActivityLogAlertsClientCreateOrUpdateOptions) (TenantActivityLogAlertsClientCreateOrUpdateResponse, error)` +- New function `*TenantActivityLogAlertsClient.Delete(context.Context, string, string, *TenantActivityLogAlertsClientDeleteOptions) (TenantActivityLogAlertsClientDeleteResponse, error)` +- New function `*TenantActivityLogAlertsClient.Get(context.Context, string, string, *TenantActivityLogAlertsClientGetOptions) (TenantActivityLogAlertsClientGetResponse, error)` +- New function `*TenantActivityLogAlertsClient.NewListByManagementGroupPager(string, *TenantActivityLogAlertsClientListByManagementGroupOptions) *runtime.Pager[TenantActivityLogAlertsClientListByManagementGroupResponse]` +- New function `*TenantActivityLogAlertsClient.NewListByTenantPager(*TenantActivityLogAlertsClientListByTenantOptions) *runtime.Pager[TenantActivityLogAlertsClientListByTenantResponse]` +- New function `*TenantActivityLogAlertsClient.Update(context.Context, string, string, TenantAlertRulePatchObject, *TenantActivityLogAlertsClientUpdateOptions) (TenantActivityLogAlertsClientUpdateResponse, error)` +- New struct `ActionGroup` +- New struct `ActionList` +- New struct `AlertRuleAllOfCondition` +- New struct `AlertRuleAnyOfOrLeafCondition` +- New struct `AlertRuleLeafCondition` +- New struct `AlertRuleProperties` +- New struct `AlertRuleRecommendationProperties` +- New struct `AlertRuleRecommendationResource` +- New struct `AlertRuleRecommendationsListResponse` +- New struct `Comments` +- New struct `PrometheusRule` +- New struct `PrometheusRuleGroupAction` +- New struct `PrometheusRuleGroupProperties` +- New struct `PrometheusRuleGroupResource` +- New struct `PrometheusRuleGroupResourceCollection` +- New struct `PrometheusRuleGroupResourcePatch` +- New struct `PrometheusRuleGroupResourcePatchProperties` +- New struct `PrometheusRuleResolveConfiguration` +- New struct `RuleArmTemplate` +- New struct `TenantActivityLogAlertResource` +- New struct `TenantAlertRuleList` +- New struct `TenantAlertRulePatchObject` +- New struct `TenantAlertRulePatchProperties` + + +## 0.9.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + ## 0.8.1 (2023-04-14) ### Bug Fixes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/README.md index e53044ed..ac93f95d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/README.md @@ -57,9 +57,16 @@ clientFactory, err := armalertsmanagement.NewClientFactory(, cr 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.NewAlertsClient() +client := clientFactory.NewAlertProcessingRulesClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/alertprocessingrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/alertprocessingrules_client.go index 89d75a3b..e61ee2fa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/alertprocessingrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/alertprocessingrules_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armalertsmanagement @@ -33,7 +32,7 @@ type AlertProcessingRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAlertProcessingRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertProcessingRulesClient, error) { - cl, err := arm.NewClient(moduleName+".AlertProcessingRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewAlertProcessingRulesClient(subscriptionID string, credential azcore.Toke // - options - AlertProcessingRulesClientCreateOrUpdateOptions contains the optional parameters for the AlertProcessingRulesClient.CreateOrUpdate // method. func (client *AlertProcessingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, alertProcessingRuleName string, alertProcessingRule AlertProcessingRule, options *AlertProcessingRulesClientCreateOrUpdateOptions) (AlertProcessingRulesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AlertProcessingRulesClient.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, alertProcessingRuleName, alertProcessingRule, options) if err != nil { return AlertProcessingRulesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertProcessingRulesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return AlertProcessingRulesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return AlertProcessingRulesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -91,7 +97,10 @@ func (client *AlertProcessingRulesClient) createOrUpdateCreateRequest(ctx contex reqQP.Set("api-version", "2021-08-08") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, alertProcessingRule) + if err := runtime.MarshalAsJSON(req, alertProcessingRule); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -115,18 +124,25 @@ func (client *AlertProcessingRulesClient) createOrUpdateHandleResponse(resp *htt // - options - AlertProcessingRulesClientDeleteOptions contains the optional parameters for the AlertProcessingRulesClient.Delete // method. func (client *AlertProcessingRulesClient) Delete(ctx context.Context, resourceGroupName string, alertProcessingRuleName string, options *AlertProcessingRulesClientDeleteOptions) (AlertProcessingRulesClientDeleteResponse, error) { + var err error + const operationName = "AlertProcessingRulesClient.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, alertProcessingRuleName, options) if err != nil { return AlertProcessingRulesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertProcessingRulesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return AlertProcessingRulesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return AlertProcessingRulesClientDeleteResponse{}, err } - return client.deleteHandleResponse(resp) + resp, err := client.deleteHandleResponse(httpResp) + return resp, err } // deleteCreateRequest creates the Delete request. @@ -173,18 +189,25 @@ func (client *AlertProcessingRulesClient) deleteHandleResponse(resp *http.Respon // - options - AlertProcessingRulesClientGetByNameOptions contains the optional parameters for the AlertProcessingRulesClient.GetByName // method. func (client *AlertProcessingRulesClient) GetByName(ctx context.Context, resourceGroupName string, alertProcessingRuleName string, options *AlertProcessingRulesClientGetByNameOptions) (AlertProcessingRulesClientGetByNameResponse, error) { + var err error + const operationName = "AlertProcessingRulesClient.GetByName" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByNameCreateRequest(ctx, resourceGroupName, alertProcessingRuleName, options) if err != nil { return AlertProcessingRulesClientGetByNameResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertProcessingRulesClientGetByNameResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertProcessingRulesClientGetByNameResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AlertProcessingRulesClientGetByNameResponse{}, err } - return client.getByNameHandleResponse(resp) + resp, err := client.getByNameHandleResponse(httpResp) + return resp, err } // getByNameCreateRequest creates the GetByName request. @@ -237,25 +260,20 @@ func (client *AlertProcessingRulesClient) NewListByResourceGroupPager(resourceGr return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AlertProcessingRulesClientListByResourceGroupResponse) (AlertProcessingRulesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AlertProcessingRulesClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AlertProcessingRulesClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 AlertProcessingRulesClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertProcessingRulesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -304,25 +322,20 @@ func (client *AlertProcessingRulesClient) NewListBySubscriptionPager(options *Al return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AlertProcessingRulesClientListBySubscriptionResponse) (AlertProcessingRulesClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AlertProcessingRulesClient.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 AlertProcessingRulesClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AlertProcessingRulesClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertProcessingRulesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -366,18 +379,25 @@ func (client *AlertProcessingRulesClient) listBySubscriptionHandleResponse(resp // - options - AlertProcessingRulesClientUpdateOptions contains the optional parameters for the AlertProcessingRulesClient.Update // method. func (client *AlertProcessingRulesClient) Update(ctx context.Context, resourceGroupName string, alertProcessingRuleName string, alertProcessingRulePatch PatchObject, options *AlertProcessingRulesClientUpdateOptions) (AlertProcessingRulesClientUpdateResponse, error) { + var err error + const operationName = "AlertProcessingRulesClient.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, alertProcessingRuleName, alertProcessingRulePatch, options) if err != nil { return AlertProcessingRulesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertProcessingRulesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertProcessingRulesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AlertProcessingRulesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -403,7 +423,10 @@ func (client *AlertProcessingRulesClient) updateCreateRequest(ctx context.Contex reqQP.Set("api-version", "2021-08-08") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, alertProcessingRulePatch) + if err := runtime.MarshalAsJSON(req, alertProcessingRulePatch); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/alertrulerecommendations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/alertrulerecommendations_client.go new file mode 100644 index 00000000..f8c3a576 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/alertrulerecommendations_client.go @@ -0,0 +1,154 @@ +//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 armalertsmanagement + +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" +) + +// AlertRuleRecommendationsClient contains the methods for the AlertRuleRecommendations group. +// Don't use this type directly, use NewAlertRuleRecommendationsClient() instead. +type AlertRuleRecommendationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAlertRuleRecommendationsClient creates a new instance of AlertRuleRecommendationsClient 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 NewAlertRuleRecommendationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertRuleRecommendationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AlertRuleRecommendationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByResourcePager - Retrieve alert rule recommendations for a resource. +// +// Generated from API version 2023-01-01-preview +// - resourceURI - The identifier of the resource. +// - options - AlertRuleRecommendationsClientListByResourceOptions contains the optional parameters for the AlertRuleRecommendationsClient.NewListByResourcePager +// method. +func (client *AlertRuleRecommendationsClient) NewListByResourcePager(resourceURI string, options *AlertRuleRecommendationsClientListByResourceOptions) *runtime.Pager[AlertRuleRecommendationsClientListByResourceResponse] { + return runtime.NewPager(runtime.PagingHandler[AlertRuleRecommendationsClientListByResourceResponse]{ + More: func(page AlertRuleRecommendationsClientListByResourceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AlertRuleRecommendationsClientListByResourceResponse) (AlertRuleRecommendationsClientListByResourceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AlertRuleRecommendationsClient.NewListByResourcePager") + 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.listByResourceCreateRequest(ctx, resourceURI, options) + }, nil) + if err != nil { + return AlertRuleRecommendationsClientListByResourceResponse{}, err + } + return client.listByResourceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceCreateRequest creates the ListByResource request. +func (client *AlertRuleRecommendationsClient) listByResourceCreateRequest(ctx context.Context, resourceURI string, options *AlertRuleRecommendationsClientListByResourceOptions) (*policy.Request, error) { + urlPath := "/{resourceUri}/providers/Microsoft.AlertsManagement/alertRuleRecommendations" + urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) + req, err := 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", "2023-01-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceHandleResponse handles the ListByResource response. +func (client *AlertRuleRecommendationsClient) listByResourceHandleResponse(resp *http.Response) (AlertRuleRecommendationsClientListByResourceResponse, error) { + result := AlertRuleRecommendationsClientListByResourceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AlertRuleRecommendationsListResponse); err != nil { + return AlertRuleRecommendationsClientListByResourceResponse{}, err + } + return result, nil +} + +// NewListByTargetTypePager - Retrieve alert rule recommendations for a target type. +// +// Generated from API version 2023-01-01-preview +// - targetType - The recommendations target type. +// - options - AlertRuleRecommendationsClientListByTargetTypeOptions contains the optional parameters for the AlertRuleRecommendationsClient.NewListByTargetTypePager +// method. +func (client *AlertRuleRecommendationsClient) NewListByTargetTypePager(targetType string, options *AlertRuleRecommendationsClientListByTargetTypeOptions) *runtime.Pager[AlertRuleRecommendationsClientListByTargetTypeResponse] { + return runtime.NewPager(runtime.PagingHandler[AlertRuleRecommendationsClientListByTargetTypeResponse]{ + More: func(page AlertRuleRecommendationsClientListByTargetTypeResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AlertRuleRecommendationsClientListByTargetTypeResponse) (AlertRuleRecommendationsClientListByTargetTypeResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AlertRuleRecommendationsClient.NewListByTargetTypePager") + 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.listByTargetTypeCreateRequest(ctx, targetType, options) + }, nil) + if err != nil { + return AlertRuleRecommendationsClientListByTargetTypeResponse{}, err + } + return client.listByTargetTypeHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByTargetTypeCreateRequest creates the ListByTargetType request. +func (client *AlertRuleRecommendationsClient) listByTargetTypeCreateRequest(ctx context.Context, targetType string, options *AlertRuleRecommendationsClientListByTargetTypeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alertRuleRecommendations" + if client.subscriptionID == "" { + return 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", "2023-01-01-preview") + reqQP.Set("targetType", targetType) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByTargetTypeHandleResponse handles the ListByTargetType response. +func (client *AlertRuleRecommendationsClient) listByTargetTypeHandleResponse(resp *http.Response) (AlertRuleRecommendationsClientListByTargetTypeResponse, error) { + result := AlertRuleRecommendationsClientListByTargetTypeResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AlertRuleRecommendationsListResponse); err != nil { + return AlertRuleRecommendationsClientListByTargetTypeResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/alerts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/alerts_client.go index 477eb2b1..7243f1ed 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/alerts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/alerts_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armalertsmanagement @@ -16,7 +15,6 @@ import ( "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" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming" "net/http" "net/url" "strconv" @@ -35,7 +33,7 @@ type AlertsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAlertsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertsClient, error) { - cl, err := arm.NewClient(moduleName+".AlertsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +52,25 @@ func NewAlertsClient(subscriptionID string, credential azcore.TokenCredential, o // - newState - New state of the alert. // - options - AlertsClientChangeStateOptions contains the optional parameters for the AlertsClient.ChangeState method. func (client *AlertsClient) ChangeState(ctx context.Context, alertID string, newState AlertState, options *AlertsClientChangeStateOptions) (AlertsClientChangeStateResponse, error) { + var err error + const operationName = "AlertsClient.ChangeState" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.changeStateCreateRequest(ctx, alertID, newState, options) if err != nil { return AlertsClientChangeStateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertsClientChangeStateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertsClientChangeStateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AlertsClientChangeStateResponse{}, err } - return client.changeStateHandleResponse(resp) + resp, err := client.changeStateHandleResponse(httpResp) + return resp, err } // changeStateCreateRequest creates the ChangeState request. @@ -89,8 +94,10 @@ func (client *AlertsClient) changeStateCreateRequest(ctx context.Context, alertI req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Comment != nil { - body := streaming.NopCloser(strings.NewReader(*options.Comment)) - return req, req.SetBody(body, "application/json") + if err := runtime.MarshalAsJSON(req, *options.Comment); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -116,25 +123,20 @@ func (client *AlertsClient) NewGetAllPager(options *AlertsClientGetAllOptions) * return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AlertsClientGetAllResponse) (AlertsClientGetAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AlertsClientGetAllResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AlertsClient.NewGetAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getAllCreateRequest(ctx, options) + }, nil) if err != nil { return AlertsClientGetAllResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertsClientGetAllResponse{}, runtime.NewResponseError(resp) - } return client.getAllHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -150,32 +152,15 @@ func (client *AlertsClient) getAllCreateRequest(ctx context.Context, options *Al return nil, err } reqQP := req.Raw().URL.Query() - if options != nil && options.TargetResource != nil { - reqQP.Set("targetResource", *options.TargetResource) - } - if options != nil && options.TargetResourceType != nil { - reqQP.Set("targetResourceType", *options.TargetResourceType) - } - if options != nil && options.TargetResourceGroup != nil { - reqQP.Set("targetResourceGroup", *options.TargetResourceGroup) - } - if options != nil && options.MonitorService != nil { - reqQP.Set("monitorService", string(*options.MonitorService)) - } - if options != nil && options.MonitorCondition != nil { - reqQP.Set("monitorCondition", string(*options.MonitorCondition)) - } - if options != nil && options.Severity != nil { - reqQP.Set("severity", string(*options.Severity)) + if options != nil && options.AlertRule != nil { + reqQP.Set("alertRule", *options.AlertRule) } if options != nil && options.AlertState != nil { reqQP.Set("alertState", string(*options.AlertState)) } - if options != nil && options.AlertRule != nil { - reqQP.Set("alertRule", *options.AlertRule) - } - if options != nil && options.SmartGroupID != nil { - reqQP.Set("smartGroupId", *options.SmartGroupID) + reqQP.Set("api-version", "2019-05-05-preview") + if options != nil && options.CustomTimeRange != nil { + reqQP.Set("customTimeRange", *options.CustomTimeRange) } if options != nil && options.IncludeContext != nil { reqQP.Set("includeContext", strconv.FormatBool(*options.IncludeContext)) @@ -183,25 +168,42 @@ func (client *AlertsClient) getAllCreateRequest(ctx context.Context, options *Al if options != nil && options.IncludeEgressConfig != nil { reqQP.Set("includeEgressConfig", strconv.FormatBool(*options.IncludeEgressConfig)) } + if options != nil && options.MonitorCondition != nil { + reqQP.Set("monitorCondition", string(*options.MonitorCondition)) + } + if options != nil && options.MonitorService != nil { + reqQP.Set("monitorService", string(*options.MonitorService)) + } if options != nil && options.PageCount != nil { reqQP.Set("pageCount", strconv.FormatInt(*options.PageCount, 10)) } + if options != nil && options.Select != nil { + reqQP.Set("select", *options.Select) + } + if options != nil && options.Severity != nil { + reqQP.Set("severity", string(*options.Severity)) + } + if options != nil && options.SmartGroupID != nil { + reqQP.Set("smartGroupId", *options.SmartGroupID) + } if options != nil && options.SortBy != nil { reqQP.Set("sortBy", string(*options.SortBy)) } if options != nil && options.SortOrder != nil { reqQP.Set("sortOrder", string(*options.SortOrder)) } - if options != nil && options.Select != nil { - reqQP.Set("select", *options.Select) + if options != nil && options.TargetResource != nil { + reqQP.Set("targetResource", *options.TargetResource) + } + if options != nil && options.TargetResourceGroup != nil { + reqQP.Set("targetResourceGroup", *options.TargetResourceGroup) + } + if options != nil && options.TargetResourceType != nil { + reqQP.Set("targetResourceType", *options.TargetResourceType) } if options != nil && options.TimeRange != nil { reqQP.Set("timeRange", string(*options.TimeRange)) } - if options != nil && options.CustomTimeRange != nil { - reqQP.Set("customTimeRange", *options.CustomTimeRange) - } - reqQP.Set("api-version", "2019-05-05-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -223,18 +225,25 @@ func (client *AlertsClient) getAllHandleResponse(resp *http.Response) (AlertsCli // - alertID - Unique ID of an alert instance. // - options - AlertsClientGetByIDOptions contains the optional parameters for the AlertsClient.GetByID method. func (client *AlertsClient) GetByID(ctx context.Context, alertID string, options *AlertsClientGetByIDOptions) (AlertsClientGetByIDResponse, error) { + var err error + const operationName = "AlertsClient.GetByID" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByIDCreateRequest(ctx, alertID, options) if err != nil { return AlertsClientGetByIDResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertsClientGetByIDResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertsClientGetByIDResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AlertsClientGetByIDResponse{}, err } - return client.getByIDHandleResponse(resp) + resp, err := client.getByIDHandleResponse(httpResp) + return resp, err } // getByIDCreateRequest creates the GetByID request. @@ -276,18 +285,25 @@ func (client *AlertsClient) getByIDHandleResponse(resp *http.Response) (AlertsCl // - alertID - Unique ID of an alert instance. // - options - AlertsClientGetHistoryOptions contains the optional parameters for the AlertsClient.GetHistory method. func (client *AlertsClient) GetHistory(ctx context.Context, alertID string, options *AlertsClientGetHistoryOptions) (AlertsClientGetHistoryResponse, error) { + var err error + const operationName = "AlertsClient.GetHistory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getHistoryCreateRequest(ctx, alertID, options) if err != nil { return AlertsClientGetHistoryResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertsClientGetHistoryResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertsClientGetHistoryResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AlertsClientGetHistoryResponse{}, err } - return client.getHistoryHandleResponse(resp) + resp, err := client.getHistoryHandleResponse(httpResp) + return resp, err } // getHistoryCreateRequest creates the GetHistory request. @@ -330,18 +346,25 @@ func (client *AlertsClient) getHistoryHandleResponse(resp *http.Response) (Alert // For example, groupby=severity or groupby=severity,alertstate. // - options - AlertsClientGetSummaryOptions contains the optional parameters for the AlertsClient.GetSummary method. func (client *AlertsClient) GetSummary(ctx context.Context, groupby AlertsSummaryGroupByFields, options *AlertsClientGetSummaryOptions) (AlertsClientGetSummaryResponse, error) { + var err error + const operationName = "AlertsClient.GetSummary" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSummaryCreateRequest(ctx, groupby, options) if err != nil { return AlertsClientGetSummaryResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertsClientGetSummaryResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertsClientGetSummaryResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AlertsClientGetSummaryResponse{}, err } - return client.getSummaryHandleResponse(resp) + resp, err := client.getSummaryHandleResponse(httpResp) + return resp, err } // getSummaryCreateRequest creates the GetSummary request. @@ -356,41 +379,41 @@ func (client *AlertsClient) getSummaryCreateRequest(ctx context.Context, groupby return nil, err } reqQP := req.Raw().URL.Query() + if options != nil && options.AlertRule != nil { + reqQP.Set("alertRule", *options.AlertRule) + } + if options != nil && options.AlertState != nil { + reqQP.Set("alertState", string(*options.AlertState)) + } + reqQP.Set("api-version", "2019-05-05-preview") + if options != nil && options.CustomTimeRange != nil { + reqQP.Set("customTimeRange", *options.CustomTimeRange) + } reqQP.Set("groupby", string(groupby)) if options != nil && options.IncludeSmartGroupsCount != nil { reqQP.Set("includeSmartGroupsCount", strconv.FormatBool(*options.IncludeSmartGroupsCount)) } - if options != nil && options.TargetResource != nil { - reqQP.Set("targetResource", *options.TargetResource) - } - if options != nil && options.TargetResourceType != nil { - reqQP.Set("targetResourceType", *options.TargetResourceType) - } - if options != nil && options.TargetResourceGroup != nil { - reqQP.Set("targetResourceGroup", *options.TargetResourceGroup) + if options != nil && options.MonitorCondition != nil { + reqQP.Set("monitorCondition", string(*options.MonitorCondition)) } if options != nil && options.MonitorService != nil { reqQP.Set("monitorService", string(*options.MonitorService)) } - if options != nil && options.MonitorCondition != nil { - reqQP.Set("monitorCondition", string(*options.MonitorCondition)) - } if options != nil && options.Severity != nil { reqQP.Set("severity", string(*options.Severity)) } - if options != nil && options.AlertState != nil { - reqQP.Set("alertState", string(*options.AlertState)) + if options != nil && options.TargetResource != nil { + reqQP.Set("targetResource", *options.TargetResource) } - if options != nil && options.AlertRule != nil { - reqQP.Set("alertRule", *options.AlertRule) + if options != nil && options.TargetResourceGroup != nil { + reqQP.Set("targetResourceGroup", *options.TargetResourceGroup) + } + if options != nil && options.TargetResourceType != nil { + reqQP.Set("targetResourceType", *options.TargetResourceType) } if options != nil && options.TimeRange != nil { reqQP.Set("timeRange", string(*options.TimeRange)) } - if options != nil && options.CustomTimeRange != nil { - reqQP.Set("customTimeRange", *options.CustomTimeRange) - } - reqQP.Set("api-version", "2019-05-05-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -412,18 +435,25 @@ func (client *AlertsClient) getSummaryHandleResponse(resp *http.Response) (Alert // - identifier - Identification of the information to be retrieved by API call. // - options - AlertsClientMetaDataOptions contains the optional parameters for the AlertsClient.MetaData method. func (client *AlertsClient) MetaData(ctx context.Context, identifier Identifier, options *AlertsClientMetaDataOptions) (AlertsClientMetaDataResponse, error) { + var err error + const operationName = "AlertsClient.MetaData" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.metaDataCreateRequest(ctx, identifier, options) if err != nil { return AlertsClientMetaDataResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertsClientMetaDataResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertsClientMetaDataResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AlertsClientMetaDataResponse{}, err } - return client.metaDataHandleResponse(resp) + resp, err := client.metaDataHandleResponse(httpResp) + return resp, err } // metaDataCreateRequest creates the MetaData request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/assets.json new file mode 100644 index 00000000..549e6517 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/alertsmanagement/armalertsmanagement", + "Tag": "go/resourcemanager/alertsmanagement/armalertsmanagement_aa22f99525" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/autorest.md index 39aff62b..70b84c5f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/autorest.md @@ -5,10 +5,11 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/a436672b07fb1fe276c203b086b3f0e0d0c4aa24/specification/alertsmanagement/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/a436672b07fb1fe276c203b086b3f0e0d0c4aa24/specification/alertsmanagement/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/6d2438481021a94793b07b226df06d5f3c61d51d/specification/alertsmanagement/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/6d2438481021a94793b07b226df06d5f3c61d51d/specification/alertsmanagement/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.8.1 +module-version: 0.10.0 modelerfour: lenient-model-deduplication: true +tag: package-2021-08 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/build.go index 16962719..c9338b9a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/build.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/build.go @@ -2,6 +2,6 @@ // 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/alertsmanagement/armalertsmanagement +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -removeUnreferencedTypes resourcemanager/alertsmanagement/armalertsmanagement package armalertsmanagement diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/client_factory.go index 1e0e6d4c..0bff9358 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armalertsmanagement @@ -18,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. @@ -28,32 +26,66 @@ 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+".ClientFactory", 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 } +// NewAlertProcessingRulesClient creates a new instance of AlertProcessingRulesClient. func (c *ClientFactory) NewAlertProcessingRulesClient() *AlertProcessingRulesClient { - subClient, _ := NewAlertProcessingRulesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &AlertProcessingRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient +// NewAlertRuleRecommendationsClient creates a new instance of AlertRuleRecommendationsClient. +func (c *ClientFactory) NewAlertRuleRecommendationsClient() *AlertRuleRecommendationsClient { + return &AlertRuleRecommendationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewAlertsClient creates a new instance of AlertsClient. func (c *ClientFactory) NewAlertsClient() *AlertsClient { - subClient, _ := NewAlertsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &AlertsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } } +// NewPrometheusRuleGroupsClient creates a new instance of PrometheusRuleGroupsClient. +func (c *ClientFactory) NewPrometheusRuleGroupsClient() *PrometheusRuleGroupsClient { + return &PrometheusRuleGroupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSmartGroupsClient creates a new instance of SmartGroupsClient. func (c *ClientFactory) NewSmartGroupsClient() *SmartGroupsClient { - subClient, _ := NewSmartGroupsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SmartGroupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTenantActivityLogAlertsClient creates a new instance of TenantActivityLogAlertsClient. +func (c *ClientFactory) NewTenantActivityLogAlertsClient() *TenantActivityLogAlertsClient { + return &TenantActivityLogAlertsClient{ + internal: c.internal, + } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/constants.go index 3fee968e..488ee7e0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armalertsmanagement const ( - moduleName = "armalertsmanagement" - moduleVersion = "v0.8.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement" + moduleVersion = "v0.10.0" ) // ActionType - Action that should be applied. @@ -34,29 +33,29 @@ func PossibleActionTypeValues() []ActionType { type AlertModificationEvent string const ( + AlertModificationEventActionRuleSuppressed AlertModificationEvent = "ActionRuleSuppressed" + AlertModificationEventActionRuleTriggered AlertModificationEvent = "ActionRuleTriggered" + AlertModificationEventActionsFailed AlertModificationEvent = "ActionsFailed" + AlertModificationEventActionsSuppressed AlertModificationEvent = "ActionsSuppressed" + AlertModificationEventActionsTriggered AlertModificationEvent = "ActionsTriggered" AlertModificationEventAlertCreated AlertModificationEvent = "AlertCreated" - AlertModificationEventStateChange AlertModificationEvent = "StateChange" AlertModificationEventMonitorConditionChange AlertModificationEvent = "MonitorConditionChange" AlertModificationEventSeverityChange AlertModificationEvent = "SeverityChange" - AlertModificationEventActionRuleTriggered AlertModificationEvent = "ActionRuleTriggered" - AlertModificationEventActionRuleSuppressed AlertModificationEvent = "ActionRuleSuppressed" - AlertModificationEventActionsTriggered AlertModificationEvent = "ActionsTriggered" - AlertModificationEventActionsSuppressed AlertModificationEvent = "ActionsSuppressed" - AlertModificationEventActionsFailed AlertModificationEvent = "ActionsFailed" + AlertModificationEventStateChange AlertModificationEvent = "StateChange" ) // PossibleAlertModificationEventValues returns the possible values for the AlertModificationEvent const type. func PossibleAlertModificationEventValues() []AlertModificationEvent { return []AlertModificationEvent{ + AlertModificationEventActionRuleSuppressed, + AlertModificationEventActionRuleTriggered, + AlertModificationEventActionsFailed, + AlertModificationEventActionsSuppressed, + AlertModificationEventActionsTriggered, AlertModificationEventAlertCreated, - AlertModificationEventStateChange, AlertModificationEventMonitorConditionChange, AlertModificationEventSeverityChange, - AlertModificationEventActionRuleTriggered, - AlertModificationEventActionRuleSuppressed, - AlertModificationEventActionsTriggered, - AlertModificationEventActionsSuppressed, - AlertModificationEventActionsFailed, + AlertModificationEventStateChange, } } @@ -373,19 +372,19 @@ func PossibleSignalTypeValues() []SignalType { type SmartGroupModificationEvent string const ( - SmartGroupModificationEventSmartGroupCreated SmartGroupModificationEvent = "SmartGroupCreated" - SmartGroupModificationEventStateChange SmartGroupModificationEvent = "StateChange" SmartGroupModificationEventAlertAdded SmartGroupModificationEvent = "AlertAdded" SmartGroupModificationEventAlertRemoved SmartGroupModificationEvent = "AlertRemoved" + SmartGroupModificationEventSmartGroupCreated SmartGroupModificationEvent = "SmartGroupCreated" + SmartGroupModificationEventStateChange SmartGroupModificationEvent = "StateChange" ) // PossibleSmartGroupModificationEventValues returns the possible values for the SmartGroupModificationEvent const type. func PossibleSmartGroupModificationEventValues() []SmartGroupModificationEvent { return []SmartGroupModificationEvent{ - SmartGroupModificationEventSmartGroupCreated, - SmartGroupModificationEventStateChange, SmartGroupModificationEventAlertAdded, SmartGroupModificationEventAlertRemoved, + SmartGroupModificationEventSmartGroupCreated, + SmartGroupModificationEventStateChange, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/interfaces.go new file mode 100644 index 00000000..dca29e77 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/interfaces.go @@ -0,0 +1,36 @@ +//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 armalertsmanagement + +// ActionClassification provides polymorphic access to related types. +// Call the interface's GetAction() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *Action, *AddActionGroups, *RemoveAllActionGroups +type ActionClassification interface { + // GetAction returns the Action content of the underlying type. + GetAction() *Action +} + +// AlertsMetaDataPropertiesClassification provides polymorphic access to related types. +// Call the interface's GetAlertsMetaDataProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AlertsMetaDataProperties, *MonitorServiceList +type AlertsMetaDataPropertiesClassification interface { + // GetAlertsMetaDataProperties returns the AlertsMetaDataProperties content of the underlying type. + GetAlertsMetaDataProperties() *AlertsMetaDataProperties +} + +// RecurrenceClassification provides polymorphic access to related types. +// Call the interface's GetRecurrence() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *DailyRecurrence, *MonthlyRecurrence, *Recurrence, *WeeklyRecurrence +type RecurrenceClassification interface { + // GetRecurrence returns the Recurrence content of the underlying type. + GetRecurrence() *Recurrence +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/models.go index 6f6df9bd..55e3b9f7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/models.go @@ -3,23 +3,13 @@ // 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. +// 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. -// DO NOT EDIT. package armalertsmanagement import "time" -// ActionClassification provides polymorphic access to related types. -// Call the interface's GetAction() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *Action, *AddActionGroups, *RemoveAllActionGroups -type ActionClassification interface { - // GetAction returns the Action content of the underlying type. - GetAction() *Action -} - // Action to be applied. type Action struct { // REQUIRED; Action that should be applied. @@ -29,6 +19,24 @@ type Action struct { // GetAction implements the ActionClassification interface for type Action. func (a *Action) GetAction() *Action { return a } +// ActionGroup - A pointer to an Azure Action Group. +type ActionGroup struct { + // REQUIRED; The resource ID of the Action Group. This cannot be null or empty. + ActionGroupID *string + + // Predefined list of properties and configuration items for the action group. + ActionProperties map[string]*string + + // the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload. + WebhookProperties map[string]*string +} + +// ActionList - A list of Activity Log Alert rule actions. +type ActionList struct { + // The list of the Action Groups. + ActionGroups []*ActionGroup +} + // ActionStatus - Action status type ActionStatus struct { // Value indicating whether alert is suppressed. @@ -160,40 +168,6 @@ type AlertProcessingRuleProperties struct { Schedule *Schedule } -// AlertProcessingRulesClientCreateOrUpdateOptions contains the optional parameters for the AlertProcessingRulesClient.CreateOrUpdate -// method. -type AlertProcessingRulesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AlertProcessingRulesClientDeleteOptions contains the optional parameters for the AlertProcessingRulesClient.Delete method. -type AlertProcessingRulesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// AlertProcessingRulesClientGetByNameOptions contains the optional parameters for the AlertProcessingRulesClient.GetByName -// method. -type AlertProcessingRulesClientGetByNameOptions struct { - // placeholder for future optional parameters -} - -// AlertProcessingRulesClientListByResourceGroupOptions contains the optional parameters for the AlertProcessingRulesClient.NewListByResourceGroupPager -// method. -type AlertProcessingRulesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// AlertProcessingRulesClientListBySubscriptionOptions contains the optional parameters for the AlertProcessingRulesClient.NewListBySubscriptionPager -// method. -type AlertProcessingRulesClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// AlertProcessingRulesClientUpdateOptions contains the optional parameters for the AlertProcessingRulesClient.Update method. -type AlertProcessingRulesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // AlertProcessingRulesList - List of alert processing rules. type AlertProcessingRulesList struct { // URL to fetch the next set of alert processing rules. @@ -215,96 +189,113 @@ type AlertProperties struct { EgressConfig any } -// AlertsClientChangeStateOptions contains the optional parameters for the AlertsClient.ChangeState method. -type AlertsClientChangeStateOptions struct { - // reason of change alert state - Comment *string +// AlertRuleAllOfCondition - An Activity Log Alert rule condition that is met when all its member conditions are met. +type AlertRuleAllOfCondition struct { + // REQUIRED; The list of Activity Log Alert rule conditions. + AllOf []*AlertRuleAnyOfOrLeafCondition } -// AlertsClientGetAllOptions contains the optional parameters for the AlertsClient.NewGetAllPager method. -type AlertsClientGetAllOptions struct { - // Filter by specific alert rule. Default value is to select all. - AlertRule *string - // Filter by state of the alert instance. Default value is to select all. - AlertState *AlertState - // Filter by custom time range in the format / where time is in (ISO-8601 format)'. Permissible values is within 30 days from - // query time. Either timeRange or customTimeRange could be used but not both. - // Default is none. - CustomTimeRange *string - // Include context which has contextual data specific to the monitor service. Default value is false' - IncludeContext *bool - // Include egress config which would be used for displaying the content in portal. Default value is 'false'. - IncludeEgressConfig *bool - // Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all. - MonitorCondition *MonitorCondition - // Filter by monitor service which generates the alert instance. Default value is select all. - MonitorService *MonitorService - // Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the "includeContent" - // filter is selected, maximum value allowed is 25. Default value is 25. - PageCount *int64 - // This filter allows to selection of the fields(comma separated) which would be part of the essential section. This would - // allow to project only the required fields rather than getting entire content. - // Default is to fetch all the fields in the essentials section. - Select *string - // Filter by severity. Default value is select all. - Severity *Severity - // Filter the alerts list by the Smart Group Id. Default value is none. - SmartGroupID *string - // Sort the query results by input field, Default value is 'lastModifiedDateTime'. - SortBy *AlertsSortByFields - // Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others. - SortOrder *SortOrder - // Filter by target resource( which is full ARM ID) Default value is select all. - TargetResource *string - // Filter by target resource group name. Default value is select all. - TargetResourceGroup *string - // Filter by target resource type. Default value is select all. - TargetResourceType *string - // Filter by time range by below listed values. Default value is 1 day. - TimeRange *TimeRange +// AlertRuleAnyOfOrLeafCondition - An Activity Log Alert rule condition that is met when all its member conditions are met. +// Each condition can be of one of the following types:Important: Each type has its unique subset of properties. +// Properties from different types CANNOT exist in one condition. +// * Leaf Condition - must contain 'field' and either 'equals' or 'containsAny'.Please note, 'anyOf' should not be set in +// a Leaf Condition. +// * AnyOf Condition - must contain only 'anyOf' (which is an array of Leaf Conditions).Please note, 'field', 'equals' and +// 'containsAny' should not be set in an AnyOf Condition. +type AlertRuleAnyOfOrLeafCondition struct { + // An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met. + AnyOf []*AlertRuleLeafCondition + + // The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition + // is met. + ContainsAny []*string + + // The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met. + Equals *string + + // The name of the Activity Log event's field that this condition will examine. The possible values for this field are (case-insensitive): + // 'resourceId', 'category', 'caller', 'level', 'operationName', + // 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'. + Field *string } -// AlertsClientGetByIDOptions contains the optional parameters for the AlertsClient.GetByID method. -type AlertsClientGetByIDOptions struct { - // placeholder for future optional parameters +// AlertRuleLeafCondition - An Activity Log Alert rule condition that is met by comparing the field and value of an Activity +// Log event. This condition must contain 'field' and either 'equals' or 'containsAny'. +type AlertRuleLeafCondition struct { + // The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition + // is met. + ContainsAny []*string + + // The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met. + Equals *string + + // The name of the Activity Log event's field that this condition will examine. The possible values for this field are (case-insensitive): + // 'resourceId', 'category', 'caller', 'level', 'operationName', + // 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'. + Field *string } -// AlertsClientGetHistoryOptions contains the optional parameters for the AlertsClient.GetHistory method. -type AlertsClientGetHistoryOptions struct { - // placeholder for future optional parameters +// AlertRuleProperties - An Azure Activity Log Alert rule. +type AlertRuleProperties struct { + // REQUIRED; The actions that will activate when the condition is met. + Actions *ActionList + + // REQUIRED; The condition that will cause this alert to activate. + Condition *AlertRuleAllOfCondition + + // A description of this Activity Log Alert rule. + Description *string + + // Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its + // actions will be activated. + Enabled *bool + + // A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs + // that fall under one of these prefixes. This list must include at least one + // item. + Scopes []*string + + // The tenant GUID. Must be provided for tenant-level and management group events rules. + TenantScope *string } -// AlertsClientGetSummaryOptions contains the optional parameters for the AlertsClient.GetSummary method. -type AlertsClientGetSummaryOptions struct { - // Filter by specific alert rule. Default value is to select all. - AlertRule *string - // Filter by state of the alert instance. Default value is to select all. - AlertState *AlertState - // Filter by custom time range in the format / where time is in (ISO-8601 format)'. Permissible values is within 30 days from - // query time. Either timeRange or customTimeRange could be used but not both. - // Default is none. - CustomTimeRange *string - // Include count of the SmartGroups as part of the summary. Default value is 'false'. - IncludeSmartGroupsCount *bool - // Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all. - MonitorCondition *MonitorCondition - // Filter by monitor service which generates the alert instance. Default value is select all. - MonitorService *MonitorService - // Filter by severity. Default value is select all. - Severity *Severity - // Filter by target resource( which is full ARM ID) Default value is select all. - TargetResource *string - // Filter by target resource group name. Default value is select all. - TargetResourceGroup *string - // Filter by target resource type. Default value is select all. - TargetResourceType *string - // Filter by time range by below listed values. Default value is 1 day. - TimeRange *TimeRange +// AlertRuleRecommendationProperties - Describes the format of Alert Rule Recommendations response. +type AlertRuleRecommendationProperties struct { + // REQUIRED; The recommendation alert rule type. + AlertRuleType *string + + // REQUIRED; A dictionary that provides the display information for an alert rule recommendation. + DisplayInformation map[string]*string + + // REQUIRED; A complete ARM template to deploy the alert rules. + RuleArmTemplate *RuleArmTemplate } -// AlertsClientMetaDataOptions contains the optional parameters for the AlertsClient.MetaData method. -type AlertsClientMetaDataOptions struct { - // placeholder for future optional parameters +// AlertRuleRecommendationResource - A single alert rule recommendation resource. +type AlertRuleRecommendationResource struct { + // REQUIRED; recommendation properties. + Properties *AlertRuleRecommendationProperties + + // 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 +} + +// AlertRuleRecommendationsListResponse - List of alert rule recommendations. +type AlertRuleRecommendationsListResponse struct { + // REQUIRED; the values for the alert rule recommendations. + Value []*AlertRuleRecommendationResource + + // URL to fetch the next set of recommendations. + NextLink *string } // AlertsList - List the alerts. @@ -322,15 +313,6 @@ type AlertsMetaData struct { Properties AlertsMetaDataPropertiesClassification } -// AlertsMetaDataPropertiesClassification provides polymorphic access to related types. -// Call the interface's GetAlertsMetaDataProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AlertsMetaDataProperties, *MonitorServiceList -type AlertsMetaDataPropertiesClassification interface { - // GetAlertsMetaDataProperties returns the AlertsMetaDataProperties content of the underlying type. - GetAlertsMetaDataProperties() *AlertsMetaDataProperties -} - // AlertsMetaDataProperties - alert meta data property bag type AlertsMetaDataProperties struct { // REQUIRED; Identification of the information to be retrieved by API call @@ -385,6 +367,11 @@ type AlertsSummaryGroupItem struct { Values []*AlertsSummaryGroupItem } +// Comments - Change alert state reason +type Comments struct { + Comments *string +} + // Condition to trigger an alert processing rule. type Condition struct { // Field for a given condition. @@ -412,75 +399,12 @@ type DailyRecurrence struct { // GetRecurrence implements the RecurrenceClassification interface for type DailyRecurrence. func (d *DailyRecurrence) GetRecurrence() *Recurrence { return &Recurrence{ + EndTime: d.EndTime, RecurrenceType: d.RecurrenceType, StartTime: d.StartTime, - EndTime: d.EndTime, } } -// ErrorResponse - An error response from the service. -type ErrorResponse struct { - // Details of error response. - Error *ErrorResponseBody -} - -// ErrorResponseAutoGenerated - An error response from the service. -type ErrorResponseAutoGenerated struct { - // Details of error response. - Error *ErrorResponseBodyAutoGenerated -} - -// ErrorResponseAutoGenerated2 - An error response from the service. -type ErrorResponseAutoGenerated2 struct { - // Details of error response. - Error *ErrorResponseBodyAutoGenerated2 -} - -// ErrorResponseBody - Details of error response. -type ErrorResponseBody struct { - // Error code, intended to be consumed programmatically. - Code *string - - // A list of additional details about the error. - Details []*ErrorResponseBody - - // Description of the error, intended for display in user interface. - Message *string - - // Target of the particular error, for example name of the property. - Target *string -} - -// ErrorResponseBodyAutoGenerated - Details of error response. -type ErrorResponseBodyAutoGenerated struct { - // Error code, intended to be consumed programmatically. - Code *string - - // A list of additional details about the error. - Details []*ErrorResponseBodyAutoGenerated - - // Description of the error, intended for display in user interface. - Message *string - - // Target of the particular error, for example name of the property. - Target *string -} - -// ErrorResponseBodyAutoGenerated2 - Details of error response. -type ErrorResponseBodyAutoGenerated2 struct { - // Error code, intended to be consumed programmatically. - Code *string - - // A list of additional details about the error. - Details []*ErrorResponseBodyAutoGenerated2 - - // Description of the error, intended for display in user interface. - Message *string - - // Target of the particular error, for example name of the property. - Target *string -} - // Essentials - This object contains consistent fields across different monitor services. type Essentials struct { // Action status @@ -546,24 +470,6 @@ type Essentials struct { StartDateTime *time.Time } -// ManagedResource - An azure managed resource object. -type ManagedResource struct { - // REQUIRED; Resource location - Location *string - - // Resource tags - Tags map[string]*string - - // READ-ONLY; Azure resource Id - ID *string - - // READ-ONLY; Azure resource name - Name *string - - // READ-ONLY; Azure resource type - Type *string -} - // MonitorServiceDetails - Details of a monitor service type MonitorServiceDetails struct { // Monitor service display name @@ -607,9 +513,9 @@ type MonthlyRecurrence struct { // GetRecurrence implements the RecurrenceClassification interface for type MonthlyRecurrence. func (m *MonthlyRecurrence) GetRecurrence() *Recurrence { return &Recurrence{ + EndTime: m.EndTime, RecurrenceType: m.RecurrenceType, StartTime: m.StartTime, - EndTime: m.EndTime, } } @@ -640,11 +546,6 @@ type OperationDisplay struct { Resource *string } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // OperationsList - Lists the operations available in the AlertsManagement RP. type OperationsList struct { // REQUIRED; Array of operations @@ -669,13 +570,121 @@ type PatchProperties struct { Enabled *bool } -// RecurrenceClassification provides polymorphic access to related types. -// Call the interface's GetRecurrence() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *DailyRecurrence, *MonthlyRecurrence, *Recurrence, *WeeklyRecurrence -type RecurrenceClassification interface { - // GetRecurrence returns the Recurrence content of the underlying type. - GetRecurrence() *Recurrence +type PrometheusRule struct { + // REQUIRED; the expression to run for the rule. + Expression *string + + // The array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. Only + // relevant for alerts. + Actions []*PrometheusRuleGroupAction + + // the name of the alert rule. + Alert *string + + // annotations for rule group. Only relevant for alerts. + Annotations map[string]*string + + // the flag that indicates whether the Prometheus rule is enabled. + Enabled *bool + + // the amount of time alert must be active before firing. Only relevant for alerts. + For *string + + // labels for rule group. Only relevant for alerts. + Labels map[string]*string + + // the name of the recording rule. + Record *string + + // defines the configuration for resolving fired alerts. Only relevant for alerts. + ResolveConfiguration *PrometheusRuleResolveConfiguration + + // the severity of the alerts fired by the rule. Only relevant for alerts. + Severity *int32 +} + +// PrometheusRuleGroupAction - An alert action. Only relevant for alerts. +type PrometheusRuleGroupAction struct { + // The resource id of the action group to use. + ActionGroupID *string + + // The properties of an action group object. + ActionProperties map[string]*string +} + +// PrometheusRuleGroupProperties - An alert rule. +type PrometheusRuleGroupProperties struct { + // REQUIRED; defines the rules in the Prometheus rule group. + Rules []*PrometheusRule + + // REQUIRED; the list of resource id's that this rule group is scoped to. + Scopes []*string + + // the cluster name of the rule group evaluation. + ClusterName *string + + // the description of the Prometheus rule group that will be included in the alert email. + Description *string + + // the flag that indicates whether the Prometheus rule group is enabled. + Enabled *bool + + // the interval in which to run the Prometheus rule group represented in ISO 8601 duration format. Should be between 1 and + // 15 minutes + Interval *string +} + +// PrometheusRuleGroupResource - The Prometheus rule group resource. +type PrometheusRuleGroupResource struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; The Prometheus rule group properties of the resource. + Properties *PrometheusRuleGroupProperties + + // 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 +} + +// PrometheusRuleGroupResourceCollection - Represents a collection of alert rule resources. +type PrometheusRuleGroupResourceCollection struct { + // the values for the alert rule resources. + Value []*PrometheusRuleGroupResource +} + +// PrometheusRuleGroupResourcePatch - The Prometheus rule group resource for patch operations. +type PrometheusRuleGroupResourcePatch struct { + Properties *PrometheusRuleGroupResourcePatchProperties + + // Resource tags + Tags map[string]*string +} + +type PrometheusRuleGroupResourcePatchProperties struct { + // the flag that indicates whether the Prometheus rule group is enabled. + Enabled *bool +} + +// PrometheusRuleResolveConfiguration - Specifies the Prometheus alert rule configuration. +type PrometheusRuleResolveConfiguration struct { + // the flag that indicates whether or not to auto resolve a fired alert. + AutoResolved *bool + + // the duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration + // format. Should be between 1 and 15 minutes + TimeToResolve *string } // Recurrence object. @@ -706,16 +715,22 @@ func (r *RemoveAllActionGroups) GetAction() *Action { } } -// Resource - An azure resource object -type Resource struct { - // READ-ONLY; Azure resource Id - ID *string +// RuleArmTemplate - A complete ARM template to deploy the alert rules. +type RuleArmTemplate struct { + // REQUIRED; A 4 number format for the version number of this template file. For example, 1.0.0.0 + ContentVersion *string - // READ-ONLY; Azure resource name - Name *string + // REQUIRED; Input parameter definitions + Parameters any - // READ-ONLY; Azure resource type - Type *string + // REQUIRED; Alert rule resource definitions + Resources []any + + // REQUIRED; JSON schema reference + Schema *string + + // REQUIRED; Variable definitions + Variables any } // Schedule - Scheduling configuration for a given alert processing rule. @@ -853,48 +868,6 @@ type SmartGroupProperties struct { StartDateTime *time.Time } -// SmartGroupsClientChangeStateOptions contains the optional parameters for the SmartGroupsClient.ChangeState method. -type SmartGroupsClientChangeStateOptions struct { - // placeholder for future optional parameters -} - -// SmartGroupsClientGetAllOptions contains the optional parameters for the SmartGroupsClient.NewGetAllPager method. -type SmartGroupsClientGetAllOptions struct { - // Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all. - MonitorCondition *MonitorCondition - // Filter by monitor service which generates the alert instance. Default value is select all. - MonitorService *MonitorService - // Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the "includeContent" - // filter is selected, maximum value allowed is 25. Default value is 25. - PageCount *int64 - // Filter by severity. Default value is select all. - Severity *Severity - // Filter by state of the smart group. Default value is to select all. - SmartGroupState *AlertState - // Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'. - SortBy *SmartGroupsSortByFields - // Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others. - SortOrder *SortOrder - // Filter by target resource( which is full ARM ID) Default value is select all. - TargetResource *string - // Filter by target resource group name. Default value is select all. - TargetResourceGroup *string - // Filter by target resource type. Default value is select all. - TargetResourceType *string - // Filter by time range by below listed values. Default value is 1 day. - TimeRange *TimeRange -} - -// SmartGroupsClientGetByIDOptions contains the optional parameters for the SmartGroupsClient.GetByID method. -type SmartGroupsClientGetByIDOptions struct { - // placeholder for future optional parameters -} - -// SmartGroupsClientGetHistoryOptions contains the optional parameters for the SmartGroupsClient.GetHistory method. -type SmartGroupsClientGetHistoryOptions struct { - // placeholder for future optional parameters -} - // SmartGroupsList - List the alerts. type SmartGroupsList struct { // URL to fetch the next set of alerts. @@ -925,6 +898,53 @@ type SystemData struct { LastModifiedByType *CreatedByType } +// TenantActivityLogAlertResource - A Tenant Activity Log Alert rule resource. +type TenantActivityLogAlertResource struct { + // REQUIRED; The Activity Log Alert rule properties of the resource. + Properties *AlertRuleProperties + + // The location of the resource. Since Azure Activity Log Alerts is a global service, the location of the rules should always + // be 'global'. + Location *string + + // The tags of the resource. + Tags map[string]*string + + // READ-ONLY; The resource Id. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; The type of the resource. + Type *string +} + +// TenantAlertRuleList - A list of Tenant Activity Log Alert rules. +type TenantAlertRuleList struct { + // Provides the link to retrieve the next set of elements. + NextLink *string + + // The list of Tenant Activity Log Alert rules. + Value []*TenantActivityLogAlertResource +} + +// TenantAlertRulePatchObject - An Activity Log Alert rule object for the body of patch operations. +type TenantAlertRulePatchObject struct { + // The activity log alert settings for an update operation. + Properties *TenantAlertRulePatchProperties + + // The resource tags + Tags map[string]*string +} + +// TenantAlertRulePatchProperties - An Activity Log Alert rule properties for patch operations. +type TenantAlertRulePatchProperties struct { + // Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its + // actions will be activated. + Enabled *bool +} + // WeeklyRecurrence - Weekly recurrence object. type WeeklyRecurrence struct { // REQUIRED; Specifies the values for weekly recurrence pattern. @@ -943,8 +963,8 @@ type WeeklyRecurrence struct { // GetRecurrence implements the RecurrenceClassification interface for type WeeklyRecurrence. func (w *WeeklyRecurrence) GetRecurrence() *Recurrence { return &Recurrence{ + EndTime: w.EndTime, RecurrenceType: w.RecurrenceType, StartTime: w.StartTime, - EndTime: w.EndTime, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/models_serde.go index 3832d501..5d77ba38 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armalertsmanagement @@ -43,6 +42,68 @@ func (a *Action) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ActionGroup. +func (a ActionGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionGroupId", a.ActionGroupID) + populate(objectMap, "actionProperties", a.ActionProperties) + populate(objectMap, "webhookProperties", a.WebhookProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ActionGroup. +func (a *ActionGroup) UnmarshalJSON(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 "actionGroupId": + err = unpopulate(val, "ActionGroupID", &a.ActionGroupID) + delete(rawMsg, key) + case "actionProperties": + err = unpopulate(val, "ActionProperties", &a.ActionProperties) + delete(rawMsg, key) + case "webhookProperties": + err = unpopulate(val, "WebhookProperties", &a.WebhookProperties) + 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 ActionList. +func (a ActionList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionGroups", a.ActionGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ActionList. +func (a *ActionList) UnmarshalJSON(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 "actionGroups": + err = unpopulate(val, "ActionGroups", &a.ActionGroups) + 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 ActionStatus. func (a ActionStatus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -425,6 +486,263 @@ func (a *AlertProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AlertRuleAllOfCondition. +func (a AlertRuleAllOfCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allOf", a.AllOf) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AlertRuleAllOfCondition. +func (a *AlertRuleAllOfCondition) UnmarshalJSON(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 "allOf": + err = unpopulate(val, "AllOf", &a.AllOf) + 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 AlertRuleAnyOfOrLeafCondition. +func (a AlertRuleAnyOfOrLeafCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "anyOf", a.AnyOf) + populate(objectMap, "containsAny", a.ContainsAny) + populate(objectMap, "equals", a.Equals) + populate(objectMap, "field", a.Field) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AlertRuleAnyOfOrLeafCondition. +func (a *AlertRuleAnyOfOrLeafCondition) UnmarshalJSON(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 "anyOf": + err = unpopulate(val, "AnyOf", &a.AnyOf) + delete(rawMsg, key) + case "containsAny": + err = unpopulate(val, "ContainsAny", &a.ContainsAny) + delete(rawMsg, key) + case "equals": + err = unpopulate(val, "Equals", &a.Equals) + delete(rawMsg, key) + case "field": + err = unpopulate(val, "Field", &a.Field) + 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 AlertRuleLeafCondition. +func (a AlertRuleLeafCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containsAny", a.ContainsAny) + populate(objectMap, "equals", a.Equals) + populate(objectMap, "field", a.Field) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AlertRuleLeafCondition. +func (a *AlertRuleLeafCondition) UnmarshalJSON(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 "containsAny": + err = unpopulate(val, "ContainsAny", &a.ContainsAny) + delete(rawMsg, key) + case "equals": + err = unpopulate(val, "Equals", &a.Equals) + delete(rawMsg, key) + case "field": + err = unpopulate(val, "Field", &a.Field) + 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 AlertRuleProperties. +func (a AlertRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actions", a.Actions) + populate(objectMap, "condition", a.Condition) + populate(objectMap, "description", a.Description) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "scopes", a.Scopes) + populate(objectMap, "tenantScope", a.TenantScope) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AlertRuleProperties. +func (a *AlertRuleProperties) UnmarshalJSON(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 "actions": + err = unpopulate(val, "Actions", &a.Actions) + delete(rawMsg, key) + case "condition": + err = unpopulate(val, "Condition", &a.Condition) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "scopes": + err = unpopulate(val, "Scopes", &a.Scopes) + delete(rawMsg, key) + case "tenantScope": + err = unpopulate(val, "TenantScope", &a.TenantScope) + 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 AlertRuleRecommendationProperties. +func (a AlertRuleRecommendationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "alertRuleType", a.AlertRuleType) + populate(objectMap, "displayInformation", a.DisplayInformation) + populate(objectMap, "ruleArmTemplate", a.RuleArmTemplate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AlertRuleRecommendationProperties. +func (a *AlertRuleRecommendationProperties) UnmarshalJSON(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 "alertRuleType": + err = unpopulate(val, "AlertRuleType", &a.AlertRuleType) + delete(rawMsg, key) + case "displayInformation": + err = unpopulate(val, "DisplayInformation", &a.DisplayInformation) + delete(rawMsg, key) + case "ruleArmTemplate": + err = unpopulate(val, "RuleArmTemplate", &a.RuleArmTemplate) + 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 AlertRuleRecommendationResource. +func (a AlertRuleRecommendationResource) 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, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AlertRuleRecommendationResource. +func (a *AlertRuleRecommendationResource) UnmarshalJSON(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 "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + 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 AlertRuleRecommendationsListResponse. +func (a AlertRuleRecommendationsListResponse) 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 AlertRuleRecommendationsListResponse. +func (a *AlertRuleRecommendationsListResponse) UnmarshalJSON(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 AlertsList. func (a AlertsList) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -627,6 +945,33 @@ func (a *AlertsSummaryGroupItem) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type Comments. +func (c Comments) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "comments", c.Comments) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Comments. +func (c *Comments) UnmarshalJSON(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 "comments": + err = unpopulate(val, "Comments", &c.Comments) + 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 Condition. func (c Condition) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -697,222 +1042,24 @@ func (d *DailyRecurrence) UnmarshalJSON(data []byte) error { 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 ErrorResponseAutoGenerated. -func (e ErrorResponseAutoGenerated) 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 ErrorResponseAutoGenerated. -func (e *ErrorResponseAutoGenerated) UnmarshalJSON(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 ErrorResponseAutoGenerated2. -func (e ErrorResponseAutoGenerated2) 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 ErrorResponseAutoGenerated2. -func (e *ErrorResponseAutoGenerated2) UnmarshalJSON(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 ErrorResponseBody. -func (e ErrorResponseBody) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - 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 ErrorResponseBody. -func (e *ErrorResponseBody) UnmarshalJSON(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 "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 ErrorResponseBodyAutoGenerated. -func (e ErrorResponseBodyAutoGenerated) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - 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 ErrorResponseBodyAutoGenerated. -func (e *ErrorResponseBodyAutoGenerated) UnmarshalJSON(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 "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 ErrorResponseBodyAutoGenerated2. -func (e ErrorResponseBodyAutoGenerated2) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - 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 ErrorResponseBodyAutoGenerated2. -func (e *ErrorResponseBodyAutoGenerated2) UnmarshalJSON(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 "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 Essentials. -func (e Essentials) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Essentials. +func (e Essentials) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "actionStatus", e.ActionStatus) populate(objectMap, "alertRule", e.AlertRule) populate(objectMap, "alertState", e.AlertState) populate(objectMap, "description", e.Description) - populateTimeRFC3339(objectMap, "lastModifiedDateTime", e.LastModifiedDateTime) + populateDateTimeRFC3339(objectMap, "lastModifiedDateTime", e.LastModifiedDateTime) populate(objectMap, "lastModifiedUserName", e.LastModifiedUserName) populate(objectMap, "monitorCondition", e.MonitorCondition) - populateTimeRFC3339(objectMap, "monitorConditionResolvedDateTime", e.MonitorConditionResolvedDateTime) + populateDateTimeRFC3339(objectMap, "monitorConditionResolvedDateTime", e.MonitorConditionResolvedDateTime) populate(objectMap, "monitorService", e.MonitorService) populate(objectMap, "severity", e.Severity) populate(objectMap, "signalType", e.SignalType) populate(objectMap, "smartGroupId", e.SmartGroupID) populate(objectMap, "smartGroupingReason", e.SmartGroupingReason) populate(objectMap, "sourceCreatedId", e.SourceCreatedID) - populateTimeRFC3339(objectMap, "startDateTime", e.StartDateTime) + populateDateTimeRFC3339(objectMap, "startDateTime", e.StartDateTime) populate(objectMap, "targetResource", e.TargetResource) populate(objectMap, "targetResourceGroup", e.TargetResourceGroup) populate(objectMap, "targetResourceName", e.TargetResourceName) @@ -942,7 +1089,7 @@ func (e *Essentials) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Description", &e.Description) delete(rawMsg, key) case "lastModifiedDateTime": - err = unpopulateTimeRFC3339(val, "LastModifiedDateTime", &e.LastModifiedDateTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedDateTime", &e.LastModifiedDateTime) delete(rawMsg, key) case "lastModifiedUserName": err = unpopulate(val, "LastModifiedUserName", &e.LastModifiedUserName) @@ -951,7 +1098,7 @@ func (e *Essentials) UnmarshalJSON(data []byte) error { err = unpopulate(val, "MonitorCondition", &e.MonitorCondition) delete(rawMsg, key) case "monitorConditionResolvedDateTime": - err = unpopulateTimeRFC3339(val, "MonitorConditionResolvedDateTime", &e.MonitorConditionResolvedDateTime) + err = unpopulateDateTimeRFC3339(val, "MonitorConditionResolvedDateTime", &e.MonitorConditionResolvedDateTime) delete(rawMsg, key) case "monitorService": err = unpopulate(val, "MonitorService", &e.MonitorService) @@ -972,7 +1119,7 @@ func (e *Essentials) UnmarshalJSON(data []byte) error { err = unpopulate(val, "SourceCreatedID", &e.SourceCreatedID) delete(rawMsg, key) case "startDateTime": - err = unpopulateTimeRFC3339(val, "StartDateTime", &e.StartDateTime) + err = unpopulateDateTimeRFC3339(val, "StartDateTime", &e.StartDateTime) delete(rawMsg, key) case "targetResource": err = unpopulate(val, "TargetResource", &e.TargetResource) @@ -994,49 +1141,6 @@ func (e *Essentials) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedResource. -func (m ManagedResource) 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, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedResource. -func (m *ManagedResource) UnmarshalJSON(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 "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 MonitorServiceDetails. func (m MonitorServiceDetails) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1301,6 +1405,314 @@ func (p *PatchProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type PrometheusRule. +func (p PrometheusRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actions", p.Actions) + populate(objectMap, "alert", p.Alert) + populate(objectMap, "annotations", p.Annotations) + populate(objectMap, "enabled", p.Enabled) + populate(objectMap, "expression", p.Expression) + populate(objectMap, "for", p.For) + populate(objectMap, "labels", p.Labels) + populate(objectMap, "record", p.Record) + populate(objectMap, "resolveConfiguration", p.ResolveConfiguration) + populate(objectMap, "severity", p.Severity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrometheusRule. +func (p *PrometheusRule) UnmarshalJSON(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 "actions": + err = unpopulate(val, "Actions", &p.Actions) + delete(rawMsg, key) + case "alert": + err = unpopulate(val, "Alert", &p.Alert) + delete(rawMsg, key) + case "annotations": + err = unpopulate(val, "Annotations", &p.Annotations) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &p.Enabled) + delete(rawMsg, key) + case "expression": + err = unpopulate(val, "Expression", &p.Expression) + delete(rawMsg, key) + case "for": + err = unpopulate(val, "For", &p.For) + delete(rawMsg, key) + case "labels": + err = unpopulate(val, "Labels", &p.Labels) + delete(rawMsg, key) + case "record": + err = unpopulate(val, "Record", &p.Record) + delete(rawMsg, key) + case "resolveConfiguration": + err = unpopulate(val, "ResolveConfiguration", &p.ResolveConfiguration) + delete(rawMsg, key) + case "severity": + err = unpopulate(val, "Severity", &p.Severity) + 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 PrometheusRuleGroupAction. +func (p PrometheusRuleGroupAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionGroupId", p.ActionGroupID) + populate(objectMap, "actionProperties", p.ActionProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrometheusRuleGroupAction. +func (p *PrometheusRuleGroupAction) UnmarshalJSON(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 "actionGroupId": + err = unpopulate(val, "ActionGroupID", &p.ActionGroupID) + delete(rawMsg, key) + case "actionProperties": + err = unpopulate(val, "ActionProperties", &p.ActionProperties) + 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 PrometheusRuleGroupProperties. +func (p PrometheusRuleGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clusterName", p.ClusterName) + populate(objectMap, "description", p.Description) + populate(objectMap, "enabled", p.Enabled) + populate(objectMap, "interval", p.Interval) + populate(objectMap, "rules", p.Rules) + populate(objectMap, "scopes", p.Scopes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrometheusRuleGroupProperties. +func (p *PrometheusRuleGroupProperties) UnmarshalJSON(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 "clusterName": + err = unpopulate(val, "ClusterName", &p.ClusterName) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &p.Enabled) + delete(rawMsg, key) + case "interval": + err = unpopulate(val, "Interval", &p.Interval) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &p.Rules) + delete(rawMsg, key) + case "scopes": + err = unpopulate(val, "Scopes", &p.Scopes) + 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 PrometheusRuleGroupResource. +func (p PrometheusRuleGroupResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + 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 PrometheusRuleGroupResource. +func (p *PrometheusRuleGroupResource) UnmarshalJSON(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 "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + 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", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrometheusRuleGroupResourceCollection. +func (p PrometheusRuleGroupResourceCollection) 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 PrometheusRuleGroupResourceCollection. +func (p *PrometheusRuleGroupResourceCollection) UnmarshalJSON(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 PrometheusRuleGroupResourcePatch. +func (p PrometheusRuleGroupResourcePatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrometheusRuleGroupResourcePatch. +func (p *PrometheusRuleGroupResourcePatch) UnmarshalJSON(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 "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + 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 PrometheusRuleGroupResourcePatchProperties. +func (p PrometheusRuleGroupResourcePatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", p.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrometheusRuleGroupResourcePatchProperties. +func (p *PrometheusRuleGroupResourcePatchProperties) UnmarshalJSON(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 "enabled": + err = unpopulate(val, "Enabled", &p.Enabled) + 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 PrometheusRuleResolveConfiguration. +func (p PrometheusRuleResolveConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoResolved", p.AutoResolved) + populate(objectMap, "timeToResolve", p.TimeToResolve) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrometheusRuleResolveConfiguration. +func (p *PrometheusRuleResolveConfiguration) UnmarshalJSON(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 "autoResolved": + err = unpopulate(val, "AutoResolved", &p.AutoResolved) + delete(rawMsg, key) + case "timeToResolve": + err = unpopulate(val, "TimeToResolve", &p.TimeToResolve) + 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 Recurrence. func (r Recurrence) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1363,17 +1775,19 @@ func (r *RemoveAllActionGroups) UnmarshalJSON(data []byte) error { 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 RuleArmTemplate. +func (r RuleArmTemplate) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "type", r.Type) + populate(objectMap, "contentVersion", r.ContentVersion) + populateAny(objectMap, "parameters", r.Parameters) + populate(objectMap, "resources", r.Resources) + populate(objectMap, "$schema", r.Schema) + populateAny(objectMap, "variables", r.Variables) 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 RuleArmTemplate. +func (r *RuleArmTemplate) UnmarshalJSON(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) @@ -1381,14 +1795,20 @@ func (r *Resource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) + case "contentVersion": + err = unpopulate(val, "ContentVersion", &r.ContentVersion) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) + case "parameters": + err = unpopulate(val, "Parameters", &r.Parameters) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) + case "resources": + err = unpopulate(val, "Resources", &r.Resources) + delete(rawMsg, key) + case "$schema": + err = unpopulate(val, "Schema", &r.Schema) + delete(rawMsg, key) + case "variables": + err = unpopulate(val, "Variables", &r.Variables) delete(rawMsg, key) } if err != nil { @@ -1638,7 +2058,7 @@ func (s SmartGroupProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "alertSeverities", s.AlertSeverities) populate(objectMap, "alertStates", s.AlertStates) populate(objectMap, "alertsCount", s.AlertsCount) - populateTimeRFC3339(objectMap, "lastModifiedDateTime", s.LastModifiedDateTime) + populateDateTimeRFC3339(objectMap, "lastModifiedDateTime", s.LastModifiedDateTime) populate(objectMap, "lastModifiedUserName", s.LastModifiedUserName) populate(objectMap, "monitorConditions", s.MonitorConditions) populate(objectMap, "monitorServices", s.MonitorServices) @@ -1648,7 +2068,7 @@ func (s SmartGroupProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "resources", s.Resources) populate(objectMap, "severity", s.Severity) populate(objectMap, "smartGroupState", s.SmartGroupState) - populateTimeRFC3339(objectMap, "startDateTime", s.StartDateTime) + populateDateTimeRFC3339(objectMap, "startDateTime", s.StartDateTime) return json.Marshal(objectMap) } @@ -1671,7 +2091,7 @@ func (s *SmartGroupProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AlertsCount", &s.AlertsCount) delete(rawMsg, key) case "lastModifiedDateTime": - err = unpopulateTimeRFC3339(val, "LastModifiedDateTime", &s.LastModifiedDateTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedDateTime", &s.LastModifiedDateTime) delete(rawMsg, key) case "lastModifiedUserName": err = unpopulate(val, "LastModifiedUserName", &s.LastModifiedUserName) @@ -1701,7 +2121,7 @@ func (s *SmartGroupProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "SmartGroupState", &s.SmartGroupState) delete(rawMsg, key) case "startDateTime": - err = unpopulateTimeRFC3339(val, "StartDateTime", &s.StartDateTime) + err = unpopulateDateTimeRFC3339(val, "StartDateTime", &s.StartDateTime) delete(rawMsg, key) } if err != nil { @@ -1745,10 +2165,10 @@ func (s *SmartGroupsList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -1764,7 +2184,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -1773,7 +2193,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) @@ -1789,6 +2209,142 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type TenantActivityLogAlertResource. +func (t TenantActivityLogAlertResource) 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, "properties", t.Properties) + populate(objectMap, "tags", t.Tags) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TenantActivityLogAlertResource. +func (t *TenantActivityLogAlertResource) UnmarshalJSON(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 "properties": + err = unpopulate(val, "Properties", &t.Properties) + 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 TenantAlertRuleList. +func (t TenantAlertRuleList) 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 TenantAlertRuleList. +func (t *TenantAlertRuleList) UnmarshalJSON(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 TenantAlertRulePatchObject. +func (t TenantAlertRulePatchObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "tags", t.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TenantAlertRulePatchObject. +func (t *TenantAlertRulePatchObject) UnmarshalJSON(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 "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &t.Tags) + 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 TenantAlertRulePatchProperties. +func (t TenantAlertRulePatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", t.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TenantAlertRulePatchProperties. +func (t *TenantAlertRulePatchProperties) UnmarshalJSON(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 "enabled": + err = unpopulate(val, "Enabled", &t.Enabled) + 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 WeeklyRecurrence. func (w WeeklyRecurrence) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1849,7 +2405,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/alertsmanagement/armalertsmanagement/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/operations_client.go index bede8929..53d024a4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armalertsmanagement @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,20 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/options.go new file mode 100644 index 00000000..95c0f243 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/options.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 armalertsmanagement + +// AlertProcessingRulesClientCreateOrUpdateOptions contains the optional parameters for the AlertProcessingRulesClient.CreateOrUpdate +// method. +type AlertProcessingRulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// AlertProcessingRulesClientDeleteOptions contains the optional parameters for the AlertProcessingRulesClient.Delete method. +type AlertProcessingRulesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AlertProcessingRulesClientGetByNameOptions contains the optional parameters for the AlertProcessingRulesClient.GetByName +// method. +type AlertProcessingRulesClientGetByNameOptions struct { + // placeholder for future optional parameters +} + +// AlertProcessingRulesClientListByResourceGroupOptions contains the optional parameters for the AlertProcessingRulesClient.NewListByResourceGroupPager +// method. +type AlertProcessingRulesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// AlertProcessingRulesClientListBySubscriptionOptions contains the optional parameters for the AlertProcessingRulesClient.NewListBySubscriptionPager +// method. +type AlertProcessingRulesClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// AlertProcessingRulesClientUpdateOptions contains the optional parameters for the AlertProcessingRulesClient.Update method. +type AlertProcessingRulesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// AlertRuleRecommendationsClientListByResourceOptions contains the optional parameters for the AlertRuleRecommendationsClient.NewListByResourcePager +// method. +type AlertRuleRecommendationsClientListByResourceOptions struct { + // placeholder for future optional parameters +} + +// AlertRuleRecommendationsClientListByTargetTypeOptions contains the optional parameters for the AlertRuleRecommendationsClient.NewListByTargetTypePager +// method. +type AlertRuleRecommendationsClientListByTargetTypeOptions struct { + // placeholder for future optional parameters +} + +// AlertsClientChangeStateOptions contains the optional parameters for the AlertsClient.ChangeState method. +type AlertsClientChangeStateOptions struct { + // reason of change alert state + Comment *Comments +} + +// AlertsClientGetAllOptions contains the optional parameters for the AlertsClient.NewGetAllPager method. +type AlertsClientGetAllOptions struct { + // Filter by specific alert rule. Default value is to select all. + AlertRule *string + + // Filter by state of the alert instance. Default value is to select all. + AlertState *AlertState + + // Filter by custom time range in the format / where time is in (ISO-8601 format)'. Permissible values is within 30 days from + // query time. Either timeRange or customTimeRange could be used but not both. + // Default is none. + CustomTimeRange *string + + // Include context which has contextual data specific to the monitor service. Default value is false' + IncludeContext *bool + + // Include egress config which would be used for displaying the content in portal. Default value is 'false'. + IncludeEgressConfig *bool + + // Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all. + MonitorCondition *MonitorCondition + + // Filter by monitor service which generates the alert instance. Default value is select all. + MonitorService *MonitorService + + // Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the "includeContent" + // filter is selected, maximum value allowed is 25. Default value is 25. + PageCount *int64 + + // This filter allows to selection of the fields(comma separated) which would be part of the essential section. This would + // allow to project only the required fields rather than getting entire content. + // Default is to fetch all the fields in the essentials section. + Select *string + + // Filter by severity. Default value is select all. + Severity *Severity + + // Filter the alerts list by the Smart Group Id. Default value is none. + SmartGroupID *string + + // Sort the query results by input field, Default value is 'lastModifiedDateTime'. + SortBy *AlertsSortByFields + + // Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others. + SortOrder *SortOrder + + // Filter by target resource( which is full ARM ID) Default value is select all. + TargetResource *string + + // Filter by target resource group name. Default value is select all. + TargetResourceGroup *string + + // Filter by target resource type. Default value is select all. + TargetResourceType *string + + // Filter by time range by below listed values. Default value is 1 day. + TimeRange *TimeRange +} + +// AlertsClientGetByIDOptions contains the optional parameters for the AlertsClient.GetByID method. +type AlertsClientGetByIDOptions struct { + // placeholder for future optional parameters +} + +// AlertsClientGetHistoryOptions contains the optional parameters for the AlertsClient.GetHistory method. +type AlertsClientGetHistoryOptions struct { + // placeholder for future optional parameters +} + +// AlertsClientGetSummaryOptions contains the optional parameters for the AlertsClient.GetSummary method. +type AlertsClientGetSummaryOptions struct { + // Filter by specific alert rule. Default value is to select all. + AlertRule *string + + // Filter by state of the alert instance. Default value is to select all. + AlertState *AlertState + + // Filter by custom time range in the format / where time is in (ISO-8601 format)'. Permissible values is within 30 days from + // query time. Either timeRange or customTimeRange could be used but not both. + // Default is none. + CustomTimeRange *string + + // Include count of the SmartGroups as part of the summary. Default value is 'false'. + IncludeSmartGroupsCount *bool + + // Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all. + MonitorCondition *MonitorCondition + + // Filter by monitor service which generates the alert instance. Default value is select all. + MonitorService *MonitorService + + // Filter by severity. Default value is select all. + Severity *Severity + + // Filter by target resource( which is full ARM ID) Default value is select all. + TargetResource *string + + // Filter by target resource group name. Default value is select all. + TargetResourceGroup *string + + // Filter by target resource type. Default value is select all. + TargetResourceType *string + + // Filter by time range by below listed values. Default value is 1 day. + TimeRange *TimeRange +} + +// AlertsClientMetaDataOptions contains the optional parameters for the AlertsClient.MetaData method. +type AlertsClientMetaDataOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrometheusRuleGroupsClientCreateOrUpdateOptions contains the optional parameters for the PrometheusRuleGroupsClient.CreateOrUpdate +// method. +type PrometheusRuleGroupsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// PrometheusRuleGroupsClientDeleteOptions contains the optional parameters for the PrometheusRuleGroupsClient.Delete method. +type PrometheusRuleGroupsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PrometheusRuleGroupsClientGetOptions contains the optional parameters for the PrometheusRuleGroupsClient.Get method. +type PrometheusRuleGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrometheusRuleGroupsClientListByResourceGroupOptions contains the optional parameters for the PrometheusRuleGroupsClient.NewListByResourceGroupPager +// method. +type PrometheusRuleGroupsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// PrometheusRuleGroupsClientListBySubscriptionOptions contains the optional parameters for the PrometheusRuleGroupsClient.NewListBySubscriptionPager +// method. +type PrometheusRuleGroupsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// PrometheusRuleGroupsClientUpdateOptions contains the optional parameters for the PrometheusRuleGroupsClient.Update method. +type PrometheusRuleGroupsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// SmartGroupsClientChangeStateOptions contains the optional parameters for the SmartGroupsClient.ChangeState method. +type SmartGroupsClientChangeStateOptions struct { + // placeholder for future optional parameters +} + +// SmartGroupsClientGetAllOptions contains the optional parameters for the SmartGroupsClient.NewGetAllPager method. +type SmartGroupsClientGetAllOptions struct { + // Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all. + MonitorCondition *MonitorCondition + + // Filter by monitor service which generates the alert instance. Default value is select all. + MonitorService *MonitorService + + // Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the "includeContent" + // filter is selected, maximum value allowed is 25. Default value is 25. + PageCount *int64 + + // Filter by severity. Default value is select all. + Severity *Severity + + // Filter by state of the smart group. Default value is to select all. + SmartGroupState *AlertState + + // Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'. + SortBy *SmartGroupsSortByFields + + // Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others. + SortOrder *SortOrder + + // Filter by target resource( which is full ARM ID) Default value is select all. + TargetResource *string + + // Filter by target resource group name. Default value is select all. + TargetResourceGroup *string + + // Filter by target resource type. Default value is select all. + TargetResourceType *string + + // Filter by time range by below listed values. Default value is 1 day. + TimeRange *TimeRange +} + +// SmartGroupsClientGetByIDOptions contains the optional parameters for the SmartGroupsClient.GetByID method. +type SmartGroupsClientGetByIDOptions struct { + // placeholder for future optional parameters +} + +// SmartGroupsClientGetHistoryOptions contains the optional parameters for the SmartGroupsClient.GetHistory method. +type SmartGroupsClientGetHistoryOptions struct { + // placeholder for future optional parameters +} + +// TenantActivityLogAlertsClientCreateOrUpdateOptions contains the optional parameters for the TenantActivityLogAlertsClient.CreateOrUpdate +// method. +type TenantActivityLogAlertsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// TenantActivityLogAlertsClientDeleteOptions contains the optional parameters for the TenantActivityLogAlertsClient.Delete +// method. +type TenantActivityLogAlertsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// TenantActivityLogAlertsClientGetOptions contains the optional parameters for the TenantActivityLogAlertsClient.Get method. +type TenantActivityLogAlertsClientGetOptions struct { + // placeholder for future optional parameters +} + +// TenantActivityLogAlertsClientListByManagementGroupOptions contains the optional parameters for the TenantActivityLogAlertsClient.NewListByManagementGroupPager +// method. +type TenantActivityLogAlertsClientListByManagementGroupOptions struct { + // placeholder for future optional parameters +} + +// TenantActivityLogAlertsClientListByTenantOptions contains the optional parameters for the TenantActivityLogAlertsClient.NewListByTenantPager +// method. +type TenantActivityLogAlertsClientListByTenantOptions struct { + // placeholder for future optional parameters +} + +// TenantActivityLogAlertsClientUpdateOptions contains the optional parameters for the TenantActivityLogAlertsClient.Update +// method. +type TenantActivityLogAlertsClientUpdateOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/polymorphic_helpers.go index c2e3e45a..9d269dab 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/polymorphic_helpers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/polymorphic_helpers.go @@ -3,16 +3,15 @@ // 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. +// 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. -// DO NOT EDIT. package armalertsmanagement import "encoding/json" func unmarshalActionClassification(rawMsg json.RawMessage) (ActionClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -28,11 +27,14 @@ func unmarshalActionClassification(rawMsg json.RawMessage) (ActionClassification default: b = &Action{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalActionClassificationArray(rawMsg json.RawMessage) ([]ActionClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -51,7 +53,7 @@ func unmarshalActionClassificationArray(rawMsg json.RawMessage) ([]ActionClassif } func unmarshalAlertsMetaDataPropertiesClassification(rawMsg json.RawMessage) (AlertsMetaDataPropertiesClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -65,11 +67,14 @@ func unmarshalAlertsMetaDataPropertiesClassification(rawMsg json.RawMessage) (Al default: b = &AlertsMetaDataProperties{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalRecurrenceClassification(rawMsg json.RawMessage) (RecurrenceClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -87,11 +92,14 @@ func unmarshalRecurrenceClassification(rawMsg json.RawMessage) (RecurrenceClassi default: b = &Recurrence{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalRecurrenceClassificationArray(rawMsg json.RawMessage) ([]RecurrenceClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/prometheusrulegroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/prometheusrulegroups_client.go new file mode 100644 index 00000000..20ab0125 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/prometheusrulegroups_client.go @@ -0,0 +1,419 @@ +//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 armalertsmanagement + +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" +) + +// PrometheusRuleGroupsClient contains the methods for the PrometheusRuleGroups group. +// Don't use this type directly, use NewPrometheusRuleGroupsClient() instead. +type PrometheusRuleGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPrometheusRuleGroupsClient creates a new instance of PrometheusRuleGroupsClient 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 NewPrometheusRuleGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrometheusRuleGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PrometheusRuleGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or update a Prometheus rule group definition. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-07-22-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - ruleGroupName - The name of the rule group. +// - parameters - The parameters of the rule group to create or update. +// - options - PrometheusRuleGroupsClientCreateOrUpdateOptions contains the optional parameters for the PrometheusRuleGroupsClient.CreateOrUpdate +// method. +func (client *PrometheusRuleGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ruleGroupName string, parameters PrometheusRuleGroupResource, options *PrometheusRuleGroupsClientCreateOrUpdateOptions) (PrometheusRuleGroupsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "PrometheusRuleGroupsClient.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, ruleGroupName, parameters, options) + if err != nil { + return PrometheusRuleGroupsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrometheusRuleGroupsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return PrometheusRuleGroupsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PrometheusRuleGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, ruleGroupName string, parameters PrometheusRuleGroupResource, options *PrometheusRuleGroupsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{ruleGroupName}" + 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 ruleGroupName == "" { + return nil, errors.New("parameter ruleGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleGroupName}", url.PathEscape(ruleGroupName)) + 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-07-22-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 *PrometheusRuleGroupsClient) createOrUpdateHandleResponse(resp *http.Response) (PrometheusRuleGroupsClientCreateOrUpdateResponse, error) { + result := PrometheusRuleGroupsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrometheusRuleGroupResource); err != nil { + return PrometheusRuleGroupsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Delete a Prometheus rule group definition. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-07-22-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - ruleGroupName - The name of the rule group. +// - options - PrometheusRuleGroupsClientDeleteOptions contains the optional parameters for the PrometheusRuleGroupsClient.Delete +// method. +func (client *PrometheusRuleGroupsClient) Delete(ctx context.Context, resourceGroupName string, ruleGroupName string, options *PrometheusRuleGroupsClientDeleteOptions) (PrometheusRuleGroupsClientDeleteResponse, error) { + var err error + const operationName = "PrometheusRuleGroupsClient.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, ruleGroupName, options) + if err != nil { + return PrometheusRuleGroupsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrometheusRuleGroupsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PrometheusRuleGroupsClientDeleteResponse{}, err + } + return PrometheusRuleGroupsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PrometheusRuleGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, ruleGroupName string, options *PrometheusRuleGroupsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{ruleGroupName}" + 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 ruleGroupName == "" { + return nil, errors.New("parameter ruleGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleGroupName}", url.PathEscape(ruleGroupName)) + 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-07-22-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieve a Prometheus rule group definition. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-07-22-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - ruleGroupName - The name of the rule group. +// - options - PrometheusRuleGroupsClientGetOptions contains the optional parameters for the PrometheusRuleGroupsClient.Get +// method. +func (client *PrometheusRuleGroupsClient) Get(ctx context.Context, resourceGroupName string, ruleGroupName string, options *PrometheusRuleGroupsClientGetOptions) (PrometheusRuleGroupsClientGetResponse, error) { + var err error + const operationName = "PrometheusRuleGroupsClient.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, ruleGroupName, options) + if err != nil { + return PrometheusRuleGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrometheusRuleGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrometheusRuleGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PrometheusRuleGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, ruleGroupName string, options *PrometheusRuleGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{ruleGroupName}" + 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 ruleGroupName == "" { + return nil, errors.New("parameter ruleGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleGroupName}", url.PathEscape(ruleGroupName)) + req, err := 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-07-22-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PrometheusRuleGroupsClient) getHandleResponse(resp *http.Response) (PrometheusRuleGroupsClientGetResponse, error) { + result := PrometheusRuleGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrometheusRuleGroupResource); err != nil { + return PrometheusRuleGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Retrieve Prometheus rule group definitions in a resource group. +// +// Generated from API version 2021-07-22-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - PrometheusRuleGroupsClientListByResourceGroupOptions contains the optional parameters for the PrometheusRuleGroupsClient.NewListByResourceGroupPager +// method. +func (client *PrometheusRuleGroupsClient) NewListByResourceGroupPager(resourceGroupName string, options *PrometheusRuleGroupsClientListByResourceGroupOptions) *runtime.Pager[PrometheusRuleGroupsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[PrometheusRuleGroupsClientListByResourceGroupResponse]{ + More: func(page PrometheusRuleGroupsClientListByResourceGroupResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *PrometheusRuleGroupsClientListByResourceGroupResponse) (PrometheusRuleGroupsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrometheusRuleGroupsClient.NewListByResourceGroupPager") + req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + if err != nil { + return PrometheusRuleGroupsClientListByResourceGroupResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrometheusRuleGroupsClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PrometheusRuleGroupsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *PrometheusRuleGroupsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *PrometheusRuleGroupsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups" + 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-07-22-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *PrometheusRuleGroupsClient) listByResourceGroupHandleResponse(resp *http.Response) (PrometheusRuleGroupsClientListByResourceGroupResponse, error) { + result := PrometheusRuleGroupsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrometheusRuleGroupResourceCollection); err != nil { + return PrometheusRuleGroupsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - Retrieve Prometheus rule group definitions in a subscription. +// +// Generated from API version 2021-07-22-preview +// - options - PrometheusRuleGroupsClientListBySubscriptionOptions contains the optional parameters for the PrometheusRuleGroupsClient.NewListBySubscriptionPager +// method. +func (client *PrometheusRuleGroupsClient) NewListBySubscriptionPager(options *PrometheusRuleGroupsClientListBySubscriptionOptions) *runtime.Pager[PrometheusRuleGroupsClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[PrometheusRuleGroupsClientListBySubscriptionResponse]{ + More: func(page PrometheusRuleGroupsClientListBySubscriptionResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *PrometheusRuleGroupsClientListBySubscriptionResponse) (PrometheusRuleGroupsClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrometheusRuleGroupsClient.NewListBySubscriptionPager") + req, err := client.listBySubscriptionCreateRequest(ctx, options) + if err != nil { + return PrometheusRuleGroupsClientListBySubscriptionResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrometheusRuleGroupsClientListBySubscriptionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PrometheusRuleGroupsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *PrometheusRuleGroupsClient) listBySubscriptionCreateRequest(ctx context.Context, options *PrometheusRuleGroupsClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/prometheusRuleGroups" + if client.subscriptionID == "" { + return 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-07-22-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *PrometheusRuleGroupsClient) listBySubscriptionHandleResponse(resp *http.Response) (PrometheusRuleGroupsClientListBySubscriptionResponse, error) { + result := PrometheusRuleGroupsClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrometheusRuleGroupResourceCollection); err != nil { + return PrometheusRuleGroupsClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// Update - Update an Prometheus rule group definition. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-07-22-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - ruleGroupName - The name of the rule group. +// - parameters - The parameters of the rule group to update. +// - options - PrometheusRuleGroupsClientUpdateOptions contains the optional parameters for the PrometheusRuleGroupsClient.Update +// method. +func (client *PrometheusRuleGroupsClient) Update(ctx context.Context, resourceGroupName string, ruleGroupName string, parameters PrometheusRuleGroupResourcePatch, options *PrometheusRuleGroupsClientUpdateOptions) (PrometheusRuleGroupsClientUpdateResponse, error) { + var err error + const operationName = "PrometheusRuleGroupsClient.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, ruleGroupName, parameters, options) + if err != nil { + return PrometheusRuleGroupsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrometheusRuleGroupsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrometheusRuleGroupsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *PrometheusRuleGroupsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, ruleGroupName string, parameters PrometheusRuleGroupResourcePatch, options *PrometheusRuleGroupsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{ruleGroupName}" + 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 ruleGroupName == "" { + return nil, errors.New("parameter ruleGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleGroupName}", url.PathEscape(ruleGroupName)) + 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-07-22-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 *PrometheusRuleGroupsClient) updateHandleResponse(resp *http.Response) (PrometheusRuleGroupsClientUpdateResponse, error) { + result := PrometheusRuleGroupsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrometheusRuleGroupResource); err != nil { + return PrometheusRuleGroupsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/response_types.go deleted file mode 100644 index dcc088cb..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/response_types.go +++ /dev/null @@ -1,110 +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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armalertsmanagement - -// AlertProcessingRulesClientCreateOrUpdateResponse contains the response from method AlertProcessingRulesClient.CreateOrUpdate. -type AlertProcessingRulesClientCreateOrUpdateResponse struct { - AlertProcessingRule - // XMSRequestID contains the information returned from the x-ms-request-id header response. - XMSRequestID *string -} - -// AlertProcessingRulesClientDeleteResponse contains the response from method AlertProcessingRulesClient.Delete. -type AlertProcessingRulesClientDeleteResponse struct { - // XMSRequestID contains the information returned from the x-ms-request-id header response. - XMSRequestID *string -} - -// AlertProcessingRulesClientGetByNameResponse contains the response from method AlertProcessingRulesClient.GetByName. -type AlertProcessingRulesClientGetByNameResponse struct { - AlertProcessingRule - // XMSRequestID contains the information returned from the x-ms-request-id header response. - XMSRequestID *string -} - -// AlertProcessingRulesClientListByResourceGroupResponse contains the response from method AlertProcessingRulesClient.NewListByResourceGroupPager. -type AlertProcessingRulesClientListByResourceGroupResponse struct { - AlertProcessingRulesList - // XMSRequestID contains the information returned from the x-ms-request-id header response. - XMSRequestID *string -} - -// AlertProcessingRulesClientListBySubscriptionResponse contains the response from method AlertProcessingRulesClient.NewListBySubscriptionPager. -type AlertProcessingRulesClientListBySubscriptionResponse struct { - AlertProcessingRulesList - // XMSRequestID contains the information returned from the x-ms-request-id header response. - XMSRequestID *string -} - -// AlertProcessingRulesClientUpdateResponse contains the response from method AlertProcessingRulesClient.Update. -type AlertProcessingRulesClientUpdateResponse struct { - AlertProcessingRule - // XMSRequestID contains the information returned from the x-ms-request-id header response. - XMSRequestID *string -} - -// AlertsClientChangeStateResponse contains the response from method AlertsClient.ChangeState. -type AlertsClientChangeStateResponse struct { - Alert -} - -// AlertsClientGetAllResponse contains the response from method AlertsClient.NewGetAllPager. -type AlertsClientGetAllResponse struct { - AlertsList -} - -// AlertsClientGetByIDResponse contains the response from method AlertsClient.GetByID. -type AlertsClientGetByIDResponse struct { - Alert -} - -// AlertsClientGetHistoryResponse contains the response from method AlertsClient.GetHistory. -type AlertsClientGetHistoryResponse struct { - AlertModification -} - -// AlertsClientGetSummaryResponse contains the response from method AlertsClient.GetSummary. -type AlertsClientGetSummaryResponse struct { - AlertsSummary -} - -// AlertsClientMetaDataResponse contains the response from method AlertsClient.MetaData. -type AlertsClientMetaDataResponse struct { - AlertsMetaData -} - -// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. -type OperationsClientListResponse struct { - OperationsList -} - -// SmartGroupsClientChangeStateResponse contains the response from method SmartGroupsClient.ChangeState. -type SmartGroupsClientChangeStateResponse struct { - SmartGroup - // XMSRequestID contains the information returned from the x-ms-request-id header response. - XMSRequestID *string -} - -// SmartGroupsClientGetAllResponse contains the response from method SmartGroupsClient.NewGetAllPager. -type SmartGroupsClientGetAllResponse struct { - SmartGroupsList -} - -// SmartGroupsClientGetByIDResponse contains the response from method SmartGroupsClient.GetByID. -type SmartGroupsClientGetByIDResponse struct { - SmartGroup - // XMSRequestID contains the information returned from the x-ms-request-id header response. - XMSRequestID *string -} - -// SmartGroupsClientGetHistoryResponse contains the response from method SmartGroupsClient.GetHistory. -type SmartGroupsClientGetHistoryResponse struct { - SmartGroupModification -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/responses.go new file mode 100644 index 00000000..8c562fc3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/responses.go @@ -0,0 +1,214 @@ +//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 armalertsmanagement + +// AlertProcessingRulesClientCreateOrUpdateResponse contains the response from method AlertProcessingRulesClient.CreateOrUpdate. +type AlertProcessingRulesClientCreateOrUpdateResponse struct { + // Alert processing rule object containing target scopes, conditions and scheduling logic. + AlertProcessingRule + + // XMSRequestID contains the information returned from the x-ms-request-id header response. + XMSRequestID *string +} + +// AlertProcessingRulesClientDeleteResponse contains the response from method AlertProcessingRulesClient.Delete. +type AlertProcessingRulesClientDeleteResponse struct { + // XMSRequestID contains the information returned from the x-ms-request-id header response. + XMSRequestID *string +} + +// AlertProcessingRulesClientGetByNameResponse contains the response from method AlertProcessingRulesClient.GetByName. +type AlertProcessingRulesClientGetByNameResponse struct { + // Alert processing rule object containing target scopes, conditions and scheduling logic. + AlertProcessingRule + + // XMSRequestID contains the information returned from the x-ms-request-id header response. + XMSRequestID *string +} + +// AlertProcessingRulesClientListByResourceGroupResponse contains the response from method AlertProcessingRulesClient.NewListByResourceGroupPager. +type AlertProcessingRulesClientListByResourceGroupResponse struct { + // List of alert processing rules. + AlertProcessingRulesList + + // XMSRequestID contains the information returned from the x-ms-request-id header response. + XMSRequestID *string +} + +// AlertProcessingRulesClientListBySubscriptionResponse contains the response from method AlertProcessingRulesClient.NewListBySubscriptionPager. +type AlertProcessingRulesClientListBySubscriptionResponse struct { + // List of alert processing rules. + AlertProcessingRulesList + + // XMSRequestID contains the information returned from the x-ms-request-id header response. + XMSRequestID *string +} + +// AlertProcessingRulesClientUpdateResponse contains the response from method AlertProcessingRulesClient.Update. +type AlertProcessingRulesClientUpdateResponse struct { + // Alert processing rule object containing target scopes, conditions and scheduling logic. + AlertProcessingRule + + // XMSRequestID contains the information returned from the x-ms-request-id header response. + XMSRequestID *string +} + +// AlertRuleRecommendationsClientListByResourceResponse contains the response from method AlertRuleRecommendationsClient.NewListByResourcePager. +type AlertRuleRecommendationsClientListByResourceResponse struct { + // List of alert rule recommendations. + AlertRuleRecommendationsListResponse +} + +// AlertRuleRecommendationsClientListByTargetTypeResponse contains the response from method AlertRuleRecommendationsClient.NewListByTargetTypePager. +type AlertRuleRecommendationsClientListByTargetTypeResponse struct { + // List of alert rule recommendations. + AlertRuleRecommendationsListResponse +} + +// AlertsClientChangeStateResponse contains the response from method AlertsClient.ChangeState. +type AlertsClientChangeStateResponse struct { + // An alert created in alert management service. + Alert +} + +// AlertsClientGetAllResponse contains the response from method AlertsClient.NewGetAllPager. +type AlertsClientGetAllResponse struct { + // List the alerts. + AlertsList +} + +// AlertsClientGetByIDResponse contains the response from method AlertsClient.GetByID. +type AlertsClientGetByIDResponse struct { + // An alert created in alert management service. + Alert +} + +// AlertsClientGetHistoryResponse contains the response from method AlertsClient.GetHistory. +type AlertsClientGetHistoryResponse struct { + // Alert Modification details + AlertModification +} + +// AlertsClientGetSummaryResponse contains the response from method AlertsClient.GetSummary. +type AlertsClientGetSummaryResponse struct { + // Summary of alerts based on the input filters and 'groupby' parameters. + AlertsSummary +} + +// AlertsClientMetaDataResponse contains the response from method AlertsClient.MetaData. +type AlertsClientMetaDataResponse struct { + // alert meta data information. + AlertsMetaData +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Lists the operations available in the AlertsManagement RP. + OperationsList +} + +// PrometheusRuleGroupsClientCreateOrUpdateResponse contains the response from method PrometheusRuleGroupsClient.CreateOrUpdate. +type PrometheusRuleGroupsClientCreateOrUpdateResponse struct { + // The Prometheus rule group resource. + PrometheusRuleGroupResource +} + +// PrometheusRuleGroupsClientDeleteResponse contains the response from method PrometheusRuleGroupsClient.Delete. +type PrometheusRuleGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// PrometheusRuleGroupsClientGetResponse contains the response from method PrometheusRuleGroupsClient.Get. +type PrometheusRuleGroupsClientGetResponse struct { + // The Prometheus rule group resource. + PrometheusRuleGroupResource +} + +// PrometheusRuleGroupsClientListByResourceGroupResponse contains the response from method PrometheusRuleGroupsClient.NewListByResourceGroupPager. +type PrometheusRuleGroupsClientListByResourceGroupResponse struct { + // Represents a collection of alert rule resources. + PrometheusRuleGroupResourceCollection +} + +// PrometheusRuleGroupsClientListBySubscriptionResponse contains the response from method PrometheusRuleGroupsClient.NewListBySubscriptionPager. +type PrometheusRuleGroupsClientListBySubscriptionResponse struct { + // Represents a collection of alert rule resources. + PrometheusRuleGroupResourceCollection +} + +// PrometheusRuleGroupsClientUpdateResponse contains the response from method PrometheusRuleGroupsClient.Update. +type PrometheusRuleGroupsClientUpdateResponse struct { + // The Prometheus rule group resource. + PrometheusRuleGroupResource +} + +// SmartGroupsClientChangeStateResponse contains the response from method SmartGroupsClient.ChangeState. +type SmartGroupsClientChangeStateResponse struct { + // Set of related alerts grouped together smartly by AMS. + SmartGroup + + // XMSRequestID contains the information returned from the x-ms-request-id header response. + XMSRequestID *string +} + +// SmartGroupsClientGetAllResponse contains the response from method SmartGroupsClient.NewGetAllPager. +type SmartGroupsClientGetAllResponse struct { + // List the alerts. + SmartGroupsList +} + +// SmartGroupsClientGetByIDResponse contains the response from method SmartGroupsClient.GetByID. +type SmartGroupsClientGetByIDResponse struct { + // Set of related alerts grouped together smartly by AMS. + SmartGroup + + // XMSRequestID contains the information returned from the x-ms-request-id header response. + XMSRequestID *string +} + +// SmartGroupsClientGetHistoryResponse contains the response from method SmartGroupsClient.GetHistory. +type SmartGroupsClientGetHistoryResponse struct { + // Alert Modification details + SmartGroupModification +} + +// TenantActivityLogAlertsClientCreateOrUpdateResponse contains the response from method TenantActivityLogAlertsClient.CreateOrUpdate. +type TenantActivityLogAlertsClientCreateOrUpdateResponse struct { + // A Tenant Activity Log Alert rule resource. + TenantActivityLogAlertResource +} + +// TenantActivityLogAlertsClientDeleteResponse contains the response from method TenantActivityLogAlertsClient.Delete. +type TenantActivityLogAlertsClientDeleteResponse struct { + // placeholder for future response values +} + +// TenantActivityLogAlertsClientGetResponse contains the response from method TenantActivityLogAlertsClient.Get. +type TenantActivityLogAlertsClientGetResponse struct { + // A Tenant Activity Log Alert rule resource. + TenantActivityLogAlertResource +} + +// TenantActivityLogAlertsClientListByManagementGroupResponse contains the response from method TenantActivityLogAlertsClient.NewListByManagementGroupPager. +type TenantActivityLogAlertsClientListByManagementGroupResponse struct { + // A list of Tenant Activity Log Alert rules. + TenantAlertRuleList +} + +// TenantActivityLogAlertsClientListByTenantResponse contains the response from method TenantActivityLogAlertsClient.NewListByTenantPager. +type TenantActivityLogAlertsClientListByTenantResponse struct { + // A list of Tenant Activity Log Alert rules. + TenantAlertRuleList +} + +// TenantActivityLogAlertsClientUpdateResponse contains the response from method TenantActivityLogAlertsClient.Update. +type TenantActivityLogAlertsClientUpdateResponse struct { + // A Tenant Activity Log Alert rule resource. + TenantActivityLogAlertResource +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/smartgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/smartgroups_client.go index c66b3767..4abbc62e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/smartgroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/smartgroups_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armalertsmanagement @@ -34,7 +33,7 @@ type SmartGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSmartGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SmartGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".SmartGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewSmartGroupsClient(subscriptionID string, credential azcore.TokenCredenti // - newState - New state of the alert. // - options - SmartGroupsClientChangeStateOptions contains the optional parameters for the SmartGroupsClient.ChangeState method. func (client *SmartGroupsClient) ChangeState(ctx context.Context, smartGroupID string, newState AlertState, options *SmartGroupsClientChangeStateOptions) (SmartGroupsClientChangeStateResponse, error) { + var err error + const operationName = "SmartGroupsClient.ChangeState" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.changeStateCreateRequest(ctx, smartGroupID, newState, options) if err != nil { return SmartGroupsClientChangeStateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SmartGroupsClientChangeStateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SmartGroupsClientChangeStateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SmartGroupsClientChangeStateResponse{}, err } - return client.changeStateHandleResponse(resp) + resp, err := client.changeStateHandleResponse(httpResp) + return resp, err } // changeStateCreateRequest creates the ChangeState request. @@ -112,25 +118,20 @@ func (client *SmartGroupsClient) NewGetAllPager(options *SmartGroupsClientGetAll return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SmartGroupsClientGetAllResponse) (SmartGroupsClientGetAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SmartGroupsClientGetAllResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SmartGroupsClient.NewGetAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getAllCreateRequest(ctx, options) + }, nil) if err != nil { return SmartGroupsClientGetAllResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SmartGroupsClientGetAllResponse{}, runtime.NewResponseError(resp) - } return client.getAllHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -146,20 +147,15 @@ func (client *SmartGroupsClient) getAllCreateRequest(ctx context.Context, option return nil, err } reqQP := req.Raw().URL.Query() - if options != nil && options.TargetResource != nil { - reqQP.Set("targetResource", *options.TargetResource) - } - if options != nil && options.TargetResourceGroup != nil { - reqQP.Set("targetResourceGroup", *options.TargetResourceGroup) - } - if options != nil && options.TargetResourceType != nil { - reqQP.Set("targetResourceType", *options.TargetResourceType) + reqQP.Set("api-version", "2019-05-05-preview") + if options != nil && options.MonitorCondition != nil { + reqQP.Set("monitorCondition", string(*options.MonitorCondition)) } if options != nil && options.MonitorService != nil { reqQP.Set("monitorService", string(*options.MonitorService)) } - if options != nil && options.MonitorCondition != nil { - reqQP.Set("monitorCondition", string(*options.MonitorCondition)) + if options != nil && options.PageCount != nil { + reqQP.Set("pageCount", strconv.FormatInt(*options.PageCount, 10)) } if options != nil && options.Severity != nil { reqQP.Set("severity", string(*options.Severity)) @@ -167,19 +163,24 @@ func (client *SmartGroupsClient) getAllCreateRequest(ctx context.Context, option if options != nil && options.SmartGroupState != nil { reqQP.Set("smartGroupState", string(*options.SmartGroupState)) } - if options != nil && options.TimeRange != nil { - reqQP.Set("timeRange", string(*options.TimeRange)) - } - if options != nil && options.PageCount != nil { - reqQP.Set("pageCount", strconv.FormatInt(*options.PageCount, 10)) - } if options != nil && options.SortBy != nil { reqQP.Set("sortBy", string(*options.SortBy)) } if options != nil && options.SortOrder != nil { reqQP.Set("sortOrder", string(*options.SortOrder)) } - reqQP.Set("api-version", "2019-05-05-preview") + if options != nil && options.TargetResource != nil { + reqQP.Set("targetResource", *options.TargetResource) + } + if options != nil && options.TargetResourceGroup != nil { + reqQP.Set("targetResourceGroup", *options.TargetResourceGroup) + } + if options != nil && options.TargetResourceType != nil { + reqQP.Set("targetResourceType", *options.TargetResourceType) + } + if options != nil && options.TimeRange != nil { + reqQP.Set("timeRange", string(*options.TimeRange)) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -201,18 +202,25 @@ func (client *SmartGroupsClient) getAllHandleResponse(resp *http.Response) (Smar // - smartGroupID - Smart group unique id. // - options - SmartGroupsClientGetByIDOptions contains the optional parameters for the SmartGroupsClient.GetByID method. func (client *SmartGroupsClient) GetByID(ctx context.Context, smartGroupID string, options *SmartGroupsClientGetByIDOptions) (SmartGroupsClientGetByIDResponse, error) { + var err error + const operationName = "SmartGroupsClient.GetByID" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByIDCreateRequest(ctx, smartGroupID, options) if err != nil { return SmartGroupsClientGetByIDResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SmartGroupsClientGetByIDResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SmartGroupsClientGetByIDResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SmartGroupsClientGetByIDResponse{}, err } - return client.getByIDHandleResponse(resp) + resp, err := client.getByIDHandleResponse(httpResp) + return resp, err } // getByIDCreateRequest creates the GetByID request. @@ -256,18 +264,25 @@ func (client *SmartGroupsClient) getByIDHandleResponse(resp *http.Response) (Sma // - smartGroupID - Smart group unique id. // - options - SmartGroupsClientGetHistoryOptions contains the optional parameters for the SmartGroupsClient.GetHistory method. func (client *SmartGroupsClient) GetHistory(ctx context.Context, smartGroupID string, options *SmartGroupsClientGetHistoryOptions) (SmartGroupsClientGetHistoryResponse, error) { + var err error + const operationName = "SmartGroupsClient.GetHistory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getHistoryCreateRequest(ctx, smartGroupID, options) if err != nil { return SmartGroupsClientGetHistoryResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SmartGroupsClientGetHistoryResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SmartGroupsClientGetHistoryResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SmartGroupsClientGetHistoryResponse{}, err } - return client.getHistoryHandleResponse(resp) + resp, err := client.getHistoryHandleResponse(httpResp) + return resp, err } // getHistoryCreateRequest creates the GetHistory request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/tenantactivitylogalerts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/tenantactivitylogalerts_client.go new file mode 100644 index 00000000..4cd43f6a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/tenantactivitylogalerts_client.go @@ -0,0 +1,392 @@ +//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 armalertsmanagement + +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" +) + +// TenantActivityLogAlertsClient contains the methods for the TenantActivityLogAlerts group. +// Don't use this type directly, use NewTenantActivityLogAlertsClient() instead. +type TenantActivityLogAlertsClient struct { + internal *arm.Client +} + +// NewTenantActivityLogAlertsClient creates a new instance of TenantActivityLogAlertsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewTenantActivityLogAlertsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*TenantActivityLogAlertsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TenantActivityLogAlertsClient{ + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create a new Tenant Activity Log Alert rule or update an existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-04-01-preview +// - managementGroupName - The name of the management group. The name is case insensitive. +// - alertRuleName - The name of the Tenant Activity Log Alert rule. +// - tenantActivityLogAlertRule - The Tenant Activity Log Alert rule to create or use for the update. +// - options - TenantActivityLogAlertsClientCreateOrUpdateOptions contains the optional parameters for the TenantActivityLogAlertsClient.CreateOrUpdate +// method. +func (client *TenantActivityLogAlertsClient) CreateOrUpdate(ctx context.Context, managementGroupName string, alertRuleName string, tenantActivityLogAlertRule TenantActivityLogAlertResource, options *TenantActivityLogAlertsClientCreateOrUpdateOptions) (TenantActivityLogAlertsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "TenantActivityLogAlertsClient.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, managementGroupName, alertRuleName, tenantActivityLogAlertRule, options) + if err != nil { + return TenantActivityLogAlertsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TenantActivityLogAlertsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return TenantActivityLogAlertsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *TenantActivityLogAlertsClient) createOrUpdateCreateRequest(ctx context.Context, managementGroupName string, alertRuleName string, tenantActivityLogAlertRule TenantActivityLogAlertResource, options *TenantActivityLogAlertsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.AlertsManagement/tenantActivityLogAlerts/{alertRuleName}" + if managementGroupName == "" { + return nil, errors.New("parameter managementGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managementGroupName}", url.PathEscape(managementGroupName)) + if alertRuleName == "" { + return nil, errors.New("parameter alertRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{alertRuleName}", url.PathEscape(alertRuleName)) + 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", "2023-04-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, tenantActivityLogAlertRule); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *TenantActivityLogAlertsClient) createOrUpdateHandleResponse(resp *http.Response) (TenantActivityLogAlertsClientCreateOrUpdateResponse, error) { + result := TenantActivityLogAlertsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TenantActivityLogAlertResource); err != nil { + return TenantActivityLogAlertsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Delete a Tenant Activity Log Alert rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-04-01-preview +// - managementGroupName - The name of the management group. The name is case insensitive. +// - alertRuleName - The name of the Tenant Activity Log Alert rule. +// - options - TenantActivityLogAlertsClientDeleteOptions contains the optional parameters for the TenantActivityLogAlertsClient.Delete +// method. +func (client *TenantActivityLogAlertsClient) Delete(ctx context.Context, managementGroupName string, alertRuleName string, options *TenantActivityLogAlertsClientDeleteOptions) (TenantActivityLogAlertsClientDeleteResponse, error) { + var err error + const operationName = "TenantActivityLogAlertsClient.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, managementGroupName, alertRuleName, options) + if err != nil { + return TenantActivityLogAlertsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TenantActivityLogAlertsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TenantActivityLogAlertsClientDeleteResponse{}, err + } + return TenantActivityLogAlertsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *TenantActivityLogAlertsClient) deleteCreateRequest(ctx context.Context, managementGroupName string, alertRuleName string, options *TenantActivityLogAlertsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.AlertsManagement/tenantActivityLogAlerts/{alertRuleName}" + if managementGroupName == "" { + return nil, errors.New("parameter managementGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managementGroupName}", url.PathEscape(managementGroupName)) + if alertRuleName == "" { + return nil, errors.New("parameter alertRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{alertRuleName}", url.PathEscape(alertRuleName)) + 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", "2023-04-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get Tenant Activity Log Alert rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-04-01-preview +// - managementGroupName - The name of the management group. The name is case insensitive. +// - alertRuleName - The name of the Tenant Activity Log Alert rule. +// - options - TenantActivityLogAlertsClientGetOptions contains the optional parameters for the TenantActivityLogAlertsClient.Get +// method. +func (client *TenantActivityLogAlertsClient) Get(ctx context.Context, managementGroupName string, alertRuleName string, options *TenantActivityLogAlertsClientGetOptions) (TenantActivityLogAlertsClientGetResponse, error) { + var err error + const operationName = "TenantActivityLogAlertsClient.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, managementGroupName, alertRuleName, options) + if err != nil { + return TenantActivityLogAlertsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TenantActivityLogAlertsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TenantActivityLogAlertsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *TenantActivityLogAlertsClient) getCreateRequest(ctx context.Context, managementGroupName string, alertRuleName string, options *TenantActivityLogAlertsClientGetOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.AlertsManagement/tenantActivityLogAlerts/{alertRuleName}" + if managementGroupName == "" { + return nil, errors.New("parameter managementGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managementGroupName}", url.PathEscape(managementGroupName)) + if alertRuleName == "" { + return nil, errors.New("parameter alertRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{alertRuleName}", url.PathEscape(alertRuleName)) + req, err := 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", "2023-04-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 *TenantActivityLogAlertsClient) getHandleResponse(resp *http.Response) (TenantActivityLogAlertsClientGetResponse, error) { + result := TenantActivityLogAlertsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TenantActivityLogAlertResource); err != nil { + return TenantActivityLogAlertsClientGetResponse{}, err + } + return result, nil +} + +// NewListByManagementGroupPager - Get a list of all Tenant Activity Log Alert rules in a management group. +// +// Generated from API version 2023-04-01-preview +// - managementGroupName - The name of the management group. The name is case insensitive. +// - options - TenantActivityLogAlertsClientListByManagementGroupOptions contains the optional parameters for the TenantActivityLogAlertsClient.NewListByManagementGroupPager +// method. +func (client *TenantActivityLogAlertsClient) NewListByManagementGroupPager(managementGroupName string, options *TenantActivityLogAlertsClientListByManagementGroupOptions) *runtime.Pager[TenantActivityLogAlertsClientListByManagementGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[TenantActivityLogAlertsClientListByManagementGroupResponse]{ + More: func(page TenantActivityLogAlertsClientListByManagementGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TenantActivityLogAlertsClientListByManagementGroupResponse) (TenantActivityLogAlertsClientListByManagementGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TenantActivityLogAlertsClient.NewListByManagementGroupPager") + 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.listByManagementGroupCreateRequest(ctx, managementGroupName, options) + }, nil) + if err != nil { + return TenantActivityLogAlertsClientListByManagementGroupResponse{}, err + } + return client.listByManagementGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByManagementGroupCreateRequest creates the ListByManagementGroup request. +func (client *TenantActivityLogAlertsClient) listByManagementGroupCreateRequest(ctx context.Context, managementGroupName string, options *TenantActivityLogAlertsClientListByManagementGroupOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.AlertsManagement/tenantActivityLogAlerts" + if managementGroupName == "" { + return nil, errors.New("parameter managementGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managementGroupName}", url.PathEscape(managementGroupName)) + req, err := 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", "2023-04-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByManagementGroupHandleResponse handles the ListByManagementGroup response. +func (client *TenantActivityLogAlertsClient) listByManagementGroupHandleResponse(resp *http.Response) (TenantActivityLogAlertsClientListByManagementGroupResponse, error) { + result := TenantActivityLogAlertsClientListByManagementGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TenantAlertRuleList); err != nil { + return TenantActivityLogAlertsClientListByManagementGroupResponse{}, err + } + return result, nil +} + +// NewListByTenantPager - Get a list of all Tenant Activity Log Alert rules in the tenant. +// +// Generated from API version 2023-04-01-preview +// - options - TenantActivityLogAlertsClientListByTenantOptions contains the optional parameters for the TenantActivityLogAlertsClient.NewListByTenantPager +// method. +func (client *TenantActivityLogAlertsClient) NewListByTenantPager(options *TenantActivityLogAlertsClientListByTenantOptions) *runtime.Pager[TenantActivityLogAlertsClientListByTenantResponse] { + return runtime.NewPager(runtime.PagingHandler[TenantActivityLogAlertsClientListByTenantResponse]{ + More: func(page TenantActivityLogAlertsClientListByTenantResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TenantActivityLogAlertsClientListByTenantResponse) (TenantActivityLogAlertsClientListByTenantResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TenantActivityLogAlertsClient.NewListByTenantPager") + 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.listByTenantCreateRequest(ctx, options) + }, nil) + if err != nil { + return TenantActivityLogAlertsClientListByTenantResponse{}, err + } + return client.listByTenantHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByTenantCreateRequest creates the ListByTenant request. +func (client *TenantActivityLogAlertsClient) listByTenantCreateRequest(ctx context.Context, options *TenantActivityLogAlertsClientListByTenantOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.AlertsManagement/tenantActivityLogAlerts" + req, err := 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", "2023-04-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByTenantHandleResponse handles the ListByTenant response. +func (client *TenantActivityLogAlertsClient) listByTenantHandleResponse(resp *http.Response) (TenantActivityLogAlertsClientListByTenantResponse, error) { + result := TenantActivityLogAlertsClientListByTenantResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TenantAlertRuleList); err != nil { + return TenantActivityLogAlertsClientListByTenantResponse{}, err + } + return result, nil +} + +// Update - Updates 'tags' and 'enabled' fields in an existing Tenant Alert rule. This method is used to update the Alert +// rule tags, and to enable or disable the Alert rule. To update other fields use +// CreateOrUpdate operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-04-01-preview +// - managementGroupName - The name of the management group. The name is case insensitive. +// - alertRuleName - The name of the Tenant Activity Log Alert rule. +// - tenantActivityLogAlertRulePatch - Parameters supplied to the operation. +// - options - TenantActivityLogAlertsClientUpdateOptions contains the optional parameters for the TenantActivityLogAlertsClient.Update +// method. +func (client *TenantActivityLogAlertsClient) Update(ctx context.Context, managementGroupName string, alertRuleName string, tenantActivityLogAlertRulePatch TenantAlertRulePatchObject, options *TenantActivityLogAlertsClientUpdateOptions) (TenantActivityLogAlertsClientUpdateResponse, error) { + var err error + const operationName = "TenantActivityLogAlertsClient.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, managementGroupName, alertRuleName, tenantActivityLogAlertRulePatch, options) + if err != nil { + return TenantActivityLogAlertsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TenantActivityLogAlertsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TenantActivityLogAlertsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *TenantActivityLogAlertsClient) updateCreateRequest(ctx context.Context, managementGroupName string, alertRuleName string, tenantActivityLogAlertRulePatch TenantAlertRulePatchObject, options *TenantActivityLogAlertsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.AlertsManagement/tenantActivityLogAlerts/{alertRuleName}" + if managementGroupName == "" { + return nil, errors.New("parameter managementGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managementGroupName}", url.PathEscape(managementGroupName)) + if alertRuleName == "" { + return nil, errors.New("parameter alertRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{alertRuleName}", url.PathEscape(alertRuleName)) + 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", "2023-04-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, tenantActivityLogAlertRulePatch); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *TenantActivityLogAlertsClient) updateHandleResponse(resp *http.Response) (TenantActivityLogAlertsClientUpdateResponse, error) { + result := TenantActivityLogAlertsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TenantActivityLogAlertResource); err != nil { + return TenantActivityLogAlertsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/time_rfc3339.go index de9bd61b..baccd3c7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armalertsmanagement @@ -19,50 +18,74 @@ import ( "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 ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + 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 + `"` ) -// 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+)*"*$`) - -type timeRFC3339 time.Time +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON +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 *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(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 *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +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) { @@ -71,14 +94,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/CHANGELOG.md index 20f5fda4..ebae90ab 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/CHANGELOG.md @@ -1,5 +1,40 @@ # Release History +## 3.0.0 (2024-08-23) +### Breaking Changes + +- Field `EndTime`, `StartTime`, `Status`, `Template` of struct `JobExecution` has been removed + +### Features Added + +- New function `*ClientFactory.NewManagedEnvironmentUsagesClient() *ManagedEnvironmentUsagesClient` +- New function `*ClientFactory.NewUsagesClient() *UsagesClient` +- New function `*ContainerAppsAPIClient.GetCustomDomainVerificationID(context.Context, *ContainerAppsAPIClientGetCustomDomainVerificationIDOptions) (ContainerAppsAPIClientGetCustomDomainVerificationIDResponse, error)` +- New function `*JobsClient.GetDetector(context.Context, string, string, string, *JobsClientGetDetectorOptions) (JobsClientGetDetectorResponse, error)` +- New function `*JobsClient.NewListDetectorsPager(string, string, *JobsClientListDetectorsOptions) *runtime.Pager[JobsClientListDetectorsResponse]` +- New function `*JobsClient.ProxyGet(context.Context, string, string, string, *JobsClientProxyGetOptions) (JobsClientProxyGetResponse, error)` +- New function `NewManagedEnvironmentUsagesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedEnvironmentUsagesClient, error)` +- New function `*ManagedEnvironmentUsagesClient.NewListPager(string, string, *ManagedEnvironmentUsagesClientListOptions) *runtime.Pager[ManagedEnvironmentUsagesClientListResponse]` +- New function `NewUsagesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*UsagesClient, error)` +- New function `*UsagesClient.NewListPager(string, *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse]` +- New struct `BlobStorageTokenStore` +- New struct `EncryptionSettings` +- New struct `IngressPortMapping` +- New struct `JobExecutionProperties` +- New struct `ListUsagesResult` +- New struct `ManagedEnvironmentPropertiesPeerTrafficConfiguration` +- New struct `ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption` +- New struct `TokenStore` +- New struct `Usage` +- New struct `UsageName` +- New field `EncryptionSettings` in struct `AuthConfigProperties` +- New field `Gpus` in struct `AvailableWorkloadProfileProperties` +- New field `AdditionalPortMappings` in struct `Ingress` +- New field `Properties` in struct `JobExecution` +- New field `TokenStore` in struct `Login` +- New field `PeerTrafficConfiguration` in struct `ManagedEnvironmentProperties` + + ## 3.0.0-beta.1 (2024-03-22) ### Breaking Changes @@ -395,4 +430,4 @@ The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontain 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 +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/README.md index 3da8922b..0b7e3b42 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/README.md @@ -57,7 +57,7 @@ clientFactory, err := armappcontainers.NewClientFactory(, cred, 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.NewAppResiliencyClient() +client := clientFactory.NewAvailableWorkloadProfilesClient() ``` ## Fakes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/appresiliency_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/appresiliency_client.go deleted file mode 100644 index 93601eb2..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/appresiliency_client.go +++ /dev/null @@ -1,383 +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 armappcontainers - -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" -) - -// AppResiliencyClient contains the methods for the AppResiliency group. -// Don't use this type directly, use NewAppResiliencyClient() instead. -type AppResiliencyClient struct { - internal *arm.Client - subscriptionID string -} - -// NewAppResiliencyClient creates a new instance of AppResiliencyClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewAppResiliencyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AppResiliencyClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &AppResiliencyClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdate - Create or update container app resiliency policy. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - appName - Name of the Container App. -// - name - Name of the resiliency policy. -// - resiliencyEnvelope - The resiliency policy to create or update. -// - options - AppResiliencyClientCreateOrUpdateOptions contains the optional parameters for the AppResiliencyClient.CreateOrUpdate -// method. -func (client *AppResiliencyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, appName string, name string, resiliencyEnvelope AppResiliency, options *AppResiliencyClientCreateOrUpdateOptions) (AppResiliencyClientCreateOrUpdateResponse, error) { - var err error - const operationName = "AppResiliencyClient.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, appName, name, resiliencyEnvelope, options) - if err != nil { - return AppResiliencyClientCreateOrUpdateResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AppResiliencyClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { - err = runtime.NewResponseError(httpResp) - return AppResiliencyClientCreateOrUpdateResponse{}, err - } - resp, err := client.createOrUpdateHandleResponse(httpResp) - return resp, err -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *AppResiliencyClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, appName string, name string, resiliencyEnvelope AppResiliency, options *AppResiliencyClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{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 appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, resiliencyEnvelope); err != nil { - return nil, err - } - return req, nil -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *AppResiliencyClient) createOrUpdateHandleResponse(resp *http.Response) (AppResiliencyClientCreateOrUpdateResponse, error) { - result := AppResiliencyClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AppResiliency); err != nil { - return AppResiliencyClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete container app resiliency policy. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - appName - Name of the Container App. -// - name - Name of the resiliency policy. -// - options - AppResiliencyClientDeleteOptions contains the optional parameters for the AppResiliencyClient.Delete method. -func (client *AppResiliencyClient) Delete(ctx context.Context, resourceGroupName string, appName string, name string, options *AppResiliencyClientDeleteOptions) (AppResiliencyClientDeleteResponse, error) { - var err error - const operationName = "AppResiliencyClient.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, appName, name, options) - if err != nil { - return AppResiliencyClientDeleteResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AppResiliencyClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { - err = runtime.NewResponseError(httpResp) - return AppResiliencyClientDeleteResponse{}, err - } - return AppResiliencyClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *AppResiliencyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, appName string, name string, options *AppResiliencyClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{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 appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get container app resiliency policy. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - appName - Name of the Container App. -// - name - Name of the resiliency policy. -// - options - AppResiliencyClientGetOptions contains the optional parameters for the AppResiliencyClient.Get method. -func (client *AppResiliencyClient) Get(ctx context.Context, resourceGroupName string, appName string, name string, options *AppResiliencyClientGetOptions) (AppResiliencyClientGetResponse, error) { - var err error - const operationName = "AppResiliencyClient.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, appName, name, options) - if err != nil { - return AppResiliencyClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AppResiliencyClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return AppResiliencyClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *AppResiliencyClient) getCreateRequest(ctx context.Context, resourceGroupName string, appName string, name string, options *AppResiliencyClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{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 appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *AppResiliencyClient) getHandleResponse(resp *http.Response) (AppResiliencyClientGetResponse, error) { - result := AppResiliencyClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AppResiliency); err != nil { - return AppResiliencyClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List container app resiliency policies. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - appName - Name of the Container App. -// - options - AppResiliencyClientListOptions contains the optional parameters for the AppResiliencyClient.NewListPager method. -func (client *AppResiliencyClient) NewListPager(resourceGroupName string, appName string, options *AppResiliencyClientListOptions) *runtime.Pager[AppResiliencyClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[AppResiliencyClientListResponse]{ - More: func(page AppResiliencyClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AppResiliencyClientListResponse) (AppResiliencyClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AppResiliencyClient.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, appName, options) - }, nil) - if err != nil { - return AppResiliencyClientListResponse{}, err - } - return client.listHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listCreateRequest creates the List request. -func (client *AppResiliencyClient) listCreateRequest(ctx context.Context, resourceGroupName string, appName string, options *AppResiliencyClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies" - 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 appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - req, err := 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *AppResiliencyClient) listHandleResponse(resp *http.Response) (AppResiliencyClientListResponse, error) { - result := AppResiliencyClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AppResiliencyCollection); err != nil { - return AppResiliencyClientListResponse{}, err - } - return result, nil -} - -// Update - Update container app resiliency policy. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - appName - Name of the Container App. -// - name - Name of the resiliency policy. -// - resiliencyEnvelope - The resiliency policy to update. -// - options - AppResiliencyClientUpdateOptions contains the optional parameters for the AppResiliencyClient.Update method. -func (client *AppResiliencyClient) Update(ctx context.Context, resourceGroupName string, appName string, name string, resiliencyEnvelope AppResiliency, options *AppResiliencyClientUpdateOptions) (AppResiliencyClientUpdateResponse, error) { - var err error - const operationName = "AppResiliencyClient.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, appName, name, resiliencyEnvelope, options) - if err != nil { - return AppResiliencyClientUpdateResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AppResiliencyClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return AppResiliencyClientUpdateResponse{}, err - } - resp, err := client.updateHandleResponse(httpResp) - return resp, err -} - -// updateCreateRequest creates the Update request. -func (client *AppResiliencyClient) updateCreateRequest(ctx context.Context, resourceGroupName string, appName string, name string, resiliencyEnvelope AppResiliency, options *AppResiliencyClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{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 appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, resiliencyEnvelope); err != nil { - return nil, err - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *AppResiliencyClient) updateHandleResponse(resp *http.Response) (AppResiliencyClientUpdateResponse, error) { - result := AppResiliencyClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AppResiliency); err != nil { - return AppResiliencyClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/autorest.md index bccbeaf9..f1ee2235 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/d74afb775446d7f0bc1810fdc5a128c56289e854/specification/app/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/d74afb775446d7f0bc1810fdc5a128c56289e854/specification/app/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/edf14cc0a577f6b9c4e3ce018cec0c383e64b7b0/specification/app/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/edf14cc0a577f6b9c4e3ce018cec0c383e64b7b0/specification/app/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 3.0.0-beta.1 -tag: package-preview-2023-11 +module-version: 3.0.0 +tag: package-2024-03 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/availableworkloadprofiles_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/availableworkloadprofiles_client.go index 821ae2a7..21baadf8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/availableworkloadprofiles_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/availableworkloadprofiles_client.go @@ -28,7 +28,7 @@ type AvailableWorkloadProfilesClient struct { } // NewAvailableWorkloadProfilesClient creates a new instance of AvailableWorkloadProfilesClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewAvailableWorkloadProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableWorkloadProfilesClient, error) { @@ -45,7 +45,7 @@ func NewAvailableWorkloadProfilesClient(subscriptionID string, credential azcore // NewGetPager - Get all available workload profiles for a location. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - location - The name of Azure region. // - options - AvailableWorkloadProfilesClientGetOptions contains the optional parameters for the AvailableWorkloadProfilesClient.NewGetPager // method. @@ -88,7 +88,7 @@ func (client *AvailableWorkloadProfilesClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/billingmeters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/billingmeters_client.go index 732cea83..f37f0302 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/billingmeters_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/billingmeters_client.go @@ -28,7 +28,7 @@ type BillingMetersClient struct { } // NewBillingMetersClient creates a new instance of BillingMetersClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewBillingMetersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BillingMetersClient, error) { @@ -46,7 +46,7 @@ func NewBillingMetersClient(subscriptionID string, credential azcore.TokenCreden // Get - Get all billingMeters for a location. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - location - The name of Azure region. // - options - BillingMetersClientGetOptions contains the optional parameters for the BillingMetersClient.Get method. func (client *BillingMetersClient) Get(ctx context.Context, location string, options *BillingMetersClientGetOptions) (BillingMetersClientGetResponse, error) { @@ -87,7 +87,7 @@ func (client *BillingMetersClient) getCreateRequest(ctx context.Context, locatio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/buildauthtoken_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/buildauthtoken_client.go deleted file mode 100644 index 4a6b7152..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/buildauthtoken_client.go +++ /dev/null @@ -1,113 +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 armappcontainers - -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" -) - -// BuildAuthTokenClient contains the methods for the BuildAuthToken group. -// Don't use this type directly, use NewBuildAuthTokenClient() instead. -type BuildAuthTokenClient struct { - internal *arm.Client - subscriptionID string -} - -// NewBuildAuthTokenClient creates a new instance of BuildAuthTokenClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewBuildAuthTokenClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildAuthTokenClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &BuildAuthTokenClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// List - Gets the token used to connect to the endpoint where source code can be uploaded for a build. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - builderName - The name of the builder. -// - buildName - The name of a build. -// - options - BuildAuthTokenClientListOptions contains the optional parameters for the BuildAuthTokenClient.List method. -func (client *BuildAuthTokenClient) List(ctx context.Context, resourceGroupName string, builderName string, buildName string, options *BuildAuthTokenClientListOptions) (BuildAuthTokenClientListResponse, error) { - var err error - const operationName = "BuildAuthTokenClient.List" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.listCreateRequest(ctx, resourceGroupName, builderName, buildName, options) - if err != nil { - return BuildAuthTokenClientListResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BuildAuthTokenClientListResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return BuildAuthTokenClientListResponse{}, err - } - resp, err := client.listHandleResponse(httpResp) - return resp, err -} - -// listCreateRequest creates the List request. -func (client *BuildAuthTokenClient) listCreateRequest(ctx context.Context, resourceGroupName string, builderName string, buildName string, options *BuildAuthTokenClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/listAuthToken" - 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 builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - if buildName == "" { - return nil, errors.New("parameter buildName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BuildAuthTokenClient) listHandleResponse(resp *http.Response) (BuildAuthTokenClientListResponse, error) { - result := BuildAuthTokenClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuildToken); err != nil { - return BuildAuthTokenClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/builders_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/builders_client.go deleted file mode 100644 index 0f374fa5..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/builders_client.go +++ /dev/null @@ -1,460 +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 armappcontainers - -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" -) - -// BuildersClient contains the methods for the Builders group. -// Don't use this type directly, use NewBuildersClient() instead. -type BuildersClient struct { - internal *arm.Client - subscriptionID string -} - -// NewBuildersClient creates a new instance of BuildersClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewBuildersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildersClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &BuildersClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update a BuilderResource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - builderName - The name of the builder. -// - builderEnvelope - Resource create parameters. -// - options - BuildersClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildersClient.BeginCreateOrUpdate -// method. -func (client *BuildersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, builderName string, builderEnvelope BuilderResource, options *BuildersClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildersClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, builderName, builderEnvelope, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildersClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BuildersClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// CreateOrUpdate - Create or update a BuilderResource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -func (client *BuildersClient) createOrUpdate(ctx context.Context, resourceGroupName string, builderName string, builderEnvelope BuilderResource, options *BuildersClientBeginCreateOrUpdateOptions) (*http.Response, error) { - var err error - const operationName = "BuildersClient.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, builderName, builderEnvelope, 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 *BuildersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, builderName string, builderEnvelope BuilderResource, options *BuildersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}" - 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 builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, builderEnvelope); err != nil { - return nil, err - } - return req, nil -} - -// BeginDelete - Delete a BuilderResource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - builderName - The name of the builder. -// - options - BuildersClientBeginDeleteOptions contains the optional parameters for the BuildersClient.BeginDelete method. -func (client *BuildersClient) BeginDelete(ctx context.Context, resourceGroupName string, builderName string, options *BuildersClientBeginDeleteOptions) (*runtime.Poller[BuildersClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, builderName, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildersClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BuildersClientDeleteResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Delete - Delete a BuilderResource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -func (client *BuildersClient) deleteOperation(ctx context.Context, resourceGroupName string, builderName string, options *BuildersClientBeginDeleteOptions) (*http.Response, error) { - var err error - const operationName = "BuildersClient.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, builderName, 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 *BuildersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, builderName string, options *BuildersClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}" - 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 builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a BuilderResource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - builderName - The name of the builder. -// - options - BuildersClientGetOptions contains the optional parameters for the BuildersClient.Get method. -func (client *BuildersClient) Get(ctx context.Context, resourceGroupName string, builderName string, options *BuildersClientGetOptions) (BuildersClientGetResponse, error) { - var err error - const operationName = "BuildersClient.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, builderName, options) - if err != nil { - return BuildersClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BuildersClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return BuildersClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *BuildersClient) getCreateRequest(ctx context.Context, resourceGroupName string, builderName string, options *BuildersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}" - 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 builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - req, err := 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BuildersClient) getHandleResponse(resp *http.Response) (BuildersClientGetResponse, error) { - result := BuildersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuilderResource); err != nil { - return BuildersClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - List BuilderResource resources by resource group -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - options - BuildersClientListByResourceGroupOptions contains the optional parameters for the BuildersClient.NewListByResourceGroupPager -// method. -func (client *BuildersClient) NewListByResourceGroupPager(resourceGroupName string, options *BuildersClientListByResourceGroupOptions) *runtime.Pager[BuildersClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[BuildersClientListByResourceGroupResponse]{ - More: func(page BuildersClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BuildersClientListByResourceGroupResponse) (BuildersClientListByResourceGroupResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BuildersClient.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 BuildersClientListByResourceGroupResponse{}, err - } - return client.listByResourceGroupHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *BuildersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *BuildersClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders" - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *BuildersClient) listByResourceGroupHandleResponse(resp *http.Response) (BuildersClientListByResourceGroupResponse, error) { - result := BuildersClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuilderCollection); err != nil { - return BuildersClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - List BuilderResource resources by subscription ID -// -// Generated from API version 2023-11-02-preview -// - options - BuildersClientListBySubscriptionOptions contains the optional parameters for the BuildersClient.NewListBySubscriptionPager -// method. -func (client *BuildersClient) NewListBySubscriptionPager(options *BuildersClientListBySubscriptionOptions) *runtime.Pager[BuildersClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[BuildersClientListBySubscriptionResponse]{ - More: func(page BuildersClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BuildersClientListBySubscriptionResponse) (BuildersClientListBySubscriptionResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BuildersClient.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 BuildersClientListBySubscriptionResponse{}, err - } - return client.listBySubscriptionHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *BuildersClient) listBySubscriptionCreateRequest(ctx context.Context, options *BuildersClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.App/builders" - if client.subscriptionID == "" { - return 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *BuildersClient) listBySubscriptionHandleResponse(resp *http.Response) (BuildersClientListBySubscriptionResponse, error) { - result := BuildersClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuilderCollection); err != nil { - return BuildersClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// BeginUpdate - Update a BuilderResource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - builderName - The name of the builder. -// - builderEnvelope - The resource properties to be updated. -// - options - BuildersClientBeginUpdateOptions contains the optional parameters for the BuildersClient.BeginUpdate method. -func (client *BuildersClient) BeginUpdate(ctx context.Context, resourceGroupName string, builderName string, builderEnvelope BuilderResourceUpdate, options *BuildersClientBeginUpdateOptions) (*runtime.Poller[BuildersClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, builderName, builderEnvelope, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildersClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BuildersClientUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Update - Update a BuilderResource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -func (client *BuildersClient) update(ctx context.Context, resourceGroupName string, builderName string, builderEnvelope BuilderResourceUpdate, options *BuildersClientBeginUpdateOptions) (*http.Response, error) { - var err error - const operationName = "BuildersClient.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, builderName, builderEnvelope, 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 *BuildersClient) updateCreateRequest(ctx context.Context, resourceGroupName string, builderName string, builderEnvelope BuilderResourceUpdate, options *BuildersClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}" - 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 builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, builderEnvelope); err != nil { - return nil, err - } - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/builds_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/builds_client.go deleted file mode 100644 index 12131257..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/builds_client.go +++ /dev/null @@ -1,280 +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 armappcontainers - -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" -) - -// BuildsClient contains the methods for the Builds group. -// Don't use this type directly, use NewBuildsClient() instead. -type BuildsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewBuildsClient creates a new instance of BuildsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewBuildsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildsClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &BuildsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create a BuildResource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - builderName - The name of the builder. -// - buildName - The name of a build. -// - buildEnvelope - Resource create or update parameters. -// - options - BuildsClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildsClient.BeginCreateOrUpdate -// method. -func (client *BuildsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, builderName string, buildName string, buildEnvelope BuildResource, options *BuildsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, builderName, buildName, buildEnvelope, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BuildsClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// CreateOrUpdate - Create a BuildResource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -func (client *BuildsClient) createOrUpdate(ctx context.Context, resourceGroupName string, builderName string, buildName string, buildEnvelope BuildResource, options *BuildsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - var err error - const operationName = "BuildsClient.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, builderName, buildName, buildEnvelope, 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 *BuildsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, builderName string, buildName string, buildEnvelope BuildResource, options *BuildsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}" - 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 builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - if buildName == "" { - return nil, errors.New("parameter buildName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, buildEnvelope); err != nil { - return nil, err - } - return req, nil -} - -// BeginDelete - Delete a BuildResource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - builderName - The name of the builder. -// - buildName - The name of a build. -// - options - BuildsClientBeginDeleteOptions contains the optional parameters for the BuildsClient.BeginDelete method. -func (client *BuildsClient) BeginDelete(ctx context.Context, resourceGroupName string, builderName string, buildName string, options *BuildsClientBeginDeleteOptions) (*runtime.Poller[BuildsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, builderName, buildName, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BuildsClientDeleteResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Delete - Delete a BuildResource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -func (client *BuildsClient) deleteOperation(ctx context.Context, resourceGroupName string, builderName string, buildName string, options *BuildsClientBeginDeleteOptions) (*http.Response, error) { - var err error - const operationName = "BuildsClient.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, builderName, buildName, 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 *BuildsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, builderName string, buildName string, options *BuildsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}" - 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 builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - if buildName == "" { - return nil, errors.New("parameter buildName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a BuildResource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - builderName - The name of the builder. -// - buildName - The name of a build. -// - options - BuildsClientGetOptions contains the optional parameters for the BuildsClient.Get method. -func (client *BuildsClient) Get(ctx context.Context, resourceGroupName string, builderName string, buildName string, options *BuildsClientGetOptions) (BuildsClientGetResponse, error) { - var err error - const operationName = "BuildsClient.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, builderName, buildName, options) - if err != nil { - return BuildsClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BuildsClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return BuildsClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *BuildsClient) getCreateRequest(ctx context.Context, resourceGroupName string, builderName string, buildName string, options *BuildsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}" - 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 builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - if buildName == "" { - return nil, errors.New("parameter buildName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) - req, err := 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BuildsClient) getHandleResponse(resp *http.Response) (BuildsClientGetResponse, error) { - result := BuildsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuildResource); err != nil { - return BuildsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/certificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/certificates_client.go index daf30ea0..ce119708 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/certificates_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/certificates_client.go @@ -28,7 +28,7 @@ type CertificatesClient struct { } // NewCertificatesClient creates a new instance of CertificatesClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificatesClient, error) { @@ -46,7 +46,7 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Create or Update a Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. @@ -98,7 +98,7 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.CertificateEnvelope != nil { @@ -122,7 +122,7 @@ func (client *CertificatesClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Deletes the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. @@ -172,7 +172,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -181,7 +181,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou // Get - Get the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. @@ -232,7 +232,7 @@ func (client *CertificatesClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *CertificatesClient) getHandleResponse(resp *http.Response) (Certif // NewListPager - Get the Certificates in a given managed environment. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. @@ -296,7 +296,7 @@ func (client *CertificatesClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -314,7 +314,7 @@ func (client *CertificatesClient) listHandleResponse(resp *http.Response) (Certi // Update - Patches a certificate. Currently only patching of tags is supported // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. @@ -366,7 +366,7 @@ func (client *CertificatesClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, certificateEnvelope); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/client_factory.go index 2588a2e5..8ae89003 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/client_factory.go @@ -22,7 +22,7 @@ type ClientFactory struct { // 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. The value must be an UUID. +// - 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) { @@ -36,14 +36,6 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -// NewAppResiliencyClient creates a new instance of AppResiliencyClient. -func (c *ClientFactory) NewAppResiliencyClient() *AppResiliencyClient { - return &AppResiliencyClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - // NewAvailableWorkloadProfilesClient creates a new instance of AvailableWorkloadProfilesClient. func (c *ClientFactory) NewAvailableWorkloadProfilesClient() *AvailableWorkloadProfilesClient { return &AvailableWorkloadProfilesClient{ @@ -60,38 +52,6 @@ func (c *ClientFactory) NewBillingMetersClient() *BillingMetersClient { } } -// NewBuildAuthTokenClient creates a new instance of BuildAuthTokenClient. -func (c *ClientFactory) NewBuildAuthTokenClient() *BuildAuthTokenClient { - return &BuildAuthTokenClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - -// NewBuildersClient creates a new instance of BuildersClient. -func (c *ClientFactory) NewBuildersClient() *BuildersClient { - return &BuildersClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - -// NewBuildsByBuilderResourceClient creates a new instance of BuildsByBuilderResourceClient. -func (c *ClientFactory) NewBuildsByBuilderResourceClient() *BuildsByBuilderResourceClient { - return &BuildsByBuilderResourceClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - -// NewBuildsClient creates a new instance of BuildsClient. -func (c *ClientFactory) NewBuildsClient() *BuildsClient { - return &BuildsClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - // NewCertificatesClient creates a new instance of CertificatesClient. func (c *ClientFactory) NewCertificatesClient() *CertificatesClient { return &CertificatesClient{ @@ -188,14 +148,6 @@ func (c *ClientFactory) NewContainerAppsSourceControlsClient() *ContainerAppsSou } } -// NewDaprComponentResiliencyPoliciesClient creates a new instance of DaprComponentResiliencyPoliciesClient. -func (c *ClientFactory) NewDaprComponentResiliencyPoliciesClient() *DaprComponentResiliencyPoliciesClient { - return &DaprComponentResiliencyPoliciesClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - // NewDaprComponentsClient creates a new instance of DaprComponentsClient. func (c *ClientFactory) NewDaprComponentsClient() *DaprComponentsClient { return &DaprComponentsClient{ @@ -204,30 +156,6 @@ func (c *ClientFactory) NewDaprComponentsClient() *DaprComponentsClient { } } -// NewDaprSubscriptionsClient creates a new instance of DaprSubscriptionsClient. -func (c *ClientFactory) NewDaprSubscriptionsClient() *DaprSubscriptionsClient { - return &DaprSubscriptionsClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - -// NewDotNetComponentsClient creates a new instance of DotNetComponentsClient. -func (c *ClientFactory) NewDotNetComponentsClient() *DotNetComponentsClient { - return &DotNetComponentsClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - -// NewJavaComponentsClient creates a new instance of JavaComponentsClient. -func (c *ClientFactory) NewJavaComponentsClient() *JavaComponentsClient { - return &JavaComponentsClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - // NewJobsClient creates a new instance of JobsClient. func (c *ClientFactory) NewJobsClient() *JobsClient { return &JobsClient{ diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironments_client.go index b4308fc6..6312b07c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironments_client.go @@ -28,7 +28,7 @@ type ConnectedEnvironmentsClient struct { } // NewConnectedEnvironmentsClient creates a new instance of ConnectedEnvironmentsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewConnectedEnvironmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectedEnvironmentsClient, error) { @@ -46,7 +46,7 @@ func NewConnectedEnvironmentsClient(subscriptionID string, credential azcore.Tok // CheckNameAvailability - Checks if resource connectedEnvironmentName is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Managed Environment. // - checkNameAvailabilityRequest - The check connectedEnvironmentName availability request. @@ -94,7 +94,7 @@ func (client *ConnectedEnvironmentsClient) checkNameAvailabilityCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, checkNameAvailabilityRequest); err != nil { @@ -115,7 +115,7 @@ func (client *ConnectedEnvironmentsClient) checkNameAvailabilityHandleResponse(r // BeginCreateOrUpdate - Creates or updates an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connectedEnvironment. // - environmentEnvelope - Configuration details of the connectedEnvironment. @@ -142,7 +142,7 @@ func (client *ConnectedEnvironmentsClient) BeginCreateOrUpdate(ctx context.Conte // CreateOrUpdate - Creates or updates an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *ConnectedEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, environmentEnvelope ConnectedEnvironment, options *ConnectedEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ConnectedEnvironmentsClient.BeginCreateOrUpdate" @@ -184,7 +184,7 @@ func (client *ConnectedEnvironmentsClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, environmentEnvelope); err != nil { @@ -196,7 +196,7 @@ func (client *ConnectedEnvironmentsClient) createOrUpdateCreateRequest(ctx conte // BeginDelete - Delete an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connectedEnvironment. // - options - ConnectedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ConnectedEnvironmentsClient.BeginDelete @@ -222,7 +222,7 @@ func (client *ConnectedEnvironmentsClient) BeginDelete(ctx context.Context, reso // Delete - Delete an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *ConnectedEnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ConnectedEnvironmentsClient.BeginDelete" @@ -264,7 +264,7 @@ func (client *ConnectedEnvironmentsClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -273,7 +273,7 @@ func (client *ConnectedEnvironmentsClient) deleteCreateRequest(ctx context.Conte // Get - Get the properties of an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connectedEnvironment. // - options - ConnectedEnvironmentsClientGetOptions contains the optional parameters for the ConnectedEnvironmentsClient.Get @@ -320,7 +320,7 @@ func (client *ConnectedEnvironmentsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -337,7 +337,7 @@ func (client *ConnectedEnvironmentsClient) getHandleResponse(resp *http.Response // NewListByResourceGroupPager - Get all connectedEnvironments in a resource group. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ConnectedEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListByResourceGroupPager // method. @@ -380,7 +380,7 @@ func (client *ConnectedEnvironmentsClient) listByResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -397,7 +397,7 @@ func (client *ConnectedEnvironmentsClient) listByResourceGroupHandleResponse(res // NewListBySubscriptionPager - Get all connectedEnvironments for a subscription. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - options - ConnectedEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListBySubscriptionPager // method. func (client *ConnectedEnvironmentsClient) NewListBySubscriptionPager(options *ConnectedEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[ConnectedEnvironmentsClientListBySubscriptionResponse] { @@ -435,7 +435,7 @@ func (client *ConnectedEnvironmentsClient) listBySubscriptionCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -453,7 +453,7 @@ func (client *ConnectedEnvironmentsClient) listBySubscriptionHandleResponse(resp // Update - Patches a Managed Environment. Only patching of tags is supported currently // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connectedEnvironment. // - options - ConnectedEnvironmentsClientUpdateOptions contains the optional parameters for the ConnectedEnvironmentsClient.Update @@ -500,7 +500,7 @@ func (client *ConnectedEnvironmentsClient) updateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/connectedenvironmentscertificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentscertificates_client.go index a36d54ae..2592a559 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentscertificates_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentscertificates_client.go @@ -28,7 +28,7 @@ type ConnectedEnvironmentsCertificatesClient struct { } // NewConnectedEnvironmentsCertificatesClient creates a new instance of ConnectedEnvironmentsCertificatesClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewConnectedEnvironmentsCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectedEnvironmentsCertificatesClient, error) { @@ -46,7 +46,7 @@ func NewConnectedEnvironmentsCertificatesClient(subscriptionID string, credentia // CreateOrUpdate - Create or Update a Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - certificateName - Name of the Certificate. @@ -98,7 +98,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) createOrUpdateCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.CertificateEnvelope != nil { @@ -122,7 +122,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) createOrUpdateHandleRespo // Delete - Deletes the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - certificateName - Name of the Certificate. @@ -173,7 +173,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) deleteCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +182,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) deleteCreateRequest(ctx c // Get - Get the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - certificateName - Name of the Certificate. @@ -234,7 +234,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) getCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -251,7 +251,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) getHandleResponse(resp *h // NewListPager - Get the Certificates in a given connected environment. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - options - ConnectedEnvironmentsCertificatesClientListOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.NewListPager @@ -299,7 +299,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) listCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -317,7 +317,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) listHandleResponse(resp * // Update - Patches a certificate. Currently only patching of tags is supported // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - certificateName - Name of the Certificate. @@ -370,7 +370,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) updateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, certificateEnvelope); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsdaprcomponents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsdaprcomponents_client.go index 4766a92a..2ef2184e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsdaprcomponents_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsdaprcomponents_client.go @@ -28,7 +28,7 @@ type ConnectedEnvironmentsDaprComponentsClient struct { } // NewConnectedEnvironmentsDaprComponentsClient creates a new instance of ConnectedEnvironmentsDaprComponentsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewConnectedEnvironmentsDaprComponentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectedEnvironmentsDaprComponentsClient, error) { @@ -46,7 +46,7 @@ func NewConnectedEnvironmentsDaprComponentsClient(subscriptionID string, credent // CreateOrUpdate - Creates or updates a Dapr Component in a connected environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - componentName - Name of the Dapr Component. @@ -99,7 +99,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) createOrUpdateCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, daprComponentEnvelope); err != nil { @@ -120,7 +120,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) createOrUpdateHandleRes // Delete - Delete a Dapr Component from a connected environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - componentName - Name of the Dapr Component. @@ -171,7 +171,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) deleteCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) deleteCreateRequest(ctx // Get - Get a dapr component. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - componentName - Name of the Dapr Component. @@ -232,7 +232,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) getCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) getHandleResponse(resp // NewListPager - Get the Dapr Components for a connected environment. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - options - ConnectedEnvironmentsDaprComponentsClientListOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.NewListPager @@ -297,7 +297,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) listCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -315,7 +315,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) listHandleResponse(resp // ListSecrets - List secrets for a dapr component // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - componentName - Name of the Dapr Component. @@ -367,7 +367,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) listSecretsCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/connectedenvironmentsstorages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsstorages_client.go index af0ec7b4..8e4441a0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsstorages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsstorages_client.go @@ -28,7 +28,7 @@ type ConnectedEnvironmentsStoragesClient struct { } // NewConnectedEnvironmentsStoragesClient creates a new instance of ConnectedEnvironmentsStoragesClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewConnectedEnvironmentsStoragesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectedEnvironmentsStoragesClient, error) { @@ -46,7 +46,7 @@ func NewConnectedEnvironmentsStoragesClient(subscriptionID string, credential az // CreateOrUpdate - Create or update storage for a connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Environment. // - storageName - Name of the storage. @@ -99,7 +99,7 @@ func (client *ConnectedEnvironmentsStoragesClient) createOrUpdateCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, storageEnvelope); err != nil { @@ -120,7 +120,7 @@ func (client *ConnectedEnvironmentsStoragesClient) createOrUpdateHandleResponse( // Delete - Delete storage for a connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Environment. // - storageName - Name of the storage. @@ -171,7 +171,7 @@ func (client *ConnectedEnvironmentsStoragesClient) deleteCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *ConnectedEnvironmentsStoragesClient) deleteCreateRequest(ctx conte // Get - Get storage for a connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Environment. // - storageName - Name of the storage. @@ -232,7 +232,7 @@ func (client *ConnectedEnvironmentsStoragesClient) getCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -250,7 +250,7 @@ func (client *ConnectedEnvironmentsStoragesClient) getHandleResponse(resp *http. // List - Get all storages for a connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Environment. // - options - ConnectedEnvironmentsStoragesClientListOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.List @@ -297,7 +297,7 @@ func (client *ConnectedEnvironmentsStoragesClient) listCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/constants.go index 5ecd2795..b1cf2808 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/constants.go @@ -10,7 +10,7 @@ package armappcontainers const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers" - moduleVersion = "v3.0.0-beta.1" + moduleVersion = "v3.0.0" ) // AccessMode - Access mode for storage @@ -127,76 +127,6 @@ func PossibleBindingTypeValues() []BindingType { } } -// BuildProvisioningState - Resource instance provisioning state. -type BuildProvisioningState string - -const ( - BuildProvisioningStateCanceled BuildProvisioningState = "Canceled" - BuildProvisioningStateCreating BuildProvisioningState = "Creating" - BuildProvisioningStateDeleting BuildProvisioningState = "Deleting" - BuildProvisioningStateFailed BuildProvisioningState = "Failed" - BuildProvisioningStateSucceeded BuildProvisioningState = "Succeeded" - BuildProvisioningStateUpdating BuildProvisioningState = "Updating" -) - -// PossibleBuildProvisioningStateValues returns the possible values for the BuildProvisioningState const type. -func PossibleBuildProvisioningStateValues() []BuildProvisioningState { - return []BuildProvisioningState{ - BuildProvisioningStateCanceled, - BuildProvisioningStateCreating, - BuildProvisioningStateDeleting, - BuildProvisioningStateFailed, - BuildProvisioningStateSucceeded, - BuildProvisioningStateUpdating, - } -} - -// BuildStatus - Status of the build once it has been provisioned. -type BuildStatus string - -const ( - BuildStatusCanceled BuildStatus = "Canceled" - BuildStatusFailed BuildStatus = "Failed" - BuildStatusInProgress BuildStatus = "InProgress" - BuildStatusNotStarted BuildStatus = "NotStarted" - BuildStatusSucceeded BuildStatus = "Succeeded" -) - -// PossibleBuildStatusValues returns the possible values for the BuildStatus const type. -func PossibleBuildStatusValues() []BuildStatus { - return []BuildStatus{ - BuildStatusCanceled, - BuildStatusFailed, - BuildStatusInProgress, - BuildStatusNotStarted, - BuildStatusSucceeded, - } -} - -// BuilderProvisioningState - Resource instance provisioning state. -type BuilderProvisioningState string - -const ( - BuilderProvisioningStateCanceled BuilderProvisioningState = "Canceled" - BuilderProvisioningStateCreating BuilderProvisioningState = "Creating" - BuilderProvisioningStateDeleting BuilderProvisioningState = "Deleting" - BuilderProvisioningStateFailed BuilderProvisioningState = "Failed" - BuilderProvisioningStateSucceeded BuilderProvisioningState = "Succeeded" - BuilderProvisioningStateUpdating BuilderProvisioningState = "Updating" -) - -// PossibleBuilderProvisioningStateValues returns the possible values for the BuilderProvisioningState const type. -func PossibleBuilderProvisioningStateValues() []BuilderProvisioningState { - return []BuilderProvisioningState{ - BuilderProvisioningStateCanceled, - BuilderProvisioningStateCreating, - BuilderProvisioningStateDeleting, - BuilderProvisioningStateFailed, - BuilderProvisioningStateSucceeded, - BuilderProvisioningStateUpdating, - } -} - // CertificateProvisioningState - Provisioning state of the certificate. type CertificateProvisioningState string @@ -219,22 +149,6 @@ func PossibleCertificateProvisioningStateValues() []CertificateProvisioningState } } -// CertificateType - The type of the certificate. Allowed values are ServerSSLCertificate and ImagePullTrustedCA -type CertificateType string - -const ( - CertificateTypeImagePullTrustedCA CertificateType = "ImagePullTrustedCA" - CertificateTypeServerSSLCertificate CertificateType = "ServerSSLCertificate" -) - -// PossibleCertificateTypeValues returns the possible values for the CertificateType const type. -func PossibleCertificateTypeValues() []CertificateType { - return []CertificateType{ - CertificateTypeImagePullTrustedCA, - CertificateTypeServerSSLCertificate, - } -} - // CheckNameAvailabilityReason - The reason why the given name is not available. type CheckNameAvailabilityReason string @@ -391,44 +305,6 @@ func PossibleDNSVerificationTestResultValues() []DNSVerificationTestResult { } } -// DotNetComponentProvisioningState - Provisioning state of the .NET Component. -type DotNetComponentProvisioningState string - -const ( - DotNetComponentProvisioningStateCanceled DotNetComponentProvisioningState = "Canceled" - DotNetComponentProvisioningStateDeleting DotNetComponentProvisioningState = "Deleting" - DotNetComponentProvisioningStateFailed DotNetComponentProvisioningState = "Failed" - DotNetComponentProvisioningStateInProgress DotNetComponentProvisioningState = "InProgress" - DotNetComponentProvisioningStateSucceeded DotNetComponentProvisioningState = "Succeeded" -) - -// PossibleDotNetComponentProvisioningStateValues returns the possible values for the DotNetComponentProvisioningState const type. -func PossibleDotNetComponentProvisioningStateValues() []DotNetComponentProvisioningState { - return []DotNetComponentProvisioningState{ - DotNetComponentProvisioningStateCanceled, - DotNetComponentProvisioningStateDeleting, - DotNetComponentProvisioningStateFailed, - DotNetComponentProvisioningStateInProgress, - DotNetComponentProvisioningStateSucceeded, - } -} - -// DotNetComponentType - Type of the .NET Component. -type DotNetComponentType string - -const ( - DotNetComponentTypeAspireDashboard DotNetComponentType = "AspireDashboard" - DotNetComponentTypeAspireResourceServerAPI DotNetComponentType = "AspireResourceServerApi" -) - -// PossibleDotNetComponentTypeValues returns the possible values for the DotNetComponentType const type. -func PossibleDotNetComponentTypeValues() []DotNetComponentType { - return []DotNetComponentType{ - DotNetComponentTypeAspireDashboard, - DotNetComponentTypeAspireResourceServerAPI, - } -} - // EnvironmentProvisioningState - Provisioning state of the Environment. type EnvironmentProvisioningState string @@ -513,22 +389,6 @@ func PossibleIngressClientCertificateModeValues() []IngressClientCertificateMode } } -// IngressTargetPortHTTPScheme - Whether an http app listens on http or https -type IngressTargetPortHTTPScheme string - -const ( - IngressTargetPortHTTPSchemeHTTP IngressTargetPortHTTPScheme = "http" - IngressTargetPortHTTPSchemeHTTPS IngressTargetPortHTTPScheme = "https" -) - -// PossibleIngressTargetPortHTTPSchemeValues returns the possible values for the IngressTargetPortHTTPScheme const type. -func PossibleIngressTargetPortHTTPSchemeValues() []IngressTargetPortHTTPScheme { - return []IngressTargetPortHTTPScheme{ - IngressTargetPortHTTPSchemeHTTP, - IngressTargetPortHTTPSchemeHTTPS, - } -} - // IngressTransportMethod - Ingress transport protocol type IngressTransportMethod string @@ -549,46 +409,6 @@ func PossibleIngressTransportMethodValues() []IngressTransportMethod { } } -// JavaComponentProvisioningState - Provisioning state of the Java Component. -type JavaComponentProvisioningState string - -const ( - JavaComponentProvisioningStateCanceled JavaComponentProvisioningState = "Canceled" - JavaComponentProvisioningStateDeleting JavaComponentProvisioningState = "Deleting" - JavaComponentProvisioningStateFailed JavaComponentProvisioningState = "Failed" - JavaComponentProvisioningStateInProgress JavaComponentProvisioningState = "InProgress" - JavaComponentProvisioningStateSucceeded JavaComponentProvisioningState = "Succeeded" -) - -// PossibleJavaComponentProvisioningStateValues returns the possible values for the JavaComponentProvisioningState const type. -func PossibleJavaComponentProvisioningStateValues() []JavaComponentProvisioningState { - return []JavaComponentProvisioningState{ - JavaComponentProvisioningStateCanceled, - JavaComponentProvisioningStateDeleting, - JavaComponentProvisioningStateFailed, - JavaComponentProvisioningStateInProgress, - JavaComponentProvisioningStateSucceeded, - } -} - -// JavaComponentType - Type of the Java Component. -type JavaComponentType string - -const ( - JavaComponentTypeSpringBootAdmin JavaComponentType = "SpringBootAdmin" - JavaComponentTypeSpringCloudConfig JavaComponentType = "SpringCloudConfig" - JavaComponentTypeSpringCloudEureka JavaComponentType = "SpringCloudEureka" -) - -// PossibleJavaComponentTypeValues returns the possible values for the JavaComponentType const type. -func PossibleJavaComponentTypeValues() []JavaComponentType { - return []JavaComponentType{ - JavaComponentTypeSpringBootAdmin, - JavaComponentTypeSpringCloudConfig, - JavaComponentTypeSpringCloudEureka, - } -} - // JobExecutionRunningState - Current running State of the job type JobExecutionRunningState string @@ -799,10 +619,9 @@ func PossibleSourceControlOperationStateValues() []SourceControlOperationState { type StorageType string const ( - StorageTypeAzureFile StorageType = "AzureFile" - StorageTypeEmptyDir StorageType = "EmptyDir" - StorageTypeNfsAzureFile StorageType = "NfsAzureFile" - StorageTypeSecret StorageType = "Secret" + StorageTypeAzureFile StorageType = "AzureFile" + StorageTypeEmptyDir StorageType = "EmptyDir" + StorageTypeSecret StorageType = "Secret" ) // PossibleStorageTypeValues returns the possible values for the StorageType const type. @@ -810,7 +629,6 @@ func PossibleStorageTypeValues() []StorageType { return []StorageType{ StorageTypeAzureFile, StorageTypeEmptyDir, - StorageTypeNfsAzureFile, StorageTypeSecret, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerapps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerapps_client.go index c7454274..6fcb279f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerapps_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerapps_client.go @@ -28,7 +28,7 @@ type ContainerAppsClient struct { } // NewContainerAppsClient creates a new instance of ContainerAppsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewContainerAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsClient, error) { @@ -46,7 +46,7 @@ func NewContainerAppsClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - containerAppEnvelope - Properties used to create a container app @@ -73,7 +73,7 @@ func (client *ContainerAppsClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *ContainerAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, containerAppName string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, containerAppEnvelope); err != nil { @@ -127,7 +127,7 @@ func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete @@ -153,7 +153,7 @@ func (client *ContainerAppsClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *ContainerAppsClient) deleteOperation(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsClient.BeginDelete" @@ -195,7 +195,7 @@ func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -204,7 +204,7 @@ func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, reso // Get - Get the properties of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. @@ -250,7 +250,7 @@ func (client *ContainerAppsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -268,7 +268,7 @@ func (client *ContainerAppsClient) getHandleResponse(resp *http.Response) (Conta // GetAuthToken - Get auth token for a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientGetAuthTokenOptions contains the optional parameters for the ContainerAppsClient.GetAuthToken @@ -315,7 +315,7 @@ func (client *ContainerAppsClient) getAuthTokenCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -332,7 +332,7 @@ func (client *ContainerAppsClient) getAuthTokenHandleResponse(resp *http.Respons // NewListByResourceGroupPager - Get the Container Apps in a given resource group. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.NewListByResourceGroupPager // method. @@ -375,7 +375,7 @@ func (client *ContainerAppsClient) listByResourceGroupCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -392,7 +392,7 @@ func (client *ContainerAppsClient) listByResourceGroupHandleResponse(resp *http. // NewListBySubscriptionPager - Get the Container Apps in a given subscription. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - options - ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.NewListBySubscriptionPager // method. func (client *ContainerAppsClient) NewListBySubscriptionPager(options *ContainerAppsClientListBySubscriptionOptions) *runtime.Pager[ContainerAppsClientListBySubscriptionResponse] { @@ -430,7 +430,7 @@ func (client *ContainerAppsClient) listBySubscriptionCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -448,7 +448,7 @@ func (client *ContainerAppsClient) listBySubscriptionHandleResponse(resp *http.R // ListCustomHostNameAnalysis - Analyzes a custom hostname for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientListCustomHostNameAnalysisOptions contains the optional parameters for the ContainerAppsClient.ListCustomHostNameAnalysis @@ -495,7 +495,7 @@ func (client *ContainerAppsClient) listCustomHostNameAnalysisCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") if options != nil && options.CustomHostname != nil { reqQP.Set("customHostname", *options.CustomHostname) } @@ -516,7 +516,7 @@ func (client *ContainerAppsClient) listCustomHostNameAnalysisHandleResponse(resp // ListSecrets - List secrets for a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets @@ -563,7 +563,7 @@ func (client *ContainerAppsClient) listSecretsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -581,7 +581,7 @@ func (client *ContainerAppsClient) listSecretsHandleResponse(resp *http.Response // BeginStart - Start a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientBeginStartOptions contains the optional parameters for the ContainerAppsClient.BeginStart @@ -607,7 +607,7 @@ func (client *ContainerAppsClient) BeginStart(ctx context.Context, resourceGroup // Start - Start a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *ContainerAppsClient) start(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsClient.BeginStart" @@ -649,7 +649,7 @@ func (client *ContainerAppsClient) startCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -658,7 +658,7 @@ func (client *ContainerAppsClient) startCreateRequest(ctx context.Context, resou // BeginStop - Stop a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientBeginStopOptions contains the optional parameters for the ContainerAppsClient.BeginStop method. @@ -683,7 +683,7 @@ func (client *ContainerAppsClient) BeginStop(ctx context.Context, resourceGroupN // Stop - Stop a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *ContainerAppsClient) stop(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginStopOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsClient.BeginStop" @@ -725,7 +725,7 @@ func (client *ContainerAppsClient) stopCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -734,7 +734,7 @@ func (client *ContainerAppsClient) stopCreateRequest(ctx context.Context, resour // BeginUpdate - Patches a Container App using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - containerAppEnvelope - Properties of a Container App that need to be updated @@ -760,7 +760,7 @@ func (client *ContainerAppsClient) BeginUpdate(ctx context.Context, resourceGrou // Update - Patches a Container App using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *ContainerAppsClient) update(ctx context.Context, resourceGroupName string, containerAppName string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsClient.BeginUpdate" @@ -802,7 +802,7 @@ func (client *ContainerAppsClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, containerAppEnvelope); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsapi_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsapi_client.go index 7d3fd0df..252f60aa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsapi_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsapi_client.go @@ -28,7 +28,7 @@ type ContainerAppsAPIClient struct { } // NewContainerAppsAPIClient creates a new instance of ContainerAppsAPIClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewContainerAppsAPIClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsAPIClient, error) { @@ -46,7 +46,7 @@ func NewContainerAppsAPIClient(subscriptionID string, credential azcore.TokenCre // GetCustomDomainVerificationID - Get the verification id of a subscription used for verifying custom domains // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - options - ContainerAppsAPIClientGetCustomDomainVerificationIDOptions contains the optional parameters for the ContainerAppsAPIClient.GetCustomDomainVerificationID // method. func (client *ContainerAppsAPIClient) GetCustomDomainVerificationID(ctx context.Context, options *ContainerAppsAPIClientGetCustomDomainVerificationIDOptions) (ContainerAppsAPIClientGetCustomDomainVerificationIDResponse, error) { @@ -83,7 +83,7 @@ func (client *ContainerAppsAPIClient) getCustomDomainVerificationIDCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -101,7 +101,7 @@ func (client *ContainerAppsAPIClient) getCustomDomainVerificationIDHandleRespons // JobExecution - Get details of a single job execution // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - jobExecutionName - Job execution name. @@ -153,7 +153,7 @@ func (client *ContainerAppsAPIClient) jobExecutionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/containerappsauthconfigs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsauthconfigs_client.go index 8747c68a..c11e4962 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsauthconfigs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsauthconfigs_client.go @@ -28,7 +28,7 @@ type ContainerAppsAuthConfigsClient struct { } // NewContainerAppsAuthConfigsClient creates a new instance of ContainerAppsAuthConfigsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewContainerAppsAuthConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsAuthConfigsClient, error) { @@ -46,7 +46,7 @@ func NewContainerAppsAuthConfigsClient(subscriptionID string, credential azcore. // CreateOrUpdate - Create or update the AuthConfig for a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - authConfigName - Name of the Container App AuthConfig. @@ -99,7 +99,7 @@ func (client *ContainerAppsAuthConfigsClient) createOrUpdateCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, authConfigEnvelope); err != nil { @@ -120,7 +120,7 @@ func (client *ContainerAppsAuthConfigsClient) createOrUpdateHandleResponse(resp // Delete - Delete a Container App AuthConfig. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - authConfigName - Name of the Container App AuthConfig. @@ -171,7 +171,7 @@ func (client *ContainerAppsAuthConfigsClient) deleteCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *ContainerAppsAuthConfigsClient) deleteCreateRequest(ctx context.Co // Get - Get a AuthConfig of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - authConfigName - Name of the Container App AuthConfig. @@ -232,7 +232,7 @@ func (client *ContainerAppsAuthConfigsClient) getCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *ContainerAppsAuthConfigsClient) getHandleResponse(resp *http.Respo // NewListByContainerAppPager - Get the Container App AuthConfigs in a given resource group. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsAuthConfigsClientListByContainerAppOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.NewListByContainerAppPager @@ -297,7 +297,7 @@ func (client *ContainerAppsAuthConfigsClient) listByContainerAppCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/containerappsdiagnostics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsdiagnostics_client.go index 465c86da..5180440f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsdiagnostics_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsdiagnostics_client.go @@ -28,7 +28,7 @@ type ContainerAppsDiagnosticsClient struct { } // NewContainerAppsDiagnosticsClient creates a new instance of ContainerAppsDiagnosticsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewContainerAppsDiagnosticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsDiagnosticsClient, error) { @@ -46,7 +46,7 @@ func NewContainerAppsDiagnosticsClient(subscriptionID string, credential azcore. // GetDetector - Get a diagnostics result of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - detectorName - Name of the Container App Detector. @@ -98,7 +98,7 @@ func (client *ContainerAppsDiagnosticsClient) getDetectorCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -116,7 +116,7 @@ func (client *ContainerAppsDiagnosticsClient) getDetectorHandleResponse(resp *ht // GetRevision - Get a revision of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -168,7 +168,7 @@ func (client *ContainerAppsDiagnosticsClient) getRevisionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -186,7 +186,7 @@ func (client *ContainerAppsDiagnosticsClient) getRevisionHandleResponse(resp *ht // GetRoot - Get the properties of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsDiagnosticsClientGetRootOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetRoot @@ -233,7 +233,7 @@ func (client *ContainerAppsDiagnosticsClient) getRootCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -250,7 +250,7 @@ func (client *ContainerAppsDiagnosticsClient) getRootHandleResponse(resp *http.R // NewListDetectorsPager - Get the list of diagnostics for a given Container App. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App for which detector info is needed. // - options - ContainerAppsDiagnosticsClientListDetectorsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListDetectorsPager @@ -298,7 +298,7 @@ func (client *ContainerAppsDiagnosticsClient) listDetectorsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -315,7 +315,7 @@ func (client *ContainerAppsDiagnosticsClient) listDetectorsHandleResponse(resp * // NewListRevisionsPager - Get the Revisions for a given Container App. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App for which Revisions are needed. // - options - ContainerAppsDiagnosticsClientListRevisionsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListRevisionsPager @@ -366,7 +366,7 @@ func (client *ContainerAppsDiagnosticsClient) listRevisionsCreateRequest(ctx con if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/containerappsrevisionreplicas_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisionreplicas_client.go index 2ec56424..f491815a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisionreplicas_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisionreplicas_client.go @@ -28,7 +28,7 @@ type ContainerAppsRevisionReplicasClient struct { } // NewContainerAppsRevisionReplicasClient creates a new instance of ContainerAppsRevisionReplicasClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewContainerAppsRevisionReplicasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsRevisionReplicasClient, error) { @@ -46,7 +46,7 @@ func NewContainerAppsRevisionReplicasClient(subscriptionID string, credential az // GetReplica - Get a replica for a Container App Revision. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -103,7 +103,7 @@ func (client *ContainerAppsRevisionReplicasClient) getReplicaCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -121,7 +121,7 @@ func (client *ContainerAppsRevisionReplicasClient) getReplicaHandleResponse(resp // ListReplicas - List replicas for a Container App Revision. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -173,7 +173,7 @@ func (client *ContainerAppsRevisionReplicasClient) listReplicasCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/containerappsrevisions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisions_client.go index f98a95a6..52e185e2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisions_client.go @@ -28,7 +28,7 @@ type ContainerAppsRevisionsClient struct { } // NewContainerAppsRevisionsClient creates a new instance of ContainerAppsRevisionsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewContainerAppsRevisionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsRevisionsClient, error) { @@ -46,7 +46,7 @@ func NewContainerAppsRevisionsClient(subscriptionID string, credential azcore.To // ActivateRevision - Activates a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -97,7 +97,7 @@ func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -106,7 +106,7 @@ func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx co // DeactivateRevision - Deactivates a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -157,7 +157,7 @@ func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -166,7 +166,7 @@ func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx // GetRevision - Get a revision of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -218,7 +218,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -235,7 +235,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionHandleResponse(resp *http // NewListRevisionsPager - Get the Revisions for a given Container App. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App for which Revisions are needed. // - options - ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.NewListRevisionsPager @@ -286,7 +286,7 @@ func (client *ContainerAppsRevisionsClient) listRevisionsCreateRequest(ctx conte if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -304,7 +304,7 @@ func (client *ContainerAppsRevisionsClient) listRevisionsHandleResponse(resp *ht // RestartRevision - Restarts a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -355,7 +355,7 @@ func (client *ContainerAppsRevisionsClient) restartRevisionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/containerappssourcecontrols_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappssourcecontrols_client.go index 069fd6fb..bdc5f15e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappssourcecontrols_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappssourcecontrols_client.go @@ -28,7 +28,7 @@ type ContainerAppsSourceControlsClient struct { } // NewContainerAppsSourceControlsClient creates a new instance of ContainerAppsSourceControlsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewContainerAppsSourceControlsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsSourceControlsClient, error) { @@ -46,7 +46,7 @@ func NewContainerAppsSourceControlsClient(subscriptionID string, credential azco // BeginCreateOrUpdate - Create or update the SourceControl for a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - sourceControlName - Name of the Container App SourceControl. @@ -73,7 +73,7 @@ func (client *ContainerAppsSourceControlsClient) BeginCreateOrUpdate(ctx context // CreateOrUpdate - Create or update the SourceControl for a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *ContainerAppsSourceControlsClient) createOrUpdate(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, sourceControlEnvelope SourceControl, options *ContainerAppsSourceControlsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsSourceControlsClient.BeginCreateOrUpdate" @@ -119,7 +119,7 @@ func (client *ContainerAppsSourceControlsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, sourceControlEnvelope); err != nil { @@ -131,7 +131,7 @@ func (client *ContainerAppsSourceControlsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Delete a Container App SourceControl. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - sourceControlName - Name of the Container App SourceControl. @@ -157,7 +157,7 @@ func (client *ContainerAppsSourceControlsClient) BeginDelete(ctx context.Context // Delete - Delete a Container App SourceControl. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *ContainerAppsSourceControlsClient) deleteOperation(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, options *ContainerAppsSourceControlsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsSourceControlsClient.BeginDelete" @@ -203,7 +203,7 @@ func (client *ContainerAppsSourceControlsClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -212,7 +212,7 @@ func (client *ContainerAppsSourceControlsClient) deleteCreateRequest(ctx context // Get - Get a SourceControl of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - sourceControlName - Name of the Container App SourceControl. @@ -264,7 +264,7 @@ func (client *ContainerAppsSourceControlsClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -281,7 +281,7 @@ func (client *ContainerAppsSourceControlsClient) getHandleResponse(resp *http.Re // NewListByContainerAppPager - Get the Container App SourceControls in a given resource group. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsSourceControlsClientListByContainerAppOptions contains the optional parameters for the ContainerAppsSourceControlsClient.NewListByContainerAppPager @@ -329,7 +329,7 @@ func (client *ContainerAppsSourceControlsClient) listByContainerAppCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/daprcomponentresiliencypolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/daprcomponentresiliencypolicies_client.go deleted file mode 100644 index afe372fb..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/daprcomponentresiliencypolicies_client.go +++ /dev/null @@ -1,333 +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 armappcontainers - -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" -) - -// DaprComponentResiliencyPoliciesClient contains the methods for the DaprComponentResiliencyPolicies group. -// Don't use this type directly, use NewDaprComponentResiliencyPoliciesClient() instead. -type DaprComponentResiliencyPoliciesClient struct { - internal *arm.Client - subscriptionID string -} - -// NewDaprComponentResiliencyPoliciesClient creates a new instance of DaprComponentResiliencyPoliciesClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewDaprComponentResiliencyPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DaprComponentResiliencyPoliciesClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &DaprComponentResiliencyPoliciesClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates a resiliency policy for a Dapr component. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - componentName - Name of the Dapr Component. -// - name - Name of the Dapr Component Resiliency Policy. -// - daprComponentResiliencyPolicyEnvelope - Configuration details of the Dapr Component Resiliency Policy. -// - options - DaprComponentResiliencyPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DaprComponentResiliencyPoliciesClient.CreateOrUpdate -// method. -func (client *DaprComponentResiliencyPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, componentName string, name string, daprComponentResiliencyPolicyEnvelope DaprComponentResiliencyPolicy, options *DaprComponentResiliencyPoliciesClientCreateOrUpdateOptions) (DaprComponentResiliencyPoliciesClientCreateOrUpdateResponse, error) { - var err error - const operationName = "DaprComponentResiliencyPoliciesClient.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, environmentName, componentName, name, daprComponentResiliencyPolicyEnvelope, options) - if err != nil { - return DaprComponentResiliencyPoliciesClientCreateOrUpdateResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DaprComponentResiliencyPoliciesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { - err = runtime.NewResponseError(httpResp) - return DaprComponentResiliencyPoliciesClientCreateOrUpdateResponse{}, err - } - resp, err := client.createOrUpdateHandleResponse(httpResp) - return resp, err -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *DaprComponentResiliencyPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, componentName string, name string, daprComponentResiliencyPolicyEnvelope DaprComponentResiliencyPolicy, options *DaprComponentResiliencyPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if componentName == "" { - return nil, errors.New("parameter componentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, daprComponentResiliencyPolicyEnvelope); err != nil { - return nil, err - } - return req, nil -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *DaprComponentResiliencyPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (DaprComponentResiliencyPoliciesClientCreateOrUpdateResponse, error) { - result := DaprComponentResiliencyPoliciesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DaprComponentResiliencyPolicy); err != nil { - return DaprComponentResiliencyPoliciesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete a resiliency policy for a Dapr component. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - componentName - Name of the Dapr Component. -// - name - Name of the Dapr Component Resiliency Policy. -// - options - DaprComponentResiliencyPoliciesClientDeleteOptions contains the optional parameters for the DaprComponentResiliencyPoliciesClient.Delete -// method. -func (client *DaprComponentResiliencyPoliciesClient) Delete(ctx context.Context, resourceGroupName string, environmentName string, componentName string, name string, options *DaprComponentResiliencyPoliciesClientDeleteOptions) (DaprComponentResiliencyPoliciesClientDeleteResponse, error) { - var err error - const operationName = "DaprComponentResiliencyPoliciesClient.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, environmentName, componentName, name, options) - if err != nil { - return DaprComponentResiliencyPoliciesClientDeleteResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DaprComponentResiliencyPoliciesClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { - err = runtime.NewResponseError(httpResp) - return DaprComponentResiliencyPoliciesClientDeleteResponse{}, err - } - return DaprComponentResiliencyPoliciesClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *DaprComponentResiliencyPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, componentName string, name string, options *DaprComponentResiliencyPoliciesClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if componentName == "" { - return nil, errors.New("parameter componentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a Dapr component resiliency policy. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - componentName - Name of the Dapr Component. -// - name - Name of the Dapr Component Resiliency Policy. -// - options - DaprComponentResiliencyPoliciesClientGetOptions contains the optional parameters for the DaprComponentResiliencyPoliciesClient.Get -// method. -func (client *DaprComponentResiliencyPoliciesClient) Get(ctx context.Context, resourceGroupName string, environmentName string, componentName string, name string, options *DaprComponentResiliencyPoliciesClientGetOptions) (DaprComponentResiliencyPoliciesClientGetResponse, error) { - var err error - const operationName = "DaprComponentResiliencyPoliciesClient.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, environmentName, componentName, name, options) - if err != nil { - return DaprComponentResiliencyPoliciesClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DaprComponentResiliencyPoliciesClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return DaprComponentResiliencyPoliciesClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *DaprComponentResiliencyPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, componentName string, name string, options *DaprComponentResiliencyPoliciesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if componentName == "" { - return nil, errors.New("parameter componentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DaprComponentResiliencyPoliciesClient) getHandleResponse(resp *http.Response) (DaprComponentResiliencyPoliciesClientGetResponse, error) { - result := DaprComponentResiliencyPoliciesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DaprComponentResiliencyPolicy); err != nil { - return DaprComponentResiliencyPoliciesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Get the resiliency policies for a Dapr component. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - componentName - Name of the Dapr Component. -// - options - DaprComponentResiliencyPoliciesClientListOptions contains the optional parameters for the DaprComponentResiliencyPoliciesClient.NewListPager -// method. -func (client *DaprComponentResiliencyPoliciesClient) NewListPager(resourceGroupName string, environmentName string, componentName string, options *DaprComponentResiliencyPoliciesClientListOptions) *runtime.Pager[DaprComponentResiliencyPoliciesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[DaprComponentResiliencyPoliciesClientListResponse]{ - More: func(page DaprComponentResiliencyPoliciesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DaprComponentResiliencyPoliciesClientListResponse) (DaprComponentResiliencyPoliciesClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DaprComponentResiliencyPoliciesClient.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, environmentName, componentName, options) - }, nil) - if err != nil { - return DaprComponentResiliencyPoliciesClientListResponse{}, err - } - return client.listHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listCreateRequest creates the List request. -func (client *DaprComponentResiliencyPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, componentName string, options *DaprComponentResiliencyPoliciesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies" - 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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *DaprComponentResiliencyPoliciesClient) listHandleResponse(resp *http.Response) (DaprComponentResiliencyPoliciesClientListResponse, error) { - result := DaprComponentResiliencyPoliciesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DaprComponentResiliencyPoliciesCollection); err != nil { - return DaprComponentResiliencyPoliciesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/daprcomponents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/daprcomponents_client.go index 722d8379..9cc17c2e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/daprcomponents_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/daprcomponents_client.go @@ -28,7 +28,7 @@ type DaprComponentsClient struct { } // NewDaprComponentsClient creates a new instance of DaprComponentsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewDaprComponentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DaprComponentsClient, error) { @@ -46,7 +46,7 @@ func NewDaprComponentsClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Creates or updates a Dapr Component in a Managed Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. @@ -99,7 +99,7 @@ func (client *DaprComponentsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, daprComponentEnvelope); err != nil { @@ -120,7 +120,7 @@ func (client *DaprComponentsClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete a Dapr Component from a Managed Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. @@ -170,7 +170,7 @@ func (client *DaprComponentsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -179,7 +179,7 @@ func (client *DaprComponentsClient) deleteCreateRequest(ctx context.Context, res // Get - Get a dapr component. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. @@ -230,7 +230,7 @@ func (client *DaprComponentsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,7 +247,7 @@ func (client *DaprComponentsClient) getHandleResponse(resp *http.Response) (Dapr // NewListPager - Get the Dapr Components for a managed environment. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - DaprComponentsClientListOptions contains the optional parameters for the DaprComponentsClient.NewListPager method. @@ -294,7 +294,7 @@ func (client *DaprComponentsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -312,7 +312,7 @@ func (client *DaprComponentsClient) listHandleResponse(resp *http.Response) (Dap // ListSecrets - List secrets for a dapr component // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. @@ -364,7 +364,7 @@ func (client *DaprComponentsClient) listSecretsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/daprsubscriptions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/daprsubscriptions_client.go deleted file mode 100644 index 5e24bd31..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/daprsubscriptions_client.go +++ /dev/null @@ -1,312 +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 armappcontainers - -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" -) - -// DaprSubscriptionsClient contains the methods for the DaprSubscriptions group. -// Don't use this type directly, use NewDaprSubscriptionsClient() instead. -type DaprSubscriptionsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewDaprSubscriptionsClient creates a new instance of DaprSubscriptionsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewDaprSubscriptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DaprSubscriptionsClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &DaprSubscriptionsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates a Dapr subscription in a Managed Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - name - Name of the Dapr subscription. -// - daprSubscriptionEnvelope - Configuration details of the Dapr subscription. -// - options - DaprSubscriptionsClientCreateOrUpdateOptions contains the optional parameters for the DaprSubscriptionsClient.CreateOrUpdate -// method. -func (client *DaprSubscriptionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, name string, daprSubscriptionEnvelope DaprSubscription, options *DaprSubscriptionsClientCreateOrUpdateOptions) (DaprSubscriptionsClientCreateOrUpdateResponse, error) { - var err error - const operationName = "DaprSubscriptionsClient.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, environmentName, name, daprSubscriptionEnvelope, options) - if err != nil { - return DaprSubscriptionsClientCreateOrUpdateResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DaprSubscriptionsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { - err = runtime.NewResponseError(httpResp) - return DaprSubscriptionsClientCreateOrUpdateResponse{}, err - } - resp, err := client.createOrUpdateHandleResponse(httpResp) - return resp, err -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *DaprSubscriptionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, daprSubscriptionEnvelope DaprSubscription, options *DaprSubscriptionsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, daprSubscriptionEnvelope); err != nil { - return nil, err - } - return req, nil -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *DaprSubscriptionsClient) createOrUpdateHandleResponse(resp *http.Response) (DaprSubscriptionsClientCreateOrUpdateResponse, error) { - result := DaprSubscriptionsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DaprSubscription); err != nil { - return DaprSubscriptionsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete a Dapr subscription from a Managed Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - name - Name of the Dapr subscription. -// - options - DaprSubscriptionsClientDeleteOptions contains the optional parameters for the DaprSubscriptionsClient.Delete -// method. -func (client *DaprSubscriptionsClient) Delete(ctx context.Context, resourceGroupName string, environmentName string, name string, options *DaprSubscriptionsClientDeleteOptions) (DaprSubscriptionsClientDeleteResponse, error) { - var err error - const operationName = "DaprSubscriptionsClient.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, environmentName, name, options) - if err != nil { - return DaprSubscriptionsClientDeleteResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DaprSubscriptionsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { - err = runtime.NewResponseError(httpResp) - return DaprSubscriptionsClientDeleteResponse{}, err - } - return DaprSubscriptionsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *DaprSubscriptionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, options *DaprSubscriptionsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a dapr subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - name - Name of the Dapr subscription. -// - options - DaprSubscriptionsClientGetOptions contains the optional parameters for the DaprSubscriptionsClient.Get method. -func (client *DaprSubscriptionsClient) Get(ctx context.Context, resourceGroupName string, environmentName string, name string, options *DaprSubscriptionsClientGetOptions) (DaprSubscriptionsClientGetResponse, error) { - var err error - const operationName = "DaprSubscriptionsClient.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, environmentName, name, options) - if err != nil { - return DaprSubscriptionsClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DaprSubscriptionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return DaprSubscriptionsClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *DaprSubscriptionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, options *DaprSubscriptionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DaprSubscriptionsClient) getHandleResponse(resp *http.Response) (DaprSubscriptionsClientGetResponse, error) { - result := DaprSubscriptionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DaprSubscription); err != nil { - return DaprSubscriptionsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Get the Dapr subscriptions for a managed environment. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - options - DaprSubscriptionsClientListOptions contains the optional parameters for the DaprSubscriptionsClient.NewListPager -// method. -func (client *DaprSubscriptionsClient) NewListPager(resourceGroupName string, environmentName string, options *DaprSubscriptionsClientListOptions) *runtime.Pager[DaprSubscriptionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[DaprSubscriptionsClientListResponse]{ - More: func(page DaprSubscriptionsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DaprSubscriptionsClientListResponse) (DaprSubscriptionsClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DaprSubscriptionsClient.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, environmentName, options) - }, nil) - if err != nil { - return DaprSubscriptionsClientListResponse{}, err - } - return client.listHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listCreateRequest creates the List request. -func (client *DaprSubscriptionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *DaprSubscriptionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions" - 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 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *DaprSubscriptionsClient) listHandleResponse(resp *http.Response) (DaprSubscriptionsClientListResponse, error) { - result := DaprSubscriptionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DaprSubscriptionsCollection); err != nil { - return DaprSubscriptionsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/dotnetcomponents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/dotnetcomponents_client.go deleted file mode 100644 index 2f19c843..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/dotnetcomponents_client.go +++ /dev/null @@ -1,431 +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 armappcontainers - -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" -) - -// DotNetComponentsClient contains the methods for the DotNetComponents group. -// Don't use this type directly, use NewDotNetComponentsClient() instead. -type DotNetComponentsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewDotNetComponentsClient creates a new instance of DotNetComponentsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewDotNetComponentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DotNetComponentsClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &DotNetComponentsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a .NET Component in a Managed Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - name - Name of the .NET Component. -// - dotNetComponentEnvelope - Configuration details of the .NET Component. -// - options - DotNetComponentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DotNetComponentsClient.BeginCreateOrUpdate -// method. -func (client *DotNetComponentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, name string, dotNetComponentEnvelope DotNetComponent, options *DotNetComponentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DotNetComponentsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, environmentName, name, dotNetComponentEnvelope, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DotNetComponentsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DotNetComponentsClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// CreateOrUpdate - Creates or updates a .NET Component in a Managed Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -func (client *DotNetComponentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, name string, dotNetComponentEnvelope DotNetComponent, options *DotNetComponentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - var err error - const operationName = "DotNetComponentsClient.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, environmentName, name, dotNetComponentEnvelope, 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 *DotNetComponentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, dotNetComponentEnvelope DotNetComponent, options *DotNetComponentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, dotNetComponentEnvelope); err != nil { - return nil, err - } - return req, nil -} - -// BeginDelete - Delete a .NET Component. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - name - Name of the .NET Component. -// - options - DotNetComponentsClientBeginDeleteOptions contains the optional parameters for the DotNetComponentsClient.BeginDelete -// method. -func (client *DotNetComponentsClient) BeginDelete(ctx context.Context, resourceGroupName string, environmentName string, name string, options *DotNetComponentsClientBeginDeleteOptions) (*runtime.Poller[DotNetComponentsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, environmentName, name, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DotNetComponentsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DotNetComponentsClientDeleteResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Delete - Delete a .NET Component. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -func (client *DotNetComponentsClient) deleteOperation(ctx context.Context, resourceGroupName string, environmentName string, name string, options *DotNetComponentsClientBeginDeleteOptions) (*http.Response, error) { - var err error - const operationName = "DotNetComponentsClient.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, environmentName, 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 *DotNetComponentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, options *DotNetComponentsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a .NET Component. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - name - Name of the .NET Component. -// - options - DotNetComponentsClientGetOptions contains the optional parameters for the DotNetComponentsClient.Get method. -func (client *DotNetComponentsClient) Get(ctx context.Context, resourceGroupName string, environmentName string, name string, options *DotNetComponentsClientGetOptions) (DotNetComponentsClientGetResponse, error) { - var err error - const operationName = "DotNetComponentsClient.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, environmentName, name, options) - if err != nil { - return DotNetComponentsClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DotNetComponentsClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return DotNetComponentsClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *DotNetComponentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, options *DotNetComponentsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DotNetComponentsClient) getHandleResponse(resp *http.Response) (DotNetComponentsClientGetResponse, error) { - result := DotNetComponentsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DotNetComponent); err != nil { - return DotNetComponentsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Get the .NET Components for a managed environment. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - options - DotNetComponentsClientListOptions contains the optional parameters for the DotNetComponentsClient.NewListPager -// method. -func (client *DotNetComponentsClient) NewListPager(resourceGroupName string, environmentName string, options *DotNetComponentsClientListOptions) *runtime.Pager[DotNetComponentsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[DotNetComponentsClientListResponse]{ - More: func(page DotNetComponentsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DotNetComponentsClientListResponse) (DotNetComponentsClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DotNetComponentsClient.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, environmentName, options) - }, nil) - if err != nil { - return DotNetComponentsClientListResponse{}, err - } - return client.listHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listCreateRequest creates the List request. -func (client *DotNetComponentsClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *DotNetComponentsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents" - 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 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *DotNetComponentsClient) listHandleResponse(resp *http.Response) (DotNetComponentsClientListResponse, error) { - result := DotNetComponentsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DotNetComponentsCollection); err != nil { - return DotNetComponentsClientListResponse{}, err - } - return result, nil -} - -// BeginUpdate - Patches a .NET Component using JSON Merge Patch -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - name - Name of the .NET Component. -// - dotNetComponentEnvelope - Configuration details of the .NET Component. -// - options - DotNetComponentsClientBeginUpdateOptions contains the optional parameters for the DotNetComponentsClient.BeginUpdate -// method. -func (client *DotNetComponentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, environmentName string, name string, dotNetComponentEnvelope DotNetComponent, options *DotNetComponentsClientBeginUpdateOptions) (*runtime.Poller[DotNetComponentsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, environmentName, name, dotNetComponentEnvelope, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DotNetComponentsClientUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DotNetComponentsClientUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Update - Patches a .NET Component using JSON Merge Patch -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -func (client *DotNetComponentsClient) update(ctx context.Context, resourceGroupName string, environmentName string, name string, dotNetComponentEnvelope DotNetComponent, options *DotNetComponentsClientBeginUpdateOptions) (*http.Response, error) { - var err error - const operationName = "DotNetComponentsClient.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, environmentName, name, dotNetComponentEnvelope, 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 *DotNetComponentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, dotNetComponentEnvelope DotNetComponent, options *DotNetComponentsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, dotNetComponentEnvelope); err != nil { - return nil, err - } - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/javacomponents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/javacomponents_client.go deleted file mode 100644 index 13624f35..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/javacomponents_client.go +++ /dev/null @@ -1,430 +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 armappcontainers - -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" -) - -// JavaComponentsClient contains the methods for the JavaComponents group. -// Don't use this type directly, use NewJavaComponentsClient() instead. -type JavaComponentsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewJavaComponentsClient creates a new instance of JavaComponentsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewJavaComponentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JavaComponentsClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &JavaComponentsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a Java Component in a Managed Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - name - Name of the Java Component. -// - javaComponentEnvelope - Configuration details of the Java Component. -// - options - JavaComponentsClientBeginCreateOrUpdateOptions contains the optional parameters for the JavaComponentsClient.BeginCreateOrUpdate -// method. -func (client *JavaComponentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, name string, javaComponentEnvelope JavaComponent, options *JavaComponentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[JavaComponentsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, environmentName, name, javaComponentEnvelope, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JavaComponentsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JavaComponentsClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// CreateOrUpdate - Creates or updates a Java Component in a Managed Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -func (client *JavaComponentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, name string, javaComponentEnvelope JavaComponent, options *JavaComponentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - var err error - const operationName = "JavaComponentsClient.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, environmentName, name, javaComponentEnvelope, 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 *JavaComponentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, javaComponentEnvelope JavaComponent, options *JavaComponentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, javaComponentEnvelope); err != nil { - return nil, err - } - return req, nil -} - -// BeginDelete - Delete a Java Component. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - name - Name of the Java Component. -// - options - JavaComponentsClientBeginDeleteOptions contains the optional parameters for the JavaComponentsClient.BeginDelete -// method. -func (client *JavaComponentsClient) BeginDelete(ctx context.Context, resourceGroupName string, environmentName string, name string, options *JavaComponentsClientBeginDeleteOptions) (*runtime.Poller[JavaComponentsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, environmentName, name, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JavaComponentsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JavaComponentsClientDeleteResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Delete - Delete a Java Component. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -func (client *JavaComponentsClient) deleteOperation(ctx context.Context, resourceGroupName string, environmentName string, name string, options *JavaComponentsClientBeginDeleteOptions) (*http.Response, error) { - var err error - const operationName = "JavaComponentsClient.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, environmentName, 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 *JavaComponentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, options *JavaComponentsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a Java Component. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - name - Name of the Java Component. -// - options - JavaComponentsClientGetOptions contains the optional parameters for the JavaComponentsClient.Get method. -func (client *JavaComponentsClient) Get(ctx context.Context, resourceGroupName string, environmentName string, name string, options *JavaComponentsClientGetOptions) (JavaComponentsClientGetResponse, error) { - var err error - const operationName = "JavaComponentsClient.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, environmentName, name, options) - if err != nil { - return JavaComponentsClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return JavaComponentsClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return JavaComponentsClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *JavaComponentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, options *JavaComponentsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *JavaComponentsClient) getHandleResponse(resp *http.Response) (JavaComponentsClientGetResponse, error) { - result := JavaComponentsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.JavaComponent); err != nil { - return JavaComponentsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Get the Java Components for a managed environment. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - options - JavaComponentsClientListOptions contains the optional parameters for the JavaComponentsClient.NewListPager method. -func (client *JavaComponentsClient) NewListPager(resourceGroupName string, environmentName string, options *JavaComponentsClientListOptions) *runtime.Pager[JavaComponentsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[JavaComponentsClientListResponse]{ - More: func(page JavaComponentsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *JavaComponentsClientListResponse) (JavaComponentsClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JavaComponentsClient.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, environmentName, options) - }, nil) - if err != nil { - return JavaComponentsClientListResponse{}, err - } - return client.listHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listCreateRequest creates the List request. -func (client *JavaComponentsClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *JavaComponentsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents" - 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 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *JavaComponentsClient) listHandleResponse(resp *http.Response) (JavaComponentsClientListResponse, error) { - result := JavaComponentsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.JavaComponentsCollection); err != nil { - return JavaComponentsClientListResponse{}, err - } - return result, nil -} - -// BeginUpdate - Patches a Java Component using JSON Merge Patch -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - environmentName - Name of the Managed Environment. -// - name - Name of the Java Component. -// - javaComponentEnvelope - Configuration details of the Java Component. -// - options - JavaComponentsClientBeginUpdateOptions contains the optional parameters for the JavaComponentsClient.BeginUpdate -// method. -func (client *JavaComponentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, environmentName string, name string, javaComponentEnvelope JavaComponent, options *JavaComponentsClientBeginUpdateOptions) (*runtime.Poller[JavaComponentsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, environmentName, name, javaComponentEnvelope, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JavaComponentsClientUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JavaComponentsClientUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Update - Patches a Java Component using JSON Merge Patch -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -func (client *JavaComponentsClient) update(ctx context.Context, resourceGroupName string, environmentName string, name string, javaComponentEnvelope JavaComponent, options *JavaComponentsClientBeginUpdateOptions) (*http.Response, error) { - var err error - const operationName = "JavaComponentsClient.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, environmentName, name, javaComponentEnvelope, 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 *JavaComponentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, javaComponentEnvelope JavaComponent, options *JavaComponentsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{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 environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, javaComponentEnvelope); err != nil { - return nil, err - } - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobs_client.go index d19cd55c..b7d0cc13 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobs_client.go @@ -28,7 +28,7 @@ type JobsClient struct { } // NewJobsClient creates a new instance of JobsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobsClient, error) { @@ -46,7 +46,7 @@ func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, opt // BeginCreateOrUpdate - Create or Update a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - jobEnvelope - Properties used to create a container apps job @@ -73,7 +73,7 @@ func (client *JobsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroup // CreateOrUpdate - Create or Update a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *JobsClient) createOrUpdate(ctx context.Context, resourceGroupName string, jobName string, jobEnvelope Job, options *JobsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *JobsClient) createOrUpdateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, jobEnvelope); err != nil { @@ -127,7 +127,7 @@ func (client *JobsClient) createOrUpdateCreateRequest(ctx context.Context, resou // BeginDelete - Delete a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - options - JobsClientBeginDeleteOptions contains the optional parameters for the JobsClient.BeginDelete method. @@ -152,7 +152,7 @@ func (client *JobsClient) BeginDelete(ctx context.Context, resourceGroupName str // Delete - Delete a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *JobsClient) deleteOperation(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginDelete" @@ -194,7 +194,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -203,7 +203,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup // Get - Get the properties of a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - options - JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. @@ -249,7 +249,7 @@ func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -267,7 +267,7 @@ func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsClientGetR // GetDetector - Get the diagnostics data for a Container App Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - detectorName - Name of the Container App Job detector. @@ -318,7 +318,7 @@ func (client *JobsClient) getDetectorCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -335,7 +335,7 @@ func (client *JobsClient) getDetectorHandleResponse(resp *http.Response) (JobsCl // NewListByResourceGroupPager - Get the Container Apps Jobs in a given resource group. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - JobsClientListByResourceGroupOptions contains the optional parameters for the JobsClient.NewListByResourceGroupPager // method. @@ -378,7 +378,7 @@ func (client *JobsClient) listByResourceGroupCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -395,7 +395,7 @@ func (client *JobsClient) listByResourceGroupHandleResponse(resp *http.Response) // NewListBySubscriptionPager - Get the Container Apps Jobs in a given subscription. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - options - JobsClientListBySubscriptionOptions contains the optional parameters for the JobsClient.NewListBySubscriptionPager // method. func (client *JobsClient) NewListBySubscriptionPager(options *JobsClientListBySubscriptionOptions) *runtime.Pager[JobsClientListBySubscriptionResponse] { @@ -433,7 +433,7 @@ func (client *JobsClient) listBySubscriptionCreateRequest(ctx context.Context, o return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -448,33 +448,33 @@ func (client *JobsClient) listBySubscriptionHandleResponse(resp *http.Response) return result, nil } -// ListDetectors - Get the list of diagnostics for a Container App Job. -// If the operation fails it returns an *azcore.ResponseError type. +// NewListDetectorsPager - Get the list of diagnostics for a Container App Job. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name -// - options - JobsClientListDetectorsOptions contains the optional parameters for the JobsClient.ListDetectors method. -func (client *JobsClient) ListDetectors(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientListDetectorsOptions) (JobsClientListDetectorsResponse, error) { - var err error - const operationName = "JobsClient.ListDetectors" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.listDetectorsCreateRequest(ctx, resourceGroupName, jobName, options) - if err != nil { - return JobsClientListDetectorsResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return JobsClientListDetectorsResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return JobsClientListDetectorsResponse{}, err - } - resp, err := client.listDetectorsHandleResponse(httpResp) - return resp, err +// - options - JobsClientListDetectorsOptions contains the optional parameters for the JobsClient.NewListDetectorsPager method. +func (client *JobsClient) NewListDetectorsPager(resourceGroupName string, jobName string, options *JobsClientListDetectorsOptions) *runtime.Pager[JobsClientListDetectorsResponse] { + return runtime.NewPager(runtime.PagingHandler[JobsClientListDetectorsResponse]{ + More: func(page JobsClientListDetectorsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobsClientListDetectorsResponse) (JobsClientListDetectorsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobsClient.NewListDetectorsPager") + 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.listDetectorsCreateRequest(ctx, resourceGroupName, jobName, options) + }, nil) + if err != nil { + return JobsClientListDetectorsResponse{}, err + } + return client.listDetectorsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) } // listDetectorsCreateRequest creates the ListDetectors request. @@ -497,7 +497,7 @@ func (client *JobsClient) listDetectorsCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -515,7 +515,7 @@ func (client *JobsClient) listDetectorsHandleResponse(resp *http.Response) (Jobs // ListSecrets - List secrets for a container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - options - JobsClientListSecretsOptions contains the optional parameters for the JobsClient.ListSecrets method. @@ -561,7 +561,7 @@ func (client *JobsClient) listSecretsCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -579,17 +579,18 @@ func (client *JobsClient) listSecretsHandleResponse(resp *http.Response) (JobsCl // ProxyGet - Get the properties of a Container App Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name +// - apiName - Proxy API Name for Container App Job. // - options - JobsClientProxyGetOptions contains the optional parameters for the JobsClient.ProxyGet method. -func (client *JobsClient) ProxyGet(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientProxyGetOptions) (JobsClientProxyGetResponse, error) { +func (client *JobsClient) ProxyGet(ctx context.Context, resourceGroupName string, jobName string, apiName string, options *JobsClientProxyGetOptions) (JobsClientProxyGetResponse, error) { var err error const operationName = "JobsClient.ProxyGet" ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) defer func() { endSpan(err) }() - req, err := client.proxyGetCreateRequest(ctx, resourceGroupName, jobName, options) + req, err := client.proxyGetCreateRequest(ctx, resourceGroupName, jobName, apiName, options) if err != nil { return JobsClientProxyGetResponse{}, err } @@ -606,7 +607,7 @@ func (client *JobsClient) ProxyGet(ctx context.Context, resourceGroupName string } // proxyGetCreateRequest creates the ProxyGet request. -func (client *JobsClient) proxyGetCreateRequest(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientProxyGetOptions) (*policy.Request, error) { +func (client *JobsClient) proxyGetCreateRequest(ctx context.Context, resourceGroupName string, jobName string, apiName string, options *JobsClientProxyGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/detectorProperties/{apiName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -620,13 +621,16 @@ func (client *JobsClient) proxyGetCreateRequest(ctx context.Context, resourceGro return nil, errors.New("parameter jobName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) - urlPath = strings.ReplaceAll(urlPath, "{apiName}", url.PathEscape("rootApi")) + if apiName == "" { + return nil, errors.New("parameter apiName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiName}", url.PathEscape(apiName)) req, err := 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", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -644,7 +648,7 @@ func (client *JobsClient) proxyGetHandleResponse(resp *http.Response) (JobsClien // BeginStart - Start a Container Apps Job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - options - JobsClientBeginStartOptions contains the optional parameters for the JobsClient.BeginStart method. @@ -669,7 +673,7 @@ func (client *JobsClient) BeginStart(ctx context.Context, resourceGroupName stri // Start - Start a Container Apps Job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *JobsClient) start(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginStart" @@ -711,7 +715,7 @@ func (client *JobsClient) startCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Template != nil { @@ -726,7 +730,7 @@ func (client *JobsClient) startCreateRequest(ctx context.Context, resourceGroupN // BeginStopExecution - Terminates execution of a running container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - jobExecutionName - Job execution name. @@ -752,7 +756,7 @@ func (client *JobsClient) BeginStopExecution(ctx context.Context, resourceGroupN // StopExecution - Terminates execution of a running container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *JobsClient) stopExecution(ctx context.Context, resourceGroupName string, jobName string, jobExecutionName string, options *JobsClientBeginStopExecutionOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginStopExecution" @@ -798,7 +802,7 @@ func (client *JobsClient) stopExecutionCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -807,7 +811,7 @@ func (client *JobsClient) stopExecutionCreateRequest(ctx context.Context, resour // BeginStopMultipleExecutions - Terminates execution of a running container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - options - JobsClientBeginStopMultipleExecutionsOptions contains the optional parameters for the JobsClient.BeginStopMultipleExecutions @@ -833,7 +837,7 @@ func (client *JobsClient) BeginStopMultipleExecutions(ctx context.Context, resou // StopMultipleExecutions - Terminates execution of a running container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *JobsClient) stopMultipleExecutions(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginStopMultipleExecutionsOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginStopMultipleExecutions" @@ -875,7 +879,7 @@ func (client *JobsClient) stopMultipleExecutionsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -884,7 +888,7 @@ func (client *JobsClient) stopMultipleExecutionsCreateRequest(ctx context.Contex // BeginUpdate - Patches a Container Apps Job using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - jobEnvelope - Properties used to create a container apps job @@ -909,7 +913,7 @@ func (client *JobsClient) BeginUpdate(ctx context.Context, resourceGroupName str // Update - Patches a Container Apps Job using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *JobsClient) update(ctx context.Context, resourceGroupName string, jobName string, jobEnvelope JobPatchProperties, options *JobsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginUpdate" @@ -951,7 +955,7 @@ func (client *JobsClient) updateCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, jobEnvelope); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobsexecutions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobsexecutions_client.go index 1e48b166..78ea9257 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobsexecutions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobsexecutions_client.go @@ -28,7 +28,7 @@ type JobsExecutionsClient struct { } // NewJobsExecutionsClient creates a new instance of JobsExecutionsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewJobsExecutionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobsExecutionsClient, error) { @@ -45,7 +45,7 @@ func NewJobsExecutionsClient(subscriptionID string, credential azcore.TokenCrede // NewListPager - Get a Container Apps Job's executions // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - options - JobsExecutionsClientListOptions contains the optional parameters for the JobsExecutionsClient.NewListPager method. @@ -95,7 +95,7 @@ func (client *JobsExecutionsClient) listCreateRequest(ctx context.Context, resou if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/managedcertificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedcertificates_client.go index eb731ee8..561089f5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedcertificates_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedcertificates_client.go @@ -28,7 +28,7 @@ type ManagedCertificatesClient struct { } // NewManagedCertificatesClient creates a new instance of ManagedCertificatesClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewManagedCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedCertificatesClient, error) { @@ -46,7 +46,7 @@ func NewManagedCertificatesClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Create or Update a Managed Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - managedCertificateName - Name of the Managed Certificate. @@ -73,7 +73,7 @@ func (client *ManagedCertificatesClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Create or Update a Managed Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *ManagedCertificatesClient) createOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, managedCertificateName string, options *ManagedCertificatesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ManagedCertificatesClient.BeginCreateOrUpdate" @@ -119,7 +119,7 @@ func (client *ManagedCertificatesClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.ManagedCertificateEnvelope != nil { @@ -134,7 +134,7 @@ func (client *ManagedCertificatesClient) createOrUpdateCreateRequest(ctx context // Delete - Deletes the specified Managed Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - managedCertificateName - Name of the Managed Certificate. @@ -185,7 +185,7 @@ func (client *ManagedCertificatesClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -194,7 +194,7 @@ func (client *ManagedCertificatesClient) deleteCreateRequest(ctx context.Context // Get - Get the specified Managed Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - managedCertificateName - Name of the Managed Certificate. @@ -245,7 +245,7 @@ func (client *ManagedCertificatesClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -262,7 +262,7 @@ func (client *ManagedCertificatesClient) getHandleResponse(resp *http.Response) // NewListPager - Get the Managed Certificates in a given managed environment. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - ManagedCertificatesClientListOptions contains the optional parameters for the ManagedCertificatesClient.NewListPager @@ -310,7 +310,7 @@ func (client *ManagedCertificatesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -328,7 +328,7 @@ func (client *ManagedCertificatesClient) listHandleResponse(resp *http.Response) // Update - Patches a managed certificate. Oly patching of tags is supported // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - managedCertificateName - Name of the Managed Certificate. @@ -381,7 +381,7 @@ func (client *ManagedCertificatesClient) updateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, managedCertificateEnvelope); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentdiagnostics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentdiagnostics_client.go index d1a0a72d..ed7ef985 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentdiagnostics_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentdiagnostics_client.go @@ -28,7 +28,7 @@ type ManagedEnvironmentDiagnosticsClient struct { } // NewManagedEnvironmentDiagnosticsClient creates a new instance of ManagedEnvironmentDiagnosticsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewManagedEnvironmentDiagnosticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedEnvironmentDiagnosticsClient, error) { @@ -46,7 +46,7 @@ func NewManagedEnvironmentDiagnosticsClient(subscriptionID string, credential az // GetDetector - Get the diagnostics data for a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - detectorName - Name of the Managed Environment detector. @@ -98,7 +98,7 @@ func (client *ManagedEnvironmentDiagnosticsClient) getDetectorCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -116,7 +116,7 @@ func (client *ManagedEnvironmentDiagnosticsClient) getDetectorHandleResponse(res // ListDetectors - Get the list of diagnostics for a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentDiagnosticsClientListDetectorsOptions contains the optional parameters for the ManagedEnvironmentDiagnosticsClient.ListDetectors @@ -163,7 +163,7 @@ func (client *ManagedEnvironmentDiagnosticsClient) listDetectorsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/managedenvironments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironments_client.go index 21397910..8937d34b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironments_client.go @@ -28,7 +28,7 @@ type ManagedEnvironmentsClient struct { } // NewManagedEnvironmentsClient creates a new instance of ManagedEnvironmentsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewManagedEnvironmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedEnvironmentsClient, error) { @@ -46,7 +46,7 @@ func NewManagedEnvironmentsClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Creates or updates a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - environmentEnvelope - Configuration details of the Environment. @@ -72,7 +72,7 @@ func (client *ManagedEnvironmentsClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Creates or updates a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *ManagedEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, environmentEnvelope ManagedEnvironment, options *ManagedEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ManagedEnvironmentsClient.BeginCreateOrUpdate" @@ -114,7 +114,7 @@ func (client *ManagedEnvironmentsClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, environmentEnvelope); err != nil { @@ -126,7 +126,7 @@ func (client *ManagedEnvironmentsClient) createOrUpdateCreateRequest(ctx context // BeginDelete - Delete a Managed Environment if it does not have any container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ManagedEnvironmentsClient.BeginDelete @@ -151,7 +151,7 @@ func (client *ManagedEnvironmentsClient) BeginDelete(ctx context.Context, resour // Delete - Delete a Managed Environment if it does not have any container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *ManagedEnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ManagedEnvironmentsClient.BeginDelete" @@ -193,7 +193,7 @@ func (client *ManagedEnvironmentsClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -202,7 +202,7 @@ func (client *ManagedEnvironmentsClient) deleteCreateRequest(ctx context.Context // Get - Get the properties of a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsClientGetOptions contains the optional parameters for the ManagedEnvironmentsClient.Get method. @@ -248,7 +248,7 @@ func (client *ManagedEnvironmentsClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -266,7 +266,7 @@ func (client *ManagedEnvironmentsClient) getHandleResponse(resp *http.Response) // GetAuthToken - Checks if resource name is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - ManagedEnvironmentsClientGetAuthTokenOptions contains the optional parameters for the ManagedEnvironmentsClient.GetAuthToken @@ -313,7 +313,7 @@ func (client *ManagedEnvironmentsClient) getAuthTokenCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -330,7 +330,7 @@ func (client *ManagedEnvironmentsClient) getAuthTokenHandleResponse(resp *http.R // NewListByResourceGroupPager - Get all the Managed Environments in a resource group. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ManagedEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListByResourceGroupPager // method. @@ -373,7 +373,7 @@ func (client *ManagedEnvironmentsClient) listByResourceGroupCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -390,7 +390,7 @@ func (client *ManagedEnvironmentsClient) listByResourceGroupHandleResponse(resp // NewListBySubscriptionPager - Get all Managed Environments for a subscription. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - options - ManagedEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListBySubscriptionPager // method. func (client *ManagedEnvironmentsClient) NewListBySubscriptionPager(options *ManagedEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[ManagedEnvironmentsClientListBySubscriptionResponse] { @@ -428,7 +428,7 @@ func (client *ManagedEnvironmentsClient) listBySubscriptionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -445,7 +445,7 @@ func (client *ManagedEnvironmentsClient) listBySubscriptionHandleResponse(resp * // NewListWorkloadProfileStatesPager - Get all workload Profile States for a Managed Environment. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - ManagedEnvironmentsClientListWorkloadProfileStatesOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListWorkloadProfileStatesPager @@ -493,7 +493,7 @@ func (client *ManagedEnvironmentsClient) listWorkloadProfileStatesCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -511,7 +511,7 @@ func (client *ManagedEnvironmentsClient) listWorkloadProfileStatesHandleResponse // BeginUpdate - Patches a Managed Environment using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - environmentEnvelope - Configuration details of the Environment. @@ -537,7 +537,7 @@ func (client *ManagedEnvironmentsClient) BeginUpdate(ctx context.Context, resour // Update - Patches a Managed Environment using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 func (client *ManagedEnvironmentsClient) update(ctx context.Context, resourceGroupName string, environmentName string, environmentEnvelope ManagedEnvironment, options *ManagedEnvironmentsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "ManagedEnvironmentsClient.BeginUpdate" @@ -579,7 +579,7 @@ func (client *ManagedEnvironmentsClient) updateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, environmentEnvelope); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsdiagnostics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsdiagnostics_client.go index f7c0c322..3dcb890b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsdiagnostics_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsdiagnostics_client.go @@ -28,7 +28,7 @@ type ManagedEnvironmentsDiagnosticsClient struct { } // NewManagedEnvironmentsDiagnosticsClient creates a new instance of ManagedEnvironmentsDiagnosticsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewManagedEnvironmentsDiagnosticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedEnvironmentsDiagnosticsClient, error) { @@ -46,7 +46,7 @@ func NewManagedEnvironmentsDiagnosticsClient(subscriptionID string, credential a // GetRoot - Get the properties of a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsDiagnosticsClientGetRootOptions contains the optional parameters for the ManagedEnvironmentsDiagnosticsClient.GetRoot @@ -93,7 +93,7 @@ func (client *ManagedEnvironmentsDiagnosticsClient) getRootCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/managedenvironmentsstorages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsstorages_client.go index bd98fc5f..63385c9d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsstorages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsstorages_client.go @@ -28,7 +28,7 @@ type ManagedEnvironmentsStoragesClient struct { } // NewManagedEnvironmentsStoragesClient creates a new instance of ManagedEnvironmentsStoragesClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewManagedEnvironmentsStoragesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedEnvironmentsStoragesClient, error) { @@ -46,7 +46,7 @@ func NewManagedEnvironmentsStoragesClient(subscriptionID string, credential azco // CreateOrUpdate - Create or update storage for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - storageName - Name of the storage. @@ -99,7 +99,7 @@ func (client *ManagedEnvironmentsStoragesClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, storageEnvelope); err != nil { @@ -120,7 +120,7 @@ func (client *ManagedEnvironmentsStoragesClient) createOrUpdateHandleResponse(re // Delete - Delete storage for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - storageName - Name of the storage. @@ -171,7 +171,7 @@ func (client *ManagedEnvironmentsStoragesClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *ManagedEnvironmentsStoragesClient) deleteCreateRequest(ctx context // Get - Get storage for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - storageName - Name of the storage. @@ -232,7 +232,7 @@ func (client *ManagedEnvironmentsStoragesClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -250,7 +250,7 @@ func (client *ManagedEnvironmentsStoragesClient) getHandleResponse(resp *http.Re // List - Get all storages for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsStoragesClientListOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.List @@ -297,7 +297,7 @@ func (client *ManagedEnvironmentsStoragesClient) listCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/managedenvironmentusages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentusages_client.go index 0d37788d..9e3a627c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentusages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentusages_client.go @@ -28,7 +28,7 @@ type ManagedEnvironmentUsagesClient struct { } // NewManagedEnvironmentUsagesClient creates a new instance of ManagedEnvironmentUsagesClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewManagedEnvironmentUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedEnvironmentUsagesClient, error) { @@ -45,7 +45,7 @@ func NewManagedEnvironmentUsagesClient(subscriptionID string, credential azcore. // NewListPager - Gets the current usage information as well as the limits for environment. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentUsagesClientListOptions contains the optional parameters for the ManagedEnvironmentUsagesClient.NewListPager @@ -93,7 +93,7 @@ func (client *ManagedEnvironmentUsagesClient) listCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models.go index 984c1484..238fb139 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models.go @@ -25,12 +25,6 @@ type AllowedPrincipals struct { Identities []*string } -// AppInsightsConfiguration - Configuration of Application Insights -type AppInsightsConfiguration struct { - // Application Insights connection string - ConnectionString *string -} - // AppLogsConfiguration - Configuration of application logs type AppLogsConfiguration struct { // Logs destination, can be 'log-analytics', 'azure-monitor' or 'none' @@ -49,54 +43,6 @@ type AppRegistration struct { AppSecretSettingName *string } -// AppResiliency - Configuration to setup App Resiliency -type AppResiliency struct { - // App Resiliency resource specific properties - Properties *AppResiliencyProperties - - // 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 -} - -// AppResiliencyCollection - Collection of AppResiliency policies -type AppResiliencyCollection struct { - // REQUIRED; Collection of resources. - Value []*AppResiliency - - // READ-ONLY; Link to next page of resources. - NextLink *string -} - -// AppResiliencyProperties - App Resiliency resource specific properties -type AppResiliencyProperties struct { - // Policy that defines circuit breaker conditions - CircuitBreakerPolicy *CircuitBreakerPolicy - - // Defines parameters for http connection pooling - HTTPConnectionPool *HTTPConnectionPool - - // Policy that defines http request retry conditions - HTTPRetryPolicy *HTTPRetryPolicy - - // Defines parameters for tcp connection pooling - TCPConnectionPool *TCPConnectionPool - - // Policy that defines tcp request retry conditions - TCPRetryPolicy *TCPRetryPolicy - - // Policy to set request timeouts - TimeoutPolicy *TimeoutPolicy -} - // Apple - The configuration settings of the Apple provider. type Apple struct { // false if the Apple provider should not be enabled despite the set registration; otherwise, true. @@ -429,150 +375,6 @@ type BlobStorageTokenStore struct { SasURLSettingName *string } -// BuildCollection - The response of a BuildResource list operation. -type BuildCollection struct { - // REQUIRED; The BuildResource items on this page - Value []*BuildResource - - // The link to the next page of items - NextLink *string -} - -// BuildConfiguration - Configuration of the build. -type BuildConfiguration struct { - // Base OS used to build and run the app. - BaseOs *string - - // List of environment variables to be passed to the build, secrets should not be used in environment variable. - EnvironmentVariables []*EnvironmentVariable - - // Platform to be used to build and run the app. - Platform *string - - // Platform version to be used to build and run the app. - PlatformVersion *string - - // List of steps to perform before the build. - PreBuildSteps []*PreBuildStep -} - -// BuildProperties - The build properties. -type BuildProperties struct { - // Configuration of the build. - Configuration *BuildConfiguration - - // Container registry that the final image will be uploaded to. - DestinationContainerRegistry *ContainerRegistryWithCustomImage - - // READ-ONLY; Status of the build once it has been provisioned. - BuildStatus *BuildStatus - - // READ-ONLY; Endpoint from which the build logs can be streamed. - LogStreamEndpoint *string - - // READ-ONLY; Build provisioning state. - ProvisioningState *BuildProvisioningState - - // READ-ONLY; Endpoint to use to retrieve an authentication token for log streaming and uploading source code. - TokenEndpoint *string - - // READ-ONLY; Endpoint to which the source code should be uploaded. - UploadEndpoint *string -} - -// BuildResource - Information pertaining to an individual build. -type BuildResource struct { - // The resource-specific properties for this resource. - Properties *BuildProperties - - // 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 -} - -// BuildToken - Build Auth Token. -type BuildToken struct { - // READ-ONLY; Token expiration date. - Expires *time.Time - - // READ-ONLY; Authentication token. - Token *string -} - -// BuilderCollection - The response of a BuilderResource list operation. -type BuilderCollection struct { - // REQUIRED; The BuilderResource items on this page - Value []*BuilderResource - - // The link to the next page of items - NextLink *string -} - -// BuilderProperties - The builder properties. -type BuilderProperties struct { - // REQUIRED; Resource ID of the container apps environment that the builder is associated with. - EnvironmentID *string - - // List of mappings of container registries and the managed identity used to connect to it. - ContainerRegistries []*ContainerRegistry - - // READ-ONLY; Provisioning state of a builder resource. - ProvisioningState *BuilderProvisioningState -} - -// BuilderResource - Information about the SourceToCloud builder resource. -type BuilderResource struct { - // REQUIRED; The geo-location where the resource lives - Location *string - - // The managed service identities assigned to this resource. - Identity *ManagedServiceIdentity - - // The resource-specific properties for this resource. - Properties *BuilderProperties - - // 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 -} - -// BuilderResourceUpdate - The type used for update operations of the BuilderResource. -type BuilderResourceUpdate struct { - // The managed service identities assigned to this resource. - Identity *ManagedServiceIdentity - - // The updatable properties of the BuilderResource. - Properties *BuilderResourceUpdateProperties - - // Resource tags. - Tags map[string]*string -} - -// BuilderResourceUpdateProperties - The updatable properties of the BuilderResource. -type BuilderResourceUpdateProperties struct { - // Resource ID of the container apps environment that the builder is associated with. - EnvironmentID *string -} - // Certificate used for Custom Domain bindings of Container Apps in a Managed Environment type Certificate struct { // REQUIRED; The geo-location where the resource lives @@ -606,15 +408,6 @@ type CertificateCollection struct { NextLink *string } -// CertificateKeyVaultProperties - Properties for a certificate stored in a Key Vault. -type CertificateKeyVaultProperties struct { - // Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. - Identity *string - - // URL pointing to the Azure Key Vault secret that holds the certificate. - KeyVaultURL *string -} - // CertificatePatch - A certificate to update type CertificatePatch struct { // Application-specific metadata in the form of key-value pairs. @@ -623,12 +416,6 @@ type CertificatePatch struct { // CertificateProperties - Certificate resource specific properties type CertificateProperties struct { - // Properties for a certificate stored in a Key Vault. - CertificateKeyVaultProperties *CertificateKeyVaultProperties - - // The type of the certificate. Allowed values are ServerSSLCertificate and ImagePullTrustedCA - CertificateType *CertificateType - // Certificate password. Password *string @@ -684,19 +471,6 @@ type CheckNameAvailabilityResponse struct { Reason *CheckNameAvailabilityReason } -// CircuitBreakerPolicy - Policy that defines circuit breaker conditions -type CircuitBreakerPolicy struct { - // Number of consecutive errors before the circuit breaker opens - ConsecutiveErrors *int32 - - // The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the check fails - // as well as closing the circuit breaker if the check succeeds. Defaults to 10s. - IntervalInSeconds *int32 - - // Maximum percentage of hosts that will be ejected after failure threshold has been met - MaxEjectionPercent *int32 -} - // ClientRegistration - The configuration settings of the app registration for providers that have client ids and client secrets type ClientRegistration struct { // The Client ID of the app used for login. @@ -1066,25 +840,6 @@ type ContainerAppSecret struct { Value *string } -// ContainerRegistry - Model representing a mapping from a container registry to the identity used to connect to it. -type ContainerRegistry struct { - // REQUIRED; Login server of the container registry. - ContainerRegistryServer *string - - // REQUIRED; Resource ID of the managed identity. - IdentityResourceID *string -} - -// ContainerRegistryWithCustomImage - Container registry that the final image will be uploaded to. -type ContainerRegistryWithCustomImage struct { - // REQUIRED; Login server of the container registry that the final image should be uploaded to. Builder resource needs to - // have this container registry defined along with an identity to use to access it. - Server *string - - // Full name that the final image should be uploaded as, including both image name and tag. - Image *string -} - // ContainerResources - Container App container resource requirements. type ContainerResources struct { // Required CPU in cores, e.g. 0.5 @@ -1141,9 +896,6 @@ type CustomDomain struct { // CustomDomainConfiguration - Configuration properties for apps environment custom domain type CustomDomainConfiguration struct { - // Certificate stored in Azure Key Vault. - CertificateKeyVaultProperties *CertificateKeyVaultProperties - // Certificate password CertificatePassword *string @@ -1325,111 +1077,10 @@ type DaprComponentProperties struct { // Collection of secrets used by a Dapr component Secrets []*Secret - // List of container app services that are bound to the Dapr component - ServiceComponentBind []*DaprComponentServiceBinding - // Component version Version *string } -// DaprComponentResiliencyPoliciesCollection - Dapr Component Resiliency Policies ARM resource. -type DaprComponentResiliencyPoliciesCollection struct { - // REQUIRED; Collection of resources. - Value []*DaprComponentResiliencyPolicy - - // READ-ONLY; Link to next page of resources. - NextLink *string -} - -// DaprComponentResiliencyPolicy - Dapr Component Resiliency Policy. -type DaprComponentResiliencyPolicy struct { - // Dapr Component Resiliency Policy resource specific properties - Properties *DaprComponentResiliencyPolicyProperties - - // 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 -} - -// DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration - Dapr Component Resiliency Policy Circuit Breaker Policy -// Configuration. -type DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration struct { - // The number of consecutive errors before the circuit is opened. - ConsecutiveErrors *int32 - - // The optional interval in seconds after which the error count resets to 0. An interval of 0 will never reset. If not specified, - // the timeoutInSeconds value will be used. - IntervalInSeconds *int32 - - // The interval in seconds until a retry attempt is made after the circuit is opened. - TimeoutInSeconds *int32 -} - -// DaprComponentResiliencyPolicyConfiguration - Dapr Component Resiliency Policy Configuration. -type DaprComponentResiliencyPolicyConfiguration struct { - // The optional circuit breaker policy configuration - CircuitBreakerPolicy *DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration - - // The optional HTTP retry policy configuration - HTTPRetryPolicy *DaprComponentResiliencyPolicyHTTPRetryPolicyConfiguration - - // The optional timeout policy configuration - TimeoutPolicy *DaprComponentResiliencyPolicyTimeoutPolicyConfiguration -} - -// DaprComponentResiliencyPolicyHTTPRetryBackOffConfiguration - Dapr Component Resiliency Policy HTTP Retry Backoff Configuration. -type DaprComponentResiliencyPolicyHTTPRetryBackOffConfiguration struct { - // The optional initial delay in milliseconds before an operation is retried - InitialDelayInMilliseconds *int32 - - // The optional maximum time interval in milliseconds between retry attempts - MaxIntervalInMilliseconds *int32 -} - -// DaprComponentResiliencyPolicyHTTPRetryPolicyConfiguration - Dapr Component Resiliency Policy HTTP Retry Policy Configuration. -type DaprComponentResiliencyPolicyHTTPRetryPolicyConfiguration struct { - // The optional maximum number of retries - MaxRetries *int32 - - // The optional retry backoff configuration - RetryBackOff *DaprComponentResiliencyPolicyHTTPRetryBackOffConfiguration -} - -// DaprComponentResiliencyPolicyProperties - Dapr Component Resiliency Policy resource specific properties -type DaprComponentResiliencyPolicyProperties struct { - // The optional inbound component resiliency policy configuration - InboundPolicy *DaprComponentResiliencyPolicyConfiguration - - // The optional outbound component resiliency policy configuration - OutboundPolicy *DaprComponentResiliencyPolicyConfiguration -} - -// DaprComponentResiliencyPolicyTimeoutPolicyConfiguration - Dapr Component Resiliency Policy Timeout Policy Configuration. -type DaprComponentResiliencyPolicyTimeoutPolicyConfiguration struct { - // The optional response timeout in seconds - ResponseTimeoutInSeconds *int32 -} - -// DaprComponentServiceBinding - Configuration to bind a Dapr Component to a dev ContainerApp Service -type DaprComponentServiceBinding struct { - // Service bind metadata - Metadata *DaprServiceBindMetadata - - // Name of the service bind - Name *string - - // Resource id of the target service - ServiceID *string -} - // DaprComponentsCollection - Dapr Components ARM resource. type DaprComponentsCollection struct { // REQUIRED; Collection of resources. @@ -1472,108 +1123,6 @@ type DaprSecretsCollection struct { Value []*DaprSecret } -// DaprServiceBindMetadata - Dapr component metadata. -type DaprServiceBindMetadata struct { - // Service bind metadata property name. - Name *string - - // Service bind metadata property value. - Value *string -} - -// DaprSubscription - Dapr PubSub Event Subscription. -type DaprSubscription struct { - // Dapr PubSub Event Subscription resource specific properties - Properties *DaprSubscriptionProperties - - // 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 -} - -// DaprSubscriptionBulkSubscribeOptions - Dapr PubSub Bulk Subscription Options. -type DaprSubscriptionBulkSubscribeOptions struct { - // Enable bulk subscription - Enabled *bool - - // Maximum duration in milliseconds to wait before a bulk message is sent to the app. - MaxAwaitDurationMs *int32 - - // Maximum number of messages to deliver in a bulk message. - MaxMessagesCount *int32 -} - -// DaprSubscriptionProperties - Dapr PubSub Event Subscription resource specific properties -type DaprSubscriptionProperties struct { - // Bulk subscription options - BulkSubscribe *DaprSubscriptionBulkSubscribeOptions - - // Deadletter topic name - DeadLetterTopic *string - - // Subscription metadata - Metadata map[string]*string - - // Dapr PubSub component name - PubsubName *string - - // Subscription routes - Routes *DaprSubscriptionRoutes - - // Application scopes to restrict the subscription to specific apps. - Scopes []*string - - // Topic name - Topic *string -} - -// DaprSubscriptionRouteRule - Dapr Pubsub Event Subscription Route Rule is used to specify the condition for sending a message -// to a specific path. -type DaprSubscriptionRouteRule struct { - // The optional CEL expression used to match the event. If the match is not specified, then the route is considered the default. - // The rules are tested in the order specified, so they should be define from - // most-to-least specific. The default route should appear last in the list. - Match *string - - // The path for events that match this rule - Path *string -} - -// DaprSubscriptionRoutes - Dapr PubSub Event Subscription Routes configuration. -type DaprSubscriptionRoutes struct { - // The default path to deliver events that do not match any of the rules. - Default *string - - // The list of Dapr PubSub Event Subscription Route Rules. - Rules []*DaprSubscriptionRouteRule -} - -// DaprSubscriptionsCollection - Dapr Subscriptions ARM resource. -type DaprSubscriptionsCollection struct { - // REQUIRED; Collection of resources. - Value []*DaprSubscription - - // READ-ONLY; Link to next page of resources. - NextLink *string -} - -// DataDogConfiguration - Configuration of datadog -type DataDogConfiguration struct { - // The data dog api key - Key *string - - // The data dog site - Site *string -} - // DefaultAuthorizationPolicy - The configuration settings of the Azure Active Directory default authorization policy. type DefaultAuthorizationPolicy struct { // The configuration settings of the Azure Active Directory allowed applications. @@ -1619,15 +1168,6 @@ type DefaultErrorResponseErrorDetailsItem struct { Target *string } -// DestinationsConfiguration - Configuration of Open Telemetry destinations -type DestinationsConfiguration struct { - // Open telemetry datadog destination configuration - DataDogConfiguration *DataDogConfiguration - - // Open telemetry otlp configurations - OtlpConfigurations []*OtlpConfiguration -} - // DiagnosticDataProviderMetadata - Details of a diagnostics data provider type DiagnosticDataProviderMetadata struct { // Collection of properties @@ -1784,66 +1324,6 @@ type DiagnosticsStatus struct { StatusID *int32 } -// DotNetComponent - .NET Component. -type DotNetComponent struct { - // .NET Component resource specific properties - Properties *DotNetComponentProperties - - // 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 -} - -// DotNetComponentConfigurationProperty - Configuration properties for a .NET Component -type DotNetComponentConfigurationProperty struct { - // The name of the property - PropertyName *string - - // The value of the property - Value *string -} - -// DotNetComponentProperties - .NET Component resource specific properties -type DotNetComponentProperties struct { - // Type of the .NET Component. - ComponentType *DotNetComponentType - - // List of .NET Components configuration properties - Configurations []*DotNetComponentConfigurationProperty - - // List of .NET Components that are bound to the .NET component - ServiceBinds []*DotNetComponentServiceBind - - // READ-ONLY; Provisioning state of the .NET Component. - ProvisioningState *DotNetComponentProvisioningState -} - -// DotNetComponentServiceBind - Configuration to bind a .NET Component to another .NET Component -type DotNetComponentServiceBind struct { - // Name of the service bind - Name *string - - // Resource id of the target service - ServiceID *string -} - -// DotNetComponentsCollection - .NET Components ARM resource. -type DotNetComponentsCollection struct { - // REQUIRED; Collection of resources. - Value []*DotNetComponent - - // READ-ONLY; Link to next page of resources. - NextLink *string -} - // EncryptionSettings - The configuration settings of the secrets references of encryption key and signing key for ContainerApp // Service Authentication/Authorization. type EncryptionSettings struct { @@ -1899,15 +1379,6 @@ type EnvironmentVar struct { Value *string } -// EnvironmentVariable - Model representing an environment variable. -type EnvironmentVariable struct { - // REQUIRED; Environment variable name. - Name *string - - // REQUIRED; Environment variable value. - Value *string -} - // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. @@ -1995,9 +1466,6 @@ type GithubActionConfiguration struct { // AzureCredentials configurations. AzureCredentials *AzureCredentials - // List of environment variables to be passed to the build. - BuildEnvironmentVariables []*EnvironmentVariable - // Context path ContextPath *string @@ -2052,60 +1520,6 @@ type Google struct { Validation *AllowedAudiencesValidation } -// HTTPConnectionPool - Defines parameters for http connection pooling -type HTTPConnectionPool struct { - // Maximum number of pending http1 requests allowed - HTTP1MaxPendingRequests *int32 - - // Maximum number of http2 requests allowed - HTTP2MaxRequests *int32 -} - -// HTTPGet - Model representing a http get request. -type HTTPGet struct { - // REQUIRED; URL to make HTTP GET request against. - URL *string - - // Name of the file that the request should be saved to. - FileName *string - - // List of headers to send with the request. - Headers []*string -} - -// HTTPRetryPolicy - Policy that defines http request retry conditions -type HTTPRetryPolicy struct { - // Conditions that must be met for a request to be retried - Matches *HTTPRetryPolicyMatches - - // Maximum number of times a request will retry - MaxRetries *int32 - - // Settings for retry backoff characteristics - RetryBackOff *HTTPRetryPolicyRetryBackOff -} - -// HTTPRetryPolicyMatches - Conditions that must be met for a request to be retried -type HTTPRetryPolicyMatches struct { - // Errors that can trigger a retry - Errors []*string - - // Additional http status codes that can trigger a retry - HTTPStatusCodes []*int32 - - // Headers that must be present for a request to be retried - Headers []*HeaderMatch -} - -// HTTPRetryPolicyRetryBackOff - Settings for retry backoff characteristics -type HTTPRetryPolicyRetryBackOff struct { - // Initial delay, in milliseconds, before retrying a request - InitialDelayInMilliseconds *int64 - - // Maximum interval, in milliseconds, between retries - MaxIntervalInMilliseconds *int64 -} - // HTTPScaleRule - Container App container Http scaling rule. type HTTPScaleRule struct { // Authentication secrets for the custom scale rule. @@ -2134,39 +1548,6 @@ type HTTPSettingsRoutes struct { APIPrefix *string } -// Header of otlp configuration -type Header struct { - // The key of otlp configuration header - Key *string - - // The value of otlp configuration header - Value *string -} - -// HeaderMatch - Conditions required to match a header -type HeaderMatch struct { - // Name of the header - Header *string - - // Type of match to perform - Match *HeaderMatchMatch -} - -// HeaderMatchMatch - Type of match to perform -type HeaderMatchMatch struct { - // Exact value of the header - ExactMatch *string - - // Prefix value of the header - PrefixMatch *string - - // Regex value of the header - RegexMatch *string - - // Suffix value of the header - SuffixMatch *string -} - // IPSecurityRestrictionRule - Rule to restrict incoming IP address. type IPSecurityRestrictionRule struct { // REQUIRED; Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny @@ -2246,9 +1627,6 @@ type Ingress struct { // Target Port in containers for traffic from ingress TargetPort *int32 - // Whether an http app listens on http or https - TargetPortHTTPScheme *IngressTargetPortHTTPScheme - // Traffic weights for app's revisions Traffic []*TrafficWeight @@ -2301,74 +1679,11 @@ type InitContainer struct { VolumeMounts []*VolumeMount } -// JavaComponent - Java Component. -type JavaComponent struct { - // Java Component resource specific properties - Properties *JavaComponentProperties - - // 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 -} - -// JavaComponentConfigurationProperty - Configuration properties for a Java Component -type JavaComponentConfigurationProperty struct { - // The name of the property - PropertyName *string - - // The value of the property - Value *string -} - -// JavaComponentProperties - Java Component resource specific properties -type JavaComponentProperties struct { - // Type of the Java Component. - ComponentType *JavaComponentType - - // List of Java Components configuration properties - Configurations []*JavaComponentConfigurationProperty - - // List of Java Components that are bound to the Java component - ServiceBinds []*JavaComponentServiceBind - - // READ-ONLY; Provisioning state of the Java Component. - ProvisioningState *JavaComponentProvisioningState -} - -// JavaComponentServiceBind - Configuration to bind a Java Component to another Java Component -type JavaComponentServiceBind struct { - // Name of the service bind - Name *string - - // Resource id of the target service - ServiceID *string -} - -// JavaComponentsCollection - Java Components ARM resource. -type JavaComponentsCollection struct { - // REQUIRED; Collection of resources. - Value []*JavaComponent - - // READ-ONLY; Link to next page of resources. - NextLink *string -} - // Job - Container App Job type Job struct { // REQUIRED; The geo-location where the resource lives Location *string - // The complex type of the extended location. - ExtendedLocation *ExtendedLocation - // Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials // in code. Identity *ManagedServiceIdentity @@ -2533,9 +1848,6 @@ type JobExecutionTemplate struct { // JobPatchProperties - Container Apps Job resource specific properties. type JobPatchProperties struct { - // The complex type of the extended location. - ExtendedLocation *ExtendedLocation - // Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials // in code. Identity *ManagedServiceIdentity @@ -2673,9 +1985,6 @@ type LogAnalyticsConfiguration struct { // Log analytics customer id CustomerID *string - // Boolean indicating whether to parse json string log into dynamic json columns - DynamicJSONColumns *bool - // Log analytics customer key SharedKey *string } @@ -2715,12 +2024,6 @@ type LoginScopes struct { Scopes []*string } -// LogsConfiguration - Configuration of Open Telemetry logs -type LogsConfiguration struct { - // Open telemetry logs destinations - Destinations []*string -} - // ManagedCertificate - Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment type ManagedCertificate struct { // REQUIRED; The geo-location where the resource lives @@ -2783,10 +2086,6 @@ type ManagedEnvironment struct { // REQUIRED; The geo-location where the resource lives Location *string - // Managed identities for the Managed Environment to interact with other Azure services without maintaining any secrets or - // credentials in code. - Identity *ManagedServiceIdentity - // Kind of the Environment. Kind *string @@ -2811,9 +2110,6 @@ type ManagedEnvironment struct { // ManagedEnvironmentProperties - Managed environment resource specific properties type ManagedEnvironmentProperties struct { - // Environment level Application Insights configuration - AppInsightsConfiguration *AppInsightsConfiguration - // Cluster configuration which enables the log daemon to export app logs to a destination. Currently only "log-analytics" // is supported AppLogsConfiguration *AppLogsConfiguration @@ -2838,12 +2134,12 @@ type ManagedEnvironmentProperties struct { // The configuration of Keda component. KedaConfiguration *KedaConfiguration - // Environment Open Telemetry configuration - OpenTelemetryConfiguration *OpenTelemetryConfiguration - // Peer authentication settings for the Managed Environment PeerAuthentication *ManagedEnvironmentPropertiesPeerAuthentication + // Peer traffic settings for the Managed Environment + PeerTrafficConfiguration *ManagedEnvironmentPropertiesPeerTrafficConfiguration + // Vnet configuration for the environment VnetConfiguration *VnetConfiguration @@ -2875,6 +2171,18 @@ type ManagedEnvironmentPropertiesPeerAuthentication struct { Mtls *Mtls } +// ManagedEnvironmentPropertiesPeerTrafficConfiguration - Peer traffic settings for the Managed Environment +type ManagedEnvironmentPropertiesPeerTrafficConfiguration struct { + // Peer traffic encryption settings for the Managed Environment + Encryption *ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption +} + +// ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption - Peer traffic encryption settings for the Managed Environment +type ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption struct { + // Boolean indicating whether the peer traffic encryption is enabled + Enabled *bool +} + // ManagedEnvironmentStorage - Storage resource for managedEnvironment. type ManagedEnvironmentStorage struct { // Storage properties @@ -2897,9 +2205,6 @@ type ManagedEnvironmentStorage struct { type ManagedEnvironmentStorageProperties struct { // Azure file properties AzureFile *AzureFileProperties - - // NFS Azure file properties - NfsAzureFile *NfsAzureFileProperties } // ManagedEnvironmentStoragesCollection - Collection of Storage for Environments @@ -2937,30 +2242,12 @@ type ManagedServiceIdentity struct { TenantID *string } -// MetricsConfiguration - Configuration of Open Telemetry metrics -type MetricsConfiguration struct { - // Open telemetry metrics destinations - Destinations []*string -} - // Mtls - Configuration properties for mutual TLS authentication type Mtls struct { // Boolean indicating whether the mutual TLS authentication is enabled Enabled *bool } -// NfsAzureFileProperties - NFS Azure File Properties. -type NfsAzureFileProperties struct { - // Access mode for storage - AccessMode *AccessMode - - // Server for NFS azure file. - Server *string - - // NFS Azure file share name. - ShareName *string -} - // Nonce - The configuration settings of the nonce used in the login flow. type Nonce struct { // The time after the request is made when the nonce should expire. @@ -3018,21 +2305,6 @@ type OpenIDConnectRegistration struct { OpenIDConnectConfiguration *OpenIDConnectConfig } -// OpenTelemetryConfiguration - Configuration of Open Telemetry -type OpenTelemetryConfiguration struct { - // Open telemetry destinations configuration - DestinationsConfiguration *DestinationsConfiguration - - // Open telemetry logs configuration - LogsConfiguration *LogsConfiguration - - // Open telemetry metrics configuration - MetricsConfiguration *MetricsConfiguration - - // Open telemetry trace configuration - TracesConfiguration *TracesConfiguration -} - // OperationDetail - Operation detail payload type OperationDetail struct { // Display of the operation @@ -3063,33 +2335,6 @@ type OperationDisplay struct { Resource *string } -// OtlpConfiguration - Configuration of otlp -type OtlpConfiguration struct { - // The endpoint of otlp configuration - Endpoint *string - - // Headers of otlp configurations - Headers []*Header - - // Boolean indicating if otlp configuration is insecure - Insecure *bool - - // The name of otlp configuration - Name *string -} - -// PreBuildStep - Model representing a pre-build step. -type PreBuildStep struct { - // Description of the pre-build step. - Description *string - - // Http get request to send before the build. - HTTPGet *HTTPGet - - // List of custom commands to run. - Scripts []*string -} - // ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a // location type ProxyResource struct { @@ -3374,12 +2619,6 @@ type Service struct { // ServiceBind - Configuration to bind a ContainerApp to a dev ContainerApp Service type ServiceBind struct { - // Type of the client to be used to connect to the service - ClientType *string - - // Customized keys for customizing injected values to the app - CustomizedKeys map[string]*string - // Name of the service bind Name *string @@ -3451,18 +2690,6 @@ type SystemData struct { LastModifiedByType *CreatedByType } -// TCPConnectionPool - Defines parameters for tcp connection pooling -type TCPConnectionPool struct { - // Maximum number of tcp connections allowed - MaxConnections *int32 -} - -// TCPRetryPolicy - Policy that defines tcp request retry conditions -type TCPRetryPolicy struct { - // Maximum number of attempts to connect to the tcp service - MaxConnectAttempts *int32 -} - // TCPScaleRule - Container App container Tcp scaling rule. type TCPScaleRule struct { // Authentication secrets for the tcp scale rule. @@ -3500,15 +2727,6 @@ type Template struct { Volumes []*Volume } -// TimeoutPolicy - Policy to set request timeouts -type TimeoutPolicy struct { - // Timeout, in seconds, for a request to initiate a connection - ConnectionTimeoutInSeconds *int32 - - // Timeout, in seconds, for a request to respond - ResponseTimeoutInSeconds *int32 -} - // TokenStore - The configuration settings of the token store. type TokenStore struct { // The configuration settings of the storage of the tokens if blob storage is used. @@ -3523,12 +2741,6 @@ type TokenStore struct { TokenRefreshExtensionHours *float64 } -// TracesConfiguration - Configuration of Open Telemetry traces -type TracesConfiguration struct { - // Open telemetry traces destinations - Destinations []*string -} - // TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' // and a 'location' type TrackedResource struct { @@ -3640,7 +2852,7 @@ type VnetConfiguration struct { // Volume definitions for the Container App. type Volume struct { - // Mount options used while mounting the Azure file share or NFS Azure file share. Must be a comma-separated string. + // Mount options used while mounting the AzureFile. Must be a comma-separated string. MountOptions *string // Volume name. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models_serde.go index 8c4a7c57..e4b80637 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models_serde.go @@ -74,33 +74,6 @@ func (a *AllowedPrincipals) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AppInsightsConfiguration. -func (a AppInsightsConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "connectionString", a.ConnectionString) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AppInsightsConfiguration. -func (a *AppInsightsConfiguration) UnmarshalJSON(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 "connectionString": - err = unpopulate(val, "ConnectionString", &a.ConnectionString) - 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 AppLogsConfiguration. func (a AppLogsConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -163,127 +136,6 @@ func (a *AppRegistration) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AppResiliency. -func (a AppResiliency) 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, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AppResiliency. -func (a *AppResiliency) UnmarshalJSON(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 "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - 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 AppResiliencyCollection. -func (a AppResiliencyCollection) 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 AppResiliencyCollection. -func (a *AppResiliencyCollection) UnmarshalJSON(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 AppResiliencyProperties. -func (a AppResiliencyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "circuitBreakerPolicy", a.CircuitBreakerPolicy) - populate(objectMap, "httpConnectionPool", a.HTTPConnectionPool) - populate(objectMap, "httpRetryPolicy", a.HTTPRetryPolicy) - populate(objectMap, "tcpConnectionPool", a.TCPConnectionPool) - populate(objectMap, "tcpRetryPolicy", a.TCPRetryPolicy) - populate(objectMap, "timeoutPolicy", a.TimeoutPolicy) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AppResiliencyProperties. -func (a *AppResiliencyProperties) UnmarshalJSON(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 "circuitBreakerPolicy": - err = unpopulate(val, "CircuitBreakerPolicy", &a.CircuitBreakerPolicy) - delete(rawMsg, key) - case "httpConnectionPool": - err = unpopulate(val, "HTTPConnectionPool", &a.HTTPConnectionPool) - delete(rawMsg, key) - case "httpRetryPolicy": - err = unpopulate(val, "HTTPRetryPolicy", &a.HTTPRetryPolicy) - delete(rawMsg, key) - case "tcpConnectionPool": - err = unpopulate(val, "TCPConnectionPool", &a.TCPConnectionPool) - delete(rawMsg, key) - case "tcpRetryPolicy": - err = unpopulate(val, "TCPRetryPolicy", &a.TCPRetryPolicy) - delete(rawMsg, key) - case "timeoutPolicy": - err = unpopulate(val, "TimeoutPolicy", &a.TimeoutPolicy) - 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 Apple. func (a Apple) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1141,403 +993,480 @@ func (b *BlobStorageTokenStore) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildCollection. -func (b BuildCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Certificate. +func (c Certificate) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) + populate(objectMap, "id", c.ID) + 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 BuildCollection. -func (b *BuildCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Certificate. +func (c *Certificate) UnmarshalJSON(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) + 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", &b.NextLink) + case "id": + err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) + 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", b, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildConfiguration. -func (b BuildConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CertificateCollection. +func (c CertificateCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "baseOs", b.BaseOs) - populate(objectMap, "environmentVariables", b.EnvironmentVariables) - populate(objectMap, "platform", b.Platform) - populate(objectMap, "platformVersion", b.PlatformVersion) - populate(objectMap, "preBuildSteps", b.PreBuildSteps) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildConfiguration. -func (b *BuildConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCollection. +func (c *CertificateCollection) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "baseOs": - err = unpopulate(val, "BaseOs", &b.BaseOs) - delete(rawMsg, key) - case "environmentVariables": - err = unpopulate(val, "EnvironmentVariables", &b.EnvironmentVariables) - delete(rawMsg, key) - case "platform": - err = unpopulate(val, "Platform", &b.Platform) - delete(rawMsg, key) - case "platformVersion": - err = unpopulate(val, "PlatformVersion", &b.PlatformVersion) + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) delete(rawMsg, key) - case "preBuildSteps": - err = unpopulate(val, "PreBuildSteps", &b.PreBuildSteps) + case "value": + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildProperties. -func (b BuildProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CertificatePatch. +func (c CertificatePatch) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "buildStatus", b.BuildStatus) - populate(objectMap, "configuration", b.Configuration) - populate(objectMap, "destinationContainerRegistry", b.DestinationContainerRegistry) - populate(objectMap, "logStreamEndpoint", b.LogStreamEndpoint) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "tokenEndpoint", b.TokenEndpoint) - populate(objectMap, "uploadEndpoint", b.UploadEndpoint) + populate(objectMap, "tags", c.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildProperties. -func (b *BuildProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificatePatch. +func (c *CertificatePatch) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "buildStatus": - err = unpopulate(val, "BuildStatus", &b.BuildStatus) - delete(rawMsg, key) - case "configuration": - err = unpopulate(val, "Configuration", &b.Configuration) - delete(rawMsg, key) - case "destinationContainerRegistry": - err = unpopulate(val, "DestinationContainerRegistry", &b.DestinationContainerRegistry) - delete(rawMsg, key) - case "logStreamEndpoint": - err = unpopulate(val, "LogStreamEndpoint", &b.LogStreamEndpoint) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - case "tokenEndpoint": - err = unpopulate(val, "TokenEndpoint", &b.TokenEndpoint) - delete(rawMsg, key) - case "uploadEndpoint": - err = unpopulate(val, "UploadEndpoint", &b.UploadEndpoint) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildResource. -func (b BuildResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CertificateProperties. +func (c CertificateProperties) 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, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) + populateDateTimeRFC3339(objectMap, "expirationDate", c.ExpirationDate) + populateDateTimeRFC3339(objectMap, "issueDate", c.IssueDate) + populate(objectMap, "issuer", c.Issuer) + populate(objectMap, "password", c.Password) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "publicKeyHash", c.PublicKeyHash) + populate(objectMap, "subjectAlternativeNames", c.SubjectAlternativeNames) + populate(objectMap, "subjectName", c.SubjectName) + populate(objectMap, "thumbprint", c.Thumbprint) + populate(objectMap, "valid", c.Valid) + populateByteArray(objectMap, "value", c.Value, func() any { + return runtime.EncodeByteArray(c.Value, runtime.Base64StdFormat) + }) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResource. -func (b *BuildResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateProperties. +func (c *CertificateProperties) UnmarshalJSON(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) + 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", &b.ID) + case "expirationDate": + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &c.ExpirationDate) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) + case "issueDate": + err = unpopulateDateTimeRFC3339(val, "IssueDate", &c.IssueDate) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) + case "issuer": + err = unpopulate(val, "Issuer", &c.Issuer) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &b.SystemData) + case "password": + err = unpopulate(val, "Password", &c.Password) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "publicKeyHash": + err = unpopulate(val, "PublicKeyHash", &c.PublicKeyHash) + delete(rawMsg, key) + case "subjectAlternativeNames": + err = unpopulate(val, "SubjectAlternativeNames", &c.SubjectAlternativeNames) + delete(rawMsg, key) + case "subjectName": + err = unpopulate(val, "SubjectName", &c.SubjectName) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) + delete(rawMsg, key) + case "valid": + err = unpopulate(val, "Valid", &c.Valid) + delete(rawMsg, key) + case "value": + if val != nil && string(val) != "null" { + err = runtime.DecodeByteArray(string(val), &c.Value, runtime.Base64StdFormat) + } delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type BuildToken. -func (b BuildToken) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest. +func (c CheckNameAvailabilityRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateDateTimeRFC3339(objectMap, "expires", b.Expires) - populate(objectMap, "token", b.Token) + populate(objectMap, "name", c.Name) + populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildToken. -func (b *BuildToken) UnmarshalJSON(data []byte) error { +// 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", b, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "expires": - err = unpopulateDateTimeRFC3339(val, "Expires", &b.Expires) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) - case "token": - err = unpopulate(val, "Token", &b.Token) + case "type": + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type BuilderCollection. -func (b BuilderCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse. +func (c CheckNameAvailabilityResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) + populate(objectMap, "message", c.Message) + populate(objectMap, "nameAvailable", c.NameAvailable) + populate(objectMap, "reason", c.Reason) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type BuilderCollection. -func (b *BuilderCollection) UnmarshalJSON(data []byte) error { +// 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", b, err) + 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", &b.NextLink) + case "message": + err = unpopulate(val, "Message", &c.Message) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &c.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type BuilderProperties. -func (b BuilderProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClientRegistration. +func (c ClientRegistration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "containerRegistries", b.ContainerRegistries) - populate(objectMap, "environmentId", b.EnvironmentID) - populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "clientId", c.ClientID) + populate(objectMap, "clientSecretSettingName", c.ClientSecretSettingName) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type BuilderProperties. -func (b *BuilderProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientRegistration. +func (c *ClientRegistration) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "containerRegistries": - err = unpopulate(val, "ContainerRegistries", &b.ContainerRegistries) + case "clientId": + err = unpopulate(val, "ClientID", &c.ClientID) delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &b.EnvironmentID) + case "clientSecretSettingName": + err = unpopulate(val, "ClientSecretSettingName", &c.ClientSecretSettingName) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Configuration. +func (c Configuration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeRevisionsMode", c.ActiveRevisionsMode) + populate(objectMap, "dapr", c.Dapr) + populate(objectMap, "ingress", c.Ingress) + populate(objectMap, "maxInactiveRevisions", c.MaxInactiveRevisions) + populate(objectMap, "registries", c.Registries) + populate(objectMap, "secrets", c.Secrets) + populate(objectMap, "service", c.Service) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Configuration. +func (c *Configuration) UnmarshalJSON(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 "activeRevisionsMode": + err = unpopulate(val, "ActiveRevisionsMode", &c.ActiveRevisionsMode) + delete(rawMsg, key) + case "dapr": + err = unpopulate(val, "Dapr", &c.Dapr) + delete(rawMsg, key) + case "ingress": + err = unpopulate(val, "Ingress", &c.Ingress) + delete(rawMsg, key) + case "maxInactiveRevisions": + err = unpopulate(val, "MaxInactiveRevisions", &c.MaxInactiveRevisions) + delete(rawMsg, key) + case "registries": + err = unpopulate(val, "Registries", &c.Registries) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &c.Secrets) + delete(rawMsg, key) + case "service": + err = unpopulate(val, "Service", &c.Service) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type BuilderResource. -func (b BuilderResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConnectedEnvironment. +func (c ConnectedEnvironment) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", b.ID) - populate(objectMap, "identity", b.Identity) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) + populate(objectMap, "extendedLocation", c.ExtendedLocation) + populate(objectMap, "id", c.ID) + 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 BuilderResource. -func (b *BuilderResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironment. +func (c *ConnectedEnvironment) UnmarshalJSON(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) + 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", &b.ID) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &c.ExtendedLocation) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &b.Identity) + case "id": + err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) case "location": - err = unpopulate(val, "Location", &b.Location) + err = unpopulate(val, "Location", &c.Location) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &b.Name) + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &b.Properties) + err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &b.SystemData) + err = unpopulate(val, "SystemData", &c.SystemData) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &b.Tags) + err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &b.Type) + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type BuilderResourceUpdate. -func (b BuilderResourceUpdate) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConnectedEnvironmentCollection. +func (c ConnectedEnvironmentCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "identity", b.Identity) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "tags", b.Tags) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type BuilderResourceUpdate. -func (b *BuilderResourceUpdate) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironmentCollection. +func (c *ConnectedEnvironmentCollection) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "identity": - err = unpopulate(val, "Identity", &b.Identity) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &b.Tags) + case "value": + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type BuilderResourceUpdateProperties. -func (b BuilderResourceUpdateProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConnectedEnvironmentProperties. +func (c ConnectedEnvironmentProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "environmentId", b.EnvironmentID) + populate(objectMap, "customDomainConfiguration", c.CustomDomainConfiguration) + populate(objectMap, "daprAIConnectionString", c.DaprAIConnectionString) + populate(objectMap, "defaultDomain", c.DefaultDomain) + populate(objectMap, "deploymentErrors", c.DeploymentErrors) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "staticIp", c.StaticIP) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type BuilderResourceUpdateProperties. -func (b *BuilderResourceUpdateProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironmentProperties. +func (c *ConnectedEnvironmentProperties) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "environmentId": - err = unpopulate(val, "EnvironmentID", &b.EnvironmentID) + case "customDomainConfiguration": + err = unpopulate(val, "CustomDomainConfiguration", &c.CustomDomainConfiguration) + delete(rawMsg, key) + case "daprAIConnectionString": + err = unpopulate(val, "DaprAIConnectionString", &c.DaprAIConnectionString) + delete(rawMsg, key) + case "defaultDomain": + err = unpopulate(val, "DefaultDomain", &c.DefaultDomain) + delete(rawMsg, key) + case "deploymentErrors": + err = unpopulate(val, "DeploymentErrors", &c.DeploymentErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "staticIp": + err = unpopulate(val, "StaticIP", &c.StaticIP) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Certificate. -func (c Certificate) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConnectedEnvironmentStorage. +func (c ConnectedEnvironmentStorage) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", c.ID) - 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 Certificate. -func (c *Certificate) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironmentStorage. +func (c *ConnectedEnvironmentStorage) UnmarshalJSON(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) @@ -1548,9 +1477,6 @@ func (c *Certificate) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &c.ID) 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) @@ -1560,9 +1486,6 @@ func (c *Certificate) 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) @@ -1574,16 +1497,15 @@ func (c *Certificate) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CertificateCollection. -func (c CertificateCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConnectedEnvironmentStorageProperties. +func (c ConnectedEnvironmentStorageProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) + populate(objectMap, "azureFile", c.AzureFile) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCollection. -func (c *CertificateCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironmentStorageProperties. +func (c *ConnectedEnvironmentStorageProperties) UnmarshalJSON(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) @@ -1591,11 +1513,8 @@ func (c *CertificateCollection) UnmarshalJSON(data []byte) error { 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) + case "azureFile": + err = unpopulate(val, "AzureFile", &c.AzureFile) delete(rawMsg, key) } if err != nil { @@ -1605,16 +1524,15 @@ func (c *CertificateCollection) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CertificateKeyVaultProperties. -func (c CertificateKeyVaultProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ConnectedEnvironmentStoragesCollection. +func (c ConnectedEnvironmentStoragesCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "identity", c.Identity) - populate(objectMap, "keyVaultUrl", c.KeyVaultURL) + populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateKeyVaultProperties. -func (c *CertificateKeyVaultProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironmentStoragesCollection. +func (c *ConnectedEnvironmentStoragesCollection) UnmarshalJSON(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) @@ -1622,11 +1540,8 @@ func (c *CertificateKeyVaultProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "identity": - err = unpopulate(val, "Identity", &c.Identity) - delete(rawMsg, key) - case "keyVaultUrl": - err = unpopulate(val, "KeyVaultURL", &c.KeyVaultURL) + case "value": + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { @@ -1636,15 +1551,22 @@ func (c *CertificateKeyVaultProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CertificatePatch. -func (c CertificatePatch) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Container. +func (c Container) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "tags", c.Tags) + populate(objectMap, "args", c.Args) + populate(objectMap, "command", c.Command) + populate(objectMap, "env", c.Env) + populate(objectMap, "image", c.Image) + populate(objectMap, "name", c.Name) + populate(objectMap, "probes", c.Probes) + populate(objectMap, "resources", c.Resources) + populate(objectMap, "volumeMounts", c.VolumeMounts) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificatePatch. -func (c *CertificatePatch) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Container. +func (c *Container) UnmarshalJSON(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) @@ -1652,8 +1574,29 @@ func (c *CertificatePatch) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "tags": - err = unpopulate(val, "Tags", &c.Tags) + case "args": + err = unpopulate(val, "Args", &c.Args) + delete(rawMsg, key) + case "command": + err = unpopulate(val, "Command", &c.Command) + delete(rawMsg, key) + case "env": + err = unpopulate(val, "Env", &c.Env) + 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 "probes": + err = unpopulate(val, "Probes", &c.Probes) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &c.Resources) + delete(rawMsg, key) + case "volumeMounts": + err = unpopulate(val, "VolumeMounts", &c.VolumeMounts) delete(rawMsg, key) } if err != nil { @@ -1663,29 +1606,24 @@ func (c *CertificatePatch) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CertificateProperties. -func (c CertificateProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerApp. +func (c ContainerApp) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "certificateKeyVaultProperties", c.CertificateKeyVaultProperties) - populate(objectMap, "certificateType", c.CertificateType) - populateDateTimeRFC3339(objectMap, "expirationDate", c.ExpirationDate) - populateDateTimeRFC3339(objectMap, "issueDate", c.IssueDate) - populate(objectMap, "issuer", c.Issuer) - populate(objectMap, "password", c.Password) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "publicKeyHash", c.PublicKeyHash) - populate(objectMap, "subjectAlternativeNames", c.SubjectAlternativeNames) - populate(objectMap, "subjectName", c.SubjectName) - populate(objectMap, "thumbprint", c.Thumbprint) - populate(objectMap, "valid", c.Valid) - populateByteArray(objectMap, "value", c.Value, func() any { - return runtime.EncodeByteArray(c.Value, runtime.Base64StdFormat) - }) + populate(objectMap, "extendedLocation", c.ExtendedLocation) + populate(objectMap, "id", c.ID) + populate(objectMap, "identity", c.Identity) + populate(objectMap, "location", c.Location) + populate(objectMap, "managedBy", c.ManagedBy) + 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 CertificateProperties. -func (c *CertificateProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerApp. +func (c *ContainerApp) UnmarshalJSON(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) @@ -1693,46 +1631,35 @@ func (c *CertificateProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "certificateKeyVaultProperties": - err = unpopulate(val, "CertificateKeyVaultProperties", &c.CertificateKeyVaultProperties) - delete(rawMsg, key) - case "certificateType": - err = unpopulate(val, "CertificateType", &c.CertificateType) - delete(rawMsg, key) - case "expirationDate": - err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &c.ExpirationDate) - delete(rawMsg, key) - case "issueDate": - err = unpopulateDateTimeRFC3339(val, "IssueDate", &c.IssueDate) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &c.ExtendedLocation) delete(rawMsg, key) - case "issuer": - err = unpopulate(val, "Issuer", &c.Issuer) + case "id": + err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &c.Password) + case "identity": + err = unpopulate(val, "Identity", &c.Identity) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + case "location": + err = unpopulate(val, "Location", &c.Location) delete(rawMsg, key) - case "publicKeyHash": - err = unpopulate(val, "PublicKeyHash", &c.PublicKeyHash) + case "managedBy": + err = unpopulate(val, "ManagedBy", &c.ManagedBy) delete(rawMsg, key) - case "subjectAlternativeNames": - err = unpopulate(val, "SubjectAlternativeNames", &c.SubjectAlternativeNames) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) - case "subjectName": - err = unpopulate(val, "SubjectName", &c.SubjectName) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) delete(rawMsg, key) - case "valid": - err = unpopulate(val, "Valid", &c.Valid) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) - case "value": - if val != nil && string(val) != "null" { - err = runtime.DecodeByteArray(string(val), &c.Value, runtime.Base64StdFormat) - } + case "type": + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { @@ -1742,16 +1669,21 @@ func (c *CertificateProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest. -func (c CheckNameAvailabilityRequest) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppAuthToken. +func (c ContainerAppAuthToken) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + 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 CheckNameAvailabilityRequest. -func (c *CheckNameAvailabilityRequest) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppAuthToken. +func (c *ContainerAppAuthToken) UnmarshalJSON(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) @@ -1759,9 +1691,24 @@ func (c *CheckNameAvailabilityRequest) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + 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) @@ -1773,17 +1720,16 @@ func (c *CheckNameAvailabilityRequest) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse. -func (c CheckNameAvailabilityResponse) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppAuthTokenProperties. +func (c ContainerAppAuthTokenProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "message", c.Message) - populate(objectMap, "nameAvailable", c.NameAvailable) - populate(objectMap, "reason", c.Reason) + populateDateTimeRFC3339(objectMap, "expires", c.Expires) + populate(objectMap, "token", c.Token) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse. -func (c *CheckNameAvailabilityResponse) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppAuthTokenProperties. +func (c *ContainerAppAuthTokenProperties) UnmarshalJSON(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) @@ -1791,14 +1737,11 @@ func (c *CheckNameAvailabilityResponse) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "message": - err = unpopulate(val, "Message", &c.Message) - delete(rawMsg, key) - case "nameAvailable": - err = unpopulate(val, "NameAvailable", &c.NameAvailable) + case "expires": + err = unpopulateDateTimeRFC3339(val, "Expires", &c.Expires) delete(rawMsg, key) - case "reason": - err = unpopulate(val, "Reason", &c.Reason) + case "token": + err = unpopulate(val, "Token", &c.Token) delete(rawMsg, key) } if err != nil { @@ -1808,17 +1751,16 @@ func (c *CheckNameAvailabilityResponse) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CircuitBreakerPolicy. -func (c CircuitBreakerPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppCollection. +func (c ContainerAppCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "consecutiveErrors", c.ConsecutiveErrors) - populate(objectMap, "intervalInSeconds", c.IntervalInSeconds) - populate(objectMap, "maxEjectionPercent", c.MaxEjectionPercent) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CircuitBreakerPolicy. -func (c *CircuitBreakerPolicy) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppCollection. +func (c *ContainerAppCollection) UnmarshalJSON(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) @@ -1826,14 +1768,11 @@ func (c *CircuitBreakerPolicy) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "consecutiveErrors": - err = unpopulate(val, "ConsecutiveErrors", &c.ConsecutiveErrors) - delete(rawMsg, key) - case "intervalInSeconds": - err = unpopulate(val, "IntervalInSeconds", &c.IntervalInSeconds) + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) delete(rawMsg, key) - case "maxEjectionPercent": - err = unpopulate(val, "MaxEjectionPercent", &c.MaxEjectionPercent) + case "value": + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { @@ -1843,16 +1782,16 @@ func (c *CircuitBreakerPolicy) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ClientRegistration. -func (c ClientRegistration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppJobExecutions. +func (c ContainerAppJobExecutions) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientId", c.ClientID) - populate(objectMap, "clientSecretSettingName", c.ClientSecretSettingName) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientRegistration. -func (c *ClientRegistration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppJobExecutions. +func (c *ContainerAppJobExecutions) UnmarshalJSON(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) @@ -1860,11 +1799,11 @@ func (c *ClientRegistration) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "clientId": - err = unpopulate(val, "ClientID", &c.ClientID) + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) delete(rawMsg, key) - case "clientSecretSettingName": - err = unpopulate(val, "ClientSecretSettingName", &c.ClientSecretSettingName) + case "value": + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { @@ -1874,21 +1813,23 @@ func (c *ClientRegistration) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Configuration. -func (c Configuration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppProbe. +func (c ContainerAppProbe) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "activeRevisionsMode", c.ActiveRevisionsMode) - populate(objectMap, "dapr", c.Dapr) - populate(objectMap, "ingress", c.Ingress) - populate(objectMap, "maxInactiveRevisions", c.MaxInactiveRevisions) - populate(objectMap, "registries", c.Registries) - populate(objectMap, "secrets", c.Secrets) - populate(objectMap, "service", c.Service) + populate(objectMap, "failureThreshold", c.FailureThreshold) + populate(objectMap, "httpGet", c.HTTPGet) + populate(objectMap, "initialDelaySeconds", c.InitialDelaySeconds) + populate(objectMap, "periodSeconds", c.PeriodSeconds) + populate(objectMap, "successThreshold", c.SuccessThreshold) + populate(objectMap, "tcpSocket", c.TCPSocket) + populate(objectMap, "terminationGracePeriodSeconds", c.TerminationGracePeriodSeconds) + populate(objectMap, "timeoutSeconds", c.TimeoutSeconds) + populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Configuration. -func (c *Configuration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbe. +func (c *ContainerAppProbe) UnmarshalJSON(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) @@ -1896,26 +1837,32 @@ func (c *Configuration) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "activeRevisionsMode": - err = unpopulate(val, "ActiveRevisionsMode", &c.ActiveRevisionsMode) + case "failureThreshold": + err = unpopulate(val, "FailureThreshold", &c.FailureThreshold) delete(rawMsg, key) - case "dapr": - err = unpopulate(val, "Dapr", &c.Dapr) + case "httpGet": + err = unpopulate(val, "HTTPGet", &c.HTTPGet) delete(rawMsg, key) - case "ingress": - err = unpopulate(val, "Ingress", &c.Ingress) + case "initialDelaySeconds": + err = unpopulate(val, "InitialDelaySeconds", &c.InitialDelaySeconds) delete(rawMsg, key) - case "maxInactiveRevisions": - err = unpopulate(val, "MaxInactiveRevisions", &c.MaxInactiveRevisions) + case "periodSeconds": + err = unpopulate(val, "PeriodSeconds", &c.PeriodSeconds) delete(rawMsg, key) - case "registries": - err = unpopulate(val, "Registries", &c.Registries) + case "successThreshold": + err = unpopulate(val, "SuccessThreshold", &c.SuccessThreshold) delete(rawMsg, key) - case "secrets": - err = unpopulate(val, "Secrets", &c.Secrets) + case "tcpSocket": + err = unpopulate(val, "TCPSocket", &c.TCPSocket) delete(rawMsg, key) - case "service": - err = unpopulate(val, "Service", &c.Service) + case "terminationGracePeriodSeconds": + err = unpopulate(val, "TerminationGracePeriodSeconds", &c.TerminationGracePeriodSeconds) + delete(rawMsg, key) + case "timeoutSeconds": + err = unpopulate(val, "TimeoutSeconds", &c.TimeoutSeconds) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { @@ -1925,106 +1872,19 @@ func (c *Configuration) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConnectedEnvironment. -func (c ConnectedEnvironment) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppProbeHTTPGet. +func (c ContainerAppProbeHTTPGet) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "extendedLocation", c.ExtendedLocation) - populate(objectMap, "id", c.ID) - 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 ConnectedEnvironment. -func (c *ConnectedEnvironment) UnmarshalJSON(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 "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &c.ExtendedLocation) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - 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 ConnectedEnvironmentCollection. -func (c ConnectedEnvironmentCollection) 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 ConnectedEnvironmentCollection. -func (c *ConnectedEnvironmentCollection) UnmarshalJSON(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 ConnectedEnvironmentProperties. -func (c ConnectedEnvironmentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "customDomainConfiguration", c.CustomDomainConfiguration) - populate(objectMap, "daprAIConnectionString", c.DaprAIConnectionString) - populate(objectMap, "defaultDomain", c.DefaultDomain) - populate(objectMap, "deploymentErrors", c.DeploymentErrors) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "staticIp", c.StaticIP) + populate(objectMap, "httpHeaders", c.HTTPHeaders) + populate(objectMap, "host", c.Host) + populate(objectMap, "path", c.Path) + populate(objectMap, "port", c.Port) + populate(objectMap, "scheme", c.Scheme) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironmentProperties. -func (c *ConnectedEnvironmentProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbeHTTPGet. +func (c *ContainerAppProbeHTTPGet) UnmarshalJSON(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) @@ -2032,23 +1892,20 @@ func (c *ConnectedEnvironmentProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "customDomainConfiguration": - err = unpopulate(val, "CustomDomainConfiguration", &c.CustomDomainConfiguration) - delete(rawMsg, key) - case "daprAIConnectionString": - err = unpopulate(val, "DaprAIConnectionString", &c.DaprAIConnectionString) + case "httpHeaders": + err = unpopulate(val, "HTTPHeaders", &c.HTTPHeaders) delete(rawMsg, key) - case "defaultDomain": - err = unpopulate(val, "DefaultDomain", &c.DefaultDomain) + case "host": + err = unpopulate(val, "Host", &c.Host) delete(rawMsg, key) - case "deploymentErrors": - err = unpopulate(val, "DeploymentErrors", &c.DeploymentErrors) + case "path": + err = unpopulate(val, "Path", &c.Path) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + case "port": + err = unpopulate(val, "Port", &c.Port) delete(rawMsg, key) - case "staticIp": - err = unpopulate(val, "StaticIP", &c.StaticIP) + case "scheme": + err = unpopulate(val, "Scheme", &c.Scheme) delete(rawMsg, key) } if err != nil { @@ -2058,119 +1915,16 @@ func (c *ConnectedEnvironmentProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConnectedEnvironmentStorage. -func (c ConnectedEnvironmentStorage) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppProbeHTTPGetHTTPHeadersItem. +func (c ContainerAppProbeHTTPGetHTTPHeadersItem) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironmentStorage. -func (c *ConnectedEnvironmentStorage) UnmarshalJSON(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 "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 "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 ConnectedEnvironmentStorageProperties. -func (c ConnectedEnvironmentStorageProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "azureFile", c.AzureFile) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironmentStorageProperties. -func (c *ConnectedEnvironmentStorageProperties) UnmarshalJSON(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 "azureFile": - err = unpopulate(val, "AzureFile", &c.AzureFile) - 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 ConnectedEnvironmentStoragesCollection. -func (c ConnectedEnvironmentStoragesCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedEnvironmentStoragesCollection. -func (c *ConnectedEnvironmentStoragesCollection) UnmarshalJSON(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 "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 Container. -func (c Container) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "args", c.Args) - populate(objectMap, "command", c.Command) - populate(objectMap, "env", c.Env) - populate(objectMap, "image", c.Image) - populate(objectMap, "name", c.Name) - populate(objectMap, "probes", c.Probes) - populate(objectMap, "resources", c.Resources) - populate(objectMap, "volumeMounts", c.VolumeMounts) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Container. -func (c *Container) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbeHTTPGetHTTPHeadersItem. +func (c *ContainerAppProbeHTTPGetHTTPHeadersItem) UnmarshalJSON(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) @@ -2178,1620 +1932,595 @@ func (c *Container) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "args": - err = unpopulate(val, "Args", &c.Args) - delete(rawMsg, key) - case "command": - err = unpopulate(val, "Command", &c.Command) - delete(rawMsg, key) - case "env": - err = unpopulate(val, "Env", &c.Env) - 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 "probes": - err = unpopulate(val, "Probes", &c.Probes) - delete(rawMsg, key) - case "resources": - err = unpopulate(val, "Resources", &c.Resources) - delete(rawMsg, key) - case "volumeMounts": - err = unpopulate(val, "VolumeMounts", &c.VolumeMounts) - 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 ContainerApp. -func (c ContainerApp) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "extendedLocation", c.ExtendedLocation) - populate(objectMap, "id", c.ID) - populate(objectMap, "identity", c.Identity) - populate(objectMap, "location", c.Location) - populate(objectMap, "managedBy", c.ManagedBy) - 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 ContainerApp. -func (c *ContainerApp) UnmarshalJSON(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 "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &c.ExtendedLocation) - delete(rawMsg, 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 "managedBy": - err = unpopulate(val, "ManagedBy", &c.ManagedBy) - 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 ContainerAppAuthToken. -func (c ContainerAppAuthToken) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - 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 ContainerAppAuthToken. -func (c *ContainerAppAuthToken) UnmarshalJSON(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 "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 ContainerAppAuthTokenProperties. -func (c ContainerAppAuthTokenProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateDateTimeRFC3339(objectMap, "expires", c.Expires) - populate(objectMap, "token", c.Token) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppAuthTokenProperties. -func (c *ContainerAppAuthTokenProperties) UnmarshalJSON(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 "expires": - err = unpopulateDateTimeRFC3339(val, "Expires", &c.Expires) - delete(rawMsg, key) - case "token": - err = unpopulate(val, "Token", &c.Token) - 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 ContainerAppCollection. -func (c ContainerAppCollection) 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 ContainerAppCollection. -func (c *ContainerAppCollection) UnmarshalJSON(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 ContainerAppJobExecutions. -func (c ContainerAppJobExecutions) 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 ContainerAppJobExecutions. -func (c *ContainerAppJobExecutions) UnmarshalJSON(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 ContainerAppProbe. -func (c ContainerAppProbe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "failureThreshold", c.FailureThreshold) - populate(objectMap, "httpGet", c.HTTPGet) - populate(objectMap, "initialDelaySeconds", c.InitialDelaySeconds) - populate(objectMap, "periodSeconds", c.PeriodSeconds) - populate(objectMap, "successThreshold", c.SuccessThreshold) - populate(objectMap, "tcpSocket", c.TCPSocket) - populate(objectMap, "terminationGracePeriodSeconds", c.TerminationGracePeriodSeconds) - populate(objectMap, "timeoutSeconds", c.TimeoutSeconds) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbe. -func (c *ContainerAppProbe) UnmarshalJSON(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 "failureThreshold": - err = unpopulate(val, "FailureThreshold", &c.FailureThreshold) - delete(rawMsg, key) - case "httpGet": - err = unpopulate(val, "HTTPGet", &c.HTTPGet) - delete(rawMsg, key) - case "initialDelaySeconds": - err = unpopulate(val, "InitialDelaySeconds", &c.InitialDelaySeconds) - delete(rawMsg, key) - case "periodSeconds": - err = unpopulate(val, "PeriodSeconds", &c.PeriodSeconds) - delete(rawMsg, key) - case "successThreshold": - err = unpopulate(val, "SuccessThreshold", &c.SuccessThreshold) - delete(rawMsg, key) - case "tcpSocket": - err = unpopulate(val, "TCPSocket", &c.TCPSocket) - delete(rawMsg, key) - case "terminationGracePeriodSeconds": - err = unpopulate(val, "TerminationGracePeriodSeconds", &c.TerminationGracePeriodSeconds) - delete(rawMsg, key) - case "timeoutSeconds": - err = unpopulate(val, "TimeoutSeconds", &c.TimeoutSeconds) - 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 ContainerAppProbeHTTPGet. -func (c ContainerAppProbeHTTPGet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "httpHeaders", c.HTTPHeaders) - populate(objectMap, "host", c.Host) - populate(objectMap, "path", c.Path) - populate(objectMap, "port", c.Port) - populate(objectMap, "scheme", c.Scheme) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbeHTTPGet. -func (c *ContainerAppProbeHTTPGet) UnmarshalJSON(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 "httpHeaders": - err = unpopulate(val, "HTTPHeaders", &c.HTTPHeaders) - delete(rawMsg, key) - case "host": - err = unpopulate(val, "Host", &c.Host) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &c.Path) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &c.Port) - delete(rawMsg, key) - case "scheme": - err = unpopulate(val, "Scheme", &c.Scheme) - 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 ContainerAppProbeHTTPGetHTTPHeadersItem. -func (c ContainerAppProbeHTTPGetHTTPHeadersItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", c.Name) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbeHTTPGetHTTPHeadersItem. -func (c *ContainerAppProbeHTTPGetHTTPHeadersItem) UnmarshalJSON(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 = 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 ContainerAppProbeTCPSocket. -func (c ContainerAppProbeTCPSocket) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "host", c.Host) - populate(objectMap, "port", c.Port) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbeTCPSocket. -func (c *ContainerAppProbeTCPSocket) UnmarshalJSON(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 "host": - err = unpopulate(val, "Host", &c.Host) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &c.Port) - 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 ContainerAppProperties. -func (c ContainerAppProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "configuration", c.Configuration) - populate(objectMap, "customDomainVerificationId", c.CustomDomainVerificationID) - populate(objectMap, "environmentId", c.EnvironmentID) - populate(objectMap, "eventStreamEndpoint", c.EventStreamEndpoint) - populate(objectMap, "latestReadyRevisionName", c.LatestReadyRevisionName) - populate(objectMap, "latestRevisionFqdn", c.LatestRevisionFqdn) - populate(objectMap, "latestRevisionName", c.LatestRevisionName) - populate(objectMap, "managedEnvironmentId", c.ManagedEnvironmentID) - populate(objectMap, "outboundIpAddresses", c.OutboundIPAddresses) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "template", c.Template) - populate(objectMap, "workloadProfileName", c.WorkloadProfileName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProperties. -func (c *ContainerAppProperties) UnmarshalJSON(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 "configuration": - err = unpopulate(val, "Configuration", &c.Configuration) - delete(rawMsg, key) - case "customDomainVerificationId": - err = unpopulate(val, "CustomDomainVerificationID", &c.CustomDomainVerificationID) - delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &c.EnvironmentID) - delete(rawMsg, key) - case "eventStreamEndpoint": - err = unpopulate(val, "EventStreamEndpoint", &c.EventStreamEndpoint) - delete(rawMsg, key) - case "latestReadyRevisionName": - err = unpopulate(val, "LatestReadyRevisionName", &c.LatestReadyRevisionName) - delete(rawMsg, key) - case "latestRevisionFqdn": - err = unpopulate(val, "LatestRevisionFqdn", &c.LatestRevisionFqdn) - delete(rawMsg, key) - case "latestRevisionName": - err = unpopulate(val, "LatestRevisionName", &c.LatestRevisionName) - delete(rawMsg, key) - case "managedEnvironmentId": - err = unpopulate(val, "ManagedEnvironmentID", &c.ManagedEnvironmentID) - delete(rawMsg, key) - case "outboundIpAddresses": - err = unpopulate(val, "OutboundIPAddresses", &c.OutboundIPAddresses) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "template": - err = unpopulate(val, "Template", &c.Template) - delete(rawMsg, key) - case "workloadProfileName": - err = unpopulate(val, "WorkloadProfileName", &c.WorkloadProfileName) - 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 ContainerAppSecret. -func (c ContainerAppSecret) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "identity", c.Identity) - populate(objectMap, "keyVaultUrl", c.KeyVaultURL) - populate(objectMap, "name", c.Name) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppSecret. -func (c *ContainerAppSecret) UnmarshalJSON(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 "identity": - err = unpopulate(val, "Identity", &c.Identity) - delete(rawMsg, key) - case "keyVaultUrl": - err = unpopulate(val, "KeyVaultURL", &c.KeyVaultURL) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - 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 ContainerRegistry. -func (c ContainerRegistry) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "containerRegistryServer", c.ContainerRegistryServer) - populate(objectMap, "identityResourceId", c.IdentityResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistry. -func (c *ContainerRegistry) UnmarshalJSON(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 "containerRegistryServer": - err = unpopulate(val, "ContainerRegistryServer", &c.ContainerRegistryServer) - delete(rawMsg, key) - case "identityResourceId": - err = unpopulate(val, "IdentityResourceID", &c.IdentityResourceID) - 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 ContainerRegistryWithCustomImage. -func (c ContainerRegistryWithCustomImage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "image", c.Image) - populate(objectMap, "server", c.Server) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryWithCustomImage. -func (c *ContainerRegistryWithCustomImage) UnmarshalJSON(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 "image": - err = unpopulate(val, "Image", &c.Image) - delete(rawMsg, key) - case "server": - err = unpopulate(val, "Server", &c.Server) - 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 ContainerResources. -func (c ContainerResources) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "cpu", c.CPU) - populate(objectMap, "ephemeralStorage", c.EphemeralStorage) - populate(objectMap, "memory", c.Memory) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerResources. -func (c *ContainerResources) UnmarshalJSON(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 "cpu": - err = unpopulate(val, "CPU", &c.CPU) - delete(rawMsg, key) - case "ephemeralStorage": - err = unpopulate(val, "EphemeralStorage", &c.EphemeralStorage) - delete(rawMsg, key) - case "memory": - err = unpopulate(val, "Memory", &c.Memory) - 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 CookieExpiration. -func (c CookieExpiration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "convention", c.Convention) - populate(objectMap, "timeToExpiration", c.TimeToExpiration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CookieExpiration. -func (c *CookieExpiration) UnmarshalJSON(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 "convention": - err = unpopulate(val, "Convention", &c.Convention) - delete(rawMsg, key) - case "timeToExpiration": - err = unpopulate(val, "TimeToExpiration", &c.TimeToExpiration) - 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 CorsPolicy. -func (c CorsPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "allowCredentials", c.AllowCredentials) - populate(objectMap, "allowedHeaders", c.AllowedHeaders) - populate(objectMap, "allowedMethods", c.AllowedMethods) - populate(objectMap, "allowedOrigins", c.AllowedOrigins) - populate(objectMap, "exposeHeaders", c.ExposeHeaders) - populate(objectMap, "maxAge", c.MaxAge) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CorsPolicy. -func (c *CorsPolicy) UnmarshalJSON(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 "allowCredentials": - err = unpopulate(val, "AllowCredentials", &c.AllowCredentials) - delete(rawMsg, key) - case "allowedHeaders": - err = unpopulate(val, "AllowedHeaders", &c.AllowedHeaders) - delete(rawMsg, key) - case "allowedMethods": - err = unpopulate(val, "AllowedMethods", &c.AllowedMethods) - delete(rawMsg, key) - case "allowedOrigins": - err = unpopulate(val, "AllowedOrigins", &c.AllowedOrigins) - delete(rawMsg, key) - case "exposeHeaders": - err = unpopulate(val, "ExposeHeaders", &c.ExposeHeaders) - delete(rawMsg, key) - case "maxAge": - err = unpopulate(val, "MaxAge", &c.MaxAge) - 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 CustomDomain. -func (c CustomDomain) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "bindingType", c.BindingType) - populate(objectMap, "certificateId", c.CertificateID) - populate(objectMap, "name", c.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomain. -func (c *CustomDomain) UnmarshalJSON(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 "bindingType": - err = unpopulate(val, "BindingType", &c.BindingType) - delete(rawMsg, key) - case "certificateId": - err = unpopulate(val, "CertificateID", &c.CertificateID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - 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 CustomDomainConfiguration. -func (c CustomDomainConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "certificateKeyVaultProperties", c.CertificateKeyVaultProperties) - populate(objectMap, "certificatePassword", c.CertificatePassword) - populateByteArray(objectMap, "certificateValue", c.CertificateValue, func() any { - return runtime.EncodeByteArray(c.CertificateValue, runtime.Base64StdFormat) - }) - populate(objectMap, "customDomainVerificationId", c.CustomDomainVerificationID) - populate(objectMap, "dnsSuffix", c.DNSSuffix) - populateDateTimeRFC3339(objectMap, "expirationDate", c.ExpirationDate) - populate(objectMap, "subjectName", c.SubjectName) - populate(objectMap, "thumbprint", c.Thumbprint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainConfiguration. -func (c *CustomDomainConfiguration) UnmarshalJSON(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 "certificateKeyVaultProperties": - err = unpopulate(val, "CertificateKeyVaultProperties", &c.CertificateKeyVaultProperties) - delete(rawMsg, key) - case "certificatePassword": - err = unpopulate(val, "CertificatePassword", &c.CertificatePassword) - delete(rawMsg, key) - case "certificateValue": - if val != nil && string(val) != "null" { - err = runtime.DecodeByteArray(string(val), &c.CertificateValue, runtime.Base64StdFormat) - } - delete(rawMsg, key) - case "customDomainVerificationId": - err = unpopulate(val, "CustomDomainVerificationID", &c.CustomDomainVerificationID) - delete(rawMsg, key) - case "dnsSuffix": - err = unpopulate(val, "DNSSuffix", &c.DNSSuffix) - delete(rawMsg, key) - case "expirationDate": - err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &c.ExpirationDate) - delete(rawMsg, key) - case "subjectName": - err = unpopulate(val, "SubjectName", &c.SubjectName) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) - 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 CustomHostnameAnalysisResult. -func (c CustomHostnameAnalysisResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "aRecords", c.ARecords) - populate(objectMap, "alternateCNameRecords", c.AlternateCNameRecords) - populate(objectMap, "alternateTxtRecords", c.AlternateTxtRecords) - populate(objectMap, "cNameRecords", c.CNameRecords) - populate(objectMap, "conflictWithEnvironmentCustomDomain", c.ConflictWithEnvironmentCustomDomain) - populate(objectMap, "conflictingContainerAppResourceId", c.ConflictingContainerAppResourceID) - populate(objectMap, "customDomainVerificationFailureInfo", c.CustomDomainVerificationFailureInfo) - populate(objectMap, "customDomainVerificationTest", c.CustomDomainVerificationTest) - populate(objectMap, "hasConflictOnManagedEnvironment", c.HasConflictOnManagedEnvironment) - populate(objectMap, "hostName", c.HostName) - populate(objectMap, "isHostnameAlreadyVerified", c.IsHostnameAlreadyVerified) - populate(objectMap, "txtRecords", c.TxtRecords) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResult. -func (c *CustomHostnameAnalysisResult) UnmarshalJSON(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 "aRecords": - err = unpopulate(val, "ARecords", &c.ARecords) - delete(rawMsg, key) - case "alternateCNameRecords": - err = unpopulate(val, "AlternateCNameRecords", &c.AlternateCNameRecords) - delete(rawMsg, key) - case "alternateTxtRecords": - err = unpopulate(val, "AlternateTxtRecords", &c.AlternateTxtRecords) - delete(rawMsg, key) - case "cNameRecords": - err = unpopulate(val, "CNameRecords", &c.CNameRecords) - delete(rawMsg, key) - case "conflictWithEnvironmentCustomDomain": - err = unpopulate(val, "ConflictWithEnvironmentCustomDomain", &c.ConflictWithEnvironmentCustomDomain) - delete(rawMsg, key) - case "conflictingContainerAppResourceId": - err = unpopulate(val, "ConflictingContainerAppResourceID", &c.ConflictingContainerAppResourceID) - delete(rawMsg, key) - case "customDomainVerificationFailureInfo": - err = unpopulate(val, "CustomDomainVerificationFailureInfo", &c.CustomDomainVerificationFailureInfo) - delete(rawMsg, key) - case "customDomainVerificationTest": - err = unpopulate(val, "CustomDomainVerificationTest", &c.CustomDomainVerificationTest) - delete(rawMsg, key) - case "hasConflictOnManagedEnvironment": - err = unpopulate(val, "HasConflictOnManagedEnvironment", &c.HasConflictOnManagedEnvironment) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &c.HostName) - delete(rawMsg, key) - case "isHostnameAlreadyVerified": - err = unpopulate(val, "IsHostnameAlreadyVerified", &c.IsHostnameAlreadyVerified) - delete(rawMsg, key) - case "txtRecords": - err = unpopulate(val, "TxtRecords", &c.TxtRecords) - 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 CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo. -func (c CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", c.Code) - populate(objectMap, "details", c.Details) - populate(objectMap, "message", c.Message) - populate(objectMap, "target", c.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo. -func (c *CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo) UnmarshalJSON(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 "code": - err = unpopulate(val, "Code", &c.Code) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &c.Details) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &c.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &c.Target) - 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 CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem. -func (c CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", c.Code) - populate(objectMap, "message", c.Message) - populate(objectMap, "target", c.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem. -func (c *CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem) UnmarshalJSON(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 "code": - err = unpopulate(val, "Code", &c.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &c.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &c.Target) - 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 CustomOpenIDConnectProvider. -func (c CustomOpenIDConnectProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", c.Enabled) - populate(objectMap, "login", c.Login) - populate(objectMap, "registration", c.Registration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomOpenIDConnectProvider. -func (c *CustomOpenIDConnectProvider) UnmarshalJSON(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 "enabled": - err = unpopulate(val, "Enabled", &c.Enabled) - delete(rawMsg, key) - case "login": - err = unpopulate(val, "Login", &c.Login) - delete(rawMsg, key) - case "registration": - err = unpopulate(val, "Registration", &c.Registration) - 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 CustomScaleRule. -func (c CustomScaleRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "auth", c.Auth) - populate(objectMap, "metadata", c.Metadata) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomScaleRule. -func (c *CustomScaleRule) UnmarshalJSON(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 "auth": - err = unpopulate(val, "Auth", &c.Auth) - delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &c.Metadata) - 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 Dapr. -func (d Dapr) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "appId", d.AppID) - populate(objectMap, "appPort", d.AppPort) - populate(objectMap, "appProtocol", d.AppProtocol) - populate(objectMap, "enableApiLogging", d.EnableAPILogging) - populate(objectMap, "enabled", d.Enabled) - populate(objectMap, "httpMaxRequestSize", d.HTTPMaxRequestSize) - populate(objectMap, "httpReadBufferSize", d.HTTPReadBufferSize) - populate(objectMap, "logLevel", d.LogLevel) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Dapr. -func (d *Dapr) UnmarshalJSON(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 "appId": - err = unpopulate(val, "AppID", &d.AppID) - delete(rawMsg, key) - case "appPort": - err = unpopulate(val, "AppPort", &d.AppPort) - delete(rawMsg, key) - case "appProtocol": - err = unpopulate(val, "AppProtocol", &d.AppProtocol) - delete(rawMsg, key) - case "enableApiLogging": - err = unpopulate(val, "EnableAPILogging", &d.EnableAPILogging) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &d.Enabled) - delete(rawMsg, key) - case "httpMaxRequestSize": - err = unpopulate(val, "HTTPMaxRequestSize", &d.HTTPMaxRequestSize) - delete(rawMsg, key) - case "httpReadBufferSize": - err = unpopulate(val, "HTTPReadBufferSize", &d.HTTPReadBufferSize) - delete(rawMsg, key) - case "logLevel": - err = unpopulate(val, "LogLevel", &d.LogLevel) - 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 DaprComponent. -func (d DaprComponent) 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 DaprComponent. -func (d *DaprComponent) UnmarshalJSON(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 DaprComponentProperties. -func (d DaprComponentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "componentType", d.ComponentType) - populate(objectMap, "ignoreErrors", d.IgnoreErrors) - populate(objectMap, "initTimeout", d.InitTimeout) - populate(objectMap, "metadata", d.Metadata) - populate(objectMap, "scopes", d.Scopes) - populate(objectMap, "secretStoreComponent", d.SecretStoreComponent) - populate(objectMap, "secrets", d.Secrets) - populate(objectMap, "serviceComponentBind", d.ServiceComponentBind) - populate(objectMap, "version", d.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentProperties. -func (d *DaprComponentProperties) UnmarshalJSON(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 "componentType": - err = unpopulate(val, "ComponentType", &d.ComponentType) - delete(rawMsg, key) - case "ignoreErrors": - err = unpopulate(val, "IgnoreErrors", &d.IgnoreErrors) - delete(rawMsg, key) - case "initTimeout": - err = unpopulate(val, "InitTimeout", &d.InitTimeout) - delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &d.Metadata) - delete(rawMsg, key) - case "scopes": - err = unpopulate(val, "Scopes", &d.Scopes) - delete(rawMsg, key) - case "secretStoreComponent": - err = unpopulate(val, "SecretStoreComponent", &d.SecretStoreComponent) - delete(rawMsg, key) - case "secrets": - err = unpopulate(val, "Secrets", &d.Secrets) - delete(rawMsg, key) - case "serviceComponentBind": - err = unpopulate(val, "ServiceComponentBind", &d.ServiceComponentBind) - 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 DaprComponentResiliencyPoliciesCollection. -func (d DaprComponentResiliencyPoliciesCollection) 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 DaprComponentResiliencyPoliciesCollection. -func (d *DaprComponentResiliencyPoliciesCollection) UnmarshalJSON(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) + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprComponentResiliencyPolicy. -func (d DaprComponentResiliencyPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppProbeTCPSocket. +func (c ContainerAppProbeTCPSocket) 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) + populate(objectMap, "host", c.Host) + populate(objectMap, "port", c.Port) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentResiliencyPolicy. -func (d *DaprComponentResiliencyPolicy) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProbeTCPSocket. +func (c *ContainerAppProbeTCPSocket) UnmarshalJSON(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) + 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", &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) + case "host": + err = unpopulate(val, "Host", &c.Host) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) + case "port": + err = unpopulate(val, "Port", &c.Port) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration. -func (d DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppProperties. +func (c ContainerAppProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "consecutiveErrors", d.ConsecutiveErrors) - populate(objectMap, "intervalInSeconds", d.IntervalInSeconds) - populate(objectMap, "timeoutInSeconds", d.TimeoutInSeconds) + populate(objectMap, "configuration", c.Configuration) + populate(objectMap, "customDomainVerificationId", c.CustomDomainVerificationID) + populate(objectMap, "environmentId", c.EnvironmentID) + populate(objectMap, "eventStreamEndpoint", c.EventStreamEndpoint) + populate(objectMap, "latestReadyRevisionName", c.LatestReadyRevisionName) + populate(objectMap, "latestRevisionFqdn", c.LatestRevisionFqdn) + populate(objectMap, "latestRevisionName", c.LatestRevisionName) + populate(objectMap, "managedEnvironmentId", c.ManagedEnvironmentID) + populate(objectMap, "outboundIpAddresses", c.OutboundIPAddresses) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "template", c.Template) + populate(objectMap, "workloadProfileName", c.WorkloadProfileName) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration. -func (d *DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProperties. +func (c *ContainerAppProperties) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "consecutiveErrors": - err = unpopulate(val, "ConsecutiveErrors", &d.ConsecutiveErrors) + case "configuration": + err = unpopulate(val, "Configuration", &c.Configuration) + delete(rawMsg, key) + case "customDomainVerificationId": + err = unpopulate(val, "CustomDomainVerificationID", &c.CustomDomainVerificationID) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &c.EnvironmentID) + delete(rawMsg, key) + case "eventStreamEndpoint": + err = unpopulate(val, "EventStreamEndpoint", &c.EventStreamEndpoint) + delete(rawMsg, key) + case "latestReadyRevisionName": + err = unpopulate(val, "LatestReadyRevisionName", &c.LatestReadyRevisionName) + delete(rawMsg, key) + case "latestRevisionFqdn": + err = unpopulate(val, "LatestRevisionFqdn", &c.LatestRevisionFqdn) + delete(rawMsg, key) + case "latestRevisionName": + err = unpopulate(val, "LatestRevisionName", &c.LatestRevisionName) + delete(rawMsg, key) + case "managedEnvironmentId": + err = unpopulate(val, "ManagedEnvironmentID", &c.ManagedEnvironmentID) + delete(rawMsg, key) + case "outboundIpAddresses": + err = unpopulate(val, "OutboundIPAddresses", &c.OutboundIPAddresses) delete(rawMsg, key) - case "intervalInSeconds": - err = unpopulate(val, "IntervalInSeconds", &d.IntervalInSeconds) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "template": + err = unpopulate(val, "Template", &c.Template) delete(rawMsg, key) - case "timeoutInSeconds": - err = unpopulate(val, "TimeoutInSeconds", &d.TimeoutInSeconds) + case "workloadProfileName": + err = unpopulate(val, "WorkloadProfileName", &c.WorkloadProfileName) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprComponentResiliencyPolicyConfiguration. -func (d DaprComponentResiliencyPolicyConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerAppSecret. +func (c ContainerAppSecret) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "circuitBreakerPolicy", d.CircuitBreakerPolicy) - populate(objectMap, "httpRetryPolicy", d.HTTPRetryPolicy) - populate(objectMap, "timeoutPolicy", d.TimeoutPolicy) + populate(objectMap, "identity", c.Identity) + populate(objectMap, "keyVaultUrl", c.KeyVaultURL) + populate(objectMap, "name", c.Name) + populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentResiliencyPolicyConfiguration. -func (d *DaprComponentResiliencyPolicyConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppSecret. +func (c *ContainerAppSecret) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "circuitBreakerPolicy": - err = unpopulate(val, "CircuitBreakerPolicy", &d.CircuitBreakerPolicy) + case "identity": + err = unpopulate(val, "Identity", &c.Identity) + delete(rawMsg, key) + case "keyVaultUrl": + err = unpopulate(val, "KeyVaultURL", &c.KeyVaultURL) delete(rawMsg, key) - case "httpRetryPolicy": - err = unpopulate(val, "HTTPRetryPolicy", &d.HTTPRetryPolicy) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) - case "timeoutPolicy": - err = unpopulate(val, "TimeoutPolicy", &d.TimeoutPolicy) + case "value": + err = unpopulate(val, "Value", &c.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprComponentResiliencyPolicyHTTPRetryBackOffConfiguration. -func (d DaprComponentResiliencyPolicyHTTPRetryBackOffConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ContainerResources. +func (c ContainerResources) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "initialDelayInMilliseconds", d.InitialDelayInMilliseconds) - populate(objectMap, "maxIntervalInMilliseconds", d.MaxIntervalInMilliseconds) + populate(objectMap, "cpu", c.CPU) + populate(objectMap, "ephemeralStorage", c.EphemeralStorage) + populate(objectMap, "memory", c.Memory) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentResiliencyPolicyHTTPRetryBackOffConfiguration. -func (d *DaprComponentResiliencyPolicyHTTPRetryBackOffConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerResources. +func (c *ContainerResources) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "initialDelayInMilliseconds": - err = unpopulate(val, "InitialDelayInMilliseconds", &d.InitialDelayInMilliseconds) + case "cpu": + err = unpopulate(val, "CPU", &c.CPU) + delete(rawMsg, key) + case "ephemeralStorage": + err = unpopulate(val, "EphemeralStorage", &c.EphemeralStorage) delete(rawMsg, key) - case "maxIntervalInMilliseconds": - err = unpopulate(val, "MaxIntervalInMilliseconds", &d.MaxIntervalInMilliseconds) + case "memory": + err = unpopulate(val, "Memory", &c.Memory) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprComponentResiliencyPolicyHTTPRetryPolicyConfiguration. -func (d DaprComponentResiliencyPolicyHTTPRetryPolicyConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CookieExpiration. +func (c CookieExpiration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "maxRetries", d.MaxRetries) - populate(objectMap, "retryBackOff", d.RetryBackOff) + populate(objectMap, "convention", c.Convention) + populate(objectMap, "timeToExpiration", c.TimeToExpiration) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentResiliencyPolicyHTTPRetryPolicyConfiguration. -func (d *DaprComponentResiliencyPolicyHTTPRetryPolicyConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CookieExpiration. +func (c *CookieExpiration) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "maxRetries": - err = unpopulate(val, "MaxRetries", &d.MaxRetries) + case "convention": + err = unpopulate(val, "Convention", &c.Convention) delete(rawMsg, key) - case "retryBackOff": - err = unpopulate(val, "RetryBackOff", &d.RetryBackOff) + case "timeToExpiration": + err = unpopulate(val, "TimeToExpiration", &c.TimeToExpiration) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprComponentResiliencyPolicyProperties. -func (d DaprComponentResiliencyPolicyProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CorsPolicy. +func (c CorsPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "inboundPolicy", d.InboundPolicy) - populate(objectMap, "outboundPolicy", d.OutboundPolicy) + populate(objectMap, "allowCredentials", c.AllowCredentials) + populate(objectMap, "allowedHeaders", c.AllowedHeaders) + populate(objectMap, "allowedMethods", c.AllowedMethods) + populate(objectMap, "allowedOrigins", c.AllowedOrigins) + populate(objectMap, "exposeHeaders", c.ExposeHeaders) + populate(objectMap, "maxAge", c.MaxAge) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentResiliencyPolicyProperties. -func (d *DaprComponentResiliencyPolicyProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CorsPolicy. +func (c *CorsPolicy) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "inboundPolicy": - err = unpopulate(val, "InboundPolicy", &d.InboundPolicy) + case "allowCredentials": + err = unpopulate(val, "AllowCredentials", &c.AllowCredentials) + delete(rawMsg, key) + case "allowedHeaders": + err = unpopulate(val, "AllowedHeaders", &c.AllowedHeaders) + delete(rawMsg, key) + case "allowedMethods": + err = unpopulate(val, "AllowedMethods", &c.AllowedMethods) + delete(rawMsg, key) + case "allowedOrigins": + err = unpopulate(val, "AllowedOrigins", &c.AllowedOrigins) + delete(rawMsg, key) + case "exposeHeaders": + err = unpopulate(val, "ExposeHeaders", &c.ExposeHeaders) delete(rawMsg, key) - case "outboundPolicy": - err = unpopulate(val, "OutboundPolicy", &d.OutboundPolicy) + case "maxAge": + err = unpopulate(val, "MaxAge", &c.MaxAge) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprComponentResiliencyPolicyTimeoutPolicyConfiguration. -func (d DaprComponentResiliencyPolicyTimeoutPolicyConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomDomain. +func (c CustomDomain) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "responseTimeoutInSeconds", d.ResponseTimeoutInSeconds) + populate(objectMap, "bindingType", c.BindingType) + populate(objectMap, "certificateId", c.CertificateID) + populate(objectMap, "name", c.Name) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentResiliencyPolicyTimeoutPolicyConfiguration. -func (d *DaprComponentResiliencyPolicyTimeoutPolicyConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomain. +func (c *CustomDomain) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "responseTimeoutInSeconds": - err = unpopulate(val, "ResponseTimeoutInSeconds", &d.ResponseTimeoutInSeconds) + case "bindingType": + err = unpopulate(val, "BindingType", &c.BindingType) + delete(rawMsg, key) + case "certificateId": + err = unpopulate(val, "CertificateID", &c.CertificateID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprComponentServiceBinding. -func (d DaprComponentServiceBinding) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomDomainConfiguration. +func (c CustomDomainConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "metadata", d.Metadata) - populate(objectMap, "name", d.Name) - populate(objectMap, "serviceId", d.ServiceID) + populate(objectMap, "certificatePassword", c.CertificatePassword) + populateByteArray(objectMap, "certificateValue", c.CertificateValue, func() any { + return runtime.EncodeByteArray(c.CertificateValue, runtime.Base64StdFormat) + }) + populate(objectMap, "customDomainVerificationId", c.CustomDomainVerificationID) + populate(objectMap, "dnsSuffix", c.DNSSuffix) + populateDateTimeRFC3339(objectMap, "expirationDate", c.ExpirationDate) + populate(objectMap, "subjectName", c.SubjectName) + populate(objectMap, "thumbprint", c.Thumbprint) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentServiceBinding. -func (d *DaprComponentServiceBinding) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainConfiguration. +func (c *CustomDomainConfiguration) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "metadata": - err = unpopulate(val, "Metadata", &d.Metadata) + case "certificatePassword": + err = unpopulate(val, "CertificatePassword", &c.CertificatePassword) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) + case "certificateValue": + if val != nil && string(val) != "null" { + err = runtime.DecodeByteArray(string(val), &c.CertificateValue, runtime.Base64StdFormat) + } delete(rawMsg, key) - case "serviceId": - err = unpopulate(val, "ServiceID", &d.ServiceID) + case "customDomainVerificationId": + err = unpopulate(val, "CustomDomainVerificationID", &c.CustomDomainVerificationID) + delete(rawMsg, key) + case "dnsSuffix": + err = unpopulate(val, "DNSSuffix", &c.DNSSuffix) + delete(rawMsg, key) + case "expirationDate": + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &c.ExpirationDate) + delete(rawMsg, key) + case "subjectName": + err = unpopulate(val, "SubjectName", &c.SubjectName) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprComponentsCollection. -func (d DaprComponentsCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameAnalysisResult. +func (c CustomHostnameAnalysisResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) + populate(objectMap, "aRecords", c.ARecords) + populate(objectMap, "alternateCNameRecords", c.AlternateCNameRecords) + populate(objectMap, "alternateTxtRecords", c.AlternateTxtRecords) + populate(objectMap, "cNameRecords", c.CNameRecords) + populate(objectMap, "conflictWithEnvironmentCustomDomain", c.ConflictWithEnvironmentCustomDomain) + populate(objectMap, "conflictingContainerAppResourceId", c.ConflictingContainerAppResourceID) + populate(objectMap, "customDomainVerificationFailureInfo", c.CustomDomainVerificationFailureInfo) + populate(objectMap, "customDomainVerificationTest", c.CustomDomainVerificationTest) + populate(objectMap, "hasConflictOnManagedEnvironment", c.HasConflictOnManagedEnvironment) + populate(objectMap, "hostName", c.HostName) + populate(objectMap, "isHostnameAlreadyVerified", c.IsHostnameAlreadyVerified) + populate(objectMap, "txtRecords", c.TxtRecords) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentsCollection. -func (d *DaprComponentsCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResult. +func (c *CustomHostnameAnalysisResult) UnmarshalJSON(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) + 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", &d.NextLink) + case "aRecords": + err = unpopulate(val, "ARecords", &c.ARecords) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) + case "alternateCNameRecords": + err = unpopulate(val, "AlternateCNameRecords", &c.AlternateCNameRecords) + delete(rawMsg, key) + case "alternateTxtRecords": + err = unpopulate(val, "AlternateTxtRecords", &c.AlternateTxtRecords) + delete(rawMsg, key) + case "cNameRecords": + err = unpopulate(val, "CNameRecords", &c.CNameRecords) + delete(rawMsg, key) + case "conflictWithEnvironmentCustomDomain": + err = unpopulate(val, "ConflictWithEnvironmentCustomDomain", &c.ConflictWithEnvironmentCustomDomain) + delete(rawMsg, key) + case "conflictingContainerAppResourceId": + err = unpopulate(val, "ConflictingContainerAppResourceID", &c.ConflictingContainerAppResourceID) + delete(rawMsg, key) + case "customDomainVerificationFailureInfo": + err = unpopulate(val, "CustomDomainVerificationFailureInfo", &c.CustomDomainVerificationFailureInfo) + delete(rawMsg, key) + case "customDomainVerificationTest": + err = unpopulate(val, "CustomDomainVerificationTest", &c.CustomDomainVerificationTest) + delete(rawMsg, key) + case "hasConflictOnManagedEnvironment": + err = unpopulate(val, "HasConflictOnManagedEnvironment", &c.HasConflictOnManagedEnvironment) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &c.HostName) + delete(rawMsg, key) + case "isHostnameAlreadyVerified": + err = unpopulate(val, "IsHostnameAlreadyVerified", &c.IsHostnameAlreadyVerified) + delete(rawMsg, key) + case "txtRecords": + err = unpopulate(val, "TxtRecords", &c.TxtRecords) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprConfiguration. -func (d DaprConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo. +func (c CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "version", d.Version) + populate(objectMap, "code", c.Code) + populate(objectMap, "details", c.Details) + populate(objectMap, "message", c.Message) + populate(objectMap, "target", c.Target) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprConfiguration. -func (d *DaprConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo. +func (c *CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "version": - err = unpopulate(val, "Version", &d.Version) + case "code": + err = unpopulate(val, "Code", &c.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &c.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &c.Target) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprMetadata. -func (d DaprMetadata) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem. +func (c CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", d.Name) - populate(objectMap, "secretRef", d.SecretRef) - populate(objectMap, "value", d.Value) + populate(objectMap, "code", c.Code) + populate(objectMap, "message", c.Message) + populate(objectMap, "target", c.Target) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprMetadata. -func (d *DaprMetadata) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem. +func (c *CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem) UnmarshalJSON(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) + 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", &d.Name) + case "code": + err = unpopulate(val, "Code", &c.Code) delete(rawMsg, key) - case "secretRef": - err = unpopulate(val, "SecretRef", &d.SecretRef) + case "message": + err = unpopulate(val, "Message", &c.Message) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) + case "target": + err = unpopulate(val, "Target", &c.Target) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprSecret. -func (d DaprSecret) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomOpenIDConnectProvider. +func (c CustomOpenIDConnectProvider) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", d.Name) - populate(objectMap, "value", d.Value) + populate(objectMap, "enabled", c.Enabled) + populate(objectMap, "login", c.Login) + populate(objectMap, "registration", c.Registration) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprSecret. -func (d *DaprSecret) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomOpenIDConnectProvider. +func (c *CustomOpenIDConnectProvider) UnmarshalJSON(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) + 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", &d.Name) + case "enabled": + err = unpopulate(val, "Enabled", &c.Enabled) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) + case "login": + err = unpopulate(val, "Login", &c.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &c.Registration) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprSecretsCollection. -func (d DaprSecretsCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomScaleRule. +func (c CustomScaleRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", d.Value) + populate(objectMap, "auth", c.Auth) + populate(objectMap, "metadata", c.Metadata) + populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprSecretsCollection. -func (d *DaprSecretsCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomScaleRule. +func (c *CustomScaleRule) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &d.Value) + case "auth": + err = unpopulate(val, "Auth", &c.Auth) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &c.Metadata) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprServiceBindMetadata. -func (d DaprServiceBindMetadata) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Dapr. +func (d Dapr) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", d.Name) - populate(objectMap, "value", d.Value) + populate(objectMap, "appId", d.AppID) + populate(objectMap, "appPort", d.AppPort) + populate(objectMap, "appProtocol", d.AppProtocol) + populate(objectMap, "enableApiLogging", d.EnableAPILogging) + populate(objectMap, "enabled", d.Enabled) + populate(objectMap, "httpMaxRequestSize", d.HTTPMaxRequestSize) + populate(objectMap, "httpReadBufferSize", d.HTTPReadBufferSize) + populate(objectMap, "logLevel", d.LogLevel) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprServiceBindMetadata. -func (d *DaprServiceBindMetadata) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Dapr. +func (d *Dapr) UnmarshalJSON(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) @@ -3799,11 +2528,29 @@ func (d *DaprServiceBindMetadata) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) + case "appId": + err = unpopulate(val, "AppID", &d.AppID) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) + case "appPort": + err = unpopulate(val, "AppPort", &d.AppPort) + delete(rawMsg, key) + case "appProtocol": + err = unpopulate(val, "AppProtocol", &d.AppProtocol) + delete(rawMsg, key) + case "enableApiLogging": + err = unpopulate(val, "EnableAPILogging", &d.EnableAPILogging) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &d.Enabled) + delete(rawMsg, key) + case "httpMaxRequestSize": + err = unpopulate(val, "HTTPMaxRequestSize", &d.HTTPMaxRequestSize) + delete(rawMsg, key) + case "httpReadBufferSize": + err = unpopulate(val, "HTTPReadBufferSize", &d.HTTPReadBufferSize) + delete(rawMsg, key) + case "logLevel": + err = unpopulate(val, "LogLevel", &d.LogLevel) delete(rawMsg, key) } if err != nil { @@ -3813,8 +2560,8 @@ func (d *DaprServiceBindMetadata) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprSubscription. -func (d DaprSubscription) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DaprComponent. +func (d DaprComponent) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", d.ID) populate(objectMap, "name", d.Name) @@ -3824,8 +2571,8 @@ func (d DaprSubscription) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprSubscription. -func (d *DaprSubscription) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponent. +func (d *DaprComponent) UnmarshalJSON(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) @@ -3856,17 +2603,22 @@ func (d *DaprSubscription) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprSubscriptionBulkSubscribeOptions. -func (d DaprSubscriptionBulkSubscribeOptions) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DaprComponentProperties. +func (d DaprComponentProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", d.Enabled) - populate(objectMap, "maxAwaitDurationMs", d.MaxAwaitDurationMs) - populate(objectMap, "maxMessagesCount", d.MaxMessagesCount) + populate(objectMap, "componentType", d.ComponentType) + populate(objectMap, "ignoreErrors", d.IgnoreErrors) + populate(objectMap, "initTimeout", d.InitTimeout) + populate(objectMap, "metadata", d.Metadata) + populate(objectMap, "scopes", d.Scopes) + populate(objectMap, "secretStoreComponent", d.SecretStoreComponent) + populate(objectMap, "secrets", d.Secrets) + populate(objectMap, "version", d.Version) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprSubscriptionBulkSubscribeOptions. -func (d *DaprSubscriptionBulkSubscribeOptions) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentProperties. +func (d *DaprComponentProperties) UnmarshalJSON(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) @@ -3874,14 +2626,29 @@ func (d *DaprSubscriptionBulkSubscribeOptions) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &d.Enabled) + case "componentType": + err = unpopulate(val, "ComponentType", &d.ComponentType) + delete(rawMsg, key) + case "ignoreErrors": + err = unpopulate(val, "IgnoreErrors", &d.IgnoreErrors) + delete(rawMsg, key) + case "initTimeout": + err = unpopulate(val, "InitTimeout", &d.InitTimeout) delete(rawMsg, key) - case "maxAwaitDurationMs": - err = unpopulate(val, "MaxAwaitDurationMs", &d.MaxAwaitDurationMs) + case "metadata": + err = unpopulate(val, "Metadata", &d.Metadata) + delete(rawMsg, key) + case "scopes": + err = unpopulate(val, "Scopes", &d.Scopes) + delete(rawMsg, key) + case "secretStoreComponent": + err = unpopulate(val, "SecretStoreComponent", &d.SecretStoreComponent) delete(rawMsg, key) - case "maxMessagesCount": - err = unpopulate(val, "MaxMessagesCount", &d.MaxMessagesCount) + case "secrets": + err = unpopulate(val, "Secrets", &d.Secrets) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &d.Version) delete(rawMsg, key) } if err != nil { @@ -3891,21 +2658,16 @@ func (d *DaprSubscriptionBulkSubscribeOptions) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprSubscriptionProperties. -func (d DaprSubscriptionProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DaprComponentsCollection. +func (d DaprComponentsCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "bulkSubscribe", d.BulkSubscribe) - populate(objectMap, "deadLetterTopic", d.DeadLetterTopic) - populate(objectMap, "metadata", d.Metadata) - populate(objectMap, "pubsubName", d.PubsubName) - populate(objectMap, "routes", d.Routes) - populate(objectMap, "scopes", d.Scopes) - populate(objectMap, "topic", d.Topic) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprSubscriptionProperties. -func (d *DaprSubscriptionProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponentsCollection. +func (d *DaprComponentsCollection) UnmarshalJSON(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) @@ -3913,26 +2675,11 @@ func (d *DaprSubscriptionProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "bulkSubscribe": - err = unpopulate(val, "BulkSubscribe", &d.BulkSubscribe) - delete(rawMsg, key) - case "deadLetterTopic": - err = unpopulate(val, "DeadLetterTopic", &d.DeadLetterTopic) - delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &d.Metadata) - delete(rawMsg, key) - case "pubsubName": - err = unpopulate(val, "PubsubName", &d.PubsubName) - delete(rawMsg, key) - case "routes": - err = unpopulate(val, "Routes", &d.Routes) - delete(rawMsg, key) - case "scopes": - err = unpopulate(val, "Scopes", &d.Scopes) + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) delete(rawMsg, key) - case "topic": - err = unpopulate(val, "Topic", &d.Topic) + case "value": + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { @@ -3942,16 +2689,15 @@ func (d *DaprSubscriptionProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprSubscriptionRouteRule. -func (d DaprSubscriptionRouteRule) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DaprConfiguration. +func (d DaprConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "match", d.Match) - populate(objectMap, "path", d.Path) + populate(objectMap, "version", d.Version) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprSubscriptionRouteRule. -func (d *DaprSubscriptionRouteRule) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprConfiguration. +func (d *DaprConfiguration) UnmarshalJSON(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) @@ -3959,11 +2705,8 @@ func (d *DaprSubscriptionRouteRule) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "match": - err = unpopulate(val, "Match", &d.Match) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &d.Path) + case "version": + err = unpopulate(val, "Version", &d.Version) delete(rawMsg, key) } if err != nil { @@ -3973,16 +2716,17 @@ func (d *DaprSubscriptionRouteRule) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprSubscriptionRoutes. -func (d DaprSubscriptionRoutes) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DaprMetadata. +func (d DaprMetadata) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "default", d.Default) - populate(objectMap, "rules", d.Rules) + populate(objectMap, "name", d.Name) + populate(objectMap, "secretRef", d.SecretRef) + populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprSubscriptionRoutes. -func (d *DaprSubscriptionRoutes) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprMetadata. +func (d *DaprMetadata) UnmarshalJSON(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) @@ -3990,11 +2734,14 @@ func (d *DaprSubscriptionRoutes) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "default": - err = unpopulate(val, "Default", &d.Default) + case "name": + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &d.Rules) + case "secretRef": + err = unpopulate(val, "SecretRef", &d.SecretRef) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { @@ -4004,16 +2751,16 @@ func (d *DaprSubscriptionRoutes) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DaprSubscriptionsCollection. -func (d DaprSubscriptionsCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DaprSecret. +func (d DaprSecret) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "name", d.Name) populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DaprSubscriptionsCollection. -func (d *DaprSubscriptionsCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprSecret. +func (d *DaprSecret) UnmarshalJSON(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) @@ -4021,8 +2768,8 @@ func (d *DaprSubscriptionsCollection) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) + case "name": + err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) case "value": err = unpopulate(val, "Value", &d.Value) @@ -4035,16 +2782,15 @@ func (d *DaprSubscriptionsCollection) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DataDogConfiguration. -func (d DataDogConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DaprSecretsCollection. +func (d DaprSecretsCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "key", d.Key) - populate(objectMap, "site", d.Site) + populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DataDogConfiguration. -func (d *DataDogConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprSecretsCollection. +func (d *DaprSecretsCollection) UnmarshalJSON(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) @@ -4052,11 +2798,8 @@ func (d *DataDogConfiguration) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "key": - err = unpopulate(val, "Key", &d.Key) - delete(rawMsg, key) - case "site": - err = unpopulate(val, "Site", &d.Site) + case "value": + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { @@ -4202,37 +2945,6 @@ func (d *DefaultErrorResponseErrorDetailsItem) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type DestinationsConfiguration. -func (d DestinationsConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "dataDogConfiguration", d.DataDogConfiguration) - populate(objectMap, "otlpConfigurations", d.OtlpConfigurations) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DestinationsConfiguration. -func (d *DestinationsConfiguration) UnmarshalJSON(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 "dataDogConfiguration": - err = unpopulate(val, "DataDogConfiguration", &d.DataDogConfiguration) - delete(rawMsg, key) - case "otlpConfigurations": - err = unpopulate(val, "OtlpConfigurations", &d.OtlpConfigurations) - 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 DiagnosticDataProviderMetadata. func (d DiagnosticDataProviderMetadata) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4495,214 +3207,11 @@ func (d *DiagnosticsCollection) UnmarshalJSON(data []byte) error { 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 DiagnosticsDataAPIResponse. -func (d DiagnosticsDataAPIResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "renderingProperties", d.RenderingProperties) - populate(objectMap, "table", d.Table) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsDataAPIResponse. -func (d *DiagnosticsDataAPIResponse) UnmarshalJSON(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 "renderingProperties": - err = unpopulate(val, "RenderingProperties", &d.RenderingProperties) - delete(rawMsg, key) - case "table": - err = unpopulate(val, "Table", &d.Table) - 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 DiagnosticsDefinition. -func (d DiagnosticsDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "analysisTypes", d.AnalysisTypes) - populate(objectMap, "author", d.Author) - populate(objectMap, "category", d.Category) - populate(objectMap, "description", d.Description) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "score", d.Score) - populate(objectMap, "supportTopicList", d.SupportTopicList) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsDefinition. -func (d *DiagnosticsDefinition) UnmarshalJSON(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 "analysisTypes": - err = unpopulate(val, "AnalysisTypes", &d.AnalysisTypes) - delete(rawMsg, key) - case "author": - err = unpopulate(val, "Author", &d.Author) - delete(rawMsg, key) - case "category": - err = unpopulate(val, "Category", &d.Category) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &d.Description) - 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 "score": - err = unpopulate(val, "Score", &d.Score) - delete(rawMsg, key) - case "supportTopicList": - err = unpopulate(val, "SupportTopicList", &d.SupportTopicList) - 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 DiagnosticsProperties. -func (d DiagnosticsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "dataProviderMetadata", d.DataProviderMetadata) - populate(objectMap, "dataset", d.Dataset) - populate(objectMap, "metadata", d.Metadata) - populate(objectMap, "status", d.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsProperties. -func (d *DiagnosticsProperties) UnmarshalJSON(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 "dataProviderMetadata": - err = unpopulate(val, "DataProviderMetadata", &d.DataProviderMetadata) - delete(rawMsg, key) - case "dataset": - err = unpopulate(val, "Dataset", &d.Dataset) - delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &d.Metadata) - delete(rawMsg, 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 DiagnosticsStatus. -func (d DiagnosticsStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "message", d.Message) - populate(objectMap, "statusId", d.StatusID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsStatus. -func (d *DiagnosticsStatus) UnmarshalJSON(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 "message": - err = unpopulate(val, "Message", &d.Message) - delete(rawMsg, key) - case "statusId": - err = unpopulate(val, "StatusID", &d.StatusID) - 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 DotNetComponent. -func (d DotNetComponent) 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 DotNetComponent. -func (d *DotNetComponent) UnmarshalJSON(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) + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) + case "value": + err = unpopulate(val, "Value", &d.Value) delete(rawMsg, key) } if err != nil { @@ -4712,16 +3221,16 @@ func (d *DotNetComponent) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DotNetComponentConfigurationProperty. -func (d DotNetComponentConfigurationProperty) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DiagnosticsDataAPIResponse. +func (d DiagnosticsDataAPIResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "propertyName", d.PropertyName) - populate(objectMap, "value", d.Value) + populate(objectMap, "renderingProperties", d.RenderingProperties) + populate(objectMap, "table", d.Table) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DotNetComponentConfigurationProperty. -func (d *DotNetComponentConfigurationProperty) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsDataAPIResponse. +func (d *DiagnosticsDataAPIResponse) UnmarshalJSON(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) @@ -4729,11 +3238,11 @@ func (d *DotNetComponentConfigurationProperty) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "propertyName": - err = unpopulate(val, "PropertyName", &d.PropertyName) + case "renderingProperties": + err = unpopulate(val, "RenderingProperties", &d.RenderingProperties) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) + case "table": + err = unpopulate(val, "Table", &d.Table) delete(rawMsg, key) } if err != nil { @@ -4743,18 +3252,23 @@ func (d *DotNetComponentConfigurationProperty) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type DotNetComponentProperties. -func (d DotNetComponentProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DiagnosticsDefinition. +func (d DiagnosticsDefinition) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "componentType", d.ComponentType) - populate(objectMap, "configurations", d.Configurations) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "serviceBinds", d.ServiceBinds) + populate(objectMap, "analysisTypes", d.AnalysisTypes) + populate(objectMap, "author", d.Author) + populate(objectMap, "category", d.Category) + populate(objectMap, "description", d.Description) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "score", d.Score) + populate(objectMap, "supportTopicList", d.SupportTopicList) + populate(objectMap, "type", d.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DotNetComponentProperties. -func (d *DotNetComponentProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsDefinition. +func (d *DiagnosticsDefinition) UnmarshalJSON(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) @@ -4762,17 +3276,32 @@ func (d *DotNetComponentProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "componentType": - err = unpopulate(val, "ComponentType", &d.ComponentType) + case "analysisTypes": + err = unpopulate(val, "AnalysisTypes", &d.AnalysisTypes) delete(rawMsg, key) - case "configurations": - err = unpopulate(val, "Configurations", &d.Configurations) + case "author": + err = unpopulate(val, "Author", &d.Author) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + case "category": + err = unpopulate(val, "Category", &d.Category) delete(rawMsg, key) - case "serviceBinds": - err = unpopulate(val, "ServiceBinds", &d.ServiceBinds) + case "description": + err = unpopulate(val, "Description", &d.Description) + 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 "score": + err = unpopulate(val, "Score", &d.Score) + delete(rawMsg, key) + case "supportTopicList": + err = unpopulate(val, "SupportTopicList", &d.SupportTopicList) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) } if err != nil { @@ -4782,16 +3311,18 @@ func (d *DotNetComponentProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DotNetComponentServiceBind. -func (d DotNetComponentServiceBind) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DiagnosticsProperties. +func (d DiagnosticsProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", d.Name) - populate(objectMap, "serviceId", d.ServiceID) + populate(objectMap, "dataProviderMetadata", d.DataProviderMetadata) + populate(objectMap, "dataset", d.Dataset) + populate(objectMap, "metadata", d.Metadata) + populate(objectMap, "status", d.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DotNetComponentServiceBind. -func (d *DotNetComponentServiceBind) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsProperties. +func (d *DiagnosticsProperties) UnmarshalJSON(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) @@ -4799,11 +3330,17 @@ func (d *DotNetComponentServiceBind) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) + case "dataProviderMetadata": + err = unpopulate(val, "DataProviderMetadata", &d.DataProviderMetadata) delete(rawMsg, key) - case "serviceId": - err = unpopulate(val, "ServiceID", &d.ServiceID) + case "dataset": + err = unpopulate(val, "Dataset", &d.Dataset) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &d.Metadata) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) delete(rawMsg, key) } if err != nil { @@ -4813,16 +3350,16 @@ func (d *DotNetComponentServiceBind) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DotNetComponentsCollection. -func (d DotNetComponentsCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DiagnosticsStatus. +func (d DiagnosticsStatus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) + populate(objectMap, "message", d.Message) + populate(objectMap, "statusId", d.StatusID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DotNetComponentsCollection. -func (d *DotNetComponentsCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsStatus. +func (d *DiagnosticsStatus) UnmarshalJSON(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) @@ -4830,11 +3367,11 @@ func (d *DotNetComponentsCollection) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) + case "message": + err = unpopulate(val, "Message", &d.Message) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) + case "statusId": + err = unpopulate(val, "StatusID", &d.StatusID) delete(rawMsg, key) } if err != nil { @@ -4992,37 +3529,6 @@ func (e *EnvironmentVar) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type EnvironmentVariable. -func (e EnvironmentVariable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", e.Name) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// 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) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &e.Name) - 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 ErrorAdditionalInfo. func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5268,7 +3774,6 @@ func (g *GitHub) UnmarshalJSON(data []byte) error { func (g GithubActionConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "azureCredentials", g.AzureCredentials) - populate(objectMap, "buildEnvironmentVariables", g.BuildEnvironmentVariables) populate(objectMap, "contextPath", g.ContextPath) populate(objectMap, "githubPersonalAccessToken", g.GithubPersonalAccessToken) populate(objectMap, "image", g.Image) @@ -5292,9 +3797,6 @@ func (g *GithubActionConfiguration) UnmarshalJSON(data []byte) error { case "azureCredentials": err = unpopulate(val, "AzureCredentials", &g.AzureCredentials) delete(rawMsg, key) - case "buildEnvironmentVariables": - err = unpopulate(val, "BuildEnvironmentVariables", &g.BuildEnvironmentVariables) - delete(rawMsg, key) case "contextPath": err = unpopulate(val, "ContextPath", &g.ContextPath) delete(rawMsg, key) @@ -5373,196 +3875,29 @@ func (g Google) MarshalJSON() ([]byte, error) { } // UnmarshalJSON implements the json.Unmarshaller interface for type Google. -func (g *Google) UnmarshalJSON(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 "enabled": - err = unpopulate(val, "Enabled", &g.Enabled) - delete(rawMsg, key) - case "login": - err = unpopulate(val, "Login", &g.Login) - delete(rawMsg, key) - case "registration": - err = unpopulate(val, "Registration", &g.Registration) - delete(rawMsg, key) - case "validation": - err = unpopulate(val, "Validation", &g.Validation) - 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 HTTPConnectionPool. -func (h HTTPConnectionPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "http1MaxPendingRequests", h.HTTP1MaxPendingRequests) - populate(objectMap, "http2MaxRequests", h.HTTP2MaxRequests) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPConnectionPool. -func (h *HTTPConnectionPool) UnmarshalJSON(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 "http1MaxPendingRequests": - err = unpopulate(val, "HTTP1MaxPendingRequests", &h.HTTP1MaxPendingRequests) - delete(rawMsg, key) - case "http2MaxRequests": - err = unpopulate(val, "HTTP2MaxRequests", &h.HTTP2MaxRequests) - 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 HTTPGet. -func (h HTTPGet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "fileName", h.FileName) - populate(objectMap, "headers", h.Headers) - populate(objectMap, "url", h.URL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPGet. -func (h *HTTPGet) UnmarshalJSON(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 "fileName": - err = unpopulate(val, "FileName", &h.FileName) - delete(rawMsg, key) - case "headers": - err = unpopulate(val, "Headers", &h.Headers) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &h.URL) - 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 HTTPRetryPolicy. -func (h HTTPRetryPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matches", h.Matches) - populate(objectMap, "maxRetries", h.MaxRetries) - populate(objectMap, "retryBackOff", h.RetryBackOff) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPRetryPolicy. -func (h *HTTPRetryPolicy) UnmarshalJSON(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 "matches": - err = unpopulate(val, "Matches", &h.Matches) - delete(rawMsg, key) - case "maxRetries": - err = unpopulate(val, "MaxRetries", &h.MaxRetries) - delete(rawMsg, key) - case "retryBackOff": - err = unpopulate(val, "RetryBackOff", &h.RetryBackOff) - 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 HTTPRetryPolicyMatches. -func (h HTTPRetryPolicyMatches) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "errors", h.Errors) - populate(objectMap, "httpStatusCodes", h.HTTPStatusCodes) - populate(objectMap, "headers", h.Headers) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPRetryPolicyMatches. -func (h *HTTPRetryPolicyMatches) UnmarshalJSON(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 "errors": - err = unpopulate(val, "Errors", &h.Errors) - delete(rawMsg, key) - case "httpStatusCodes": - err = unpopulate(val, "HTTPStatusCodes", &h.HTTPStatusCodes) - delete(rawMsg, key) - case "headers": - err = unpopulate(val, "Headers", &h.Headers) - 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 HTTPRetryPolicyRetryBackOff. -func (h HTTPRetryPolicyRetryBackOff) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "initialDelayInMilliseconds", h.InitialDelayInMilliseconds) - populate(objectMap, "maxIntervalInMilliseconds", h.MaxIntervalInMilliseconds) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPRetryPolicyRetryBackOff. -func (h *HTTPRetryPolicyRetryBackOff) UnmarshalJSON(data []byte) error { +func (g *Google) UnmarshalJSON(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", g, err) } for key, val := range rawMsg { var err error switch key { - case "initialDelayInMilliseconds": - err = unpopulate(val, "InitialDelayInMilliseconds", &h.InitialDelayInMilliseconds) + case "enabled": + err = unpopulate(val, "Enabled", &g.Enabled) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &g.Login) delete(rawMsg, key) - case "maxIntervalInMilliseconds": - err = unpopulate(val, "MaxIntervalInMilliseconds", &h.MaxIntervalInMilliseconds) + case "registration": + err = unpopulate(val, "Registration", &g.Registration) + delete(rawMsg, key) + case "validation": + err = unpopulate(val, "Validation", &g.Validation) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil @@ -5661,107 +3996,6 @@ func (h *HTTPSettingsRoutes) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Header. -func (h Header) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "key", h.Key) - populate(objectMap, "value", h.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Header. -func (h *Header) UnmarshalJSON(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 "key": - err = unpopulate(val, "Key", &h.Key) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &h.Value) - 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 HeaderMatch. -func (h HeaderMatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "header", h.Header) - populate(objectMap, "match", h.Match) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HeaderMatch. -func (h *HeaderMatch) UnmarshalJSON(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 "header": - err = unpopulate(val, "Header", &h.Header) - delete(rawMsg, key) - case "match": - err = unpopulate(val, "Match", &h.Match) - 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 HeaderMatchMatch. -func (h HeaderMatchMatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "exactMatch", h.ExactMatch) - populate(objectMap, "prefixMatch", h.PrefixMatch) - populate(objectMap, "regexMatch", h.RegexMatch) - populate(objectMap, "suffixMatch", h.SuffixMatch) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HeaderMatchMatch. -func (h *HeaderMatchMatch) UnmarshalJSON(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 "exactMatch": - err = unpopulate(val, "ExactMatch", &h.ExactMatch) - delete(rawMsg, key) - case "prefixMatch": - err = unpopulate(val, "PrefixMatch", &h.PrefixMatch) - delete(rawMsg, key) - case "regexMatch": - err = unpopulate(val, "RegexMatch", &h.RegexMatch) - delete(rawMsg, key) - case "suffixMatch": - err = unpopulate(val, "SuffixMatch", &h.SuffixMatch) - 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 IPSecurityRestrictionRule. func (i IPSecurityRestrictionRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5870,7 +4104,6 @@ func (i Ingress) MarshalJSON() ([]byte, error) { populate(objectMap, "ipSecurityRestrictions", i.IPSecurityRestrictions) populate(objectMap, "stickySessions", i.StickySessions) populate(objectMap, "targetPort", i.TargetPort) - populate(objectMap, "targetPortHttpScheme", i.TargetPortHTTPScheme) populate(objectMap, "traffic", i.Traffic) populate(objectMap, "transport", i.Transport) return json.Marshal(objectMap) @@ -5918,9 +4151,6 @@ func (i *Ingress) UnmarshalJSON(data []byte) error { case "targetPort": err = unpopulate(val, "TargetPort", &i.TargetPort) delete(rawMsg, key) - case "targetPortHttpScheme": - err = unpopulate(val, "TargetPortHTTPScheme", &i.TargetPortHTTPScheme) - delete(rawMsg, key) case "traffic": err = unpopulate(val, "Traffic", &i.Traffic) delete(rawMsg, key) @@ -6048,185 +4278,9 @@ func (i *InitContainer) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JavaComponent. -func (j JavaComponent) 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 JavaComponent. -func (j *JavaComponent) UnmarshalJSON(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 "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 JavaComponentConfigurationProperty. -func (j JavaComponentConfigurationProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "propertyName", j.PropertyName) - populate(objectMap, "value", j.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JavaComponentConfigurationProperty. -func (j *JavaComponentConfigurationProperty) UnmarshalJSON(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 "propertyName": - err = unpopulate(val, "PropertyName", &j.PropertyName) - 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 JavaComponentProperties. -func (j JavaComponentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "componentType", j.ComponentType) - populate(objectMap, "configurations", j.Configurations) - populate(objectMap, "provisioningState", j.ProvisioningState) - populate(objectMap, "serviceBinds", j.ServiceBinds) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JavaComponentProperties. -func (j *JavaComponentProperties) UnmarshalJSON(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 "componentType": - err = unpopulate(val, "ComponentType", &j.ComponentType) - delete(rawMsg, key) - case "configurations": - err = unpopulate(val, "Configurations", &j.Configurations) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &j.ProvisioningState) - delete(rawMsg, key) - case "serviceBinds": - err = unpopulate(val, "ServiceBinds", &j.ServiceBinds) - 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 JavaComponentServiceBind. -func (j JavaComponentServiceBind) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", j.Name) - populate(objectMap, "serviceId", j.ServiceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JavaComponentServiceBind. -func (j *JavaComponentServiceBind) UnmarshalJSON(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 "name": - err = unpopulate(val, "Name", &j.Name) - delete(rawMsg, key) - case "serviceId": - err = unpopulate(val, "ServiceID", &j.ServiceID) - 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 JavaComponentsCollection. -func (j JavaComponentsCollection) 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 JavaComponentsCollection. -func (j *JavaComponentsCollection) UnmarshalJSON(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 Job. func (j Job) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "extendedLocation", j.ExtendedLocation) populate(objectMap, "id", j.ID) populate(objectMap, "identity", j.Identity) populate(objectMap, "location", j.Location) @@ -6247,9 +4301,6 @@ func (j *Job) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &j.ExtendedLocation) - delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &j.ID) delete(rawMsg, key) @@ -6655,7 +4706,6 @@ func (j *JobExecutionTemplate) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobPatchProperties. func (j JobPatchProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "extendedLocation", j.ExtendedLocation) populate(objectMap, "identity", j.Identity) populate(objectMap, "properties", j.Properties) populate(objectMap, "tags", j.Tags) @@ -6671,9 +4721,6 @@ func (j *JobPatchProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &j.ExtendedLocation) - delete(rawMsg, key) case "identity": err = unpopulate(val, "Identity", &j.Identity) delete(rawMsg, key) @@ -7049,7 +5096,6 @@ func (l *ListUsagesResult) UnmarshalJSON(data []byte) error { func (l LogAnalyticsConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "customerId", l.CustomerID) - populate(objectMap, "dynamicJsonColumns", l.DynamicJSONColumns) populate(objectMap, "sharedKey", l.SharedKey) return json.Marshal(objectMap) } @@ -7066,9 +5112,6 @@ func (l *LogAnalyticsConfiguration) UnmarshalJSON(data []byte) error { case "customerId": err = unpopulate(val, "CustomerID", &l.CustomerID) delete(rawMsg, key) - case "dynamicJsonColumns": - err = unpopulate(val, "DynamicJSONColumns", &l.DynamicJSONColumns) - delete(rawMsg, key) case "sharedKey": err = unpopulate(val, "SharedKey", &l.SharedKey) delete(rawMsg, key) @@ -7155,41 +5198,14 @@ func (l *LoginRoutes) UnmarshalJSON(data []byte) error { } // MarshalJSON implements the json.Marshaller interface for type LoginScopes. -func (l LoginScopes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "scopes", l.Scopes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoginScopes. -func (l *LoginScopes) UnmarshalJSON(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 "scopes": - err = unpopulate(val, "Scopes", &l.Scopes) - 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 LogsConfiguration. -func (l LogsConfiguration) MarshalJSON() ([]byte, error) { +func (l LoginScopes) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "destinations", l.Destinations) + populate(objectMap, "scopes", l.Scopes) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LogsConfiguration. -func (l *LogsConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type LoginScopes. +func (l *LoginScopes) UnmarshalJSON(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) @@ -7197,8 +5213,8 @@ func (l *LogsConfiguration) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "destinations": - err = unpopulate(val, "Destinations", &l.Destinations) + case "scopes": + err = unpopulate(val, "Scopes", &l.Scopes) delete(rawMsg, key) } if err != nil { @@ -7364,7 +5380,6 @@ func (m *ManagedCertificateProperties) UnmarshalJSON(data []byte) error { func (m ManagedEnvironment) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", m.ID) - populate(objectMap, "identity", m.Identity) populate(objectMap, "kind", m.Kind) populate(objectMap, "location", m.Location) populate(objectMap, "name", m.Name) @@ -7387,9 +5402,6 @@ func (m *ManagedEnvironment) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) - delete(rawMsg, key) case "kind": err = unpopulate(val, "Kind", &m.Kind) delete(rawMsg, key) @@ -7422,7 +5434,6 @@ func (m *ManagedEnvironment) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedEnvironmentProperties. func (m ManagedEnvironmentProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "appInsightsConfiguration", m.AppInsightsConfiguration) populate(objectMap, "appLogsConfiguration", m.AppLogsConfiguration) populate(objectMap, "customDomainConfiguration", m.CustomDomainConfiguration) populate(objectMap, "daprAIConnectionString", m.DaprAIConnectionString) @@ -7433,8 +5444,8 @@ func (m ManagedEnvironmentProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "eventStreamEndpoint", m.EventStreamEndpoint) populate(objectMap, "infrastructureResourceGroup", m.InfrastructureResourceGroup) populate(objectMap, "kedaConfiguration", m.KedaConfiguration) - populate(objectMap, "openTelemetryConfiguration", m.OpenTelemetryConfiguration) populate(objectMap, "peerAuthentication", m.PeerAuthentication) + populate(objectMap, "peerTrafficConfiguration", m.PeerTrafficConfiguration) populate(objectMap, "provisioningState", m.ProvisioningState) populate(objectMap, "staticIp", m.StaticIP) populate(objectMap, "vnetConfiguration", m.VnetConfiguration) @@ -7452,9 +5463,6 @@ func (m *ManagedEnvironmentProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "appInsightsConfiguration": - err = unpopulate(val, "AppInsightsConfiguration", &m.AppInsightsConfiguration) - delete(rawMsg, key) case "appLogsConfiguration": err = unpopulate(val, "AppLogsConfiguration", &m.AppLogsConfiguration) delete(rawMsg, key) @@ -7485,12 +5493,12 @@ func (m *ManagedEnvironmentProperties) UnmarshalJSON(data []byte) error { case "kedaConfiguration": err = unpopulate(val, "KedaConfiguration", &m.KedaConfiguration) delete(rawMsg, key) - case "openTelemetryConfiguration": - err = unpopulate(val, "OpenTelemetryConfiguration", &m.OpenTelemetryConfiguration) - delete(rawMsg, key) case "peerAuthentication": err = unpopulate(val, "PeerAuthentication", &m.PeerAuthentication) delete(rawMsg, key) + case "peerTrafficConfiguration": + err = unpopulate(val, "PeerTrafficConfiguration", &m.PeerTrafficConfiguration) + delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) delete(rawMsg, key) @@ -7541,6 +5549,60 @@ func (m *ManagedEnvironmentPropertiesPeerAuthentication) UnmarshalJSON(data []by return nil } +// MarshalJSON implements the json.Marshaller interface for type ManagedEnvironmentPropertiesPeerTrafficConfiguration. +func (m ManagedEnvironmentPropertiesPeerTrafficConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "encryption", m.Encryption) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedEnvironmentPropertiesPeerTrafficConfiguration. +func (m *ManagedEnvironmentPropertiesPeerTrafficConfiguration) UnmarshalJSON(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 "encryption": + err = unpopulate(val, "Encryption", &m.Encryption) + 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 ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption. +func (m ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", m.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption. +func (m *ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption) UnmarshalJSON(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 "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + 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 ManagedEnvironmentStorage. func (m ManagedEnvironmentStorage) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -7588,7 +5650,6 @@ func (m *ManagedEnvironmentStorage) UnmarshalJSON(data []byte) error { func (m ManagedEnvironmentStorageProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "azureFile", m.AzureFile) - populate(objectMap, "nfsAzureFile", m.NfsAzureFile) return json.Marshal(objectMap) } @@ -7604,9 +5665,6 @@ func (m *ManagedEnvironmentStorageProperties) UnmarshalJSON(data []byte) error { case "azureFile": err = unpopulate(val, "AzureFile", &m.AzureFile) delete(rawMsg, key) - case "nfsAzureFile": - err = unpopulate(val, "NfsAzureFile", &m.NfsAzureFile) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -7712,33 +5770,6 @@ func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MetricsConfiguration. -func (m MetricsConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "destinations", m.Destinations) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricsConfiguration. -func (m *MetricsConfiguration) UnmarshalJSON(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 "destinations": - err = unpopulate(val, "Destinations", &m.Destinations) - 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 Mtls. func (m Mtls) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -7766,41 +5797,6 @@ func (m *Mtls) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type NfsAzureFileProperties. -func (n NfsAzureFileProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "accessMode", n.AccessMode) - populate(objectMap, "server", n.Server) - populate(objectMap, "shareName", n.ShareName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NfsAzureFileProperties. -func (n *NfsAzureFileProperties) UnmarshalJSON(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 "server": - err = unpopulate(val, "Server", &n.Server) - delete(rawMsg, key) - case "shareName": - err = unpopulate(val, "ShareName", &n.ShareName) - 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 Nonce. func (n Nonce) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -7972,45 +5968,6 @@ func (o *OpenIDConnectRegistration) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type OpenTelemetryConfiguration. -func (o OpenTelemetryConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "destinationsConfiguration", o.DestinationsConfiguration) - populate(objectMap, "logsConfiguration", o.LogsConfiguration) - populate(objectMap, "metricsConfiguration", o.MetricsConfiguration) - populate(objectMap, "tracesConfiguration", o.TracesConfiguration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OpenTelemetryConfiguration. -func (o *OpenTelemetryConfiguration) UnmarshalJSON(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 "destinationsConfiguration": - err = unpopulate(val, "DestinationsConfiguration", &o.DestinationsConfiguration) - delete(rawMsg, key) - case "logsConfiguration": - err = unpopulate(val, "LogsConfiguration", &o.LogsConfiguration) - delete(rawMsg, key) - case "metricsConfiguration": - err = unpopulate(val, "MetricsConfiguration", &o.MetricsConfiguration) - delete(rawMsg, key) - case "tracesConfiguration": - err = unpopulate(val, "TracesConfiguration", &o.TracesConfiguration) - 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 OperationDetail. func (o OperationDetail) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -8089,80 +6046,6 @@ func (o *OperationDisplay) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type OtlpConfiguration. -func (o OtlpConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "endpoint", o.Endpoint) - populate(objectMap, "headers", o.Headers) - populate(objectMap, "insecure", o.Insecure) - populate(objectMap, "name", o.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OtlpConfiguration. -func (o *OtlpConfiguration) UnmarshalJSON(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 "endpoint": - err = unpopulate(val, "Endpoint", &o.Endpoint) - delete(rawMsg, key) - case "headers": - err = unpopulate(val, "Headers", &o.Headers) - delete(rawMsg, key) - case "insecure": - err = unpopulate(val, "Insecure", &o.Insecure) - 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 PreBuildStep. -func (p PreBuildStep) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", p.Description) - populate(objectMap, "httpGet", p.HTTPGet) - populate(objectMap, "scripts", p.Scripts) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PreBuildStep. -func (p *PreBuildStep) UnmarshalJSON(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 "httpGet": - err = unpopulate(val, "HTTPGet", &p.HTTPGet) - delete(rawMsg, key) - case "scripts": - err = unpopulate(val, "Scripts", &p.Scripts) - 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) @@ -8899,8 +6782,6 @@ func (s *Service) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceBind. func (s ServiceBind) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientType", s.ClientType) - populate(objectMap, "customizedKeys", s.CustomizedKeys) populate(objectMap, "name", s.Name) populate(objectMap, "serviceId", s.ServiceID) return json.Marshal(objectMap) @@ -8915,12 +6796,6 @@ func (s *ServiceBind) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "clientType": - err = unpopulate(val, "ClientType", &s.ClientType) - delete(rawMsg, key) - case "customizedKeys": - err = unpopulate(val, "CustomizedKeys", &s.CustomizedKeys) - delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) @@ -9095,60 +6970,6 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TCPConnectionPool. -func (t TCPConnectionPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "maxConnections", t.MaxConnections) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TCPConnectionPool. -func (t *TCPConnectionPool) UnmarshalJSON(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 "maxConnections": - err = unpopulate(val, "MaxConnections", &t.MaxConnections) - 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 TCPRetryPolicy. -func (t TCPRetryPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "maxConnectAttempts", t.MaxConnectAttempts) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TCPRetryPolicy. -func (t *TCPRetryPolicy) UnmarshalJSON(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 "maxConnectAttempts": - err = unpopulate(val, "MaxConnectAttempts", &t.MaxConnectAttempts) - 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 TCPScaleRule. func (t TCPScaleRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -9231,37 +7052,6 @@ func (t *Template) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TimeoutPolicy. -func (t TimeoutPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "connectionTimeoutInSeconds", t.ConnectionTimeoutInSeconds) - populate(objectMap, "responseTimeoutInSeconds", t.ResponseTimeoutInSeconds) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TimeoutPolicy. -func (t *TimeoutPolicy) UnmarshalJSON(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 "connectionTimeoutInSeconds": - err = unpopulate(val, "ConnectionTimeoutInSeconds", &t.ConnectionTimeoutInSeconds) - delete(rawMsg, key) - case "responseTimeoutInSeconds": - err = unpopulate(val, "ResponseTimeoutInSeconds", &t.ResponseTimeoutInSeconds) - 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 TokenStore. func (t TokenStore) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -9297,33 +7087,6 @@ func (t *TokenStore) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TracesConfiguration. -func (t TracesConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "destinations", t.Destinations) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TracesConfiguration. -func (t *TracesConfiguration) UnmarshalJSON(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 "destinations": - err = unpopulate(val, "Destinations", &t.Destinations) - 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) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/namespaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/namespaces_client.go index a6536750..fff8f0a4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/namespaces_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/namespaces_client.go @@ -28,7 +28,7 @@ type NamespacesClient struct { } // NewNamespacesClient creates a new instance of NamespacesClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewNamespacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NamespacesClient, error) { @@ -46,7 +46,7 @@ func NewNamespacesClient(subscriptionID string, credential azcore.TokenCredentia // CheckNameAvailability - Checks if resource name is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - checkNameAvailabilityRequest - The check name availability request. @@ -94,7 +94,7 @@ func (client *NamespacesClient) checkNameAvailabilityCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, checkNameAvailabilityRequest); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/operations_client.go index f89a1409..eafeab12 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/operations_client.go @@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available RP operations. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-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-11-02-preview") + reqQP.Set("api-version", "2024-03-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/appcontainers/armappcontainers/v3/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/options.go index e253c702..0ef6af64 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/options.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/options.go @@ -8,31 +8,6 @@ package armappcontainers -// AppResiliencyClientCreateOrUpdateOptions contains the optional parameters for the AppResiliencyClient.CreateOrUpdate method. -type AppResiliencyClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AppResiliencyClientDeleteOptions contains the optional parameters for the AppResiliencyClient.Delete method. -type AppResiliencyClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// AppResiliencyClientGetOptions contains the optional parameters for the AppResiliencyClient.Get method. -type AppResiliencyClientGetOptions struct { - // placeholder for future optional parameters -} - -// AppResiliencyClientListOptions contains the optional parameters for the AppResiliencyClient.NewListPager method. -type AppResiliencyClientListOptions struct { - // placeholder for future optional parameters -} - -// AppResiliencyClientUpdateOptions contains the optional parameters for the AppResiliencyClient.Update method. -type AppResiliencyClientUpdateOptions struct { - // placeholder for future optional parameters -} - // AvailableWorkloadProfilesClientGetOptions contains the optional parameters for the AvailableWorkloadProfilesClient.NewGetPager // method. type AvailableWorkloadProfilesClientGetOptions struct { @@ -44,69 +19,6 @@ type BillingMetersClientGetOptions struct { // placeholder for future optional parameters } -// BuildAuthTokenClientListOptions contains the optional parameters for the BuildAuthTokenClient.List method. -type BuildAuthTokenClientListOptions struct { - // placeholder for future optional parameters -} - -// BuildersClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildersClient.BeginCreateOrUpdate method. -type BuildersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BuildersClientBeginDeleteOptions contains the optional parameters for the BuildersClient.BeginDelete method. -type BuildersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BuildersClientBeginUpdateOptions contains the optional parameters for the BuildersClient.BeginUpdate method. -type BuildersClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BuildersClientGetOptions contains the optional parameters for the BuildersClient.Get method. -type BuildersClientGetOptions struct { - // placeholder for future optional parameters -} - -// BuildersClientListByResourceGroupOptions contains the optional parameters for the BuildersClient.NewListByResourceGroupPager -// method. -type BuildersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// BuildersClientListBySubscriptionOptions contains the optional parameters for the BuildersClient.NewListBySubscriptionPager -// method. -type BuildersClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// BuildsByBuilderResourceClientListOptions contains the optional parameters for the BuildsByBuilderResourceClient.NewListPager -// method. -type BuildsByBuilderResourceClientListOptions struct { - // placeholder for future optional parameters -} - -// BuildsClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildsClient.BeginCreateOrUpdate method. -type BuildsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BuildsClientBeginDeleteOptions contains the optional parameters for the BuildsClient.BeginDelete method. -type BuildsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BuildsClientGetOptions contains the optional parameters for the BuildsClient.Get method. -type BuildsClientGetOptions struct { - // placeholder for future optional parameters -} - // CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate method. type CertificatesClientCreateOrUpdateOptions struct { // Certificate to be created or updated @@ -460,30 +372,6 @@ type ContainerAppsSourceControlsClientListByContainerAppOptions struct { // placeholder for future optional parameters } -// DaprComponentResiliencyPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DaprComponentResiliencyPoliciesClient.CreateOrUpdate -// method. -type DaprComponentResiliencyPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// DaprComponentResiliencyPoliciesClientDeleteOptions contains the optional parameters for the DaprComponentResiliencyPoliciesClient.Delete -// method. -type DaprComponentResiliencyPoliciesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DaprComponentResiliencyPoliciesClientGetOptions contains the optional parameters for the DaprComponentResiliencyPoliciesClient.Get -// method. -type DaprComponentResiliencyPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// DaprComponentResiliencyPoliciesClientListOptions contains the optional parameters for the DaprComponentResiliencyPoliciesClient.NewListPager -// method. -type DaprComponentResiliencyPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - // DaprComponentsClientCreateOrUpdateOptions contains the optional parameters for the DaprComponentsClient.CreateOrUpdate // method. type DaprComponentsClientCreateOrUpdateOptions struct { @@ -510,85 +398,6 @@ type DaprComponentsClientListSecretsOptions struct { // placeholder for future optional parameters } -// DaprSubscriptionsClientCreateOrUpdateOptions contains the optional parameters for the DaprSubscriptionsClient.CreateOrUpdate -// method. -type DaprSubscriptionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// DaprSubscriptionsClientDeleteOptions contains the optional parameters for the DaprSubscriptionsClient.Delete method. -type DaprSubscriptionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DaprSubscriptionsClientGetOptions contains the optional parameters for the DaprSubscriptionsClient.Get method. -type DaprSubscriptionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DaprSubscriptionsClientListOptions contains the optional parameters for the DaprSubscriptionsClient.NewListPager method. -type DaprSubscriptionsClientListOptions struct { - // placeholder for future optional parameters -} - -// DotNetComponentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DotNetComponentsClient.BeginCreateOrUpdate -// method. -type DotNetComponentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DotNetComponentsClientBeginDeleteOptions contains the optional parameters for the DotNetComponentsClient.BeginDelete method. -type DotNetComponentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DotNetComponentsClientBeginUpdateOptions contains the optional parameters for the DotNetComponentsClient.BeginUpdate method. -type DotNetComponentsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DotNetComponentsClientGetOptions contains the optional parameters for the DotNetComponentsClient.Get method. -type DotNetComponentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DotNetComponentsClientListOptions contains the optional parameters for the DotNetComponentsClient.NewListPager method. -type DotNetComponentsClientListOptions struct { - // placeholder for future optional parameters -} - -// JavaComponentsClientBeginCreateOrUpdateOptions contains the optional parameters for the JavaComponentsClient.BeginCreateOrUpdate -// method. -type JavaComponentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// JavaComponentsClientBeginDeleteOptions contains the optional parameters for the JavaComponentsClient.BeginDelete method. -type JavaComponentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// JavaComponentsClientBeginUpdateOptions contains the optional parameters for the JavaComponentsClient.BeginUpdate method. -type JavaComponentsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// JavaComponentsClientGetOptions contains the optional parameters for the JavaComponentsClient.Get method. -type JavaComponentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// JavaComponentsClientListOptions contains the optional parameters for the JavaComponentsClient.NewListPager method. -type JavaComponentsClientListOptions struct { - // placeholder for future optional parameters -} - // JobsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobsClient.BeginCreateOrUpdate method. type JobsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. @@ -649,7 +458,7 @@ type JobsClientListBySubscriptionOptions struct { // placeholder for future optional parameters } -// JobsClientListDetectorsOptions contains the optional parameters for the JobsClient.ListDetectors method. +// JobsClientListDetectorsOptions contains the optional parameters for the JobsClient.NewListDetectorsPager method. type JobsClientListDetectorsOptions struct { // placeholder for future optional parameters } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/responses.go index cb1d443a..c15629c1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/responses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/responses.go @@ -8,35 +8,6 @@ package armappcontainers -// AppResiliencyClientCreateOrUpdateResponse contains the response from method AppResiliencyClient.CreateOrUpdate. -type AppResiliencyClientCreateOrUpdateResponse struct { - // Configuration to setup App Resiliency - AppResiliency -} - -// AppResiliencyClientDeleteResponse contains the response from method AppResiliencyClient.Delete. -type AppResiliencyClientDeleteResponse struct { - // placeholder for future response values -} - -// AppResiliencyClientGetResponse contains the response from method AppResiliencyClient.Get. -type AppResiliencyClientGetResponse struct { - // Configuration to setup App Resiliency - AppResiliency -} - -// AppResiliencyClientListResponse contains the response from method AppResiliencyClient.NewListPager. -type AppResiliencyClientListResponse struct { - // Collection of AppResiliency policies - AppResiliencyCollection -} - -// AppResiliencyClientUpdateResponse contains the response from method AppResiliencyClient.Update. -type AppResiliencyClientUpdateResponse struct { - // Configuration to setup App Resiliency - AppResiliency -} - // AvailableWorkloadProfilesClientGetResponse contains the response from method AvailableWorkloadProfilesClient.NewGetPager. type AvailableWorkloadProfilesClientGetResponse struct { // Collection of available workload profiles in the location. @@ -49,70 +20,6 @@ type BillingMetersClientGetResponse struct { BillingMeterCollection } -// BuildAuthTokenClientListResponse contains the response from method BuildAuthTokenClient.List. -type BuildAuthTokenClientListResponse struct { - // Build Auth Token. - BuildToken -} - -// BuildersClientCreateOrUpdateResponse contains the response from method BuildersClient.BeginCreateOrUpdate. -type BuildersClientCreateOrUpdateResponse struct { - // Information about the SourceToCloud builder resource. - BuilderResource -} - -// BuildersClientDeleteResponse contains the response from method BuildersClient.BeginDelete. -type BuildersClientDeleteResponse struct { - // placeholder for future response values -} - -// BuildersClientGetResponse contains the response from method BuildersClient.Get. -type BuildersClientGetResponse struct { - // Information about the SourceToCloud builder resource. - BuilderResource -} - -// BuildersClientListByResourceGroupResponse contains the response from method BuildersClient.NewListByResourceGroupPager. -type BuildersClientListByResourceGroupResponse struct { - // The response of a BuilderResource list operation. - BuilderCollection -} - -// BuildersClientListBySubscriptionResponse contains the response from method BuildersClient.NewListBySubscriptionPager. -type BuildersClientListBySubscriptionResponse struct { - // The response of a BuilderResource list operation. - BuilderCollection -} - -// BuildersClientUpdateResponse contains the response from method BuildersClient.BeginUpdate. -type BuildersClientUpdateResponse struct { - // Information about the SourceToCloud builder resource. - BuilderResource -} - -// BuildsByBuilderResourceClientListResponse contains the response from method BuildsByBuilderResourceClient.NewListPager. -type BuildsByBuilderResourceClientListResponse struct { - // The response of a BuildResource list operation. - BuildCollection -} - -// BuildsClientCreateOrUpdateResponse contains the response from method BuildsClient.BeginCreateOrUpdate. -type BuildsClientCreateOrUpdateResponse struct { - // Information pertaining to an individual build. - BuildResource -} - -// BuildsClientDeleteResponse contains the response from method BuildsClient.BeginDelete. -type BuildsClientDeleteResponse struct { - // placeholder for future response values -} - -// BuildsClientGetResponse contains the response from method BuildsClient.Get. -type BuildsClientGetResponse struct { - // Information pertaining to an individual build. - BuildResource -} - // CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.CreateOrUpdate. type CertificatesClientCreateOrUpdateResponse struct { // Certificate used for Custom Domain bindings of Container Apps in a Managed Environment @@ -456,29 +363,6 @@ type ContainerAppsSourceControlsClientListByContainerAppResponse struct { SourceControlCollection } -// DaprComponentResiliencyPoliciesClientCreateOrUpdateResponse contains the response from method DaprComponentResiliencyPoliciesClient.CreateOrUpdate. -type DaprComponentResiliencyPoliciesClientCreateOrUpdateResponse struct { - // Dapr Component Resiliency Policy. - DaprComponentResiliencyPolicy -} - -// DaprComponentResiliencyPoliciesClientDeleteResponse contains the response from method DaprComponentResiliencyPoliciesClient.Delete. -type DaprComponentResiliencyPoliciesClientDeleteResponse struct { - // placeholder for future response values -} - -// DaprComponentResiliencyPoliciesClientGetResponse contains the response from method DaprComponentResiliencyPoliciesClient.Get. -type DaprComponentResiliencyPoliciesClientGetResponse struct { - // Dapr Component Resiliency Policy. - DaprComponentResiliencyPolicy -} - -// DaprComponentResiliencyPoliciesClientListResponse contains the response from method DaprComponentResiliencyPoliciesClient.NewListPager. -type DaprComponentResiliencyPoliciesClientListResponse struct { - // Dapr Component Resiliency Policies ARM resource. - DaprComponentResiliencyPoliciesCollection -} - // DaprComponentsClientCreateOrUpdateResponse contains the response from method DaprComponentsClient.CreateOrUpdate. type DaprComponentsClientCreateOrUpdateResponse struct { // Dapr Component. @@ -508,87 +392,6 @@ type DaprComponentsClientListSecretsResponse struct { DaprSecretsCollection } -// DaprSubscriptionsClientCreateOrUpdateResponse contains the response from method DaprSubscriptionsClient.CreateOrUpdate. -type DaprSubscriptionsClientCreateOrUpdateResponse struct { - // Dapr PubSub Event Subscription. - DaprSubscription -} - -// DaprSubscriptionsClientDeleteResponse contains the response from method DaprSubscriptionsClient.Delete. -type DaprSubscriptionsClientDeleteResponse struct { - // placeholder for future response values -} - -// DaprSubscriptionsClientGetResponse contains the response from method DaprSubscriptionsClient.Get. -type DaprSubscriptionsClientGetResponse struct { - // Dapr PubSub Event Subscription. - DaprSubscription -} - -// DaprSubscriptionsClientListResponse contains the response from method DaprSubscriptionsClient.NewListPager. -type DaprSubscriptionsClientListResponse struct { - // Dapr Subscriptions ARM resource. - DaprSubscriptionsCollection -} - -// DotNetComponentsClientCreateOrUpdateResponse contains the response from method DotNetComponentsClient.BeginCreateOrUpdate. -type DotNetComponentsClientCreateOrUpdateResponse struct { - // .NET Component. - DotNetComponent -} - -// DotNetComponentsClientDeleteResponse contains the response from method DotNetComponentsClient.BeginDelete. -type DotNetComponentsClientDeleteResponse struct { - // placeholder for future response values -} - -// DotNetComponentsClientGetResponse contains the response from method DotNetComponentsClient.Get. -type DotNetComponentsClientGetResponse struct { - // .NET Component. - DotNetComponent -} - -// DotNetComponentsClientListResponse contains the response from method DotNetComponentsClient.NewListPager. -type DotNetComponentsClientListResponse struct { - // .NET Components ARM resource. - DotNetComponentsCollection -} - -// DotNetComponentsClientUpdateResponse contains the response from method DotNetComponentsClient.BeginUpdate. -type DotNetComponentsClientUpdateResponse struct { - // .NET Component. - DotNetComponent -} - -// JavaComponentsClientCreateOrUpdateResponse contains the response from method JavaComponentsClient.BeginCreateOrUpdate. -type JavaComponentsClientCreateOrUpdateResponse struct { - // Java Component. - JavaComponent -} - -// JavaComponentsClientDeleteResponse contains the response from method JavaComponentsClient.BeginDelete. -type JavaComponentsClientDeleteResponse struct { - // placeholder for future response values -} - -// JavaComponentsClientGetResponse contains the response from method JavaComponentsClient.Get. -type JavaComponentsClientGetResponse struct { - // Java Component. - JavaComponent -} - -// JavaComponentsClientListResponse contains the response from method JavaComponentsClient.NewListPager. -type JavaComponentsClientListResponse struct { - // Java Components ARM resource. - JavaComponentsCollection -} - -// JavaComponentsClientUpdateResponse contains the response from method JavaComponentsClient.BeginUpdate. -type JavaComponentsClientUpdateResponse struct { - // Java Component. - JavaComponent -} - // JobsClientCreateOrUpdateResponse contains the response from method JobsClient.BeginCreateOrUpdate. type JobsClientCreateOrUpdateResponse struct { // Container App Job @@ -624,7 +427,7 @@ type JobsClientListBySubscriptionResponse struct { JobsCollection } -// JobsClientListDetectorsResponse contains the response from method JobsClient.ListDetectors. +// JobsClientListDetectorsResponse contains the response from method JobsClient.NewListDetectorsPager. type JobsClientListDetectorsResponse struct { // Diagnostics data collection for a resource. DiagnosticsCollection diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/usages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/usages_client.go index 19505aaf..cd4392d5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/usages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/usages_client.go @@ -28,7 +28,7 @@ type UsagesClient struct { } // NewUsagesClient creates a new instance of UsagesClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - 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 NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error) { @@ -46,7 +46,7 @@ func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, o // NewListPager - Gets, for the specified location, the current resource usage information as well as the limits under the // subscription. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-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] { @@ -88,7 +88,7 @@ func (client *UsagesClient) listCreateRequest(ctx context.Context, location stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-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/applicationinsights/armapplicationinsights/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/CHANGELOG.md index 591377c0..7f7fcb35 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/CHANGELOG.md @@ -1,5 +1,11 @@ # 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/README.md index a67c536a..ad86e915 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewAPIKeysClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/analyticsitems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/analyticsitems_client.go index e87cdac2..0ba295da 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/analyticsitems_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/analyticsitems_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -34,7 +33,7 @@ type AnalyticsItemsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAnalyticsItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AnalyticsItemsClient, error) { - cl, err := arm.NewClient(moduleName+".AnalyticsItemsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,16 +54,22 @@ func NewAnalyticsItemsClient(subscriptionID string, credential azcore.TokenCrede // to the Application Insights component. // - options - AnalyticsItemsClientDeleteOptions contains the optional parameters for the AnalyticsItemsClient.Delete method. func (client *AnalyticsItemsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, options *AnalyticsItemsClientDeleteOptions) (AnalyticsItemsClientDeleteResponse, error) { + var err error + const operationName = "AnalyticsItemsClient.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, resourceName, scopePath, options) if err != nil { return AnalyticsItemsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AnalyticsItemsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AnalyticsItemsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AnalyticsItemsClientDeleteResponse{}, err } return AnalyticsItemsClientDeleteResponse{}, nil } @@ -114,18 +119,25 @@ func (client *AnalyticsItemsClient) deleteCreateRequest(ctx context.Context, res // to the Application Insights component. // - options - AnalyticsItemsClientGetOptions contains the optional parameters for the AnalyticsItemsClient.Get method. func (client *AnalyticsItemsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, options *AnalyticsItemsClientGetOptions) (AnalyticsItemsClientGetResponse, error) { + var err error + const operationName = "AnalyticsItemsClient.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, resourceName, scopePath, options) if err != nil { return AnalyticsItemsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AnalyticsItemsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AnalyticsItemsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AnalyticsItemsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -183,18 +195,25 @@ func (client *AnalyticsItemsClient) getHandleResponse(resp *http.Response) (Anal // to the Application Insights component. // - options - AnalyticsItemsClientListOptions contains the optional parameters for the AnalyticsItemsClient.List method. func (client *AnalyticsItemsClient) List(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, options *AnalyticsItemsClientListOptions) (AnalyticsItemsClientListResponse, error) { + var err error + const operationName = "AnalyticsItemsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, scopePath, options) if err != nil { return AnalyticsItemsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AnalyticsItemsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AnalyticsItemsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AnalyticsItemsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -256,18 +275,25 @@ func (client *AnalyticsItemsClient) listHandleResponse(resp *http.Response) (Ana // - itemProperties - Properties that need to be specified to create a new item and add it to an Application Insights component. // - options - AnalyticsItemsClientPutOptions contains the optional parameters for the AnalyticsItemsClient.Put method. func (client *AnalyticsItemsClient) Put(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, itemProperties ComponentAnalyticsItem, options *AnalyticsItemsClientPutOptions) (AnalyticsItemsClientPutResponse, error) { + var err error + const operationName = "AnalyticsItemsClient.Put" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.putCreateRequest(ctx, resourceGroupName, resourceName, scopePath, itemProperties, options) if err != nil { return AnalyticsItemsClientPutResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AnalyticsItemsClientPutResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AnalyticsItemsClientPutResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AnalyticsItemsClientPutResponse{}, err } - return client.putHandleResponse(resp) + resp, err := client.putHandleResponse(httpResp) + return resp, err } // putCreateRequest creates the Put request. @@ -300,7 +326,10 @@ func (client *AnalyticsItemsClient) putCreateRequest(ctx context.Context, resour } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, itemProperties) + if err := runtime.MarshalAsJSON(req, itemProperties); err != nil { + return nil, err + } + return req, nil } // putHandleResponse handles the Put response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/annotations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/annotations_client.go index ea158b86..244dec4c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/annotations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/annotations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -33,7 +32,7 @@ type AnnotationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAnnotationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AnnotationsClient, error) { - cl, err := arm.NewClient(moduleName+".AnnotationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewAnnotationsClient(subscriptionID string, credential azcore.TokenCredenti // - annotationProperties - Properties that need to be specified to create an annotation of a Application Insights component. // - options - AnnotationsClientCreateOptions contains the optional parameters for the AnnotationsClient.Create method. func (client *AnnotationsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, annotationProperties Annotation, options *AnnotationsClientCreateOptions) (AnnotationsClientCreateResponse, error) { + var err error + const operationName = "AnnotationsClient.Create" + 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, resourceName, annotationProperties, options) if err != nil { return AnnotationsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AnnotationsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AnnotationsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AnnotationsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -90,7 +96,10 @@ func (client *AnnotationsClient) createCreateRequest(ctx context.Context, resour reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, annotationProperties) + if err := runtime.MarshalAsJSON(req, annotationProperties); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -111,16 +120,22 @@ func (client *AnnotationsClient) createHandleResponse(resp *http.Response) (Anno // - annotationID - The unique annotation ID. This is unique within a Application Insights component. // - options - AnnotationsClientDeleteOptions contains the optional parameters for the AnnotationsClient.Delete method. func (client *AnnotationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, annotationID string, options *AnnotationsClientDeleteOptions) (AnnotationsClientDeleteResponse, error) { + var err error + const operationName = "AnnotationsClient.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, resourceName, annotationID, options) if err != nil { return AnnotationsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AnnotationsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AnnotationsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AnnotationsClientDeleteResponse{}, err } return AnnotationsClientDeleteResponse{}, nil } @@ -163,18 +178,25 @@ func (client *AnnotationsClient) deleteCreateRequest(ctx context.Context, resour // - annotationID - The unique annotation ID. This is unique within a Application Insights component. // - options - AnnotationsClientGetOptions contains the optional parameters for the AnnotationsClient.Get method. func (client *AnnotationsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, annotationID string, options *AnnotationsClientGetOptions) (AnnotationsClientGetResponse, error) { + var err error + const operationName = "AnnotationsClient.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, resourceName, annotationID, options) if err != nil { return AnnotationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AnnotationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AnnotationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AnnotationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -230,6 +252,7 @@ func (client *AnnotationsClient) NewListPager(resourceGroupName string, resource return false }, Fetcher: func(ctx context.Context, page *AnnotationsClientListResponse) (AnnotationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AnnotationsClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, start, end, options) if err != nil { return AnnotationsClientListResponse{}, err @@ -243,6 +266,7 @@ func (client *AnnotationsClient) NewListPager(resourceGroupName string, resource } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/apikeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/apikeys_client.go index be17d5d6..e604ef25 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/apikeys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/apikeys_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -33,7 +32,7 @@ type APIKeysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPIKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIKeysClient, error) { - cl, err := arm.NewClient(moduleName+".APIKeysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewAPIKeysClient(subscriptionID string, credential azcore.TokenCredential, // - apiKeyProperties - Properties that need to be specified to create an API key of a Application Insights component. // - options - APIKeysClientCreateOptions contains the optional parameters for the APIKeysClient.Create method. func (client *APIKeysClient) Create(ctx context.Context, resourceGroupName string, resourceName string, apiKeyProperties APIKeyRequest, options *APIKeysClientCreateOptions) (APIKeysClientCreateResponse, error) { + var err error + const operationName = "APIKeysClient.Create" + 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, resourceName, apiKeyProperties, options) if err != nil { return APIKeysClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIKeysClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIKeysClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIKeysClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -90,7 +96,10 @@ func (client *APIKeysClient) createCreateRequest(ctx context.Context, resourceGr reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, apiKeyProperties) + if err := runtime.MarshalAsJSON(req, apiKeyProperties); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -111,18 +120,25 @@ func (client *APIKeysClient) createHandleResponse(resp *http.Response) (APIKeysC // - keyID - The API Key ID. This is unique within a Application Insights component. // - options - APIKeysClientDeleteOptions contains the optional parameters for the APIKeysClient.Delete method. func (client *APIKeysClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, keyID string, options *APIKeysClientDeleteOptions) (APIKeysClientDeleteResponse, error) { + var err error + const operationName = "APIKeysClient.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, resourceName, keyID, options) if err != nil { return APIKeysClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIKeysClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIKeysClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIKeysClientDeleteResponse{}, err } - return client.deleteHandleResponse(resp) + resp, err := client.deleteHandleResponse(httpResp) + return resp, err } // deleteCreateRequest creates the Delete request. @@ -173,18 +189,25 @@ func (client *APIKeysClient) deleteHandleResponse(resp *http.Response) (APIKeysC // - keyID - The API Key ID. This is unique within a Application Insights component. // - options - APIKeysClientGetOptions contains the optional parameters for the APIKeysClient.Get method. func (client *APIKeysClient) Get(ctx context.Context, resourceGroupName string, resourceName string, keyID string, options *APIKeysClientGetOptions) (APIKeysClientGetResponse, error) { + var err error + const operationName = "APIKeysClient.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, resourceName, keyID, options) if err != nil { return APIKeysClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIKeysClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIKeysClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIKeysClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -238,6 +261,7 @@ func (client *APIKeysClient) NewListPager(resourceGroupName string, resourceName return false }, Fetcher: func(ctx context.Context, page *APIKeysClientListResponse) (APIKeysClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIKeysClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return APIKeysClientListResponse{}, err @@ -251,6 +275,7 @@ func (client *APIKeysClient) NewListPager(resourceGroupName string, resourceName } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/autorest.md index 13ffcfc3..6f7e968e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/autorest.md @@ -8,6 +8,6 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/applicationinsights/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 +module-version: 1.2.0 tag: package-2020-02-02 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/client_factory.go index f484711f..f425f591 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -28,7 +27,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,82 +37,98 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewAnnotationsClient() *AnnotationsClient { - subClient, _ := NewAnnotationsClient(c.subscriptionID, c.credential, c.options) +// NewAPIKeysClient creates a new instance of APIKeysClient. +func (c *ClientFactory) NewAPIKeysClient() *APIKeysClient { + subClient, _ := NewAPIKeysClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewAPIKeysClient() *APIKeysClient { - subClient, _ := NewAPIKeysClient(c.subscriptionID, c.credential, c.options) +// NewAnalyticsItemsClient creates a new instance of AnalyticsItemsClient. +func (c *ClientFactory) NewAnalyticsItemsClient() *AnalyticsItemsClient { + subClient, _ := NewAnalyticsItemsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewExportConfigurationsClient() *ExportConfigurationsClient { - subClient, _ := NewExportConfigurationsClient(c.subscriptionID, c.credential, c.options) +// NewAnnotationsClient creates a new instance of AnnotationsClient. +func (c *ClientFactory) NewAnnotationsClient() *AnnotationsClient { + subClient, _ := NewAnnotationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewComponentCurrentBillingFeaturesClient() *ComponentCurrentBillingFeaturesClient { - subClient, _ := NewComponentCurrentBillingFeaturesClient(c.subscriptionID, c.credential, c.options) +// NewComponentAvailableFeaturesClient creates a new instance of ComponentAvailableFeaturesClient. +func (c *ClientFactory) NewComponentAvailableFeaturesClient() *ComponentAvailableFeaturesClient { + subClient, _ := NewComponentAvailableFeaturesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewComponentQuotaStatusClient() *ComponentQuotaStatusClient { - subClient, _ := NewComponentQuotaStatusClient(c.subscriptionID, c.credential, c.options) +// NewComponentCurrentBillingFeaturesClient creates a new instance of ComponentCurrentBillingFeaturesClient. +func (c *ClientFactory) NewComponentCurrentBillingFeaturesClient() *ComponentCurrentBillingFeaturesClient { + subClient, _ := NewComponentCurrentBillingFeaturesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewComponentFeatureCapabilitiesClient creates a new instance of ComponentFeatureCapabilitiesClient. func (c *ClientFactory) NewComponentFeatureCapabilitiesClient() *ComponentFeatureCapabilitiesClient { subClient, _ := NewComponentFeatureCapabilitiesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewComponentAvailableFeaturesClient() *ComponentAvailableFeaturesClient { - subClient, _ := NewComponentAvailableFeaturesClient(c.subscriptionID, c.credential, c.options) +// NewComponentQuotaStatusClient creates a new instance of ComponentQuotaStatusClient. +func (c *ClientFactory) NewComponentQuotaStatusClient() *ComponentQuotaStatusClient { + subClient, _ := NewComponentQuotaStatusClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewProactiveDetectionConfigurationsClient() *ProactiveDetectionConfigurationsClient { - subClient, _ := NewProactiveDetectionConfigurationsClient(c.subscriptionID, c.credential, c.options) +// NewComponentsClient creates a new instance of ComponentsClient. +func (c *ClientFactory) NewComponentsClient() *ComponentsClient { + subClient, _ := NewComponentsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkItemConfigurationsClient() *WorkItemConfigurationsClient { - subClient, _ := NewWorkItemConfigurationsClient(c.subscriptionID, c.credential, c.options) +// NewExportConfigurationsClient creates a new instance of ExportConfigurationsClient. +func (c *ClientFactory) NewExportConfigurationsClient() *ExportConfigurationsClient { + subClient, _ := NewExportConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewFavoritesClient creates a new instance of FavoritesClient. func (c *ClientFactory) NewFavoritesClient() *FavoritesClient { subClient, _ := NewFavoritesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWebTestLocationsClient() *WebTestLocationsClient { - subClient, _ := NewWebTestLocationsClient(c.subscriptionID, c.credential, c.options) +// NewMyWorkbooksClient creates a new instance of MyWorkbooksClient. +func (c *ClientFactory) NewMyWorkbooksClient() *MyWorkbooksClient { + subClient, _ := NewMyWorkbooksClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWebTestsClient() *WebTestsClient { - subClient, _ := NewWebTestsClient(c.subscriptionID, c.credential, c.options) +// NewProactiveDetectionConfigurationsClient creates a new instance of ProactiveDetectionConfigurationsClient. +func (c *ClientFactory) NewProactiveDetectionConfigurationsClient() *ProactiveDetectionConfigurationsClient { + subClient, _ := NewProactiveDetectionConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewAnalyticsItemsClient() *AnalyticsItemsClient { - subClient, _ := NewAnalyticsItemsClient(c.subscriptionID, c.credential, c.options) +// NewWebTestLocationsClient creates a new instance of WebTestLocationsClient. +func (c *ClientFactory) NewWebTestLocationsClient() *WebTestLocationsClient { + subClient, _ := NewWebTestLocationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkbooksClient() *WorkbooksClient { - subClient, _ := NewWorkbooksClient(c.subscriptionID, c.credential, c.options) +// NewWebTestsClient creates a new instance of WebTestsClient. +func (c *ClientFactory) NewWebTestsClient() *WebTestsClient { + subClient, _ := NewWebTestsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewMyWorkbooksClient() *MyWorkbooksClient { - subClient, _ := NewMyWorkbooksClient(c.subscriptionID, c.credential, c.options) +// NewWorkItemConfigurationsClient creates a new instance of WorkItemConfigurationsClient. +func (c *ClientFactory) NewWorkItemConfigurationsClient() *WorkItemConfigurationsClient { + subClient, _ := NewWorkItemConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewComponentsClient() *ComponentsClient { - subClient, _ := NewComponentsClient(c.subscriptionID, c.credential, c.options) +// NewWorkbooksClient creates a new instance of WorkbooksClient. +func (c *ClientFactory) NewWorkbooksClient() *WorkbooksClient { + subClient, _ := NewWorkbooksClient(c.subscriptionID, c.credential, c.options) return subClient } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentavailablefeatures_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentavailablefeatures_client.go index 93d57b6b..53c0c17e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentavailablefeatures_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentavailablefeatures_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -33,7 +32,7 @@ type ComponentAvailableFeaturesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewComponentAvailableFeaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentAvailableFeaturesClient, error) { - cl, err := arm.NewClient(moduleName+".ComponentAvailableFeaturesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewComponentAvailableFeaturesClient(subscriptionID string, credential azcor // - options - ComponentAvailableFeaturesClientGetOptions contains the optional parameters for the ComponentAvailableFeaturesClient.Get // method. func (client *ComponentAvailableFeaturesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ComponentAvailableFeaturesClientGetOptions) (ComponentAvailableFeaturesClientGetResponse, error) { + var err error + const operationName = "ComponentAvailableFeaturesClient.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, resourceName, options) if err != nil { return ComponentAvailableFeaturesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ComponentAvailableFeaturesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentAvailableFeaturesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ComponentAvailableFeaturesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentcurrentbillingfeatures_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentcurrentbillingfeatures_client.go index 34573fb5..04175380 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentcurrentbillingfeatures_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentcurrentbillingfeatures_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -33,7 +32,7 @@ type ComponentCurrentBillingFeaturesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewComponentCurrentBillingFeaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentCurrentBillingFeaturesClient, error) { - cl, err := arm.NewClient(moduleName+".ComponentCurrentBillingFeaturesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewComponentCurrentBillingFeaturesClient(subscriptionID string, credential // - options - ComponentCurrentBillingFeaturesClientGetOptions contains the optional parameters for the ComponentCurrentBillingFeaturesClient.Get // method. func (client *ComponentCurrentBillingFeaturesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ComponentCurrentBillingFeaturesClientGetOptions) (ComponentCurrentBillingFeaturesClientGetResponse, error) { + var err error + const operationName = "ComponentCurrentBillingFeaturesClient.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, resourceName, options) if err != nil { return ComponentCurrentBillingFeaturesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ComponentCurrentBillingFeaturesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentCurrentBillingFeaturesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ComponentCurrentBillingFeaturesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -113,18 +119,25 @@ func (client *ComponentCurrentBillingFeaturesClient) getHandleResponse(resp *htt // - options - ComponentCurrentBillingFeaturesClientUpdateOptions contains the optional parameters for the ComponentCurrentBillingFeaturesClient.Update // method. func (client *ComponentCurrentBillingFeaturesClient) Update(ctx context.Context, resourceGroupName string, resourceName string, billingFeaturesProperties ComponentBillingFeatures, options *ComponentCurrentBillingFeaturesClientUpdateOptions) (ComponentCurrentBillingFeaturesClientUpdateResponse, error) { + var err error + const operationName = "ComponentCurrentBillingFeaturesClient.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, resourceName, billingFeaturesProperties, options) if err != nil { return ComponentCurrentBillingFeaturesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ComponentCurrentBillingFeaturesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentCurrentBillingFeaturesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ComponentCurrentBillingFeaturesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -150,7 +163,10 @@ func (client *ComponentCurrentBillingFeaturesClient) updateCreateRequest(ctx con reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, billingFeaturesProperties) + if err := runtime.MarshalAsJSON(req, billingFeaturesProperties); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentfeaturecapabilities_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentfeaturecapabilities_client.go index 39e8d2f2..7d1da563 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentfeaturecapabilities_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentfeaturecapabilities_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -33,7 +32,7 @@ type ComponentFeatureCapabilitiesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewComponentFeatureCapabilitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentFeatureCapabilitiesClient, error) { - cl, err := arm.NewClient(moduleName+".ComponentFeatureCapabilitiesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewComponentFeatureCapabilitiesClient(subscriptionID string, credential azc // - options - ComponentFeatureCapabilitiesClientGetOptions contains the optional parameters for the ComponentFeatureCapabilitiesClient.Get // method. func (client *ComponentFeatureCapabilitiesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ComponentFeatureCapabilitiesClientGetOptions) (ComponentFeatureCapabilitiesClientGetResponse, error) { + var err error + const operationName = "ComponentFeatureCapabilitiesClient.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, resourceName, options) if err != nil { return ComponentFeatureCapabilitiesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ComponentFeatureCapabilitiesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentFeatureCapabilitiesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ComponentFeatureCapabilitiesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentquotastatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentquotastatus_client.go index f04ed9ec..ef82ac89 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentquotastatus_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/componentquotastatus_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -33,7 +32,7 @@ type ComponentQuotaStatusClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewComponentQuotaStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentQuotaStatusClient, error) { - cl, err := arm.NewClient(moduleName+".ComponentQuotaStatusClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewComponentQuotaStatusClient(subscriptionID string, credential azcore.Toke // - options - ComponentQuotaStatusClientGetOptions contains the optional parameters for the ComponentQuotaStatusClient.Get // method. func (client *ComponentQuotaStatusClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ComponentQuotaStatusClientGetOptions) (ComponentQuotaStatusClientGetResponse, error) { + var err error + const operationName = "ComponentQuotaStatusClient.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, resourceName, options) if err != nil { return ComponentQuotaStatusClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ComponentQuotaStatusClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentQuotaStatusClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ComponentQuotaStatusClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/components_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/components_client.go index f5b5e09c..8d9e48c8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/components_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/components_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -33,7 +32,7 @@ type ComponentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewComponentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentsClient, error) { - cl, err := arm.NewClient(moduleName+".ComponentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewComponentsClient(subscriptionID string, credential azcore.TokenCredentia // - options - ComponentsClientCreateOrUpdateOptions contains the optional parameters for the ComponentsClient.CreateOrUpdate // method. func (client *ComponentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, insightProperties Component, options *ComponentsClientCreateOrUpdateOptions) (ComponentsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ComponentsClient.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, resourceName, insightProperties, options) if err != nil { return ComponentsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ComponentsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ComponentsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -92,7 +98,10 @@ func (client *ComponentsClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2020-02-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, insightProperties) + if err := runtime.MarshalAsJSON(req, insightProperties); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,16 +121,22 @@ func (client *ComponentsClient) createOrUpdateHandleResponse(resp *http.Response // - resourceName - The name of the Application Insights component resource. // - options - ComponentsClientDeleteOptions contains the optional parameters for the ComponentsClient.Delete method. func (client *ComponentsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, options *ComponentsClientDeleteOptions) (ComponentsClientDeleteResponse, error) { + var err error + const operationName = "ComponentsClient.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, resourceName, options) if err != nil { return ComponentsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ComponentsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ComponentsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ComponentsClientDeleteResponse{}, err } return ComponentsClientDeleteResponse{}, nil } @@ -160,18 +175,25 @@ func (client *ComponentsClient) deleteCreateRequest(ctx context.Context, resourc // - resourceName - The name of the Application Insights component resource. // - options - ComponentsClientGetOptions contains the optional parameters for the ComponentsClient.Get method. func (client *ComponentsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ComponentsClientGetOptions) (ComponentsClientGetResponse, error) { + var err error + const operationName = "ComponentsClient.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, resourceName, options) if err != nil { return ComponentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ComponentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ComponentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -219,18 +241,25 @@ func (client *ComponentsClient) getHandleResponse(resp *http.Response) (Componen // - options - ComponentsClientGetPurgeStatusOptions contains the optional parameters for the ComponentsClient.GetPurgeStatus // method. func (client *ComponentsClient) GetPurgeStatus(ctx context.Context, resourceGroupName string, resourceName string, purgeID string, options *ComponentsClientGetPurgeStatusOptions) (ComponentsClientGetPurgeStatusResponse, error) { + var err error + const operationName = "ComponentsClient.GetPurgeStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPurgeStatusCreateRequest(ctx, resourceGroupName, resourceName, purgeID, options) if err != nil { return ComponentsClientGetPurgeStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ComponentsClientGetPurgeStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentsClientGetPurgeStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ComponentsClientGetPurgeStatusResponse{}, err } - return client.getPurgeStatusHandleResponse(resp) + resp, err := client.getPurgeStatusHandleResponse(httpResp) + return resp, err } // getPurgeStatusCreateRequest creates the GetPurgeStatus request. @@ -282,25 +311,20 @@ func (client *ComponentsClient) NewListPager(options *ComponentsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ComponentsClientListResponse) (ComponentsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ComponentsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ComponentsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 ComponentsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -343,25 +367,20 @@ func (client *ComponentsClient) NewListByResourceGroupPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ComponentsClientListByResourceGroupResponse) (ComponentsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ComponentsClient.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 ComponentsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ComponentsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -409,18 +428,25 @@ func (client *ComponentsClient) listByResourceGroupHandleResponse(resp *http.Res // - body - Describes the body of a request to purge data in a single table of an Application Insights component // - options - ComponentsClientPurgeOptions contains the optional parameters for the ComponentsClient.Purge method. func (client *ComponentsClient) Purge(ctx context.Context, resourceGroupName string, resourceName string, body ComponentPurgeBody, options *ComponentsClientPurgeOptions) (ComponentsClientPurgeResponse, error) { + var err error + const operationName = "ComponentsClient.Purge" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.purgeCreateRequest(ctx, resourceGroupName, resourceName, body, options) if err != nil { return ComponentsClientPurgeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ComponentsClientPurgeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return ComponentsClientPurgeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ComponentsClientPurgeResponse{}, err } - return client.purgeHandleResponse(resp) + resp, err := client.purgeHandleResponse(httpResp) + return resp, err } // purgeCreateRequest creates the Purge request. @@ -446,7 +472,10 @@ func (client *ComponentsClient) purgeCreateRequest(ctx context.Context, resource reqQP.Set("api-version", "2020-02-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil } // purgeHandleResponse handles the Purge response. @@ -467,18 +496,25 @@ func (client *ComponentsClient) purgeHandleResponse(resp *http.Response) (Compon // - componentTags - Updated tag information to set into the component instance. // - options - ComponentsClientUpdateTagsOptions contains the optional parameters for the ComponentsClient.UpdateTags method. func (client *ComponentsClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, componentTags TagsResource, options *ComponentsClientUpdateTagsOptions) (ComponentsClientUpdateTagsResponse, error) { + var err error + const operationName = "ComponentsClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, resourceName, componentTags, options) if err != nil { return ComponentsClientUpdateTagsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ComponentsClientUpdateTagsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ComponentsClientUpdateTagsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ComponentsClientUpdateTagsResponse{}, err } - return client.updateTagsHandleResponse(resp) + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err } // updateTagsCreateRequest creates the UpdateTags request. @@ -504,7 +540,10 @@ func (client *ComponentsClient) updateTagsCreateRequest(ctx context.Context, res reqQP.Set("api-version", "2020-02-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, componentTags) + if err := runtime.MarshalAsJSON(req, componentTags); err != nil { + return nil, err + } + return req, nil } // updateTagsHandleResponse handles the UpdateTags response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/constants.go index 6397cba7..80313269 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights const ( - moduleName = "armapplicationinsights" - moduleVersion = "v1.1.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" + moduleVersion = "v1.2.0" ) // ApplicationType - Type of application being monitored. @@ -269,14 +268,14 @@ func PossibleSharedTypeKindValues() []SharedTypeKind { type WebTestKind string const ( - WebTestKindPing WebTestKind = "ping" WebTestKindMultistep WebTestKind = "multistep" + WebTestKindPing WebTestKind = "ping" ) // PossibleWebTestKindValues returns the possible values for the WebTestKind const type. func PossibleWebTestKindValues() []WebTestKind { return []WebTestKind{ - WebTestKindPing, WebTestKindMultistep, + WebTestKindPing, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/exportconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/exportconfigurations_client.go index 69c92e57..9c614cb0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/exportconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/exportconfigurations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -33,7 +32,7 @@ type ExportConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExportConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExportConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".ExportConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewExportConfigurationsClient(subscriptionID string, credential azcore.Toke // - options - ExportConfigurationsClientCreateOptions contains the optional parameters for the ExportConfigurationsClient.Create // method. func (client *ExportConfigurationsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, exportProperties ComponentExportRequest, options *ExportConfigurationsClientCreateOptions) (ExportConfigurationsClientCreateResponse, error) { + var err error + const operationName = "ExportConfigurationsClient.Create" + 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, resourceName, exportProperties, options) if err != nil { return ExportConfigurationsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExportConfigurationsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExportConfigurationsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExportConfigurationsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -92,7 +98,10 @@ func (client *ExportConfigurationsClient) createCreateRequest(ctx context.Contex reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, exportProperties) + if err := runtime.MarshalAsJSON(req, exportProperties); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -114,18 +123,25 @@ func (client *ExportConfigurationsClient) createHandleResponse(resp *http.Respon // - options - ExportConfigurationsClientDeleteOptions contains the optional parameters for the ExportConfigurationsClient.Delete // method. func (client *ExportConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, exportID string, options *ExportConfigurationsClientDeleteOptions) (ExportConfigurationsClientDeleteResponse, error) { + var err error + const operationName = "ExportConfigurationsClient.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, resourceName, exportID, options) if err != nil { return ExportConfigurationsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExportConfigurationsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExportConfigurationsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExportConfigurationsClientDeleteResponse{}, err } - return client.deleteHandleResponse(resp) + resp, err := client.deleteHandleResponse(httpResp) + return resp, err } // deleteCreateRequest creates the Delete request. @@ -177,18 +193,25 @@ func (client *ExportConfigurationsClient) deleteHandleResponse(resp *http.Respon // - options - ExportConfigurationsClientGetOptions contains the optional parameters for the ExportConfigurationsClient.Get // method. func (client *ExportConfigurationsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, exportID string, options *ExportConfigurationsClientGetOptions) (ExportConfigurationsClientGetResponse, error) { + var err error + const operationName = "ExportConfigurationsClient.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, resourceName, exportID, options) if err != nil { return ExportConfigurationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExportConfigurationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExportConfigurationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExportConfigurationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -239,18 +262,25 @@ func (client *ExportConfigurationsClient) getHandleResponse(resp *http.Response) // - options - ExportConfigurationsClientListOptions contains the optional parameters for the ExportConfigurationsClient.List // method. func (client *ExportConfigurationsClient) List(ctx context.Context, resourceGroupName string, resourceName string, options *ExportConfigurationsClientListOptions) (ExportConfigurationsClientListResponse, error) { + var err error + const operationName = "ExportConfigurationsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return ExportConfigurationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExportConfigurationsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExportConfigurationsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExportConfigurationsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -299,18 +329,25 @@ func (client *ExportConfigurationsClient) listHandleResponse(resp *http.Response // - options - ExportConfigurationsClientUpdateOptions contains the optional parameters for the ExportConfigurationsClient.Update // method. func (client *ExportConfigurationsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, exportID string, exportProperties ComponentExportRequest, options *ExportConfigurationsClientUpdateOptions) (ExportConfigurationsClientUpdateResponse, error) { + var err error + const operationName = "ExportConfigurationsClient.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, resourceName, exportID, exportProperties, options) if err != nil { return ExportConfigurationsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExportConfigurationsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExportConfigurationsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExportConfigurationsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -340,7 +377,10 @@ func (client *ExportConfigurationsClient) updateCreateRequest(ctx context.Contex reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, exportProperties) + if err := runtime.MarshalAsJSON(req, exportProperties); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/favorites_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/favorites_client.go index 184a76b9..ae7ce20c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/favorites_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/favorites_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -34,7 +33,7 @@ type FavoritesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFavoritesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FavoritesClient, error) { - cl, err := arm.NewClient(moduleName+".FavoritesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewFavoritesClient(subscriptionID string, credential azcore.TokenCredential // component. // - options - FavoritesClientAddOptions contains the optional parameters for the FavoritesClient.Add method. func (client *FavoritesClient) Add(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ComponentFavorite, options *FavoritesClientAddOptions) (FavoritesClientAddResponse, error) { + var err error + const operationName = "FavoritesClient.Add" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.addCreateRequest(ctx, resourceGroupName, resourceName, favoriteID, favoriteProperties, options) if err != nil { return FavoritesClientAddResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FavoritesClientAddResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FavoritesClientAddResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FavoritesClientAddResponse{}, err } - return client.addHandleResponse(resp) + resp, err := client.addHandleResponse(httpResp) + return resp, err } // addCreateRequest creates the Add request. @@ -97,7 +103,10 @@ func (client *FavoritesClient) addCreateRequest(ctx context.Context, resourceGro reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, favoriteProperties) + if err := runtime.MarshalAsJSON(req, favoriteProperties); err != nil { + return nil, err + } + return req, nil } // addHandleResponse handles the Add response. @@ -118,16 +127,22 @@ func (client *FavoritesClient) addHandleResponse(resp *http.Response) (Favorites // - favoriteID - The Id of a specific favorite defined in the Application Insights component // - options - FavoritesClientDeleteOptions contains the optional parameters for the FavoritesClient.Delete method. func (client *FavoritesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, options *FavoritesClientDeleteOptions) (FavoritesClientDeleteResponse, error) { + var err error + const operationName = "FavoritesClient.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, resourceName, favoriteID, options) if err != nil { return FavoritesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FavoritesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FavoritesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FavoritesClientDeleteResponse{}, err } return FavoritesClientDeleteResponse{}, nil } @@ -170,18 +185,25 @@ func (client *FavoritesClient) deleteCreateRequest(ctx context.Context, resource // - favoriteID - The Id of a specific favorite defined in the Application Insights component // - options - FavoritesClientGetOptions contains the optional parameters for the FavoritesClient.Get method. func (client *FavoritesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, options *FavoritesClientGetOptions) (FavoritesClientGetResponse, error) { + var err error + const operationName = "FavoritesClient.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, resourceName, favoriteID, options) if err != nil { return FavoritesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FavoritesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FavoritesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FavoritesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -231,18 +253,25 @@ func (client *FavoritesClient) getHandleResponse(resp *http.Response) (Favorites // - resourceName - The name of the Application Insights component resource. // - options - FavoritesClientListOptions contains the optional parameters for the FavoritesClient.List method. func (client *FavoritesClient) List(ctx context.Context, resourceGroupName string, resourceName string, options *FavoritesClientListOptions) (FavoritesClientListResponse, error) { + var err error + const operationName = "FavoritesClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return FavoritesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FavoritesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FavoritesClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FavoritesClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -302,18 +331,25 @@ func (client *FavoritesClient) listHandleResponse(resp *http.Response) (Favorite // - favoriteProperties - Properties that need to be specified to update the existing favorite. // - options - FavoritesClientUpdateOptions contains the optional parameters for the FavoritesClient.Update method. func (client *FavoritesClient) Update(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ComponentFavorite, options *FavoritesClientUpdateOptions) (FavoritesClientUpdateResponse, error) { + var err error + const operationName = "FavoritesClient.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, resourceName, favoriteID, favoriteProperties, options) if err != nil { return FavoritesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FavoritesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FavoritesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FavoritesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -343,7 +379,10 @@ func (client *FavoritesClient) updateCreateRequest(ctx context.Context, resource reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, favoriteProperties) + if err := runtime.MarshalAsJSON(req, favoriteProperties); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/models.go index 9a78e5f6..a4d64790 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -23,59 +22,6 @@ type APIKeyRequest struct { Name *string } -// APIKeysClientCreateOptions contains the optional parameters for the APIKeysClient.Create method. -type APIKeysClientCreateOptions struct { - // placeholder for future optional parameters -} - -// APIKeysClientDeleteOptions contains the optional parameters for the APIKeysClient.Delete method. -type APIKeysClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// APIKeysClientGetOptions contains the optional parameters for the APIKeysClient.Get method. -type APIKeysClientGetOptions struct { - // placeholder for future optional parameters -} - -// APIKeysClientListOptions contains the optional parameters for the APIKeysClient.NewListPager method. -type APIKeysClientListOptions struct { - // placeholder for future optional parameters -} - -// AnalyticsItemsClientDeleteOptions contains the optional parameters for the AnalyticsItemsClient.Delete method. -type AnalyticsItemsClientDeleteOptions struct { - // The Id of a specific item defined in the Application Insights component - ID *string - // The name of a specific item defined in the Application Insights component - Name *string -} - -// AnalyticsItemsClientGetOptions contains the optional parameters for the AnalyticsItemsClient.Get method. -type AnalyticsItemsClientGetOptions struct { - // The Id of a specific item defined in the Application Insights component - ID *string - // The name of a specific item defined in the Application Insights component - Name *string -} - -// AnalyticsItemsClientListOptions contains the optional parameters for the AnalyticsItemsClient.List method. -type AnalyticsItemsClientListOptions struct { - // Flag indicating whether or not to return the content of each applicable item. If false, only return the item information. - IncludeContent *bool - // Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application - // Insights component. - Scope *ItemScope - // Enum indicating the type of the Analytics item. - Type *ItemTypeParameter -} - -// AnalyticsItemsClientPutOptions contains the optional parameters for the AnalyticsItemsClient.Put method. -type AnalyticsItemsClientPutOptions struct { - // Flag indicating whether or not to force save an item. This allows overriding an item if it already exists. - OverrideItem *bool -} - // Annotation associated with an application insights resource. type Annotation struct { // Name of annotation @@ -109,26 +55,6 @@ type AnnotationError struct { Message *string } -// AnnotationsClientCreateOptions contains the optional parameters for the AnnotationsClient.Create method. -type AnnotationsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// AnnotationsClientDeleteOptions contains the optional parameters for the AnnotationsClient.Delete method. -type AnnotationsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// AnnotationsClientGetOptions contains the optional parameters for the AnnotationsClient.Get method. -type AnnotationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AnnotationsClientListOptions contains the optional parameters for the AnnotationsClient.NewListPager method. -type AnnotationsClientListOptions struct { - // placeholder for future optional parameters -} - // AnnotationsListResult - Annotations list result. type AnnotationsListResult struct { // READ-ONLY; An array of annotations. @@ -235,12 +161,6 @@ type ComponentAvailableFeatures struct { Result []*ComponentFeature } -// ComponentAvailableFeaturesClientGetOptions contains the optional parameters for the ComponentAvailableFeaturesClient.Get -// method. -type ComponentAvailableFeaturesClientGetOptions struct { - // placeholder for future optional parameters -} - // ComponentBillingFeatures - An Application Insights component billing features type ComponentBillingFeatures struct { // Current enabled pricing plan. When the component is in the Enterprise plan, this will list both 'Basic' and 'Application @@ -251,18 +171,6 @@ type ComponentBillingFeatures struct { DataVolumeCap *ComponentDataVolumeCap } -// ComponentCurrentBillingFeaturesClientGetOptions contains the optional parameters for the ComponentCurrentBillingFeaturesClient.Get -// method. -type ComponentCurrentBillingFeaturesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ComponentCurrentBillingFeaturesClientUpdateOptions contains the optional parameters for the ComponentCurrentBillingFeaturesClient.Update -// method. -type ComponentCurrentBillingFeaturesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ComponentDataVolumeCap - An Application Insights component daily data volume cap type ComponentDataVolumeCap struct { // Daily data volume cap in GB. @@ -502,12 +410,6 @@ type ComponentFeatureCapabilities struct { WorkItemIntegration *bool } -// ComponentFeatureCapabilitiesClientGetOptions contains the optional parameters for the ComponentFeatureCapabilitiesClient.Get -// method. -type ComponentFeatureCapabilitiesClientGetOptions struct { - // placeholder for future optional parameters -} - // ComponentFeatureCapability - An Application Insights component feature capability type ComponentFeatureCapability struct { // READ-ONLY; The description of the capability. @@ -724,11 +626,6 @@ type ComponentQuotaStatus struct { ShouldBeThrottled *bool } -// ComponentQuotaStatusClientGetOptions contains the optional parameters for the ComponentQuotaStatusClient.Get method. -type ComponentQuotaStatusClientGetOptions struct { - // placeholder for future optional parameters -} - // ComponentWebTestLocation - Properties that define a web test location available to an Application Insights Component. type ComponentWebTestLocation struct { // READ-ONLY; The display name of the web test location. @@ -738,47 +635,6 @@ type ComponentWebTestLocation struct { Tag *string } -// ComponentsClientCreateOrUpdateOptions contains the optional parameters for the ComponentsClient.CreateOrUpdate method. -type ComponentsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ComponentsClientDeleteOptions contains the optional parameters for the ComponentsClient.Delete method. -type ComponentsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ComponentsClientGetOptions contains the optional parameters for the ComponentsClient.Get method. -type ComponentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ComponentsClientGetPurgeStatusOptions contains the optional parameters for the ComponentsClient.GetPurgeStatus method. -type ComponentsClientGetPurgeStatusOptions struct { - // placeholder for future optional parameters -} - -// ComponentsClientListByResourceGroupOptions contains the optional parameters for the ComponentsClient.NewListByResourceGroupPager -// method. -type ComponentsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ComponentsClientListOptions contains the optional parameters for the ComponentsClient.NewListPager method. -type ComponentsClientListOptions struct { - // placeholder for future optional parameters -} - -// ComponentsClientPurgeOptions contains the optional parameters for the ComponentsClient.Purge method. -type ComponentsClientPurgeOptions struct { - // placeholder for future optional parameters -} - -// ComponentsClientUpdateTagsOptions contains the optional parameters for the ComponentsClient.UpdateTags method. -type ComponentsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // ComponentsResource - An azure resource object type ComponentsResource struct { // REQUIRED; Resource location @@ -835,64 +691,6 @@ type ErrorResponseComponentsError struct { Message *string } -// ExportConfigurationsClientCreateOptions contains the optional parameters for the ExportConfigurationsClient.Create method. -type ExportConfigurationsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// ExportConfigurationsClientDeleteOptions contains the optional parameters for the ExportConfigurationsClient.Delete method. -type ExportConfigurationsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ExportConfigurationsClientGetOptions contains the optional parameters for the ExportConfigurationsClient.Get method. -type ExportConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExportConfigurationsClientListOptions contains the optional parameters for the ExportConfigurationsClient.List method. -type ExportConfigurationsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExportConfigurationsClientUpdateOptions contains the optional parameters for the ExportConfigurationsClient.Update method. -type ExportConfigurationsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// FavoritesClientAddOptions contains the optional parameters for the FavoritesClient.Add method. -type FavoritesClientAddOptions struct { - // placeholder for future optional parameters -} - -// FavoritesClientDeleteOptions contains the optional parameters for the FavoritesClient.Delete method. -type FavoritesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// FavoritesClientGetOptions contains the optional parameters for the FavoritesClient.Get method. -type FavoritesClientGetOptions struct { - // placeholder for future optional parameters -} - -// FavoritesClientListOptions contains the optional parameters for the FavoritesClient.List method. -type FavoritesClientListOptions struct { - // Flag indicating whether or not to return the full content for each applicable favorite. If false, only return summary content - // for favorites. - CanFetchContent *bool - // The type of favorite. Value can be either shared or user. - FavoriteType *FavoriteType - // Source type of favorite to return. When left out, the source type defaults to 'other' (not present in this enum). - SourceType *FavoriteSourceType - // Tags that must be present on each favorite returned. - Tags []string -} - -// FavoritesClientUpdateOptions contains the optional parameters for the FavoritesClient.Update method. -type FavoritesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // InnerError - Inner error type InnerError struct { // Provides correlation for request @@ -995,46 +793,6 @@ type MyWorkbookResource struct { Type *string } -// MyWorkbooksClientCreateOrUpdateOptions contains the optional parameters for the MyWorkbooksClient.CreateOrUpdate method. -type MyWorkbooksClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// MyWorkbooksClientDeleteOptions contains the optional parameters for the MyWorkbooksClient.Delete method. -type MyWorkbooksClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// MyWorkbooksClientGetOptions contains the optional parameters for the MyWorkbooksClient.Get method. -type MyWorkbooksClientGetOptions struct { - // placeholder for future optional parameters -} - -// MyWorkbooksClientListByResourceGroupOptions contains the optional parameters for the MyWorkbooksClient.NewListByResourceGroupPager -// method. -type MyWorkbooksClientListByResourceGroupOptions struct { - // Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content - // for workbooks. - CanFetchContent *bool - // Tags presents on each workbook returned. - Tags []string -} - -// MyWorkbooksClientListBySubscriptionOptions contains the optional parameters for the MyWorkbooksClient.NewListBySubscriptionPager -// method. -type MyWorkbooksClientListBySubscriptionOptions struct { - // Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content - // for workbooks. - CanFetchContent *bool - // Tags presents on each workbook returned. - Tags []string -} - -// MyWorkbooksClientUpdateOptions contains the optional parameters for the MyWorkbooksClient.Update method. -type MyWorkbooksClientUpdateOptions struct { - // placeholder for future optional parameters -} - // MyWorkbooksListResult - Workbook list result. type MyWorkbooksListResult struct { // READ-ONLY; An array of private workbooks. @@ -1081,24 +839,6 @@ type PrivateLinkScopedResource struct { ScopeID *string } -// ProactiveDetectionConfigurationsClientGetOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.Get -// method. -type ProactiveDetectionConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProactiveDetectionConfigurationsClientListOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.List -// method. -type ProactiveDetectionConfigurationsClientListOptions struct { - // placeholder for future optional parameters -} - -// ProactiveDetectionConfigurationsClientUpdateOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.Update -// method. -type ProactiveDetectionConfigurationsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // TagsResource - A container holding only the Tags for a resource, allowing the user to update the tags on a WebTest instance. type TagsResource struct { // Resource tags @@ -1146,11 +886,6 @@ type WebTestListResult struct { NextLink *string } -// WebTestLocationsClientListOptions contains the optional parameters for the WebTestLocationsClient.NewListPager method. -type WebTestLocationsClientListOptions struct { - // placeholder for future optional parameters -} - // WebTestLocationsListResult - Describes the list of web test locations available to an Application Insights Component. type WebTestLocationsListResult struct { // REQUIRED; List of web test locations. @@ -1201,42 +936,6 @@ type WebTestPropertiesConfiguration struct { WebTest *string } -// WebTestsClientCreateOrUpdateOptions contains the optional parameters for the WebTestsClient.CreateOrUpdate method. -type WebTestsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WebTestsClientDeleteOptions contains the optional parameters for the WebTestsClient.Delete method. -type WebTestsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// WebTestsClientGetOptions contains the optional parameters for the WebTestsClient.Get method. -type WebTestsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WebTestsClientListByComponentOptions contains the optional parameters for the WebTestsClient.NewListByComponentPager method. -type WebTestsClientListByComponentOptions struct { - // placeholder for future optional parameters -} - -// WebTestsClientListByResourceGroupOptions contains the optional parameters for the WebTestsClient.NewListByResourceGroupPager -// method. -type WebTestsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// WebTestsClientListOptions contains the optional parameters for the WebTestsClient.NewListPager method. -type WebTestsClientListOptions struct { - // placeholder for future optional parameters -} - -// WebTestsClientUpdateTagsOptions contains the optional parameters for the WebTestsClient.UpdateTags method. -type WebTestsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // WebtestsResource - An azure resource object type WebtestsResource struct { // REQUIRED; Resource location @@ -1285,42 +984,6 @@ type WorkItemConfigurationError struct { Message *string } -// WorkItemConfigurationsClientCreateOptions contains the optional parameters for the WorkItemConfigurationsClient.Create -// method. -type WorkItemConfigurationsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// WorkItemConfigurationsClientDeleteOptions contains the optional parameters for the WorkItemConfigurationsClient.Delete -// method. -type WorkItemConfigurationsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// WorkItemConfigurationsClientGetDefaultOptions contains the optional parameters for the WorkItemConfigurationsClient.GetDefault -// method. -type WorkItemConfigurationsClientGetDefaultOptions struct { - // placeholder for future optional parameters -} - -// WorkItemConfigurationsClientGetItemOptions contains the optional parameters for the WorkItemConfigurationsClient.GetItem -// method. -type WorkItemConfigurationsClientGetItemOptions struct { - // placeholder for future optional parameters -} - -// WorkItemConfigurationsClientListOptions contains the optional parameters for the WorkItemConfigurationsClient.NewListPager -// method. -type WorkItemConfigurationsClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkItemConfigurationsClientUpdateItemOptions contains the optional parameters for the WorkItemConfigurationsClient.UpdateItem -// method. -type WorkItemConfigurationsClientUpdateItemOptions struct { - // placeholder for future optional parameters -} - // WorkItemConfigurationsListResult - Work item configuration list result. type WorkItemConfigurationsListResult struct { // READ-ONLY; An array of work item configurations. @@ -1430,36 +1093,6 @@ type WorkbookResource struct { Type *string } -// WorkbooksClientCreateOrUpdateOptions contains the optional parameters for the WorkbooksClient.CreateOrUpdate method. -type WorkbooksClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WorkbooksClientDeleteOptions contains the optional parameters for the WorkbooksClient.Delete method. -type WorkbooksClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// WorkbooksClientGetOptions contains the optional parameters for the WorkbooksClient.Get method. -type WorkbooksClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkbooksClientListByResourceGroupOptions contains the optional parameters for the WorkbooksClient.NewListByResourceGroupPager -// method. -type WorkbooksClientListByResourceGroupOptions struct { - // Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content - // for workbooks. - CanFetchContent *bool - // Tags presents on each workbook returned. - Tags []string -} - -// WorkbooksClientUpdateOptions contains the optional parameters for the WorkbooksClient.Update method. -type WorkbooksClientUpdateOptions struct { - // placeholder for future optional parameters -} - // WorkbooksListResult - Workbook list result. type WorkbooksListResult struct { // READ-ONLY; An array of workbooks. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/models_serde.go index fcf30fea..0eabca16 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -56,7 +55,7 @@ func (a Annotation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "AnnotationName", a.AnnotationName) populate(objectMap, "Category", a.Category) - populateTimeRFC3339(objectMap, "EventTime", a.EventTime) + populateDateTimeRFC3339(objectMap, "EventTime", a.EventTime) populate(objectMap, "Id", a.ID) populate(objectMap, "Properties", a.Properties) populate(objectMap, "RelatedAnnotation", a.RelatedAnnotation) @@ -79,7 +78,7 @@ func (a *Annotation) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Category", &a.Category) delete(rawMsg, key) case "EventTime": - err = unpopulateTimeRFC3339(val, "EventTime", &a.EventTime) + err = unpopulateDateTimeRFC3339(val, "EventTime", &a.EventTime) delete(rawMsg, key) case "Id": err = unpopulate(val, "ID", &a.ID) @@ -1038,7 +1037,7 @@ func (c ComponentProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "ApplicationId", c.ApplicationID) populate(objectMap, "Application_Type", c.ApplicationType) populate(objectMap, "ConnectionString", c.ConnectionString) - populateTimeRFC3339(objectMap, "CreationDate", c.CreationDate) + populateDateTimeRFC3339(objectMap, "CreationDate", c.CreationDate) populate(objectMap, "DisableIpMasking", c.DisableIPMasking) populate(objectMap, "DisableLocalAuth", c.DisableLocalAuth) populate(objectMap, "Flow_Type", c.FlowType) @@ -1048,7 +1047,7 @@ func (c ComponentProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "ImmediatePurgeDataOn30Days", c.ImmediatePurgeDataOn30Days) populate(objectMap, "IngestionMode", c.IngestionMode) populate(objectMap, "InstrumentationKey", c.InstrumentationKey) - populateTimeRFC3339(objectMap, "LaMigrationDate", c.LaMigrationDate) + populateDateTimeRFC3339(objectMap, "LaMigrationDate", c.LaMigrationDate) populate(objectMap, "Name", c.Name) populate(objectMap, "PrivateLinkScopedResources", c.PrivateLinkScopedResources) populate(objectMap, "provisioningState", c.ProvisioningState) @@ -1084,7 +1083,7 @@ func (c *ComponentProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ConnectionString", &c.ConnectionString) delete(rawMsg, key) case "CreationDate": - err = unpopulateTimeRFC3339(val, "CreationDate", &c.CreationDate) + err = unpopulateDateTimeRFC3339(val, "CreationDate", &c.CreationDate) delete(rawMsg, key) case "DisableIpMasking": err = unpopulate(val, "DisableIPMasking", &c.DisableIPMasking) @@ -1114,7 +1113,7 @@ func (c *ComponentProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "InstrumentationKey", &c.InstrumentationKey) delete(rawMsg, key) case "LaMigrationDate": - err = unpopulateTimeRFC3339(val, "LaMigrationDate", &c.LaMigrationDate) + err = unpopulateDateTimeRFC3339(val, "LaMigrationDate", &c.LaMigrationDate) delete(rawMsg, key) case "Name": err = unpopulate(val, "Name", &c.Name) @@ -1515,7 +1514,7 @@ func (e *ErrorResponseComponentsError) UnmarshalJSON(data []byte) error { func (i InnerError) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "diagnosticcontext", i.Diagnosticcontext) - populateTimeRFC3339(objectMap, "time", i.Time) + populateDateTimeRFC3339(objectMap, "time", i.Time) return json.Marshal(objectMap) } @@ -1532,7 +1531,7 @@ func (i *InnerError) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Diagnosticcontext", &i.Diagnosticcontext) delete(rawMsg, key) case "time": - err = unpopulateTimeRFC3339(val, "Time", &i.Time) + err = unpopulateDateTimeRFC3339(val, "Time", &i.Time) delete(rawMsg, key) } if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/myworkbooks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/myworkbooks_client.go index 1fc87a48..73087e74 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/myworkbooks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/myworkbooks_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -34,7 +33,7 @@ type MyWorkbooksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewMyWorkbooksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MyWorkbooksClient, error) { - cl, err := arm.NewClient(moduleName+".MyWorkbooksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewMyWorkbooksClient(subscriptionID string, credential azcore.TokenCredenti // - options - MyWorkbooksClientCreateOrUpdateOptions contains the optional parameters for the MyWorkbooksClient.CreateOrUpdate // method. func (client *MyWorkbooksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties MyWorkbook, options *MyWorkbooksClientCreateOrUpdateOptions) (MyWorkbooksClientCreateOrUpdateResponse, error) { + var err error + const operationName = "MyWorkbooksClient.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, resourceName, workbookProperties, options) if err != nil { return MyWorkbooksClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MyWorkbooksClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return MyWorkbooksClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return MyWorkbooksClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -92,7 +98,10 @@ func (client *MyWorkbooksClient) createOrUpdateCreateRequest(ctx context.Context reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workbookProperties) + if err := runtime.MarshalAsJSON(req, workbookProperties); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,16 +121,22 @@ func (client *MyWorkbooksClient) createOrUpdateHandleResponse(resp *http.Respons // - resourceName - The name of the Application Insights component resource. // - options - MyWorkbooksClientDeleteOptions contains the optional parameters for the MyWorkbooksClient.Delete method. func (client *MyWorkbooksClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, options *MyWorkbooksClientDeleteOptions) (MyWorkbooksClientDeleteResponse, error) { + var err error + const operationName = "MyWorkbooksClient.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, resourceName, options) if err != nil { return MyWorkbooksClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MyWorkbooksClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated, http.StatusNoContent) { - return MyWorkbooksClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return MyWorkbooksClientDeleteResponse{}, err } return MyWorkbooksClientDeleteResponse{}, nil } @@ -160,18 +175,25 @@ func (client *MyWorkbooksClient) deleteCreateRequest(ctx context.Context, resour // - resourceName - The name of the Application Insights component resource. // - options - MyWorkbooksClientGetOptions contains the optional parameters for the MyWorkbooksClient.Get method. func (client *MyWorkbooksClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *MyWorkbooksClientGetOptions) (MyWorkbooksClientGetResponse, error) { + var err error + const operationName = "MyWorkbooksClient.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, resourceName, options) if err != nil { return MyWorkbooksClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MyWorkbooksClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MyWorkbooksClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MyWorkbooksClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -222,6 +244,7 @@ func (client *MyWorkbooksClient) NewListByResourceGroupPager(resourceGroupName s return false }, Fetcher: func(ctx context.Context, page *MyWorkbooksClientListByResourceGroupResponse) (MyWorkbooksClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MyWorkbooksClient.NewListByResourceGroupPager") req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, category, options) if err != nil { return MyWorkbooksClientListByResourceGroupResponse{}, err @@ -235,6 +258,7 @@ func (client *MyWorkbooksClient) NewListByResourceGroupPager(resourceGroupName s } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -288,6 +312,7 @@ func (client *MyWorkbooksClient) NewListBySubscriptionPager(category CategoryTyp return false }, Fetcher: func(ctx context.Context, page *MyWorkbooksClientListBySubscriptionResponse) (MyWorkbooksClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MyWorkbooksClient.NewListBySubscriptionPager") req, err := client.listBySubscriptionCreateRequest(ctx, category, options) if err != nil { return MyWorkbooksClientListBySubscriptionResponse{}, err @@ -301,6 +326,7 @@ func (client *MyWorkbooksClient) NewListBySubscriptionPager(category CategoryTyp } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -347,18 +373,25 @@ func (client *MyWorkbooksClient) listBySubscriptionHandleResponse(resp *http.Res // - workbookProperties - Properties that need to be specified to create a new private workbook. // - options - MyWorkbooksClientUpdateOptions contains the optional parameters for the MyWorkbooksClient.Update method. func (client *MyWorkbooksClient) Update(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties MyWorkbook, options *MyWorkbooksClientUpdateOptions) (MyWorkbooksClientUpdateResponse, error) { + var err error + const operationName = "MyWorkbooksClient.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, resourceName, workbookProperties, options) if err != nil { return MyWorkbooksClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MyWorkbooksClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MyWorkbooksClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MyWorkbooksClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -384,7 +417,10 @@ func (client *MyWorkbooksClient) updateCreateRequest(ctx context.Context, resour reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workbookProperties) + if err := runtime.MarshalAsJSON(req, workbookProperties); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/options.go new file mode 100644 index 00000000..15e3827e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/options.go @@ -0,0 +1,385 @@ +//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 armapplicationinsights + +// APIKeysClientCreateOptions contains the optional parameters for the APIKeysClient.Create method. +type APIKeysClientCreateOptions struct { + // placeholder for future optional parameters +} + +// APIKeysClientDeleteOptions contains the optional parameters for the APIKeysClient.Delete method. +type APIKeysClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// APIKeysClientGetOptions contains the optional parameters for the APIKeysClient.Get method. +type APIKeysClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIKeysClientListOptions contains the optional parameters for the APIKeysClient.NewListPager method. +type APIKeysClientListOptions struct { + // placeholder for future optional parameters +} + +// AnalyticsItemsClientDeleteOptions contains the optional parameters for the AnalyticsItemsClient.Delete method. +type AnalyticsItemsClientDeleteOptions struct { + // The Id of a specific item defined in the Application Insights component + ID *string + + // The name of a specific item defined in the Application Insights component + Name *string +} + +// AnalyticsItemsClientGetOptions contains the optional parameters for the AnalyticsItemsClient.Get method. +type AnalyticsItemsClientGetOptions struct { + // The Id of a specific item defined in the Application Insights component + ID *string + + // The name of a specific item defined in the Application Insights component + Name *string +} + +// AnalyticsItemsClientListOptions contains the optional parameters for the AnalyticsItemsClient.List method. +type AnalyticsItemsClientListOptions struct { + // Flag indicating whether or not to return the content of each applicable item. If false, only return the item information. + IncludeContent *bool + + // Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application + // Insights component. + Scope *ItemScope + + // Enum indicating the type of the Analytics item. + Type *ItemTypeParameter +} + +// AnalyticsItemsClientPutOptions contains the optional parameters for the AnalyticsItemsClient.Put method. +type AnalyticsItemsClientPutOptions struct { + // Flag indicating whether or not to force save an item. This allows overriding an item if it already exists. + OverrideItem *bool +} + +// AnnotationsClientCreateOptions contains the optional parameters for the AnnotationsClient.Create method. +type AnnotationsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// AnnotationsClientDeleteOptions contains the optional parameters for the AnnotationsClient.Delete method. +type AnnotationsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AnnotationsClientGetOptions contains the optional parameters for the AnnotationsClient.Get method. +type AnnotationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AnnotationsClientListOptions contains the optional parameters for the AnnotationsClient.NewListPager method. +type AnnotationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ComponentAvailableFeaturesClientGetOptions contains the optional parameters for the ComponentAvailableFeaturesClient.Get +// method. +type ComponentAvailableFeaturesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ComponentCurrentBillingFeaturesClientGetOptions contains the optional parameters for the ComponentCurrentBillingFeaturesClient.Get +// method. +type ComponentCurrentBillingFeaturesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ComponentCurrentBillingFeaturesClientUpdateOptions contains the optional parameters for the ComponentCurrentBillingFeaturesClient.Update +// method. +type ComponentCurrentBillingFeaturesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ComponentFeatureCapabilitiesClientGetOptions contains the optional parameters for the ComponentFeatureCapabilitiesClient.Get +// method. +type ComponentFeatureCapabilitiesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ComponentQuotaStatusClientGetOptions contains the optional parameters for the ComponentQuotaStatusClient.Get method. +type ComponentQuotaStatusClientGetOptions struct { + // placeholder for future optional parameters +} + +// ComponentsClientCreateOrUpdateOptions contains the optional parameters for the ComponentsClient.CreateOrUpdate method. +type ComponentsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ComponentsClientDeleteOptions contains the optional parameters for the ComponentsClient.Delete method. +type ComponentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ComponentsClientGetOptions contains the optional parameters for the ComponentsClient.Get method. +type ComponentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ComponentsClientGetPurgeStatusOptions contains the optional parameters for the ComponentsClient.GetPurgeStatus method. +type ComponentsClientGetPurgeStatusOptions struct { + // placeholder for future optional parameters +} + +// ComponentsClientListByResourceGroupOptions contains the optional parameters for the ComponentsClient.NewListByResourceGroupPager +// method. +type ComponentsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ComponentsClientListOptions contains the optional parameters for the ComponentsClient.NewListPager method. +type ComponentsClientListOptions struct { + // placeholder for future optional parameters +} + +// ComponentsClientPurgeOptions contains the optional parameters for the ComponentsClient.Purge method. +type ComponentsClientPurgeOptions struct { + // placeholder for future optional parameters +} + +// ComponentsClientUpdateTagsOptions contains the optional parameters for the ComponentsClient.UpdateTags method. +type ComponentsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ExportConfigurationsClientCreateOptions contains the optional parameters for the ExportConfigurationsClient.Create method. +type ExportConfigurationsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// ExportConfigurationsClientDeleteOptions contains the optional parameters for the ExportConfigurationsClient.Delete method. +type ExportConfigurationsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ExportConfigurationsClientGetOptions contains the optional parameters for the ExportConfigurationsClient.Get method. +type ExportConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExportConfigurationsClientListOptions contains the optional parameters for the ExportConfigurationsClient.List method. +type ExportConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExportConfigurationsClientUpdateOptions contains the optional parameters for the ExportConfigurationsClient.Update method. +type ExportConfigurationsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// FavoritesClientAddOptions contains the optional parameters for the FavoritesClient.Add method. +type FavoritesClientAddOptions struct { + // placeholder for future optional parameters +} + +// FavoritesClientDeleteOptions contains the optional parameters for the FavoritesClient.Delete method. +type FavoritesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// FavoritesClientGetOptions contains the optional parameters for the FavoritesClient.Get method. +type FavoritesClientGetOptions struct { + // placeholder for future optional parameters +} + +// FavoritesClientListOptions contains the optional parameters for the FavoritesClient.List method. +type FavoritesClientListOptions struct { + // Flag indicating whether or not to return the full content for each applicable favorite. If false, only return summary content + // for favorites. + CanFetchContent *bool + + // The type of favorite. Value can be either shared or user. + FavoriteType *FavoriteType + + // Source type of favorite to return. When left out, the source type defaults to 'other' (not present in this enum). + SourceType *FavoriteSourceType + + // Tags that must be present on each favorite returned. + Tags []string +} + +// FavoritesClientUpdateOptions contains the optional parameters for the FavoritesClient.Update method. +type FavoritesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// MyWorkbooksClientCreateOrUpdateOptions contains the optional parameters for the MyWorkbooksClient.CreateOrUpdate method. +type MyWorkbooksClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// MyWorkbooksClientDeleteOptions contains the optional parameters for the MyWorkbooksClient.Delete method. +type MyWorkbooksClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// MyWorkbooksClientGetOptions contains the optional parameters for the MyWorkbooksClient.Get method. +type MyWorkbooksClientGetOptions struct { + // placeholder for future optional parameters +} + +// MyWorkbooksClientListByResourceGroupOptions contains the optional parameters for the MyWorkbooksClient.NewListByResourceGroupPager +// method. +type MyWorkbooksClientListByResourceGroupOptions struct { + // Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content + // for workbooks. + CanFetchContent *bool + + // Tags presents on each workbook returned. + Tags []string +} + +// MyWorkbooksClientListBySubscriptionOptions contains the optional parameters for the MyWorkbooksClient.NewListBySubscriptionPager +// method. +type MyWorkbooksClientListBySubscriptionOptions struct { + // Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content + // for workbooks. + CanFetchContent *bool + + // Tags presents on each workbook returned. + Tags []string +} + +// MyWorkbooksClientUpdateOptions contains the optional parameters for the MyWorkbooksClient.Update method. +type MyWorkbooksClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProactiveDetectionConfigurationsClientGetOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.Get +// method. +type ProactiveDetectionConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProactiveDetectionConfigurationsClientListOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.List +// method. +type ProactiveDetectionConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ProactiveDetectionConfigurationsClientUpdateOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.Update +// method. +type ProactiveDetectionConfigurationsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WebTestLocationsClientListOptions contains the optional parameters for the WebTestLocationsClient.NewListPager method. +type WebTestLocationsClientListOptions struct { + // placeholder for future optional parameters +} + +// WebTestsClientCreateOrUpdateOptions contains the optional parameters for the WebTestsClient.CreateOrUpdate method. +type WebTestsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WebTestsClientDeleteOptions contains the optional parameters for the WebTestsClient.Delete method. +type WebTestsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WebTestsClientGetOptions contains the optional parameters for the WebTestsClient.Get method. +type WebTestsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WebTestsClientListByComponentOptions contains the optional parameters for the WebTestsClient.NewListByComponentPager method. +type WebTestsClientListByComponentOptions struct { + // placeholder for future optional parameters +} + +// WebTestsClientListByResourceGroupOptions contains the optional parameters for the WebTestsClient.NewListByResourceGroupPager +// method. +type WebTestsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// WebTestsClientListOptions contains the optional parameters for the WebTestsClient.NewListPager method. +type WebTestsClientListOptions struct { + // placeholder for future optional parameters +} + +// WebTestsClientUpdateTagsOptions contains the optional parameters for the WebTestsClient.UpdateTags method. +type WebTestsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// WorkItemConfigurationsClientCreateOptions contains the optional parameters for the WorkItemConfigurationsClient.Create +// method. +type WorkItemConfigurationsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// WorkItemConfigurationsClientDeleteOptions contains the optional parameters for the WorkItemConfigurationsClient.Delete +// method. +type WorkItemConfigurationsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkItemConfigurationsClientGetDefaultOptions contains the optional parameters for the WorkItemConfigurationsClient.GetDefault +// method. +type WorkItemConfigurationsClientGetDefaultOptions struct { + // placeholder for future optional parameters +} + +// WorkItemConfigurationsClientGetItemOptions contains the optional parameters for the WorkItemConfigurationsClient.GetItem +// method. +type WorkItemConfigurationsClientGetItemOptions struct { + // placeholder for future optional parameters +} + +// WorkItemConfigurationsClientListOptions contains the optional parameters for the WorkItemConfigurationsClient.NewListPager +// method. +type WorkItemConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkItemConfigurationsClientUpdateItemOptions contains the optional parameters for the WorkItemConfigurationsClient.UpdateItem +// method. +type WorkItemConfigurationsClientUpdateItemOptions struct { + // placeholder for future optional parameters +} + +// WorkbooksClientCreateOrUpdateOptions contains the optional parameters for the WorkbooksClient.CreateOrUpdate method. +type WorkbooksClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkbooksClientDeleteOptions contains the optional parameters for the WorkbooksClient.Delete method. +type WorkbooksClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkbooksClientGetOptions contains the optional parameters for the WorkbooksClient.Get method. +type WorkbooksClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkbooksClientListByResourceGroupOptions contains the optional parameters for the WorkbooksClient.NewListByResourceGroupPager +// method. +type WorkbooksClientListByResourceGroupOptions struct { + // Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content + // for workbooks. + CanFetchContent *bool + + // Tags presents on each workbook returned. + Tags []string +} + +// WorkbooksClientUpdateOptions contains the optional parameters for the WorkbooksClient.Update method. +type WorkbooksClientUpdateOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/proactivedetectionconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/proactivedetectionconfigurations_client.go index bd3b836c..91c7caa8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/proactivedetectionconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/proactivedetectionconfigurations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -33,7 +32,7 @@ type ProactiveDetectionConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProactiveDetectionConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProactiveDetectionConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".ProactiveDetectionConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewProactiveDetectionConfigurationsClient(subscriptionID string, credential // - options - ProactiveDetectionConfigurationsClientGetOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.Get // method. func (client *ProactiveDetectionConfigurationsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, configurationID string, options *ProactiveDetectionConfigurationsClientGetOptions) (ProactiveDetectionConfigurationsClientGetResponse, error) { + var err error + const operationName = "ProactiveDetectionConfigurationsClient.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, resourceName, configurationID, options) if err != nil { return ProactiveDetectionConfigurationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProactiveDetectionConfigurationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProactiveDetectionConfigurationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProactiveDetectionConfigurationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -116,18 +122,25 @@ func (client *ProactiveDetectionConfigurationsClient) getHandleResponse(resp *ht // - options - ProactiveDetectionConfigurationsClientListOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.List // method. func (client *ProactiveDetectionConfigurationsClient) List(ctx context.Context, resourceGroupName string, resourceName string, options *ProactiveDetectionConfigurationsClientListOptions) (ProactiveDetectionConfigurationsClientListResponse, error) { + var err error + const operationName = "ProactiveDetectionConfigurationsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return ProactiveDetectionConfigurationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProactiveDetectionConfigurationsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProactiveDetectionConfigurationsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProactiveDetectionConfigurationsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -176,18 +189,25 @@ func (client *ProactiveDetectionConfigurationsClient) listHandleResponse(resp *h // - options - ProactiveDetectionConfigurationsClientUpdateOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.Update // method. func (client *ProactiveDetectionConfigurationsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, configurationID string, proactiveDetectionProperties ComponentProactiveDetectionConfiguration, options *ProactiveDetectionConfigurationsClientUpdateOptions) (ProactiveDetectionConfigurationsClientUpdateResponse, error) { + var err error + const operationName = "ProactiveDetectionConfigurationsClient.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, resourceName, configurationID, proactiveDetectionProperties, options) if err != nil { return ProactiveDetectionConfigurationsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProactiveDetectionConfigurationsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProactiveDetectionConfigurationsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProactiveDetectionConfigurationsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -217,7 +237,10 @@ func (client *ProactiveDetectionConfigurationsClient) updateCreateRequest(ctx co reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, proactiveDetectionProperties) + if err := runtime.MarshalAsJSON(req, proactiveDetectionProperties); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/response_types.go index 43259570..96c60968 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/response_types.go @@ -3,29 +3,32 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights // APIKeysClientCreateResponse contains the response from method APIKeysClient.Create. type APIKeysClientCreateResponse struct { + // Properties that define an API key of an Application Insights Component. ComponentAPIKey } // APIKeysClientDeleteResponse contains the response from method APIKeysClient.Delete. type APIKeysClientDeleteResponse struct { + // Properties that define an API key of an Application Insights Component. ComponentAPIKey } // APIKeysClientGetResponse contains the response from method APIKeysClient.Get. type APIKeysClientGetResponse struct { + // Properties that define an API key of an Application Insights Component. ComponentAPIKey } // APIKeysClientListResponse contains the response from method APIKeysClient.NewListPager. type APIKeysClientListResponse struct { + // Describes the list of API Keys of an Application Insights Component. ComponentAPIKeyListResult } @@ -36,6 +39,7 @@ type AnalyticsItemsClientDeleteResponse struct { // AnalyticsItemsClientGetResponse contains the response from method AnalyticsItemsClient.Get. type AnalyticsItemsClientGetResponse struct { + // Properties that define an Analytics item that is associated to an Application Insights component. ComponentAnalyticsItem } @@ -47,6 +51,7 @@ type AnalyticsItemsClientListResponse struct { // AnalyticsItemsClientPutResponse contains the response from method AnalyticsItemsClient.Put. type AnalyticsItemsClientPutResponse struct { + // Properties that define an Analytics item that is associated to an Application Insights component. ComponentAnalyticsItem } @@ -69,36 +74,43 @@ type AnnotationsClientGetResponse struct { // AnnotationsClientListResponse contains the response from method AnnotationsClient.NewListPager. type AnnotationsClientListResponse struct { + // Annotations list result. AnnotationsListResult } // ComponentAvailableFeaturesClientGetResponse contains the response from method ComponentAvailableFeaturesClient.Get. type ComponentAvailableFeaturesClientGetResponse struct { + // An Application Insights component available features. ComponentAvailableFeatures } // ComponentCurrentBillingFeaturesClientGetResponse contains the response from method ComponentCurrentBillingFeaturesClient.Get. type ComponentCurrentBillingFeaturesClientGetResponse struct { + // An Application Insights component billing features ComponentBillingFeatures } // ComponentCurrentBillingFeaturesClientUpdateResponse contains the response from method ComponentCurrentBillingFeaturesClient.Update. type ComponentCurrentBillingFeaturesClientUpdateResponse struct { + // An Application Insights component billing features ComponentBillingFeatures } // ComponentFeatureCapabilitiesClientGetResponse contains the response from method ComponentFeatureCapabilitiesClient.Get. type ComponentFeatureCapabilitiesClientGetResponse struct { + // An Application Insights component feature capabilities ComponentFeatureCapabilities } // ComponentQuotaStatusClientGetResponse contains the response from method ComponentQuotaStatusClient.Get. type ComponentQuotaStatusClientGetResponse struct { + // An Application Insights component daily data volume cap status ComponentQuotaStatus } // ComponentsClientCreateOrUpdateResponse contains the response from method ComponentsClient.CreateOrUpdate. type ComponentsClientCreateOrUpdateResponse struct { + // An Application Insights component definition. Component } @@ -109,31 +121,37 @@ type ComponentsClientDeleteResponse struct { // ComponentsClientGetPurgeStatusResponse contains the response from method ComponentsClient.GetPurgeStatus. type ComponentsClientGetPurgeStatusResponse struct { + // Response containing status for a specific purge operation. ComponentPurgeStatusResponse } // ComponentsClientGetResponse contains the response from method ComponentsClient.Get. type ComponentsClientGetResponse struct { + // An Application Insights component definition. Component } // ComponentsClientListByResourceGroupResponse contains the response from method ComponentsClient.NewListByResourceGroupPager. type ComponentsClientListByResourceGroupResponse struct { + // Describes the list of Application Insights Resources. ComponentListResult } // ComponentsClientListResponse contains the response from method ComponentsClient.NewListPager. type ComponentsClientListResponse struct { + // Describes the list of Application Insights Resources. ComponentListResult } // ComponentsClientPurgeResponse contains the response from method ComponentsClient.Purge. type ComponentsClientPurgeResponse struct { + // Response containing operationId for a specific purge action. ComponentPurgeResponse } // ComponentsClientUpdateTagsResponse contains the response from method ComponentsClient.UpdateTags. type ComponentsClientUpdateTagsResponse struct { + // An Application Insights component definition. Component } @@ -145,11 +163,13 @@ type ExportConfigurationsClientCreateResponse struct { // ExportConfigurationsClientDeleteResponse contains the response from method ExportConfigurationsClient.Delete. type ExportConfigurationsClientDeleteResponse struct { + // Properties that define a Continuous Export configuration. ComponentExportConfiguration } // ExportConfigurationsClientGetResponse contains the response from method ExportConfigurationsClient.Get. type ExportConfigurationsClientGetResponse struct { + // Properties that define a Continuous Export configuration. ComponentExportConfiguration } @@ -161,11 +181,13 @@ type ExportConfigurationsClientListResponse struct { // ExportConfigurationsClientUpdateResponse contains the response from method ExportConfigurationsClient.Update. type ExportConfigurationsClientUpdateResponse struct { + // Properties that define a Continuous Export configuration. ComponentExportConfiguration } // FavoritesClientAddResponse contains the response from method FavoritesClient.Add. type FavoritesClientAddResponse struct { + // Properties that define a favorite that is associated to an Application Insights component. ComponentFavorite } @@ -176,6 +198,7 @@ type FavoritesClientDeleteResponse struct { // FavoritesClientGetResponse contains the response from method FavoritesClient.Get. type FavoritesClientGetResponse struct { + // Properties that define a favorite that is associated to an Application Insights component. ComponentFavorite } @@ -187,11 +210,13 @@ type FavoritesClientListResponse struct { // FavoritesClientUpdateResponse contains the response from method FavoritesClient.Update. type FavoritesClientUpdateResponse struct { + // Properties that define a favorite that is associated to an Application Insights component. ComponentFavorite } // MyWorkbooksClientCreateOrUpdateResponse contains the response from method MyWorkbooksClient.CreateOrUpdate. type MyWorkbooksClientCreateOrUpdateResponse struct { + // An Application Insights private workbook definition. MyWorkbook } @@ -202,26 +227,31 @@ type MyWorkbooksClientDeleteResponse struct { // MyWorkbooksClientGetResponse contains the response from method MyWorkbooksClient.Get. type MyWorkbooksClientGetResponse struct { + // An Application Insights private workbook definition. MyWorkbook } // MyWorkbooksClientListByResourceGroupResponse contains the response from method MyWorkbooksClient.NewListByResourceGroupPager. type MyWorkbooksClientListByResourceGroupResponse struct { + // Workbook list result. MyWorkbooksListResult } // MyWorkbooksClientListBySubscriptionResponse contains the response from method MyWorkbooksClient.NewListBySubscriptionPager. type MyWorkbooksClientListBySubscriptionResponse struct { + // Workbook list result. MyWorkbooksListResult } // MyWorkbooksClientUpdateResponse contains the response from method MyWorkbooksClient.Update. type MyWorkbooksClientUpdateResponse struct { + // An Application Insights private workbook definition. MyWorkbook } // ProactiveDetectionConfigurationsClientGetResponse contains the response from method ProactiveDetectionConfigurationsClient.Get. type ProactiveDetectionConfigurationsClientGetResponse struct { + // Properties that define a ProactiveDetection configuration. ComponentProactiveDetectionConfiguration } @@ -233,16 +263,19 @@ type ProactiveDetectionConfigurationsClientListResponse struct { // ProactiveDetectionConfigurationsClientUpdateResponse contains the response from method ProactiveDetectionConfigurationsClient.Update. type ProactiveDetectionConfigurationsClientUpdateResponse struct { + // Properties that define a ProactiveDetection configuration. ComponentProactiveDetectionConfiguration } // WebTestLocationsClientListResponse contains the response from method WebTestLocationsClient.NewListPager. type WebTestLocationsClientListResponse struct { + // Describes the list of web test locations available to an Application Insights Component. WebTestLocationsListResult } // WebTestsClientCreateOrUpdateResponse contains the response from method WebTestsClient.CreateOrUpdate. type WebTestsClientCreateOrUpdateResponse struct { + // An Application Insights web test definition. WebTest } @@ -253,31 +286,37 @@ type WebTestsClientDeleteResponse struct { // WebTestsClientGetResponse contains the response from method WebTestsClient.Get. type WebTestsClientGetResponse struct { + // An Application Insights web test definition. WebTest } // WebTestsClientListByComponentResponse contains the response from method WebTestsClient.NewListByComponentPager. type WebTestsClientListByComponentResponse struct { + // A list of 0 or more Application Insights web test definitions. WebTestListResult } // WebTestsClientListByResourceGroupResponse contains the response from method WebTestsClient.NewListByResourceGroupPager. type WebTestsClientListByResourceGroupResponse struct { + // A list of 0 or more Application Insights web test definitions. WebTestListResult } // WebTestsClientListResponse contains the response from method WebTestsClient.NewListPager. type WebTestsClientListResponse struct { + // A list of 0 or more Application Insights web test definitions. WebTestListResult } // WebTestsClientUpdateTagsResponse contains the response from method WebTestsClient.UpdateTags. type WebTestsClientUpdateTagsResponse struct { + // An Application Insights web test definition. WebTest } // WorkItemConfigurationsClientCreateResponse contains the response from method WorkItemConfigurationsClient.Create. type WorkItemConfigurationsClientCreateResponse struct { + // Work item configuration associated with an application insights resource. WorkItemConfiguration } @@ -288,26 +327,31 @@ type WorkItemConfigurationsClientDeleteResponse struct { // WorkItemConfigurationsClientGetDefaultResponse contains the response from method WorkItemConfigurationsClient.GetDefault. type WorkItemConfigurationsClientGetDefaultResponse struct { + // Work item configuration associated with an application insights resource. WorkItemConfiguration } // WorkItemConfigurationsClientGetItemResponse contains the response from method WorkItemConfigurationsClient.GetItem. type WorkItemConfigurationsClientGetItemResponse struct { + // Work item configuration associated with an application insights resource. WorkItemConfiguration } // WorkItemConfigurationsClientListResponse contains the response from method WorkItemConfigurationsClient.NewListPager. type WorkItemConfigurationsClientListResponse struct { + // Work item configuration list result. WorkItemConfigurationsListResult } // WorkItemConfigurationsClientUpdateItemResponse contains the response from method WorkItemConfigurationsClient.UpdateItem. type WorkItemConfigurationsClientUpdateItemResponse struct { + // Work item configuration associated with an application insights resource. WorkItemConfiguration } // WorkbooksClientCreateOrUpdateResponse contains the response from method WorkbooksClient.CreateOrUpdate. type WorkbooksClientCreateOrUpdateResponse struct { + // An Application Insights workbook definition. Workbook } @@ -318,15 +362,18 @@ type WorkbooksClientDeleteResponse struct { // WorkbooksClientGetResponse contains the response from method WorkbooksClient.Get. type WorkbooksClientGetResponse struct { + // An Application Insights workbook definition. Workbook } // WorkbooksClientListByResourceGroupResponse contains the response from method WorkbooksClient.NewListByResourceGroupPager. type WorkbooksClientListByResourceGroupResponse struct { + // Workbook list result. WorkbooksListResult } // WorkbooksClientUpdateResponse contains the response from method WorkbooksClient.Update. type WorkbooksClientUpdateResponse struct { + // An Application Insights workbook definition. Workbook } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/time_rfc3339.go index 0cb26178..a346a241 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtestlocations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtestlocations_client.go index 15b236e0..194bc10a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtestlocations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtestlocations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -33,7 +32,7 @@ type WebTestLocationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWebTestLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebTestLocationsClient, error) { - cl, err := arm.NewClient(moduleName+".WebTestLocationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,6 +56,7 @@ func (client *WebTestLocationsClient) NewListPager(resourceGroupName string, res return false }, Fetcher: func(ctx context.Context, page *WebTestLocationsClientListResponse) (WebTestLocationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebTestLocationsClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return WebTestLocationsClientListResponse{}, err @@ -70,6 +70,7 @@ func (client *WebTestLocationsClient) NewListPager(resourceGroupName string, res } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtests_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtests_client.go index d26d5a30..5c0275e3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtests_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/webtests_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -33,7 +32,7 @@ type WebTestsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWebTestsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebTestsClient, error) { - cl, err := arm.NewClient(moduleName+".WebTestsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewWebTestsClient(subscriptionID string, credential azcore.TokenCredential, // - webTestDefinition - Properties that need to be specified to create or update an Application Insights web test definition. // - options - WebTestsClientCreateOrUpdateOptions contains the optional parameters for the WebTestsClient.CreateOrUpdate method. func (client *WebTestsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, webTestName string, webTestDefinition WebTest, options *WebTestsClientCreateOrUpdateOptions) (WebTestsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WebTestsClient.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, webTestName, webTestDefinition, options) if err != nil { return WebTestsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebTestsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebTestsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebTestsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -90,7 +96,10 @@ func (client *WebTestsClient) createOrUpdateCreateRequest(ctx context.Context, r reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, webTestDefinition) + if err := runtime.MarshalAsJSON(req, webTestDefinition); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -110,16 +119,22 @@ func (client *WebTestsClient) createOrUpdateHandleResponse(resp *http.Response) // - webTestName - The name of the Application Insights webtest resource. // - options - WebTestsClientDeleteOptions contains the optional parameters for the WebTestsClient.Delete method. func (client *WebTestsClient) Delete(ctx context.Context, resourceGroupName string, webTestName string, options *WebTestsClientDeleteOptions) (WebTestsClientDeleteResponse, error) { + var err error + const operationName = "WebTestsClient.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, webTestName, options) if err != nil { return WebTestsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebTestsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebTestsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebTestsClientDeleteResponse{}, err } return WebTestsClientDeleteResponse{}, nil } @@ -157,18 +172,25 @@ func (client *WebTestsClient) deleteCreateRequest(ctx context.Context, resourceG // - webTestName - The name of the Application Insights webtest resource. // - options - WebTestsClientGetOptions contains the optional parameters for the WebTestsClient.Get method. func (client *WebTestsClient) Get(ctx context.Context, resourceGroupName string, webTestName string, options *WebTestsClientGetOptions) (WebTestsClientGetResponse, error) { + var err error + const operationName = "WebTestsClient.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, webTestName, options) if err != nil { return WebTestsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebTestsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebTestsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebTestsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -216,25 +238,20 @@ func (client *WebTestsClient) NewListPager(options *WebTestsClientListOptions) * return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebTestsClientListResponse) (WebTestsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebTestsClient.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 WebTestsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebTestsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebTestsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -278,25 +295,20 @@ func (client *WebTestsClient) NewListByComponentPager(componentName string, reso return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebTestsClientListByComponentResponse) (WebTestsClientListByComponentResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByComponentCreateRequest(ctx, componentName, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebTestsClientListByComponentResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebTestsClient.NewListByComponentPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByComponentCreateRequest(ctx, componentName, resourceGroupName, options) + }, nil) if err != nil { return WebTestsClientListByComponentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebTestsClientListByComponentResponse{}, runtime.NewResponseError(resp) - } return client.listByComponentHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -347,25 +359,20 @@ func (client *WebTestsClient) NewListByResourceGroupPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebTestsClientListByResourceGroupResponse) (WebTestsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebTestsClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebTestsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 WebTestsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebTestsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -409,18 +416,25 @@ func (client *WebTestsClient) listByResourceGroupHandleResponse(resp *http.Respo // - webTestTags - Updated tag information to set into the web test instance. // - options - WebTestsClientUpdateTagsOptions contains the optional parameters for the WebTestsClient.UpdateTags method. func (client *WebTestsClient) UpdateTags(ctx context.Context, resourceGroupName string, webTestName string, webTestTags TagsResource, options *WebTestsClientUpdateTagsOptions) (WebTestsClientUpdateTagsResponse, error) { + var err error + const operationName = "WebTestsClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, webTestName, webTestTags, options) if err != nil { return WebTestsClientUpdateTagsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebTestsClientUpdateTagsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebTestsClientUpdateTagsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebTestsClientUpdateTagsResponse{}, err } - return client.updateTagsHandleResponse(resp) + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err } // updateTagsCreateRequest creates the UpdateTags request. @@ -446,7 +460,10 @@ func (client *WebTestsClient) updateTagsCreateRequest(ctx context.Context, resou reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, webTestTags) + if err := runtime.MarshalAsJSON(req, webTestTags); err != nil { + return nil, err + } + return req, nil } // updateTagsHandleResponse handles the UpdateTags response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooks_client.go index b46ea005..19307028 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/workbooks_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -34,7 +33,7 @@ type WorkbooksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkbooksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkbooksClient, error) { - cl, err := arm.NewClient(moduleName+".WorkbooksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewWorkbooksClient(subscriptionID string, credential azcore.TokenCredential // - options - WorkbooksClientCreateOrUpdateOptions contains the optional parameters for the WorkbooksClient.CreateOrUpdate // method. func (client *WorkbooksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook, options *WorkbooksClientCreateOrUpdateOptions) (WorkbooksClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkbooksClient.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, resourceName, workbookProperties, options) if err != nil { return WorkbooksClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkbooksClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WorkbooksClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkbooksClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -92,7 +98,10 @@ func (client *WorkbooksClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workbookProperties) + if err := runtime.MarshalAsJSON(req, workbookProperties); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,16 +121,22 @@ func (client *WorkbooksClient) createOrUpdateHandleResponse(resp *http.Response) // - resourceName - The name of the Application Insights component resource. // - options - WorkbooksClientDeleteOptions contains the optional parameters for the WorkbooksClient.Delete method. func (client *WorkbooksClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientDeleteOptions) (WorkbooksClientDeleteResponse, error) { + var err error + const operationName = "WorkbooksClient.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, resourceName, options) if err != nil { return WorkbooksClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkbooksClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated, http.StatusNoContent) { - return WorkbooksClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkbooksClientDeleteResponse{}, err } return WorkbooksClientDeleteResponse{}, nil } @@ -160,18 +175,25 @@ func (client *WorkbooksClient) deleteCreateRequest(ctx context.Context, resource // - resourceName - The name of the Application Insights component resource. // - options - WorkbooksClientGetOptions contains the optional parameters for the WorkbooksClient.Get method. func (client *WorkbooksClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientGetOptions) (WorkbooksClientGetResponse, error) { + var err error + const operationName = "WorkbooksClient.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, resourceName, options) if err != nil { return WorkbooksClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkbooksClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkbooksClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkbooksClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -222,6 +244,7 @@ func (client *WorkbooksClient) NewListByResourceGroupPager(resourceGroupName str return false }, Fetcher: func(ctx context.Context, page *WorkbooksClientListByResourceGroupResponse) (WorkbooksClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkbooksClient.NewListByResourceGroupPager") req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, category, options) if err != nil { return WorkbooksClientListByResourceGroupResponse{}, err @@ -235,6 +258,7 @@ func (client *WorkbooksClient) NewListByResourceGroupPager(resourceGroupName str } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -285,18 +309,25 @@ func (client *WorkbooksClient) listByResourceGroupHandleResponse(resp *http.Resp // - workbookProperties - Properties that need to be specified to create a new workbook. // - options - WorkbooksClientUpdateOptions contains the optional parameters for the WorkbooksClient.Update method. func (client *WorkbooksClient) Update(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook, options *WorkbooksClientUpdateOptions) (WorkbooksClientUpdateResponse, error) { + var err error + const operationName = "WorkbooksClient.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, resourceName, workbookProperties, options) if err != nil { return WorkbooksClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkbooksClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkbooksClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkbooksClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -322,7 +353,10 @@ func (client *WorkbooksClient) updateCreateRequest(ctx context.Context, resource reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workbookProperties) + if err := runtime.MarshalAsJSON(req, workbookProperties); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/workitemconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/workitemconfigurations_client.go index 6d2b1f44..f0ed4e02 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/workitemconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights/workitemconfigurations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armapplicationinsights @@ -33,7 +32,7 @@ type WorkItemConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkItemConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkItemConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkItemConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewWorkItemConfigurationsClient(subscriptionID string, credential azcore.To // - options - WorkItemConfigurationsClientCreateOptions contains the optional parameters for the WorkItemConfigurationsClient.Create // method. func (client *WorkItemConfigurationsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigurationProperties WorkItemCreateConfiguration, options *WorkItemConfigurationsClientCreateOptions) (WorkItemConfigurationsClientCreateResponse, error) { + var err error + const operationName = "WorkItemConfigurationsClient.Create" + 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, resourceName, workItemConfigurationProperties, options) if err != nil { return WorkItemConfigurationsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkItemConfigurationsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkItemConfigurationsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkItemConfigurationsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -92,7 +98,10 @@ func (client *WorkItemConfigurationsClient) createCreateRequest(ctx context.Cont reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workItemConfigurationProperties) + if err := runtime.MarshalAsJSON(req, workItemConfigurationProperties); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -115,16 +124,22 @@ func (client *WorkItemConfigurationsClient) createHandleResponse(resp *http.Resp // - options - WorkItemConfigurationsClientDeleteOptions contains the optional parameters for the WorkItemConfigurationsClient.Delete // method. func (client *WorkItemConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigID string, options *WorkItemConfigurationsClientDeleteOptions) (WorkItemConfigurationsClientDeleteResponse, error) { + var err error + const operationName = "WorkItemConfigurationsClient.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, resourceName, workItemConfigID, options) if err != nil { return WorkItemConfigurationsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkItemConfigurationsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkItemConfigurationsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkItemConfigurationsClientDeleteResponse{}, err } return WorkItemConfigurationsClientDeleteResponse{}, nil } @@ -167,18 +182,25 @@ func (client *WorkItemConfigurationsClient) deleteCreateRequest(ctx context.Cont // - options - WorkItemConfigurationsClientGetDefaultOptions contains the optional parameters for the WorkItemConfigurationsClient.GetDefault // method. func (client *WorkItemConfigurationsClient) GetDefault(ctx context.Context, resourceGroupName string, resourceName string, options *WorkItemConfigurationsClientGetDefaultOptions) (WorkItemConfigurationsClientGetDefaultResponse, error) { + var err error + const operationName = "WorkItemConfigurationsClient.GetDefault" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDefaultCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return WorkItemConfigurationsClientGetDefaultResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkItemConfigurationsClientGetDefaultResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkItemConfigurationsClientGetDefaultResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkItemConfigurationsClientGetDefaultResponse{}, err } - return client.getDefaultHandleResponse(resp) + resp, err := client.getDefaultHandleResponse(httpResp) + return resp, err } // getDefaultCreateRequest creates the GetDefault request. @@ -227,18 +249,25 @@ func (client *WorkItemConfigurationsClient) getDefaultHandleResponse(resp *http. // - options - WorkItemConfigurationsClientGetItemOptions contains the optional parameters for the WorkItemConfigurationsClient.GetItem // method. func (client *WorkItemConfigurationsClient) GetItem(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigID string, options *WorkItemConfigurationsClientGetItemOptions) (WorkItemConfigurationsClientGetItemResponse, error) { + var err error + const operationName = "WorkItemConfigurationsClient.GetItem" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getItemCreateRequest(ctx, resourceGroupName, resourceName, workItemConfigID, options) if err != nil { return WorkItemConfigurationsClientGetItemResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkItemConfigurationsClientGetItemResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkItemConfigurationsClientGetItemResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkItemConfigurationsClientGetItemResponse{}, err } - return client.getItemHandleResponse(resp) + resp, err := client.getItemHandleResponse(httpResp) + return resp, err } // getItemCreateRequest creates the GetItem request. @@ -293,6 +322,7 @@ func (client *WorkItemConfigurationsClient) NewListPager(resourceGroupName strin return false }, Fetcher: func(ctx context.Context, page *WorkItemConfigurationsClientListResponse) (WorkItemConfigurationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkItemConfigurationsClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return WorkItemConfigurationsClientListResponse{}, err @@ -306,6 +336,7 @@ func (client *WorkItemConfigurationsClient) NewListPager(resourceGroupName strin } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -357,18 +388,25 @@ func (client *WorkItemConfigurationsClient) listHandleResponse(resp *http.Respon // - options - WorkItemConfigurationsClientUpdateItemOptions contains the optional parameters for the WorkItemConfigurationsClient.UpdateItem // method. func (client *WorkItemConfigurationsClient) UpdateItem(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigID string, workItemConfigurationProperties WorkItemCreateConfiguration, options *WorkItemConfigurationsClientUpdateItemOptions) (WorkItemConfigurationsClientUpdateItemResponse, error) { + var err error + const operationName = "WorkItemConfigurationsClient.UpdateItem" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateItemCreateRequest(ctx, resourceGroupName, resourceName, workItemConfigID, workItemConfigurationProperties, options) if err != nil { return WorkItemConfigurationsClientUpdateItemResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkItemConfigurationsClientUpdateItemResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkItemConfigurationsClientUpdateItemResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkItemConfigurationsClientUpdateItemResponse{}, err } - return client.updateItemHandleResponse(resp) + resp, err := client.updateItemHandleResponse(httpResp) + return resp, err } // updateItemCreateRequest creates the UpdateItem request. @@ -398,7 +436,10 @@ func (client *WorkItemConfigurationsClient) updateItemCreateRequest(ctx context. reqQP.Set("api-version", "2015-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workItemConfigurationProperties) + if err := runtime.MarshalAsJSON(req, workItemConfigurationProperties); err != nil { + return nil, err + } + return req, nil } // updateItemHandleResponse handles the UpdateItem response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/CHANGELOG.md index ef44ffb1..28b1ed8b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 0.9.0 (2023-11-30) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + ## 0.8.1 (2023-04-14) ### Bug Fixes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/README.md index a56d9c4b..ca48f98e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewHybridRunbookWorkerGroupClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/account_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/account_client.go index 24974791..951db726 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/account_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/account_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type AccountClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAccountClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountClient, error) { - cl, err := arm.NewClient(moduleName+".AccountClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewAccountClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - Parameters supplied to the create or update automation account. // - options - AccountClientCreateOrUpdateOptions contains the optional parameters for the AccountClient.CreateOrUpdate method. func (client *AccountClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AccountCreateOrUpdateParameters, options *AccountClientCreateOrUpdateOptions) (AccountClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AccountClient.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, automationAccountName, parameters, options) if err != nil { return AccountClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return AccountClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return AccountClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -91,7 +97,10 @@ func (client *AccountClient) createOrUpdateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2021-06-22") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -111,16 +120,22 @@ func (client *AccountClient) createOrUpdateHandleResponse(resp *http.Response) ( // - automationAccountName - The name of the automation account. // - options - AccountClientDeleteOptions contains the optional parameters for the AccountClient.Delete method. func (client *AccountClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, options *AccountClientDeleteOptions) (AccountClientDeleteResponse, error) { + var err error + const operationName = "AccountClient.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, automationAccountName, options) if err != nil { return AccountClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return AccountClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return AccountClientDeleteResponse{}, err } return AccountClientDeleteResponse{}, nil } @@ -159,18 +174,25 @@ func (client *AccountClient) deleteCreateRequest(ctx context.Context, resourceGr // - automationAccountName - The name of the automation account. // - options - AccountClientGetOptions contains the optional parameters for the AccountClient.Get method. func (client *AccountClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, options *AccountClientGetOptions) (AccountClientGetResponse, error) { + var err error + const operationName = "AccountClient.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, automationAccountName, options) if err != nil { return AccountClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -218,25 +240,20 @@ func (client *AccountClient) NewListPager(options *AccountClientListOptions) *ru return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AccountClientListResponse) (AccountClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AccountClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AccountClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 AccountClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -279,25 +296,20 @@ func (client *AccountClient) NewListByResourceGroupPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AccountClientListByResourceGroupResponse) (AccountClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AccountClient.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 AccountClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AccountClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -341,18 +353,25 @@ func (client *AccountClient) listByResourceGroupHandleResponse(resp *http.Respon // - parameters - Parameters supplied to the update automation account. // - options - AccountClientUpdateOptions contains the optional parameters for the AccountClient.Update method. func (client *AccountClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AccountUpdateParameters, options *AccountClientUpdateOptions) (AccountClientUpdateResponse, error) { + var err error + const operationName = "AccountClient.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, automationAccountName, parameters, options) if err != nil { return AccountClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -378,7 +397,10 @@ func (client *AccountClient) updateCreateRequest(ctx context.Context, resourceGr reqQP.Set("api-version", "2021-06-22") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/activity_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/activity_client.go index 45ef2f69..edc445cd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/activity_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/activity_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type ActivityClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewActivityClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ActivityClient, error) { - cl, err := arm.NewClient(moduleName+".ActivityClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewActivityClient(subscriptionID string, credential azcore.TokenCredential, // - activityName - The name of activity. // - options - ActivityClientGetOptions contains the optional parameters for the ActivityClient.Get method. func (client *ActivityClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string, options *ActivityClientGetOptions) (ActivityClientGetResponse, error) { + var err error + const operationName = "ActivityClient.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, automationAccountName, moduleName, activityName, options) if err != nil { return ActivityClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ActivityClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActivityClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ActivityClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -126,25 +132,20 @@ func (client *ActivityClient) NewListByModulePager(resourceGroupName string, aut return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ActivityClientListByModuleResponse) (ActivityClientListByModuleResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByModuleCreateRequest(ctx, resourceGroupName, automationAccountName, moduleName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ActivityClient.NewListByModulePager") + 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.listByModuleCreateRequest(ctx, resourceGroupName, automationAccountName, moduleName, options) + }, nil) if err != nil { return ActivityClientListByModuleResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ActivityClientListByModuleResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActivityClientListByModuleResponse{}, runtime.NewResponseError(resp) - } return client.listByModuleHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/agentregistrationinformation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/agentregistrationinformation_client.go index 784c919a..bada2054 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/agentregistrationinformation_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/agentregistrationinformation_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type AgentRegistrationInformationClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAgentRegistrationInformationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AgentRegistrationInformationClient, error) { - cl, err := arm.NewClient(moduleName+".AgentRegistrationInformationClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewAgentRegistrationInformationClient(subscriptionID string, credential azc // - options - AgentRegistrationInformationClientGetOptions contains the optional parameters for the AgentRegistrationInformationClient.Get // method. func (client *AgentRegistrationInformationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, options *AgentRegistrationInformationClientGetOptions) (AgentRegistrationInformationClientGetResponse, error) { + var err error + const operationName = "AgentRegistrationInformationClient.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, automationAccountName, options) if err != nil { return AgentRegistrationInformationClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AgentRegistrationInformationClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AgentRegistrationInformationClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AgentRegistrationInformationClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -113,18 +119,25 @@ func (client *AgentRegistrationInformationClient) getHandleResponse(resp *http.R // - options - AgentRegistrationInformationClientRegenerateKeyOptions contains the optional parameters for the AgentRegistrationInformationClient.RegenerateKey // method. func (client *AgentRegistrationInformationClient) RegenerateKey(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter, options *AgentRegistrationInformationClientRegenerateKeyOptions) (AgentRegistrationInformationClientRegenerateKeyResponse, error) { + var err error + const operationName = "AgentRegistrationInformationClient.RegenerateKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regenerateKeyCreateRequest(ctx, resourceGroupName, automationAccountName, parameters, options) if err != nil { return AgentRegistrationInformationClientRegenerateKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AgentRegistrationInformationClientRegenerateKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AgentRegistrationInformationClientRegenerateKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AgentRegistrationInformationClientRegenerateKeyResponse{}, err } - return client.regenerateKeyHandleResponse(resp) + resp, err := client.regenerateKeyHandleResponse(httpResp) + return resp, err } // regenerateKeyCreateRequest creates the RegenerateKey request. @@ -150,7 +163,10 @@ func (client *AgentRegistrationInformationClient) regenerateKeyCreateRequest(ctx reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // regenerateKeyHandleResponse handles the RegenerateKey response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/autorest.md index 0fd3c9d7..ddbf803a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/autorest.md @@ -8,5 +8,10 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/432872fac1d0f8edcae98a0e8504afc0ee302710/specification/automation/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/432872fac1d0f8edcae98a0e8504afc0ee302710/specification/automation/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.8.1 +module-version: 0.9.0 +directive: + - where-operation: DscConfiguration_CreateOrUpdate + transform: delete $['x-ms-examples'] + - where-operation: DscConfiguration_Update + transform: delete $['x-ms-examples'] ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/certificate_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/certificate_client.go index a9b2e72b..54d9053f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/certificate_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/certificate_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type CertificateClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCertificateClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateClient, error) { - cl, err := arm.NewClient(moduleName+".CertificateClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewCertificateClient(subscriptionID string, credential azcore.TokenCredenti // - options - CertificateClientCreateOrUpdateOptions contains the optional parameters for the CertificateClient.CreateOrUpdate // method. func (client *CertificateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters, options *CertificateClientCreateOrUpdateOptions) (CertificateClientCreateOrUpdateResponse, error) { + var err error + const operationName = "CertificateClient.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, automationAccountName, certificateName, parameters, options) if err != nil { return CertificateClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return CertificateClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return CertificateClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *CertificateClient) createOrUpdateCreateRequest(ctx context.Context reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *CertificateClient) createOrUpdateHandleResponse(resp *http.Respons // - certificateName - The name of certificate. // - options - CertificateClientDeleteOptions contains the optional parameters for the CertificateClient.Delete method. func (client *CertificateClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, options *CertificateClientDeleteOptions) (CertificateClientDeleteResponse, error) { + var err error + const operationName = "CertificateClient.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, automationAccountName, certificateName, options) if err != nil { return CertificateClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateClientDeleteResponse{}, err } return CertificateClientDeleteResponse{}, nil } @@ -171,18 +186,25 @@ func (client *CertificateClient) deleteCreateRequest(ctx context.Context, resour // - certificateName - The name of certificate. // - options - CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method. func (client *CertificateClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, options *CertificateClientGetOptions) (CertificateClientGetResponse, error) { + var err error + const operationName = "CertificateClient.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, automationAccountName, certificateName, options) if err != nil { return CertificateClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -237,25 +259,20 @@ func (client *CertificateClient) NewListByAutomationAccountPager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CertificateClientListByAutomationAccountResponse) (CertificateClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificateClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return CertificateClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -304,18 +321,25 @@ func (client *CertificateClient) listByAutomationAccountHandleResponse(resp *htt // - parameters - The parameters supplied to the update certificate operation. // - options - CertificateClientUpdateOptions contains the optional parameters for the CertificateClient.Update method. func (client *CertificateClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateUpdateParameters, options *CertificateClientUpdateOptions) (CertificateClientUpdateResponse, error) { + var err error + const operationName = "CertificateClient.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, automationAccountName, certificateName, parameters, options) if err != nil { return CertificateClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -345,7 +369,10 @@ func (client *CertificateClient) updateCreateRequest(ctx context.Context, resour reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/client.go index 2bf4b603..e54ee5f6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type Client struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { - cl, err := arm.NewClient(moduleName+".Client", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewClient(subscriptionID string, credential azcore.TokenCredential, options // - options - ClientConvertGraphRunbookContentOptions contains the optional parameters for the Client.ConvertGraphRunbookContent // method. func (client *Client) ConvertGraphRunbookContent(ctx context.Context, resourceGroupName string, automationAccountName string, parameters GraphicalRunbookContent, options *ClientConvertGraphRunbookContentOptions) (ClientConvertGraphRunbookContentResponse, error) { + var err error + const operationName = "Client.ConvertGraphRunbookContent" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.convertGraphRunbookContentCreateRequest(ctx, resourceGroupName, automationAccountName, parameters, options) if err != nil { return ClientConvertGraphRunbookContentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClientConvertGraphRunbookContentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientConvertGraphRunbookContentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientConvertGraphRunbookContentResponse{}, err } - return client.convertGraphRunbookContentHandleResponse(resp) + resp, err := client.convertGraphRunbookContentHandleResponse(httpResp) + return resp, err } // convertGraphRunbookContentCreateRequest creates the ConvertGraphRunbookContent request. @@ -92,7 +98,10 @@ func (client *Client) convertGraphRunbookContentCreateRequest(ctx context.Contex reqQP.Set("api-version", "2021-06-22") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // convertGraphRunbookContentHandleResponse handles the ConvertGraphRunbookContent response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/client_factory.go index 813200a2..6712fada 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -29,7 +28,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -39,232 +38,278 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) +// NewAccountClient creates a new instance of AccountClient. +func (c *ClientFactory) NewAccountClient() *AccountClient { + subClient, _ := NewAccountClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPython2PackageClient() *Python2PackageClient { - subClient, _ := NewPython2PackageClient(c.subscriptionID, c.credential, c.options) +// NewActivityClient creates a new instance of ActivityClient. +func (c *ClientFactory) NewActivityClient() *ActivityClient { + subClient, _ := NewActivityClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewAgentRegistrationInformationClient creates a new instance of AgentRegistrationInformationClient. func (c *ClientFactory) NewAgentRegistrationInformationClient() *AgentRegistrationInformationClient { subClient, _ := NewAgentRegistrationInformationClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDscNodeClient() *DscNodeClient { - subClient, _ := NewDscNodeClient(c.subscriptionID, c.credential, c.options) +// NewCertificateClient creates a new instance of CertificateClient. +func (c *ClientFactory) NewCertificateClient() *CertificateClient { + subClient, _ := NewCertificateClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewNodeReportsClient() *NodeReportsClient { - subClient, _ := NewNodeReportsClient(c.subscriptionID, c.credential, c.options) +// NewClient creates a new instance of Client. +func (c *ClientFactory) NewClient() *Client { + subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDscNodeConfigurationClient() *DscNodeConfigurationClient { - subClient, _ := NewDscNodeConfigurationClient(c.subscriptionID, c.credential, c.options) +// NewConnectionClient creates a new instance of ConnectionClient. +func (c *ClientFactory) NewConnectionClient() *ConnectionClient { + subClient, _ := NewConnectionClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDscCompilationJobClient() *DscCompilationJobClient { - subClient, _ := NewDscCompilationJobClient(c.subscriptionID, c.credential, c.options) +// NewConnectionTypeClient creates a new instance of ConnectionTypeClient. +func (c *ClientFactory) NewConnectionTypeClient() *ConnectionTypeClient { + subClient, _ := NewConnectionTypeClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDscCompilationJobStreamClient() *DscCompilationJobStreamClient { - subClient, _ := NewDscCompilationJobStreamClient(c.subscriptionID, c.credential, c.options) +// NewCredentialClient creates a new instance of CredentialClient. +func (c *ClientFactory) NewCredentialClient() *CredentialClient { + subClient, _ := NewCredentialClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewNodeCountInformationClient() *NodeCountInformationClient { - subClient, _ := NewNodeCountInformationClient(c.subscriptionID, c.credential, c.options) +// NewDeletedAutomationAccountsClient creates a new instance of DeletedAutomationAccountsClient. +func (c *ClientFactory) NewDeletedAutomationAccountsClient() *DeletedAutomationAccountsClient { + subClient, _ := NewDeletedAutomationAccountsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSourceControlClient() *SourceControlClient { - subClient, _ := NewSourceControlClient(c.subscriptionID, c.credential, c.options) +// NewDscCompilationJobClient creates a new instance of DscCompilationJobClient. +func (c *ClientFactory) NewDscCompilationJobClient() *DscCompilationJobClient { + subClient, _ := NewDscCompilationJobClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSourceControlSyncJobClient() *SourceControlSyncJobClient { - subClient, _ := NewSourceControlSyncJobClient(c.subscriptionID, c.credential, c.options) +// NewDscCompilationJobStreamClient creates a new instance of DscCompilationJobStreamClient. +func (c *ClientFactory) NewDscCompilationJobStreamClient() *DscCompilationJobStreamClient { + subClient, _ := NewDscCompilationJobStreamClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSourceControlSyncJobStreamsClient() *SourceControlSyncJobStreamsClient { - subClient, _ := NewSourceControlSyncJobStreamsClient(c.subscriptionID, c.credential, c.options) +// NewDscConfigurationClient creates a new instance of DscConfigurationClient. +func (c *ClientFactory) NewDscConfigurationClient() *DscConfigurationClient { + subClient, _ := NewDscConfigurationClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewAccountClient() *AccountClient { - subClient, _ := NewAccountClient(c.subscriptionID, c.credential, c.options) +// NewDscNodeClient creates a new instance of DscNodeClient. +func (c *ClientFactory) NewDscNodeClient() *DscNodeClient { + subClient, _ := NewDscNodeClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewStatisticsClient() *StatisticsClient { - subClient, _ := NewStatisticsClient(c.subscriptionID, c.credential, c.options) +// NewDscNodeConfigurationClient creates a new instance of DscNodeConfigurationClient. +func (c *ClientFactory) NewDscNodeConfigurationClient() *DscNodeConfigurationClient { + subClient, _ := NewDscNodeConfigurationClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewUsagesClient() *UsagesClient { - subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) +// NewFieldsClient creates a new instance of FieldsClient. +func (c *ClientFactory) NewFieldsClient() *FieldsClient { + subClient, _ := NewFieldsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewKeysClient() *KeysClient { - subClient, _ := NewKeysClient(c.subscriptionID, c.credential, c.options) +// NewHybridRunbookWorkerGroupClient creates a new instance of HybridRunbookWorkerGroupClient. +func (c *ClientFactory) NewHybridRunbookWorkerGroupClient() *HybridRunbookWorkerGroupClient { + subClient, _ := NewHybridRunbookWorkerGroupClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewCertificateClient() *CertificateClient { - subClient, _ := NewCertificateClient(c.subscriptionID, c.credential, c.options) +// NewHybridRunbookWorkersClient creates a new instance of HybridRunbookWorkersClient. +func (c *ClientFactory) NewHybridRunbookWorkersClient() *HybridRunbookWorkersClient { + subClient, _ := NewHybridRunbookWorkersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewConnectionClient() *ConnectionClient { - subClient, _ := NewConnectionClient(c.subscriptionID, c.credential, c.options) +// NewJobClient creates a new instance of JobClient. +func (c *ClientFactory) NewJobClient() *JobClient { + subClient, _ := NewJobClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewConnectionTypeClient() *ConnectionTypeClient { - subClient, _ := NewConnectionTypeClient(c.subscriptionID, c.credential, c.options) +// NewJobScheduleClient creates a new instance of JobScheduleClient. +func (c *ClientFactory) NewJobScheduleClient() *JobScheduleClient { + subClient, _ := NewJobScheduleClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewCredentialClient() *CredentialClient { - subClient, _ := NewCredentialClient(c.subscriptionID, c.credential, c.options) +// NewJobStreamClient creates a new instance of JobStreamClient. +func (c *ClientFactory) NewJobStreamClient() *JobStreamClient { + subClient, _ := NewJobStreamClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewJobScheduleClient() *JobScheduleClient { - subClient, _ := NewJobScheduleClient(c.subscriptionID, c.credential, c.options) +// NewKeysClient creates a new instance of KeysClient. +func (c *ClientFactory) NewKeysClient() *KeysClient { + subClient, _ := NewKeysClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewLinkedWorkspaceClient creates a new instance of LinkedWorkspaceClient. func (c *ClientFactory) NewLinkedWorkspaceClient() *LinkedWorkspaceClient { subClient, _ := NewLinkedWorkspaceClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewActivityClient() *ActivityClient { - subClient, _ := NewActivityClient(c.subscriptionID, c.credential, c.options) +// NewModuleClient creates a new instance of ModuleClient. +func (c *ClientFactory) NewModuleClient() *ModuleClient { + subClient, _ := NewModuleClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewModuleClient() *ModuleClient { - subClient, _ := NewModuleClient(c.subscriptionID, c.credential, c.options) +// NewNodeCountInformationClient creates a new instance of NodeCountInformationClient. +func (c *ClientFactory) NewNodeCountInformationClient() *NodeCountInformationClient { + subClient, _ := NewNodeCountInformationClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewNodeReportsClient creates a new instance of NodeReportsClient. +func (c *ClientFactory) NewNodeReportsClient() *NodeReportsClient { + subClient, _ := NewNodeReportsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewObjectDataTypesClient creates a new instance of ObjectDataTypesClient. func (c *ClientFactory) NewObjectDataTypesClient() *ObjectDataTypesClient { subClient, _ := NewObjectDataTypesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewFieldsClient() *FieldsClient { - subClient, _ := NewFieldsClient(c.subscriptionID, c.credential, c.options) +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewScheduleClient() *ScheduleClient { - subClient, _ := NewScheduleClient(c.subscriptionID, c.credential, c.options) +// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient. +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVariableClient() *VariableClient { - subClient, _ := NewVariableClient(c.subscriptionID, c.credential, c.options) +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient. +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWatcherClient() *WatcherClient { - subClient, _ := NewWatcherClient(c.subscriptionID, c.credential, c.options) +// NewPython2PackageClient creates a new instance of Python2PackageClient. +func (c *ClientFactory) NewPython2PackageClient() *Python2PackageClient { + subClient, _ := NewPython2PackageClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDscConfigurationClient() *DscConfigurationClient { - subClient, _ := NewDscConfigurationClient(c.subscriptionID, c.credential, c.options) +// NewRunbookClient creates a new instance of RunbookClient. +func (c *ClientFactory) NewRunbookClient() *RunbookClient { + subClient, _ := NewRunbookClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewJobClient() *JobClient { - subClient, _ := NewJobClient(c.subscriptionID, c.credential, c.options) +// NewRunbookDraftClient creates a new instance of RunbookDraftClient. +func (c *ClientFactory) NewRunbookDraftClient() *RunbookDraftClient { + subClient, _ := NewRunbookDraftClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewJobStreamClient() *JobStreamClient { - subClient, _ := NewJobStreamClient(c.subscriptionID, c.credential, c.options) +// NewScheduleClient creates a new instance of ScheduleClient. +func (c *ClientFactory) NewScheduleClient() *ScheduleClient { + subClient, _ := NewScheduleClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +// NewSoftwareUpdateConfigurationMachineRunsClient creates a new instance of SoftwareUpdateConfigurationMachineRunsClient. +func (c *ClientFactory) NewSoftwareUpdateConfigurationMachineRunsClient() *SoftwareUpdateConfigurationMachineRunsClient { + subClient, _ := NewSoftwareUpdateConfigurationMachineRunsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewClient() *Client { - subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) +// NewSoftwareUpdateConfigurationRunsClient creates a new instance of SoftwareUpdateConfigurationRunsClient. +func (c *ClientFactory) NewSoftwareUpdateConfigurationRunsClient() *SoftwareUpdateConfigurationRunsClient { + subClient, _ := NewSoftwareUpdateConfigurationRunsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSoftwareUpdateConfigurationsClient creates a new instance of SoftwareUpdateConfigurationsClient. func (c *ClientFactory) NewSoftwareUpdateConfigurationsClient() *SoftwareUpdateConfigurationsClient { subClient, _ := NewSoftwareUpdateConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSoftwareUpdateConfigurationRunsClient() *SoftwareUpdateConfigurationRunsClient { - subClient, _ := NewSoftwareUpdateConfigurationRunsClient(c.subscriptionID, c.credential, c.options) +// NewSourceControlClient creates a new instance of SourceControlClient. +func (c *ClientFactory) NewSourceControlClient() *SourceControlClient { + subClient, _ := NewSourceControlClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSoftwareUpdateConfigurationMachineRunsClient() *SoftwareUpdateConfigurationMachineRunsClient { - subClient, _ := NewSoftwareUpdateConfigurationMachineRunsClient(c.subscriptionID, c.credential, c.options) +// NewSourceControlSyncJobClient creates a new instance of SourceControlSyncJobClient. +func (c *ClientFactory) NewSourceControlSyncJobClient() *SourceControlSyncJobClient { + subClient, _ := NewSourceControlSyncJobClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewRunbookDraftClient() *RunbookDraftClient { - subClient, _ := NewRunbookDraftClient(c.subscriptionID, c.credential, c.options) +// NewSourceControlSyncJobStreamsClient creates a new instance of SourceControlSyncJobStreamsClient. +func (c *ClientFactory) NewSourceControlSyncJobStreamsClient() *SourceControlSyncJobStreamsClient { + subClient, _ := NewSourceControlSyncJobStreamsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewRunbookClient() *RunbookClient { - subClient, _ := NewRunbookClient(c.subscriptionID, c.credential, c.options) +// NewStatisticsClient creates a new instance of StatisticsClient. +func (c *ClientFactory) NewStatisticsClient() *StatisticsClient { + subClient, _ := NewStatisticsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewTestJobStreamsClient() *TestJobStreamsClient { - subClient, _ := NewTestJobStreamsClient(c.subscriptionID, c.credential, c.options) +// NewTestJobClient creates a new instance of TestJobClient. +func (c *ClientFactory) NewTestJobClient() *TestJobClient { + subClient, _ := NewTestJobClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewTestJobClient() *TestJobClient { - subClient, _ := NewTestJobClient(c.subscriptionID, c.credential, c.options) +// NewTestJobStreamsClient creates a new instance of TestJobStreamsClient. +func (c *ClientFactory) NewTestJobStreamsClient() *TestJobStreamsClient { + subClient, _ := NewTestJobStreamsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWebhookClient() *WebhookClient { - subClient, _ := NewWebhookClient(c.subscriptionID, c.credential, c.options) +// NewUsagesClient creates a new instance of UsagesClient. +func (c *ClientFactory) NewUsagesClient() *UsagesClient { + subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewHybridRunbookWorkersClient() *HybridRunbookWorkersClient { - subClient, _ := NewHybridRunbookWorkersClient(c.subscriptionID, c.credential, c.options) +// NewVariableClient creates a new instance of VariableClient. +func (c *ClientFactory) NewVariableClient() *VariableClient { + subClient, _ := NewVariableClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDeletedAutomationAccountsClient() *DeletedAutomationAccountsClient { - subClient, _ := NewDeletedAutomationAccountsClient(c.subscriptionID, c.credential, c.options) +// NewWatcherClient creates a new instance of WatcherClient. +func (c *ClientFactory) NewWatcherClient() *WatcherClient { + subClient, _ := NewWatcherClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewHybridRunbookWorkerGroupClient() *HybridRunbookWorkerGroupClient { - subClient, _ := NewHybridRunbookWorkerGroupClient(c.subscriptionID, c.credential, c.options) +// NewWebhookClient creates a new instance of WebhookClient. +func (c *ClientFactory) NewWebhookClient() *WebhookClient { + subClient, _ := NewWebhookClient(c.subscriptionID, c.credential, c.options) return subClient } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/connection_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/connection_client.go index a25fe5e4..8345ac26 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/connection_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/connection_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type ConnectionClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectionClient, error) { - cl, err := arm.NewClient(moduleName+".ConnectionClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewConnectionClient(subscriptionID string, credential azcore.TokenCredentia // - options - ConnectionClientCreateOrUpdateOptions contains the optional parameters for the ConnectionClient.CreateOrUpdate // method. func (client *ConnectionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters, options *ConnectionClientCreateOrUpdateOptions) (ConnectionClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ConnectionClient.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, automationAccountName, connectionName, parameters, options) if err != nil { return ConnectionClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ConnectionClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ConnectionClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *ConnectionClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *ConnectionClient) createOrUpdateHandleResponse(resp *http.Response // - connectionName - The name of connection. // - options - ConnectionClientDeleteOptions contains the optional parameters for the ConnectionClient.Delete method. func (client *ConnectionClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, options *ConnectionClientDeleteOptions) (ConnectionClientDeleteResponse, error) { + var err error + const operationName = "ConnectionClient.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, automationAccountName, connectionName, options) if err != nil { return ConnectionClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ConnectionClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ConnectionClientDeleteResponse{}, err } return ConnectionClientDeleteResponse{}, nil } @@ -171,18 +186,25 @@ func (client *ConnectionClient) deleteCreateRequest(ctx context.Context, resourc // - connectionName - The name of connection. // - options - ConnectionClientGetOptions contains the optional parameters for the ConnectionClient.Get method. func (client *ConnectionClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, options *ConnectionClientGetOptions) (ConnectionClientGetResponse, error) { + var err error + const operationName = "ConnectionClient.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, automationAccountName, connectionName, options) if err != nil { return ConnectionClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectionClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectionClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -237,25 +259,20 @@ func (client *ConnectionClient) NewListByAutomationAccountPager(resourceGroupNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ConnectionClientListByAutomationAccountResponse) (ConnectionClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ConnectionClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ConnectionClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return ConnectionClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectionClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -304,18 +321,25 @@ func (client *ConnectionClient) listByAutomationAccountHandleResponse(resp *http // - parameters - The parameters supplied to the update a connection operation. // - options - ConnectionClientUpdateOptions contains the optional parameters for the ConnectionClient.Update method. func (client *ConnectionClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters, options *ConnectionClientUpdateOptions) (ConnectionClientUpdateResponse, error) { + var err error + const operationName = "ConnectionClient.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, automationAccountName, connectionName, parameters, options) if err != nil { return ConnectionClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectionClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectionClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -345,7 +369,10 @@ func (client *ConnectionClient) updateCreateRequest(ctx context.Context, resourc reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/connectiontype_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/connectiontype_client.go index 37e09675..63a6c9fd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/connectiontype_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/connectiontype_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type ConnectionTypeClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewConnectionTypeClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectionTypeClient, error) { - cl, err := arm.NewClient(moduleName+".ConnectionTypeClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewConnectionTypeClient(subscriptionID string, credential azcore.TokenCrede // - options - ConnectionTypeClientCreateOrUpdateOptions contains the optional parameters for the ConnectionTypeClient.CreateOrUpdate // method. func (client *ConnectionTypeClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters, options *ConnectionTypeClientCreateOrUpdateOptions) (ConnectionTypeClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ConnectionTypeClient.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, automationAccountName, connectionTypeName, parameters, options) if err != nil { return ConnectionTypeClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionTypeClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return ConnectionTypeClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ConnectionTypeClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *ConnectionTypeClient) createOrUpdateCreateRequest(ctx context.Cont reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *ConnectionTypeClient) createOrUpdateHandleResponse(resp *http.Resp // - connectionTypeName - The name of connection type. // - options - ConnectionTypeClientDeleteOptions contains the optional parameters for the ConnectionTypeClient.Delete method. func (client *ConnectionTypeClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, options *ConnectionTypeClientDeleteOptions) (ConnectionTypeClientDeleteResponse, error) { + var err error + const operationName = "ConnectionTypeClient.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, automationAccountName, connectionTypeName, options) if err != nil { return ConnectionTypeClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionTypeClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ConnectionTypeClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ConnectionTypeClientDeleteResponse{}, err } return ConnectionTypeClientDeleteResponse{}, nil } @@ -171,18 +186,25 @@ func (client *ConnectionTypeClient) deleteCreateRequest(ctx context.Context, res // - connectionTypeName - The name of connection type. // - options - ConnectionTypeClientGetOptions contains the optional parameters for the ConnectionTypeClient.Get method. func (client *ConnectionTypeClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, options *ConnectionTypeClientGetOptions) (ConnectionTypeClientGetResponse, error) { + var err error + const operationName = "ConnectionTypeClient.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, automationAccountName, connectionTypeName, options) if err != nil { return ConnectionTypeClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionTypeClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectionTypeClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectionTypeClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -237,25 +259,20 @@ func (client *ConnectionTypeClient) NewListByAutomationAccountPager(resourceGrou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ConnectionTypeClientListByAutomationAccountResponse) (ConnectionTypeClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ConnectionTypeClient.NewListByAutomationAccountPager") + 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.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return ConnectionTypeClientListByAutomationAccountResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectionTypeClientListByAutomationAccountResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectionTypeClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/constants.go index a794aa37..376aab40 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation const ( - moduleName = "armautomation" - moduleVersion = "v0.8.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" + moduleVersion = "v0.9.0" ) // AgentRegistrationKeyName - Gets or sets the agent registration key name - primary or secondary. @@ -410,42 +409,42 @@ func PossibleLinuxUpdateClassesValues() []LinuxUpdateClasses { type ModuleProvisioningState string const ( - ModuleProvisioningStateCreated ModuleProvisioningState = "Created" - ModuleProvisioningStateCreating ModuleProvisioningState = "Creating" - ModuleProvisioningStateStartingImportModuleRunbook ModuleProvisioningState = "StartingImportModuleRunbook" - ModuleProvisioningStateRunningImportModuleRunbook ModuleProvisioningState = "RunningImportModuleRunbook" - ModuleProvisioningStateContentRetrieved ModuleProvisioningState = "ContentRetrieved" - ModuleProvisioningStateContentDownloaded ModuleProvisioningState = "ContentDownloaded" - ModuleProvisioningStateContentValidated ModuleProvisioningState = "ContentValidated" + ModuleProvisioningStateActivitiesStored ModuleProvisioningState = "ActivitiesStored" + ModuleProvisioningStateCancelled ModuleProvisioningState = "Cancelled" ModuleProvisioningStateConnectionTypeImported ModuleProvisioningState = "ConnectionTypeImported" + ModuleProvisioningStateContentDownloaded ModuleProvisioningState = "ContentDownloaded" + ModuleProvisioningStateContentRetrieved ModuleProvisioningState = "ContentRetrieved" ModuleProvisioningStateContentStored ModuleProvisioningState = "ContentStored" + ModuleProvisioningStateContentValidated ModuleProvisioningState = "ContentValidated" + ModuleProvisioningStateCreated ModuleProvisioningState = "Created" + ModuleProvisioningStateCreating ModuleProvisioningState = "Creating" + ModuleProvisioningStateFailed ModuleProvisioningState = "Failed" ModuleProvisioningStateModuleDataStored ModuleProvisioningState = "ModuleDataStored" - ModuleProvisioningStateActivitiesStored ModuleProvisioningState = "ActivitiesStored" ModuleProvisioningStateModuleImportRunbookComplete ModuleProvisioningState = "ModuleImportRunbookComplete" + ModuleProvisioningStateRunningImportModuleRunbook ModuleProvisioningState = "RunningImportModuleRunbook" + ModuleProvisioningStateStartingImportModuleRunbook ModuleProvisioningState = "StartingImportModuleRunbook" ModuleProvisioningStateSucceeded ModuleProvisioningState = "Succeeded" - ModuleProvisioningStateFailed ModuleProvisioningState = "Failed" - ModuleProvisioningStateCancelled ModuleProvisioningState = "Cancelled" ModuleProvisioningStateUpdating ModuleProvisioningState = "Updating" ) // PossibleModuleProvisioningStateValues returns the possible values for the ModuleProvisioningState const type. func PossibleModuleProvisioningStateValues() []ModuleProvisioningState { return []ModuleProvisioningState{ - ModuleProvisioningStateCreated, - ModuleProvisioningStateCreating, - ModuleProvisioningStateStartingImportModuleRunbook, - ModuleProvisioningStateRunningImportModuleRunbook, - ModuleProvisioningStateContentRetrieved, - ModuleProvisioningStateContentDownloaded, - ModuleProvisioningStateContentValidated, + ModuleProvisioningStateActivitiesStored, + ModuleProvisioningStateCancelled, ModuleProvisioningStateConnectionTypeImported, + ModuleProvisioningStateContentDownloaded, + ModuleProvisioningStateContentRetrieved, ModuleProvisioningStateContentStored, + ModuleProvisioningStateContentValidated, + ModuleProvisioningStateCreated, + ModuleProvisioningStateCreating, + ModuleProvisioningStateFailed, ModuleProvisioningStateModuleDataStored, - ModuleProvisioningStateActivitiesStored, ModuleProvisioningStateModuleImportRunbookComplete, + ModuleProvisioningStateRunningImportModuleRunbook, + ModuleProvisioningStateStartingImportModuleRunbook, ModuleProvisioningStateSucceeded, - ModuleProvisioningStateFailed, - ModuleProvisioningStateCancelled, ModuleProvisioningStateUpdating, } } @@ -454,15 +453,15 @@ func PossibleModuleProvisioningStateValues() []ModuleProvisioningState { type OperatingSystemType string const ( - OperatingSystemTypeWindows OperatingSystemType = "Windows" OperatingSystemTypeLinux OperatingSystemType = "Linux" + OperatingSystemTypeWindows OperatingSystemType = "Windows" ) // PossibleOperatingSystemTypeValues returns the possible values for the OperatingSystemType const type. func PossibleOperatingSystemTypeValues() []OperatingSystemType { return []OperatingSystemType{ - OperatingSystemTypeWindows, OperatingSystemTypeLinux, + OperatingSystemTypeWindows, } } @@ -488,19 +487,19 @@ func PossibleProvisioningStateValues() []ProvisioningState { type ResourceIdentityType string const ( + ResourceIdentityTypeNone ResourceIdentityType = "None" ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" - ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" - ResourceIdentityTypeNone ResourceIdentityType = "None" + ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" ) // PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type. func PossibleResourceIdentityTypeValues() []ResourceIdentityType { return []ResourceIdentityType{ + ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, - ResourceIdentityTypeUserAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, - ResourceIdentityTypeNone, + ResourceIdentityTypeUserAssigned, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/credential_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/credential_client.go index d3f883ff..a25e0a7d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/credential_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/credential_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type CredentialClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCredentialClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CredentialClient, error) { - cl, err := arm.NewClient(moduleName+".CredentialClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewCredentialClient(subscriptionID string, credential azcore.TokenCredentia // - options - CredentialClientCreateOrUpdateOptions contains the optional parameters for the CredentialClient.CreateOrUpdate // method. func (client *CredentialClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters, options *CredentialClientCreateOrUpdateOptions) (CredentialClientCreateOrUpdateResponse, error) { + var err error + const operationName = "CredentialClient.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, automationAccountName, credentialName, parameters, options) if err != nil { return CredentialClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CredentialClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return CredentialClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return CredentialClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *CredentialClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *CredentialClient) createOrUpdateHandleResponse(resp *http.Response // - credentialName - The name of credential. // - options - CredentialClientDeleteOptions contains the optional parameters for the CredentialClient.Delete method. func (client *CredentialClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, options *CredentialClientDeleteOptions) (CredentialClientDeleteResponse, error) { + var err error + const operationName = "CredentialClient.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, automationAccountName, credentialName, options) if err != nil { return CredentialClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CredentialClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CredentialClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CredentialClientDeleteResponse{}, err } return CredentialClientDeleteResponse{}, nil } @@ -171,18 +186,25 @@ func (client *CredentialClient) deleteCreateRequest(ctx context.Context, resourc // - credentialName - The name of credential. // - options - CredentialClientGetOptions contains the optional parameters for the CredentialClient.Get method. func (client *CredentialClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, options *CredentialClientGetOptions) (CredentialClientGetResponse, error) { + var err error + const operationName = "CredentialClient.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, automationAccountName, credentialName, options) if err != nil { return CredentialClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CredentialClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CredentialClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CredentialClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -237,25 +259,20 @@ func (client *CredentialClient) NewListByAutomationAccountPager(resourceGroupNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CredentialClientListByAutomationAccountResponse) (CredentialClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CredentialClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CredentialClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return CredentialClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CredentialClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -304,18 +321,25 @@ func (client *CredentialClient) listByAutomationAccountHandleResponse(resp *http // - parameters - The parameters supplied to the Update credential operation. // - options - CredentialClientUpdateOptions contains the optional parameters for the CredentialClient.Update method. func (client *CredentialClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialUpdateParameters, options *CredentialClientUpdateOptions) (CredentialClientUpdateResponse, error) { + var err error + const operationName = "CredentialClient.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, automationAccountName, credentialName, parameters, options) if err != nil { return CredentialClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CredentialClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CredentialClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CredentialClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -345,7 +369,10 @@ func (client *CredentialClient) updateCreateRequest(ctx context.Context, resourc reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/deletedautomationaccounts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/deletedautomationaccounts_client.go index 12e74629..f7dae9c2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/deletedautomationaccounts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/deletedautomationaccounts_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type DeletedAutomationAccountsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDeletedAutomationAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedAutomationAccountsClient, error) { - cl, err := arm.NewClient(moduleName+".DeletedAutomationAccountsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -52,18 +51,25 @@ func NewDeletedAutomationAccountsClient(subscriptionID string, credential azcore // - options - DeletedAutomationAccountsClientListBySubscriptionOptions contains the optional parameters for the DeletedAutomationAccountsClient.ListBySubscription // method. func (client *DeletedAutomationAccountsClient) ListBySubscription(ctx context.Context, options *DeletedAutomationAccountsClientListBySubscriptionOptions) (DeletedAutomationAccountsClientListBySubscriptionResponse, error) { + var err error + const operationName = "DeletedAutomationAccountsClient.ListBySubscription" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listBySubscriptionCreateRequest(ctx, options) if err != nil { return DeletedAutomationAccountsClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DeletedAutomationAccountsClientListBySubscriptionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeletedAutomationAccountsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DeletedAutomationAccountsClientListBySubscriptionResponse{}, err } - return client.listBySubscriptionHandleResponse(resp) + resp, err := client.listBySubscriptionHandleResponse(httpResp) + return resp, err } // listBySubscriptionCreateRequest creates the ListBySubscription request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dsccompilationjob_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dsccompilationjob_client.go index bc6fc1da..183a7406 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dsccompilationjob_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dsccompilationjob_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type DscCompilationJobClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDscCompilationJobClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DscCompilationJobClient, error) { - cl, err := arm.NewClient(moduleName+".DscCompilationJobClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,9 +60,14 @@ func (client *DscCompilationJobClient) BeginCreate(ctx context.Context, resource if err != nil { return nil, err } - return runtime.NewPoller[DscCompilationJobClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DscCompilationJobClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DscCompilationJobClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DscCompilationJobClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +76,24 @@ func (client *DscCompilationJobClient) BeginCreate(ctx context.Context, resource // // Generated from API version 2020-01-13-preview func (client *DscCompilationJobClient) create(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobName string, parameters DscCompilationJobCreateParameters, options *DscCompilationJobClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "DscCompilationJobClient.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, automationAccountName, compilationJobName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -113,7 +123,10 @@ func (client *DscCompilationJobClient) createCreateRequest(ctx context.Context, reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Get - Retrieve the Dsc configuration compilation job identified by job id. @@ -125,18 +138,25 @@ func (client *DscCompilationJobClient) createCreateRequest(ctx context.Context, // - compilationJobName - The DSC configuration Id. // - options - DscCompilationJobClientGetOptions contains the optional parameters for the DscCompilationJobClient.Get method. func (client *DscCompilationJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobName string, options *DscCompilationJobClientGetOptions) (DscCompilationJobClientGetResponse, error) { + var err error + const operationName = "DscCompilationJobClient.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, automationAccountName, compilationJobName, options) if err != nil { return DscCompilationJobClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscCompilationJobClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscCompilationJobClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscCompilationJobClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -189,18 +209,25 @@ func (client *DscCompilationJobClient) getHandleResponse(resp *http.Response) (D // - options - DscCompilationJobClientGetStreamOptions contains the optional parameters for the DscCompilationJobClient.GetStream // method. func (client *DscCompilationJobClient) GetStream(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, jobStreamID string, options *DscCompilationJobClientGetStreamOptions) (DscCompilationJobClientGetStreamResponse, error) { + var err error + const operationName = "DscCompilationJobClient.GetStream" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getStreamCreateRequest(ctx, resourceGroupName, automationAccountName, jobID, jobStreamID, options) if err != nil { return DscCompilationJobClientGetStreamResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscCompilationJobClientGetStreamResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscCompilationJobClientGetStreamResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscCompilationJobClientGetStreamResponse{}, err } - return client.getStreamHandleResponse(resp) + resp, err := client.getStreamHandleResponse(httpResp) + return resp, err } // getStreamCreateRequest creates the GetStream request. @@ -214,6 +241,9 @@ func (client *DscCompilationJobClient) getStreamCreateRequest(ctx context.Contex return nil, errors.New("parameter automationAccountName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if jobID == "" { + return nil, errors.New("parameter jobID cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{jobId}", url.PathEscape(jobID)) if jobStreamID == "" { return nil, errors.New("parameter jobStreamID cannot be empty") @@ -256,25 +286,20 @@ func (client *DscCompilationJobClient) NewListByAutomationAccountPager(resourceG return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DscCompilationJobClientListByAutomationAccountResponse) (DscCompilationJobClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DscCompilationJobClient.NewListByAutomationAccountPager") + 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.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return DscCompilationJobClientListByAutomationAccountResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DscCompilationJobClientListByAutomationAccountResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscCompilationJobClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dsccompilationjobstream_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dsccompilationjobstream_client.go index 960c0626..87390705 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dsccompilationjobstream_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dsccompilationjobstream_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type DscCompilationJobStreamClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDscCompilationJobStreamClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DscCompilationJobStreamClient, error) { - cl, err := arm.NewClient(moduleName+".DscCompilationJobStreamClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewDscCompilationJobStreamClient(subscriptionID string, credential azcore.T // - options - DscCompilationJobStreamClientListByJobOptions contains the optional parameters for the DscCompilationJobStreamClient.ListByJob // method. func (client *DscCompilationJobStreamClient) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, options *DscCompilationJobStreamClientListByJobOptions) (DscCompilationJobStreamClientListByJobResponse, error) { + var err error + const operationName = "DscCompilationJobStreamClient.ListByJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByJobCreateRequest(ctx, resourceGroupName, automationAccountName, jobID, options) if err != nil { return DscCompilationJobStreamClientListByJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscCompilationJobStreamClientListByJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscCompilationJobStreamClientListByJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscCompilationJobStreamClientListByJobResponse{}, err } - return client.listByJobHandleResponse(resp) + resp, err := client.listByJobHandleResponse(httpResp) + return resp, err } // listByJobCreateRequest creates the ListByJob request. @@ -80,6 +86,9 @@ func (client *DscCompilationJobStreamClient) listByJobCreateRequest(ctx context. return nil, errors.New("parameter automationAccountName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if jobID == "" { + return nil, errors.New("parameter jobID cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{jobId}", url.PathEscape(jobID)) if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dscconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dscconfiguration_client.go index 961bce0a..891a1b35 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dscconfiguration_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dscconfiguration_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -36,7 +35,7 @@ type DscConfigurationClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDscConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DscConfigurationClient, error) { - cl, err := arm.NewClient(moduleName+".DscConfigurationClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,18 +57,25 @@ func NewDscConfigurationClient(subscriptionID string, credential azcore.TokenCre // - options - DscConfigurationClientCreateOrUpdateWithJSONOptions contains the optional parameters for the DscConfigurationClient.CreateOrUpdateWithJSON // method. func (client *DscConfigurationClient) CreateOrUpdateWithJSON(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters, options *DscConfigurationClientCreateOrUpdateWithJSONOptions) (DscConfigurationClientCreateOrUpdateWithJSONResponse, error) { + var err error + const operationName = "DscConfigurationClient.CreateOrUpdateWithJSON" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateWithJSONCreateRequest(ctx, resourceGroupName, automationAccountName, configurationName, parameters, options) if err != nil { return DscConfigurationClientCreateOrUpdateWithJSONResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientCreateOrUpdateWithJSONResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DscConfigurationClientCreateOrUpdateWithJSONResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientCreateOrUpdateWithJSONResponse{}, err } - return client.createOrUpdateWithJSONHandleResponse(resp) + resp, err := client.createOrUpdateWithJSONHandleResponse(httpResp) + return resp, err } // createOrUpdateWithJSONCreateRequest creates the CreateOrUpdateWithJSON request. @@ -99,7 +105,10 @@ func (client *DscConfigurationClient) createOrUpdateWithJSONCreateRequest(ctx co reqQP.Set("api-version", "2019-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateWithJSONHandleResponse handles the CreateOrUpdateWithJSON response. @@ -122,18 +131,25 @@ func (client *DscConfigurationClient) createOrUpdateWithJSONHandleResponse(resp // - options - DscConfigurationClientCreateOrUpdateWithTextOptions contains the optional parameters for the DscConfigurationClient.CreateOrUpdateWithText // method. func (client *DscConfigurationClient) CreateOrUpdateWithText(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters string, options *DscConfigurationClientCreateOrUpdateWithTextOptions) (DscConfigurationClientCreateOrUpdateWithTextResponse, error) { + var err error + const operationName = "DscConfigurationClient.CreateOrUpdateWithText" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateWithTextCreateRequest(ctx, resourceGroupName, automationAccountName, configurationName, parameters, options) if err != nil { return DscConfigurationClientCreateOrUpdateWithTextResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientCreateOrUpdateWithTextResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DscConfigurationClientCreateOrUpdateWithTextResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientCreateOrUpdateWithTextResponse{}, err } - return client.createOrUpdateWithTextHandleResponse(resp) + resp, err := client.createOrUpdateWithTextHandleResponse(httpResp) + return resp, err } // createOrUpdateWithTextCreateRequest creates the CreateOrUpdateWithText request. @@ -164,7 +180,10 @@ func (client *DscConfigurationClient) createOrUpdateWithTextCreateRequest(ctx co req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} body := streaming.NopCloser(strings.NewReader(parameters)) - return req, req.SetBody(body, "text/plain; charset=utf-8") + if err := req.SetBody(body, "text/plain; charset=utf-8"); err != nil { + return nil, err + } + return req, nil } // createOrUpdateWithTextHandleResponse handles the CreateOrUpdateWithText response. @@ -185,16 +204,22 @@ func (client *DscConfigurationClient) createOrUpdateWithTextHandleResponse(resp // - configurationName - The configuration name. // - options - DscConfigurationClientDeleteOptions contains the optional parameters for the DscConfigurationClient.Delete method. func (client *DscConfigurationClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, options *DscConfigurationClientDeleteOptions) (DscConfigurationClientDeleteResponse, error) { + var err error + const operationName = "DscConfigurationClient.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, automationAccountName, configurationName, options) if err != nil { return DscConfigurationClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DscConfigurationClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientDeleteResponse{}, err } return DscConfigurationClientDeleteResponse{}, nil } @@ -238,18 +263,25 @@ func (client *DscConfigurationClient) deleteCreateRequest(ctx context.Context, r // - configurationName - The configuration name. // - options - DscConfigurationClientGetOptions contains the optional parameters for the DscConfigurationClient.Get method. func (client *DscConfigurationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, options *DscConfigurationClientGetOptions) (DscConfigurationClientGetResponse, error) { + var err error + const operationName = "DscConfigurationClient.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, automationAccountName, configurationName, options) if err != nil { return DscConfigurationClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscConfigurationClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -301,18 +333,25 @@ func (client *DscConfigurationClient) getHandleResponse(resp *http.Response) (Ds // - options - DscConfigurationClientGetContentOptions contains the optional parameters for the DscConfigurationClient.GetContent // method. func (client *DscConfigurationClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, options *DscConfigurationClientGetContentOptions) (DscConfigurationClientGetContentResponse, error) { + var err error + const operationName = "DscConfigurationClient.GetContent" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getContentCreateRequest(ctx, resourceGroupName, automationAccountName, configurationName, options) if err != nil { return DscConfigurationClientGetContentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientGetContentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscConfigurationClientGetContentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientGetContentResponse{}, err } - return client.getContentHandleResponse(resp) + resp, err := client.getContentHandleResponse(httpResp) + return resp, err } // getContentCreateRequest creates the GetContent request. @@ -370,25 +409,20 @@ func (client *DscConfigurationClient) NewListByAutomationAccountPager(resourceGr return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DscConfigurationClientListByAutomationAccountResponse) (DscConfigurationClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DscConfigurationClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DscConfigurationClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return DscConfigurationClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscConfigurationClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -449,18 +483,25 @@ func (client *DscConfigurationClient) listByAutomationAccountHandleResponse(resp // - options - DscConfigurationClientUpdateWithJSONOptions contains the optional parameters for the DscConfigurationClient.UpdateWithJSON // method. func (client *DscConfigurationClient) UpdateWithJSON(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, options *DscConfigurationClientUpdateWithJSONOptions) (DscConfigurationClientUpdateWithJSONResponse, error) { + var err error + const operationName = "DscConfigurationClient.UpdateWithJSON" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateWithJSONCreateRequest(ctx, resourceGroupName, automationAccountName, configurationName, options) if err != nil { return DscConfigurationClientUpdateWithJSONResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientUpdateWithJSONResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscConfigurationClientUpdateWithJSONResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientUpdateWithJSONResponse{}, err } - return client.updateWithJSONHandleResponse(resp) + resp, err := client.updateWithJSONHandleResponse(httpResp) + return resp, err } // updateWithJSONCreateRequest creates the UpdateWithJSON request. @@ -491,7 +532,10 @@ func (client *DscConfigurationClient) updateWithJSONCreateRequest(ctx context.Co req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -515,18 +559,25 @@ func (client *DscConfigurationClient) updateWithJSONHandleResponse(resp *http.Re // - options - DscConfigurationClientUpdateWithTextOptions contains the optional parameters for the DscConfigurationClient.UpdateWithText // method. func (client *DscConfigurationClient) UpdateWithText(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, options *DscConfigurationClientUpdateWithTextOptions) (DscConfigurationClientUpdateWithTextResponse, error) { + var err error + const operationName = "DscConfigurationClient.UpdateWithText" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateWithTextCreateRequest(ctx, resourceGroupName, automationAccountName, configurationName, options) if err != nil { return DscConfigurationClientUpdateWithTextResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientUpdateWithTextResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscConfigurationClientUpdateWithTextResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientUpdateWithTextResponse{}, err } - return client.updateWithTextHandleResponse(resp) + resp, err := client.updateWithTextHandleResponse(httpResp) + return resp, err } // updateWithTextCreateRequest creates the UpdateWithText request. @@ -558,7 +609,10 @@ func (client *DscConfigurationClient) updateWithTextCreateRequest(ctx context.Co req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { body := streaming.NopCloser(strings.NewReader(*options.Parameters)) - return req, req.SetBody(body, "text/plain; charset=utf-8") + if err := req.SetBody(body, "text/plain; charset=utf-8"); err != nil { + return nil, err + } + return req, nil } return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dscnode_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dscnode_client.go index 4c2cc12a..a013be19 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dscnode_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dscnode_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -35,7 +34,7 @@ type DscNodeClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDscNodeClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DscNodeClient, error) { - cl, err := arm.NewClient(moduleName+".DscNodeClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,16 +54,22 @@ func NewDscNodeClient(subscriptionID string, credential azcore.TokenCredential, // - nodeID - The node id. // - options - DscNodeClientDeleteOptions contains the optional parameters for the DscNodeClient.Delete method. func (client *DscNodeClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, options *DscNodeClientDeleteOptions) (DscNodeClientDeleteResponse, error) { + var err error + const operationName = "DscNodeClient.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, automationAccountName, nodeID, options) if err != nil { return DscNodeClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscNodeClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscNodeClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscNodeClientDeleteResponse{}, err } return DscNodeClientDeleteResponse{}, nil } @@ -108,18 +113,25 @@ func (client *DscNodeClient) deleteCreateRequest(ctx context.Context, resourceGr // - nodeID - The node id. // - options - DscNodeClientGetOptions contains the optional parameters for the DscNodeClient.Get method. func (client *DscNodeClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, options *DscNodeClientGetOptions) (DscNodeClientGetResponse, error) { + var err error + const operationName = "DscNodeClient.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, automationAccountName, nodeID, options) if err != nil { return DscNodeClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscNodeClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscNodeClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscNodeClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -174,25 +186,20 @@ func (client *DscNodeClient) NewListByAutomationAccountPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DscNodeClientListByAutomationAccountResponse) (DscNodeClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DscNodeClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DscNodeClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return DscNodeClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscNodeClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -253,18 +260,25 @@ func (client *DscNodeClient) listByAutomationAccountHandleResponse(resp *http.Re // - dscNodeUpdateParameters - Parameters supplied to the update dsc node. // - options - DscNodeClientUpdateOptions contains the optional parameters for the DscNodeClient.Update method. func (client *DscNodeClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, dscNodeUpdateParameters DscNodeUpdateParameters, options *DscNodeClientUpdateOptions) (DscNodeClientUpdateResponse, error) { + var err error + const operationName = "DscNodeClient.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, automationAccountName, nodeID, dscNodeUpdateParameters, options) if err != nil { return DscNodeClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscNodeClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscNodeClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscNodeClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -294,7 +308,10 @@ func (client *DscNodeClient) updateCreateRequest(ctx context.Context, resourceGr reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, dscNodeUpdateParameters) + if err := runtime.MarshalAsJSON(req, dscNodeUpdateParameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dscnodeconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dscnodeconfiguration_client.go index b502fa64..71e23a51 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dscnodeconfiguration_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/dscnodeconfiguration_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -35,7 +34,7 @@ type DscNodeConfigurationClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDscNodeConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DscNodeConfigurationClient, error) { - cl, err := arm.NewClient(moduleName+".DscNodeConfigurationClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,9 +61,14 @@ func (client *DscNodeConfigurationClient) BeginCreateOrUpdate(ctx context.Contex if err != nil { return nil, err } - return runtime.NewPoller[DscNodeConfigurationClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DscNodeConfigurationClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DscNodeConfigurationClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DscNodeConfigurationClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +77,24 @@ func (client *DscNodeConfigurationClient) BeginCreateOrUpdate(ctx context.Contex // // Generated from API version 2020-01-13-preview func (client *DscNodeConfigurationClient) createOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters, options *DscNodeConfigurationClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DscNodeConfigurationClient.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, automationAccountName, nodeConfigurationName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -114,7 +124,10 @@ func (client *DscNodeConfigurationClient) createOrUpdateCreateRequest(ctx contex reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Delete - Delete the Dsc node configurations by node configuration. @@ -127,16 +140,22 @@ func (client *DscNodeConfigurationClient) createOrUpdateCreateRequest(ctx contex // - options - DscNodeConfigurationClientDeleteOptions contains the optional parameters for the DscNodeConfigurationClient.Delete // method. func (client *DscNodeConfigurationClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, options *DscNodeConfigurationClientDeleteOptions) (DscNodeConfigurationClientDeleteResponse, error) { + var err error + const operationName = "DscNodeConfigurationClient.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, automationAccountName, nodeConfigurationName, options) if err != nil { return DscNodeConfigurationClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscNodeConfigurationClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscNodeConfigurationClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscNodeConfigurationClientDeleteResponse{}, err } return DscNodeConfigurationClientDeleteResponse{}, nil } @@ -181,18 +200,25 @@ func (client *DscNodeConfigurationClient) deleteCreateRequest(ctx context.Contex // - options - DscNodeConfigurationClientGetOptions contains the optional parameters for the DscNodeConfigurationClient.Get // method. func (client *DscNodeConfigurationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, options *DscNodeConfigurationClientGetOptions) (DscNodeConfigurationClientGetResponse, error) { + var err error + const operationName = "DscNodeConfigurationClient.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, automationAccountName, nodeConfigurationName, options) if err != nil { return DscNodeConfigurationClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscNodeConfigurationClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscNodeConfigurationClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscNodeConfigurationClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -247,25 +273,20 @@ func (client *DscNodeConfigurationClient) NewListByAutomationAccountPager(resour return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DscNodeConfigurationClientListByAutomationAccountResponse) (DscNodeConfigurationClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DscNodeConfigurationClient.NewListByAutomationAccountPager") + 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.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return DscNodeConfigurationClientListByAutomationAccountResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DscNodeConfigurationClientListByAutomationAccountResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscNodeConfigurationClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/fields_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/fields_client.go index 3cf7a6f5..cceffb69 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/fields_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/fields_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type FieldsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFieldsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FieldsClient, error) { - cl, err := arm.NewClient(moduleName+".FieldsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,6 +58,7 @@ func (client *FieldsClient) NewListByTypePager(resourceGroupName string, automat return false }, Fetcher: func(ctx context.Context, page *FieldsClientListByTypeResponse) (FieldsClientListByTypeResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FieldsClient.NewListByTypePager") req, err := client.listByTypeCreateRequest(ctx, resourceGroupName, automationAccountName, moduleName, typeName, options) if err != nil { return FieldsClientListByTypeResponse{}, err @@ -72,6 +72,7 @@ func (client *FieldsClient) NewListByTypePager(resourceGroupName string, automat } return client.listByTypeHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/hybridrunbookworkergroup_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/hybridrunbookworkergroup_client.go index 2cfbaaea..c4e5487c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/hybridrunbookworkergroup_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/hybridrunbookworkergroup_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type HybridRunbookWorkerGroupClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewHybridRunbookWorkerGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HybridRunbookWorkerGroupClient, error) { - cl, err := arm.NewClient(moduleName+".HybridRunbookWorkerGroupClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewHybridRunbookWorkerGroupClient(subscriptionID string, credential azcore. // - options - HybridRunbookWorkerGroupClientCreateOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Create // method. func (client *HybridRunbookWorkerGroupClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, hybridRunbookWorkerGroupCreationParameters HybridRunbookWorkerGroupCreateOrUpdateParameters, options *HybridRunbookWorkerGroupClientCreateOptions) (HybridRunbookWorkerGroupClientCreateResponse, error) { + var err error + const operationName = "HybridRunbookWorkerGroupClient.Create" + 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, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerGroupCreationParameters, options) if err != nil { return HybridRunbookWorkerGroupClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkerGroupClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkerGroupClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkerGroupClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -97,7 +103,10 @@ func (client *HybridRunbookWorkerGroupClient) createCreateRequest(ctx context.Co reqQP.Set("api-version", "2022-02-22") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hybridRunbookWorkerGroupCreationParameters) + if err := runtime.MarshalAsJSON(req, hybridRunbookWorkerGroupCreationParameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -119,16 +128,22 @@ func (client *HybridRunbookWorkerGroupClient) createHandleResponse(resp *http.Re // - options - HybridRunbookWorkerGroupClientDeleteOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Delete // method. func (client *HybridRunbookWorkerGroupClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, options *HybridRunbookWorkerGroupClientDeleteOptions) (HybridRunbookWorkerGroupClientDeleteResponse, error) { + var err error + const operationName = "HybridRunbookWorkerGroupClient.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, automationAccountName, hybridRunbookWorkerGroupName, options) if err != nil { return HybridRunbookWorkerGroupClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkerGroupClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkerGroupClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkerGroupClientDeleteResponse{}, err } return HybridRunbookWorkerGroupClientDeleteResponse{}, nil } @@ -173,18 +188,25 @@ func (client *HybridRunbookWorkerGroupClient) deleteCreateRequest(ctx context.Co // - options - HybridRunbookWorkerGroupClientGetOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Get // method. func (client *HybridRunbookWorkerGroupClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, options *HybridRunbookWorkerGroupClientGetOptions) (HybridRunbookWorkerGroupClientGetResponse, error) { + var err error + const operationName = "HybridRunbookWorkerGroupClient.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, automationAccountName, hybridRunbookWorkerGroupName, options) if err != nil { return HybridRunbookWorkerGroupClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkerGroupClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkerGroupClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkerGroupClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -239,25 +261,20 @@ func (client *HybridRunbookWorkerGroupClient) NewListByAutomationAccountPager(re return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *HybridRunbookWorkerGroupClientListByAutomationAccountResponse) (HybridRunbookWorkerGroupClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return HybridRunbookWorkerGroupClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "HybridRunbookWorkerGroupClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return HybridRunbookWorkerGroupClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkerGroupClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -310,18 +327,25 @@ func (client *HybridRunbookWorkerGroupClient) listByAutomationAccountHandleRespo // - options - HybridRunbookWorkerGroupClientUpdateOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Update // method. func (client *HybridRunbookWorkerGroupClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, hybridRunbookWorkerGroupUpdationParameters HybridRunbookWorkerGroupCreateOrUpdateParameters, options *HybridRunbookWorkerGroupClientUpdateOptions) (HybridRunbookWorkerGroupClientUpdateResponse, error) { + var err error + const operationName = "HybridRunbookWorkerGroupClient.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, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerGroupUpdationParameters, options) if err != nil { return HybridRunbookWorkerGroupClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkerGroupClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkerGroupClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkerGroupClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -351,7 +375,10 @@ func (client *HybridRunbookWorkerGroupClient) updateCreateRequest(ctx context.Co reqQP.Set("api-version", "2022-02-22") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hybridRunbookWorkerGroupUpdationParameters) + if err := runtime.MarshalAsJSON(req, hybridRunbookWorkerGroupUpdationParameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/hybridrunbookworkers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/hybridrunbookworkers_client.go index cf90de76..6f31ff62 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/hybridrunbookworkers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/hybridrunbookworkers_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type HybridRunbookWorkersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewHybridRunbookWorkersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HybridRunbookWorkersClient, error) { - cl, err := arm.NewClient(moduleName+".HybridRunbookWorkersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,18 +56,25 @@ func NewHybridRunbookWorkersClient(subscriptionID string, credential azcore.Toke // - options - HybridRunbookWorkersClientCreateOptions contains the optional parameters for the HybridRunbookWorkersClient.Create // method. func (client *HybridRunbookWorkersClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, hybridRunbookWorkerID string, hybridRunbookWorkerCreationParameters HybridRunbookWorkerCreateParameters, options *HybridRunbookWorkersClientCreateOptions) (HybridRunbookWorkersClientCreateResponse, error) { + var err error + const operationName = "HybridRunbookWorkersClient.Create" + 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, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerID, hybridRunbookWorkerCreationParameters, options) if err != nil { return HybridRunbookWorkersClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkersClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkersClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkersClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -102,7 +108,10 @@ func (client *HybridRunbookWorkersClient) createCreateRequest(ctx context.Contex reqQP.Set("api-version", "2021-06-22") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hybridRunbookWorkerCreationParameters) + if err := runtime.MarshalAsJSON(req, hybridRunbookWorkerCreationParameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -125,16 +134,22 @@ func (client *HybridRunbookWorkersClient) createHandleResponse(resp *http.Respon // - options - HybridRunbookWorkersClientDeleteOptions contains the optional parameters for the HybridRunbookWorkersClient.Delete // method. func (client *HybridRunbookWorkersClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, hybridRunbookWorkerID string, options *HybridRunbookWorkersClientDeleteOptions) (HybridRunbookWorkersClientDeleteResponse, error) { + var err error + const operationName = "HybridRunbookWorkersClient.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, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerID, options) if err != nil { return HybridRunbookWorkersClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkersClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return HybridRunbookWorkersClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkersClientDeleteResponse{}, err } return HybridRunbookWorkersClientDeleteResponse{}, nil } @@ -184,18 +199,25 @@ func (client *HybridRunbookWorkersClient) deleteCreateRequest(ctx context.Contex // - options - HybridRunbookWorkersClientGetOptions contains the optional parameters for the HybridRunbookWorkersClient.Get // method. func (client *HybridRunbookWorkersClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, hybridRunbookWorkerID string, options *HybridRunbookWorkersClientGetOptions) (HybridRunbookWorkersClientGetResponse, error) { + var err error + const operationName = "HybridRunbookWorkersClient.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, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerID, options) if err != nil { return HybridRunbookWorkersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -255,25 +277,20 @@ func (client *HybridRunbookWorkersClient) NewListByHybridRunbookWorkerGroupPager return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *HybridRunbookWorkersClientListByHybridRunbookWorkerGroupResponse) (HybridRunbookWorkersClientListByHybridRunbookWorkerGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByHybridRunbookWorkerGroupCreateRequest(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return HybridRunbookWorkersClientListByHybridRunbookWorkerGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "HybridRunbookWorkersClient.NewListByHybridRunbookWorkerGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByHybridRunbookWorkerGroupCreateRequest(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options) + }, nil) if err != nil { return HybridRunbookWorkersClientListByHybridRunbookWorkerGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkersClientListByHybridRunbookWorkerGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByHybridRunbookWorkerGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -331,16 +348,22 @@ func (client *HybridRunbookWorkersClient) listByHybridRunbookWorkerGroupHandleRe // - options - HybridRunbookWorkersClientMoveOptions contains the optional parameters for the HybridRunbookWorkersClient.Move // method. func (client *HybridRunbookWorkersClient) Move(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, hybridRunbookWorkerID string, hybridRunbookWorkerMoveParameters HybridRunbookWorkerMoveParameters, options *HybridRunbookWorkersClientMoveOptions) (HybridRunbookWorkersClientMoveResponse, error) { + var err error + const operationName = "HybridRunbookWorkersClient.Move" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.moveCreateRequest(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerID, hybridRunbookWorkerMoveParameters, options) if err != nil { return HybridRunbookWorkersClientMoveResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkersClientMoveResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkersClientMoveResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkersClientMoveResponse{}, err } return HybridRunbookWorkersClientMoveResponse{}, nil } @@ -376,5 +399,8 @@ func (client *HybridRunbookWorkersClient) moveCreateRequest(ctx context.Context, reqQP.Set("api-version", "2021-06-22") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hybridRunbookWorkerMoveParameters) + if err := runtime.MarshalAsJSON(req, hybridRunbookWorkerMoveParameters); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/job_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/job_client.go index a0506478..87344f8c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/job_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/job_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type JobClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewJobClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobClient, error) { - cl, err := arm.NewClient(moduleName+".JobClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewJobClient(subscriptionID string, credential azcore.TokenCredential, opti // - parameters - The parameters supplied to the create job operation. // - options - JobClientCreateOptions contains the optional parameters for the JobClient.Create method. func (client *JobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, parameters JobCreateParameters, options *JobClientCreateOptions) (JobClientCreateResponse, error) { + var err error + const operationName = "JobClient.Create" + 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, automationAccountName, jobName, parameters, options) if err != nil { return JobClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return JobClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return JobClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -99,7 +105,10 @@ func (client *JobClient) createCreateRequest(ctx context.Context, resourceGroupN req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -120,18 +129,25 @@ func (client *JobClient) createHandleResponse(resp *http.Response) (JobClientCre // - jobName - The job name. // - options - JobClientGetOptions contains the optional parameters for the JobClient.Get method. func (client *JobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, options *JobClientGetOptions) (JobClientGetResponse, error) { + var err error + const operationName = "JobClient.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, automationAccountName, jobName, options) if err != nil { return JobClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -185,18 +201,25 @@ func (client *JobClient) getHandleResponse(resp *http.Response) (JobClientGetRes // - jobName - The name of the job to be created. // - options - JobClientGetOutputOptions contains the optional parameters for the JobClient.GetOutput method. func (client *JobClient) GetOutput(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, options *JobClientGetOutputOptions) (JobClientGetOutputResponse, error) { + var err error + const operationName = "JobClient.GetOutput" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getOutputCreateRequest(ctx, resourceGroupName, automationAccountName, jobName, options) if err != nil { return JobClientGetOutputResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientGetOutputResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobClientGetOutputResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobClientGetOutputResponse{}, err } - return client.getOutputHandleResponse(resp) + resp, err := client.getOutputHandleResponse(httpResp) + return resp, err } // getOutputCreateRequest creates the GetOutput request. @@ -253,18 +276,25 @@ func (client *JobClient) getOutputHandleResponse(resp *http.Response) (JobClient // - jobName - The job name. // - options - JobClientGetRunbookContentOptions contains the optional parameters for the JobClient.GetRunbookContent method. func (client *JobClient) GetRunbookContent(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, options *JobClientGetRunbookContentOptions) (JobClientGetRunbookContentResponse, error) { + var err error + const operationName = "JobClient.GetRunbookContent" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getRunbookContentCreateRequest(ctx, resourceGroupName, automationAccountName, jobName, options) if err != nil { return JobClientGetRunbookContentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientGetRunbookContentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobClientGetRunbookContentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobClientGetRunbookContentResponse{}, err } - return client.getRunbookContentHandleResponse(resp) + resp, err := client.getRunbookContentHandleResponse(httpResp) + return resp, err } // getRunbookContentCreateRequest creates the GetRunbookContent request. @@ -325,25 +355,20 @@ func (client *JobClient) NewListByAutomationAccountPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *JobClientListByAutomationAccountResponse) (JobClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobClient.NewListByAutomationAccountPager") + 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.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return JobClientListByAutomationAccountResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return JobClientListByAutomationAccountResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -397,16 +422,22 @@ func (client *JobClient) listByAutomationAccountHandleResponse(resp *http.Respon // - jobName - The job name. // - options - JobClientResumeOptions contains the optional parameters for the JobClient.Resume method. func (client *JobClient) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, options *JobClientResumeOptions) (JobClientResumeResponse, error) { + var err error + const operationName = "JobClient.Resume" + 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, automationAccountName, jobName, options) if err != nil { return JobClientResumeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientResumeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobClientResumeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobClientResumeResponse{}, err } return JobClientResumeResponse{}, nil } @@ -453,16 +484,22 @@ func (client *JobClient) resumeCreateRequest(ctx context.Context, resourceGroupN // - jobName - The job name. // - options - JobClientStopOptions contains the optional parameters for the JobClient.Stop method. func (client *JobClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, options *JobClientStopOptions) (JobClientStopResponse, error) { + var err error + const operationName = "JobClient.Stop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopCreateRequest(ctx, resourceGroupName, automationAccountName, jobName, options) if err != nil { return JobClientStopResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientStopResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobClientStopResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobClientStopResponse{}, err } return JobClientStopResponse{}, nil } @@ -509,16 +546,22 @@ func (client *JobClient) stopCreateRequest(ctx context.Context, resourceGroupNam // - jobName - The job name. // - options - JobClientSuspendOptions contains the optional parameters for the JobClient.Suspend method. func (client *JobClient) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, options *JobClientSuspendOptions) (JobClientSuspendResponse, error) { + var err error + const operationName = "JobClient.Suspend" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.suspendCreateRequest(ctx, resourceGroupName, automationAccountName, jobName, options) if err != nil { return JobClientSuspendResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientSuspendResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobClientSuspendResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobClientSuspendResponse{}, err } return JobClientSuspendResponse{}, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/jobschedule_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/jobschedule_client.go index e76f8193..716666db 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/jobschedule_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/jobschedule_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type JobScheduleClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewJobScheduleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobScheduleClient, error) { - cl, err := arm.NewClient(moduleName+".JobScheduleClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewJobScheduleClient(subscriptionID string, credential azcore.TokenCredenti // - parameters - The parameters supplied to the create job schedule operation. // - options - JobScheduleClientCreateOptions contains the optional parameters for the JobScheduleClient.Create method. func (client *JobScheduleClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID string, parameters JobScheduleCreateParameters, options *JobScheduleClientCreateOptions) (JobScheduleClientCreateResponse, error) { + var err error + const operationName = "JobScheduleClient.Create" + 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, automationAccountName, jobScheduleID, parameters, options) if err != nil { return JobScheduleClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobScheduleClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return JobScheduleClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return JobScheduleClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -80,6 +86,9 @@ func (client *JobScheduleClient) createCreateRequest(ctx context.Context, resour return nil, errors.New("parameter automationAccountName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if jobScheduleID == "" { + return nil, errors.New("parameter jobScheduleID cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{jobScheduleId}", url.PathEscape(jobScheduleID)) if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -93,7 +102,10 @@ func (client *JobScheduleClient) createCreateRequest(ctx context.Context, resour reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -114,16 +126,22 @@ func (client *JobScheduleClient) createHandleResponse(resp *http.Response) (JobS // - jobScheduleID - The job schedule name. // - options - JobScheduleClientDeleteOptions contains the optional parameters for the JobScheduleClient.Delete method. func (client *JobScheduleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID string, options *JobScheduleClientDeleteOptions) (JobScheduleClientDeleteResponse, error) { + var err error + const operationName = "JobScheduleClient.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, automationAccountName, jobScheduleID, options) if err != nil { return JobScheduleClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobScheduleClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobScheduleClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobScheduleClientDeleteResponse{}, err } return JobScheduleClientDeleteResponse{}, nil } @@ -139,6 +157,9 @@ func (client *JobScheduleClient) deleteCreateRequest(ctx context.Context, resour return nil, errors.New("parameter automationAccountName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if jobScheduleID == "" { + return nil, errors.New("parameter jobScheduleID cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{jobScheduleId}", url.PathEscape(jobScheduleID)) if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -164,18 +185,25 @@ func (client *JobScheduleClient) deleteCreateRequest(ctx context.Context, resour // - jobScheduleID - The job schedule name. // - options - JobScheduleClientGetOptions contains the optional parameters for the JobScheduleClient.Get method. func (client *JobScheduleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID string, options *JobScheduleClientGetOptions) (JobScheduleClientGetResponse, error) { + var err error + const operationName = "JobScheduleClient.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, automationAccountName, jobScheduleID, options) if err != nil { return JobScheduleClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobScheduleClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobScheduleClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobScheduleClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -189,6 +217,9 @@ func (client *JobScheduleClient) getCreateRequest(ctx context.Context, resourceG return nil, errors.New("parameter automationAccountName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if jobScheduleID == "" { + return nil, errors.New("parameter jobScheduleID cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{jobScheduleId}", url.PathEscape(jobScheduleID)) if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -227,25 +258,20 @@ func (client *JobScheduleClient) NewListByAutomationAccountPager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *JobScheduleClientListByAutomationAccountResponse) (JobScheduleClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return JobScheduleClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobScheduleClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return JobScheduleClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobScheduleClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/jobstream_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/jobstream_client.go index c6d494ec..c4765b80 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/jobstream_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/jobstream_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type JobStreamClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewJobStreamClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobStreamClient, error) { - cl, err := arm.NewClient(moduleName+".JobStreamClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewJobStreamClient(subscriptionID string, credential azcore.TokenCredential // - jobStreamID - The job stream id. // - options - JobStreamClientGetOptions contains the optional parameters for the JobStreamClient.Get method. func (client *JobStreamClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, jobStreamID string, options *JobStreamClientGetOptions) (JobStreamClientGetResponse, error) { + var err error + const operationName = "JobStreamClient.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, automationAccountName, jobName, jobStreamID, options) if err != nil { return JobStreamClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobStreamClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobStreamClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobStreamClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -128,25 +134,20 @@ func (client *JobStreamClient) NewListByJobPager(resourceGroupName string, autom return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *JobStreamClientListByJobResponse) (JobStreamClientListByJobResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByJobCreateRequest(ctx, resourceGroupName, automationAccountName, jobName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobStreamClient.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, automationAccountName, jobName, options) + }, nil) if err != nil { return JobStreamClientListByJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return JobStreamClientListByJobResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobStreamClientListByJobResponse{}, runtime.NewResponseError(resp) - } return client.listByJobHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/keys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/keys_client.go index f0960bf5..ef0a7d24 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/keys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/keys_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type KeysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KeysClient, error) { - cl, err := arm.NewClient(moduleName+".KeysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, opt // - options - KeysClientListByAutomationAccountOptions contains the optional parameters for the KeysClient.ListByAutomationAccount // method. func (client *KeysClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, options *KeysClientListByAutomationAccountOptions) (KeysClientListByAutomationAccountResponse, error) { + var err error + const operationName = "KeysClient.ListByAutomationAccount" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return KeysClientListByAutomationAccountResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KeysClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KeysClientListByAutomationAccountResponse{}, err } - return client.listByAutomationAccountHandleResponse(resp) + resp, err := client.listByAutomationAccountHandleResponse(httpResp) + return resp, err } // listByAutomationAccountCreateRequest creates the ListByAutomationAccount request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/linkedworkspace_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/linkedworkspace_client.go index 2e66fe75..1f76df0f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/linkedworkspace_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/linkedworkspace_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type LinkedWorkspaceClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLinkedWorkspaceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LinkedWorkspaceClient, error) { - cl, err := arm.NewClient(moduleName+".LinkedWorkspaceClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewLinkedWorkspaceClient(subscriptionID string, credential azcore.TokenCred // - automationAccountName - The name of the automation account. // - options - LinkedWorkspaceClientGetOptions contains the optional parameters for the LinkedWorkspaceClient.Get method. func (client *LinkedWorkspaceClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, options *LinkedWorkspaceClientGetOptions) (LinkedWorkspaceClientGetResponse, error) { + var err error + const operationName = "LinkedWorkspaceClient.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, automationAccountName, options) if err != nil { return LinkedWorkspaceClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LinkedWorkspaceClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LinkedWorkspaceClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LinkedWorkspaceClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/models.go index fb4812ad..1dbfeea9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -41,37 +40,6 @@ type Account struct { Type *string } -// AccountClientCreateOrUpdateOptions contains the optional parameters for the AccountClient.CreateOrUpdate method. -type AccountClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AccountClientDeleteOptions contains the optional parameters for the AccountClient.Delete method. -type AccountClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// AccountClientGetOptions contains the optional parameters for the AccountClient.Get method. -type AccountClientGetOptions struct { - // placeholder for future optional parameters -} - -// AccountClientListByResourceGroupOptions contains the optional parameters for the AccountClient.NewListByResourceGroupPager -// method. -type AccountClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// AccountClientListOptions contains the optional parameters for the AccountClient.NewListPager method. -type AccountClientListOptions struct { - // placeholder for future optional parameters -} - -// AccountClientUpdateOptions contains the optional parameters for the AccountClient.Update method. -type AccountClientUpdateOptions struct { - // placeholder for future optional parameters -} - // AccountCreateOrUpdateParameters - The parameters supplied to the create or update automation account operation. type AccountCreateOrUpdateParameters struct { // Sets the identity property for automation account @@ -195,16 +163,6 @@ type Activity struct { Name *string } -// ActivityClientGetOptions contains the optional parameters for the ActivityClient.Get method. -type ActivityClientGetOptions struct { - // placeholder for future optional parameters -} - -// ActivityClientListByModuleOptions contains the optional parameters for the ActivityClient.NewListByModulePager method. -type ActivityClientListByModuleOptions struct { - // placeholder for future optional parameters -} - // ActivityListResult - The response model for the list activity operation. type ActivityListResult struct { // Gets or sets the next link. @@ -335,18 +293,6 @@ type AgentRegistration struct { Keys *AgentRegistrationKeys } -// AgentRegistrationInformationClientGetOptions contains the optional parameters for the AgentRegistrationInformationClient.Get -// method. -type AgentRegistrationInformationClientGetOptions struct { - // placeholder for future optional parameters -} - -// AgentRegistrationInformationClientRegenerateKeyOptions contains the optional parameters for the AgentRegistrationInformationClient.RegenerateKey -// method. -type AgentRegistrationInformationClientRegenerateKeyOptions struct { - // placeholder for future optional parameters -} - // AgentRegistrationKeys - Definition of the agent registration keys. type AgentRegistrationKeys struct { // Gets or sets the primary key. @@ -389,32 +335,6 @@ type Certificate struct { Type *string } -// CertificateClientCreateOrUpdateOptions contains the optional parameters for the CertificateClient.CreateOrUpdate method. -type CertificateClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// CertificateClientDeleteOptions contains the optional parameters for the CertificateClient.Delete method. -type CertificateClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method. -type CertificateClientGetOptions struct { - // placeholder for future optional parameters -} - -// CertificateClientListByAutomationAccountOptions contains the optional parameters for the CertificateClient.NewListByAutomationAccountPager -// method. -type CertificateClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// CertificateClientUpdateOptions contains the optional parameters for the CertificateClient.Update method. -type CertificateClientUpdateOptions struct { - // placeholder for future optional parameters -} - // CertificateCreateOrUpdateParameters - The parameters supplied to the create or update or replace certificate operation. type CertificateCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the certificate. @@ -484,11 +404,6 @@ type CertificateUpdateProperties struct { Description *string } -// ClientConvertGraphRunbookContentOptions contains the optional parameters for the Client.ConvertGraphRunbookContent method. -type ClientConvertGraphRunbookContentOptions struct { - // placeholder for future optional parameters -} - type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties struct { // READ-ONLY; The client id of user assigned identity. ClientID *string @@ -512,32 +427,6 @@ type Connection struct { Type *string } -// ConnectionClientCreateOrUpdateOptions contains the optional parameters for the ConnectionClient.CreateOrUpdate method. -type ConnectionClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectionClientDeleteOptions contains the optional parameters for the ConnectionClient.Delete method. -type ConnectionClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ConnectionClientGetOptions contains the optional parameters for the ConnectionClient.Get method. -type ConnectionClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectionClientListByAutomationAccountOptions contains the optional parameters for the ConnectionClient.NewListByAutomationAccountPager -// method. -type ConnectionClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// ConnectionClientUpdateOptions contains the optional parameters for the ConnectionClient.Update method. -type ConnectionClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ConnectionCreateOrUpdateParameters - The parameters supplied to the create or update connection operation. type ConnectionCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the connection. @@ -607,28 +496,6 @@ type ConnectionTypeAssociationProperty struct { Name *string } -// ConnectionTypeClientCreateOrUpdateOptions contains the optional parameters for the ConnectionTypeClient.CreateOrUpdate -// method. -type ConnectionTypeClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectionTypeClientDeleteOptions contains the optional parameters for the ConnectionTypeClient.Delete method. -type ConnectionTypeClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ConnectionTypeClientGetOptions contains the optional parameters for the ConnectionTypeClient.Get method. -type ConnectionTypeClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectionTypeClientListByAutomationAccountOptions contains the optional parameters for the ConnectionTypeClient.NewListByAutomationAccountPager -// method. -type ConnectionTypeClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - // ConnectionTypeCreateOrUpdateParameters - The parameters supplied to the create or update connection type operation. type ConnectionTypeCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the connection type. @@ -743,32 +610,6 @@ type Credential struct { Type *string } -// CredentialClientCreateOrUpdateOptions contains the optional parameters for the CredentialClient.CreateOrUpdate method. -type CredentialClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// CredentialClientDeleteOptions contains the optional parameters for the CredentialClient.Delete method. -type CredentialClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CredentialClientGetOptions contains the optional parameters for the CredentialClient.Get method. -type CredentialClientGetOptions struct { - // placeholder for future optional parameters -} - -// CredentialClientListByAutomationAccountOptions contains the optional parameters for the CredentialClient.NewListByAutomationAccountPager -// method. -type CredentialClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// CredentialClientUpdateOptions contains the optional parameters for the CredentialClient.Update method. -type CredentialClientUpdateOptions struct { - // placeholder for future optional parameters -} - // CredentialCreateOrUpdateParameters - The parameters supplied to the create or update credential operation. type CredentialCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the credential. @@ -874,12 +715,6 @@ type DeletedAutomationAccountProperties struct { DeletionTime *time.Time } -// DeletedAutomationAccountsClientListBySubscriptionOptions contains the optional parameters for the DeletedAutomationAccountsClient.ListBySubscription -// method. -type DeletedAutomationAccountsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - // DscCompilationJob - Definition of the Dsc Compilation job. type DscCompilationJob struct { // Gets or sets the properties of the Dsc Compilation job. @@ -895,30 +730,6 @@ type DscCompilationJob struct { Type *string } -// DscCompilationJobClientBeginCreateOptions contains the optional parameters for the DscCompilationJobClient.BeginCreate -// method. -type DscCompilationJobClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DscCompilationJobClientGetOptions contains the optional parameters for the DscCompilationJobClient.Get method. -type DscCompilationJobClientGetOptions struct { - // placeholder for future optional parameters -} - -// DscCompilationJobClientGetStreamOptions contains the optional parameters for the DscCompilationJobClient.GetStream method. -type DscCompilationJobClientGetStreamOptions struct { - // placeholder for future optional parameters -} - -// DscCompilationJobClientListByAutomationAccountOptions contains the optional parameters for the DscCompilationJobClient.NewListByAutomationAccountPager -// method. -type DscCompilationJobClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - // DscCompilationJobCreateParameters - The parameters supplied to the create compilation job operation. type DscCompilationJobCreateParameters struct { // REQUIRED; Gets or sets the list of compilation job properties. @@ -1000,12 +811,6 @@ type DscCompilationJobProperties struct { StartedBy *string } -// DscCompilationJobStreamClientListByJobOptions contains the optional parameters for the DscCompilationJobStreamClient.ListByJob -// method. -type DscCompilationJobStreamClientListByJobOptions struct { - // placeholder for future optional parameters -} - // DscConfiguration - Definition of the configuration type. type DscConfiguration struct { // Gets or sets the etag of the resource. @@ -1036,60 +841,6 @@ type DscConfigurationAssociationProperty struct { Name *string } -// DscConfigurationClientCreateOrUpdateWithJSONOptions contains the optional parameters for the DscConfigurationClient.CreateOrUpdateWithJSON -// method. -type DscConfigurationClientCreateOrUpdateWithJSONOptions struct { - // placeholder for future optional parameters -} - -// DscConfigurationClientCreateOrUpdateWithTextOptions contains the optional parameters for the DscConfigurationClient.CreateOrUpdateWithText -// method. -type DscConfigurationClientCreateOrUpdateWithTextOptions struct { - // placeholder for future optional parameters -} - -// DscConfigurationClientDeleteOptions contains the optional parameters for the DscConfigurationClient.Delete method. -type DscConfigurationClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DscConfigurationClientGetContentOptions contains the optional parameters for the DscConfigurationClient.GetContent method. -type DscConfigurationClientGetContentOptions struct { - // placeholder for future optional parameters -} - -// DscConfigurationClientGetOptions contains the optional parameters for the DscConfigurationClient.Get method. -type DscConfigurationClientGetOptions struct { - // placeholder for future optional parameters -} - -// DscConfigurationClientListByAutomationAccountOptions contains the optional parameters for the DscConfigurationClient.NewListByAutomationAccountPager -// method. -type DscConfigurationClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string - // Return total rows. - Inlinecount *string - // The number of rows to skip. - Skip *int32 - // The number of rows to take. - Top *int32 -} - -// DscConfigurationClientUpdateWithJSONOptions contains the optional parameters for the DscConfigurationClient.UpdateWithJSON -// method. -type DscConfigurationClientUpdateWithJSONOptions struct { - // The create or update parameters for configuration. - Parameters *DscConfigurationUpdateParameters -} - -// DscConfigurationClientUpdateWithTextOptions contains the optional parameters for the DscConfigurationClient.UpdateWithText -// method. -type DscConfigurationClientUpdateWithTextOptions struct { - // The create or update parameters for configuration. - Parameters *string -} - // DscConfigurationCreateOrUpdateParameters - The parameters supplied to the create or update configuration operation. type DscConfigurationCreateOrUpdateParameters struct { // REQUIRED; Gets or sets configuration create or update properties. @@ -1234,34 +985,6 @@ type DscNode struct { Type *string } -// DscNodeClientDeleteOptions contains the optional parameters for the DscNodeClient.Delete method. -type DscNodeClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DscNodeClientGetOptions contains the optional parameters for the DscNodeClient.Get method. -type DscNodeClientGetOptions struct { - // placeholder for future optional parameters -} - -// DscNodeClientListByAutomationAccountOptions contains the optional parameters for the DscNodeClient.NewListByAutomationAccountPager -// method. -type DscNodeClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string - // Return total rows. - Inlinecount *string - // The number of rows to skip. - Skip *int32 - // The number of rows to take. - Top *int32 -} - -// DscNodeClientUpdateOptions contains the optional parameters for the DscNodeClient.Update method. -type DscNodeClientUpdateOptions struct { - // placeholder for future optional parameters -} - // DscNodeConfiguration - Definition of the dsc node configuration. type DscNodeConfiguration struct { // Gets or sets the configuration properties. @@ -1283,36 +1006,6 @@ type DscNodeConfigurationAssociationProperty struct { Name *string } -// DscNodeConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscNodeConfigurationClient.BeginCreateOrUpdate -// method. -type DscNodeConfigurationClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DscNodeConfigurationClientDeleteOptions contains the optional parameters for the DscNodeConfigurationClient.Delete method. -type DscNodeConfigurationClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DscNodeConfigurationClientGetOptions contains the optional parameters for the DscNodeConfigurationClient.Get method. -type DscNodeConfigurationClientGetOptions struct { - // placeholder for future optional parameters -} - -// DscNodeConfigurationClientListByAutomationAccountOptions contains the optional parameters for the DscNodeConfigurationClient.NewListByAutomationAccountPager -// method. -type DscNodeConfigurationClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string - // Return total rows. - Inlinecount *string - // The number of rows to skip. - Skip *int32 - // The number of rows to take. - Top *int32 -} - // DscNodeConfigurationCreateOrUpdateParameters - The parameters supplied to the create or update node configuration operation. type DscNodeConfigurationCreateOrUpdateParameters struct { // Name of the node configuration. @@ -1606,11 +1299,6 @@ type FieldDefinition struct { IsOptional *bool } -// FieldsClientListByTypeOptions contains the optional parameters for the FieldsClient.NewListByTypePager method. -type FieldsClientListByTypeOptions struct { - // placeholder for future optional parameters -} - // GraphicalRunbookContent - Graphical Runbook Content type GraphicalRunbookContent struct { // Graphical Runbook content as JSON @@ -1671,36 +1359,6 @@ type HybridRunbookWorkerGroup struct { Type *string } -// HybridRunbookWorkerGroupClientCreateOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Create -// method. -type HybridRunbookWorkerGroupClientCreateOptions struct { - // placeholder for future optional parameters -} - -// HybridRunbookWorkerGroupClientDeleteOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Delete -// method. -type HybridRunbookWorkerGroupClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// HybridRunbookWorkerGroupClientGetOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Get method. -type HybridRunbookWorkerGroupClientGetOptions struct { - // placeholder for future optional parameters -} - -// HybridRunbookWorkerGroupClientListByAutomationAccountOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.NewListByAutomationAccountPager -// method. -type HybridRunbookWorkerGroupClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - -// HybridRunbookWorkerGroupClientUpdateOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Update -// method. -type HybridRunbookWorkerGroupClientUpdateOptions struct { - // placeholder for future optional parameters -} - // HybridRunbookWorkerGroupCreateOrUpdateParameters - The parameters supplied to the create hybrid runbook worker group operation. type HybridRunbookWorkerGroupCreateOrUpdateParameters struct { // Gets or sets the name of the resource. @@ -1761,33 +1419,6 @@ type HybridRunbookWorkerProperties struct { WorkerType *WorkerType } -// HybridRunbookWorkersClientCreateOptions contains the optional parameters for the HybridRunbookWorkersClient.Create method. -type HybridRunbookWorkersClientCreateOptions struct { - // placeholder for future optional parameters -} - -// HybridRunbookWorkersClientDeleteOptions contains the optional parameters for the HybridRunbookWorkersClient.Delete method. -type HybridRunbookWorkersClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// HybridRunbookWorkersClientGetOptions contains the optional parameters for the HybridRunbookWorkersClient.Get method. -type HybridRunbookWorkersClientGetOptions struct { - // placeholder for future optional parameters -} - -// HybridRunbookWorkersClientListByHybridRunbookWorkerGroupOptions contains the optional parameters for the HybridRunbookWorkersClient.NewListByHybridRunbookWorkerGroupPager -// method. -type HybridRunbookWorkersClientListByHybridRunbookWorkerGroupOptions struct { - // The filter to apply on the operation. - Filter *string -} - -// HybridRunbookWorkersClientMoveOptions contains the optional parameters for the HybridRunbookWorkersClient.Move method. -type HybridRunbookWorkersClientMoveOptions struct { - // placeholder for future optional parameters -} - // HybridRunbookWorkersListResult - The response model for the list hybrid runbook workers. type HybridRunbookWorkersListResult struct { // Gets or sets the next link. @@ -1829,57 +1460,6 @@ type Job struct { Type *string } -// JobClientCreateOptions contains the optional parameters for the JobClient.Create method. -type JobClientCreateOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobClientGetOptions contains the optional parameters for the JobClient.Get method. -type JobClientGetOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobClientGetOutputOptions contains the optional parameters for the JobClient.GetOutput method. -type JobClientGetOutputOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobClientGetRunbookContentOptions contains the optional parameters for the JobClient.GetRunbookContent method. -type JobClientGetRunbookContentOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobClientListByAutomationAccountOptions contains the optional parameters for the JobClient.NewListByAutomationAccountPager -// method. -type JobClientListByAutomationAccountOptions struct { - // Identifies this specific client request. - ClientRequestID *string - // The filter to apply on the operation. - Filter *string -} - -// JobClientResumeOptions contains the optional parameters for the JobClient.Resume method. -type JobClientResumeOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobClientStopOptions contains the optional parameters for the JobClient.Stop method. -type JobClientStopOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobClientSuspendOptions contains the optional parameters for the JobClient.Suspend method. -type JobClientSuspendOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - // JobCollectionItem - Job collection item properties. type JobCollectionItem struct { // REQUIRED; Job properties. @@ -2017,28 +1597,6 @@ type JobSchedule struct { Type *string } -// JobScheduleClientCreateOptions contains the optional parameters for the JobScheduleClient.Create method. -type JobScheduleClientCreateOptions struct { - // placeholder for future optional parameters -} - -// JobScheduleClientDeleteOptions contains the optional parameters for the JobScheduleClient.Delete method. -type JobScheduleClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// JobScheduleClientGetOptions contains the optional parameters for the JobScheduleClient.Get method. -type JobScheduleClientGetOptions struct { - // placeholder for future optional parameters -} - -// JobScheduleClientListByAutomationAccountOptions contains the optional parameters for the JobScheduleClient.NewListByAutomationAccountPager -// method. -type JobScheduleClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - // JobScheduleCreateParameters - The parameters supplied to the create job schedule operation. type JobScheduleCreateParameters struct { // REQUIRED; Gets or sets the list of job schedule properties. @@ -2096,20 +1654,6 @@ type JobStream struct { Properties *JobStreamProperties } -// JobStreamClientGetOptions contains the optional parameters for the JobStreamClient.Get method. -type JobStreamClientGetOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobStreamClientListByJobOptions contains the optional parameters for the JobStreamClient.NewListByJobPager method. -type JobStreamClientListByJobOptions struct { - // Identifies this specific client request. - ClientRequestID *string - // The filter to apply on the operation. - Filter *string -} - // JobStreamListResult - The response model for the list job stream operation. type JobStreamListResult struct { // Gets or sets the next link. @@ -2169,22 +1713,12 @@ type KeyVaultProperties struct { KeyvaultURI *string } -// KeysClientListByAutomationAccountOptions contains the optional parameters for the KeysClient.ListByAutomationAccount method. -type KeysClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - // LinkedWorkspace - Definition of the linked workspace. type LinkedWorkspace struct { // READ-ONLY; Gets the id of the linked workspace. ID *string } -// LinkedWorkspaceClientGetOptions contains the optional parameters for the LinkedWorkspaceClient.Get method. -type LinkedWorkspaceClientGetOptions struct { - // placeholder for future optional parameters -} - // LinuxProperties - Linux specific update configuration. type LinuxProperties struct { // packages excluded from the software update configuration. @@ -2224,32 +1758,6 @@ type Module struct { Type *string } -// ModuleClientCreateOrUpdateOptions contains the optional parameters for the ModuleClient.CreateOrUpdate method. -type ModuleClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ModuleClientDeleteOptions contains the optional parameters for the ModuleClient.Delete method. -type ModuleClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ModuleClientGetOptions contains the optional parameters for the ModuleClient.Get method. -type ModuleClientGetOptions struct { - // placeholder for future optional parameters -} - -// ModuleClientListByAutomationAccountOptions contains the optional parameters for the ModuleClient.NewListByAutomationAccountPager -// method. -type ModuleClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// ModuleClientUpdateOptions contains the optional parameters for the ModuleClient.Update method. -type ModuleClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ModuleCreateOrUpdateParameters - The parameters supplied to the create or update module operation. type ModuleCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the module create properties. @@ -2353,11 +1861,6 @@ type NodeCount struct { Properties *NodeCountProperties } -// NodeCountInformationClientGetOptions contains the optional parameters for the NodeCountInformationClient.Get method. -type NodeCountInformationClientGetOptions struct { - // placeholder for future optional parameters -} - type NodeCountProperties struct { // Gets the count for the name Count *int32 @@ -2372,22 +1875,6 @@ type NodeCounts struct { Value []*NodeCount } -// NodeReportsClientGetContentOptions contains the optional parameters for the NodeReportsClient.GetContent method. -type NodeReportsClientGetContentOptions struct { - // placeholder for future optional parameters -} - -// NodeReportsClientGetOptions contains the optional parameters for the NodeReportsClient.Get method. -type NodeReportsClientGetOptions struct { - // placeholder for future optional parameters -} - -// NodeReportsClientListByNodeOptions contains the optional parameters for the NodeReportsClient.NewListByNodePager method. -type NodeReportsClientListByNodeOptions struct { - // The filter to apply on the operation. - Filter *string -} - // NonAzureQueryProperties - Non Azure query for the update configuration. type NonAzureQueryProperties struct { // Log Analytics Saved Search name. @@ -2397,18 +1884,6 @@ type NonAzureQueryProperties struct { WorkspaceID *string } -// ObjectDataTypesClientListFieldsByModuleAndTypeOptions contains the optional parameters for the ObjectDataTypesClient.NewListFieldsByModuleAndTypePager -// method. -type ObjectDataTypesClientListFieldsByModuleAndTypeOptions struct { - // placeholder for future optional parameters -} - -// ObjectDataTypesClientListFieldsByTypeOptions contains the optional parameters for the ObjectDataTypesClient.NewListFieldsByTypePager -// method. -type ObjectDataTypesClientListFieldsByTypeOptions struct { - // placeholder for future optional parameters -} - // Operation - Automation REST API operation type Operation struct { // Provider, Resource and Operation values @@ -2436,11 +1911,6 @@ type OperationListResult struct { Value []*Operation } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateEndpointConnection - A private endpoint connection type PrivateEndpointConnection struct { // Resource properties. @@ -2474,32 +1944,6 @@ type PrivateEndpointConnectionProperties struct { PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty } -// 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 -} - -// PrivateEndpointConnectionsClientListByAutomationAccountOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByAutomationAccountPager -// method. -type PrivateEndpointConnectionsClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - // PrivateEndpointProperty - Private endpoint which the connection belongs to. type PrivateEndpointProperty struct { // Resource id of the private endpoint. @@ -2536,12 +1980,6 @@ type PrivateLinkResourceProperties struct { RequiredMembers []*string } -// PrivateLinkResourcesClientAutomationOptions contains the optional parameters for the PrivateLinkResourcesClient.NewAutomationPager -// method. -type PrivateLinkResourcesClientAutomationOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkServiceConnectionStateProperty - Connection State of the Private Endpoint Connection. type PrivateLinkServiceConnectionStateProperty struct { // The private link service connection description. @@ -2566,33 +2004,6 @@ type ProxyResource struct { Type *string } -// Python2PackageClientCreateOrUpdateOptions contains the optional parameters for the Python2PackageClient.CreateOrUpdate -// method. -type Python2PackageClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// Python2PackageClientDeleteOptions contains the optional parameters for the Python2PackageClient.Delete method. -type Python2PackageClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// Python2PackageClientGetOptions contains the optional parameters for the Python2PackageClient.Get method. -type Python2PackageClientGetOptions struct { - // placeholder for future optional parameters -} - -// Python2PackageClientListByAutomationAccountOptions contains the optional parameters for the Python2PackageClient.NewListByAutomationAccountPager -// method. -type Python2PackageClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// Python2PackageClientUpdateOptions contains the optional parameters for the Python2PackageClient.Update method. -type Python2PackageClientUpdateOptions struct { - // placeholder for future optional parameters -} - // PythonPackageCreateParameters - The parameters supplied to the create or update module operation. type PythonPackageCreateParameters struct { // REQUIRED; Gets or sets the module create properties. @@ -2674,43 +2085,6 @@ type RunbookAssociationProperty struct { Name *string } -// RunbookClientBeginPublishOptions contains the optional parameters for the RunbookClient.BeginPublish method. -type RunbookClientBeginPublishOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RunbookClientCreateOrUpdateOptions contains the optional parameters for the RunbookClient.CreateOrUpdate method. -type RunbookClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// RunbookClientDeleteOptions contains the optional parameters for the RunbookClient.Delete method. -type RunbookClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// RunbookClientGetContentOptions contains the optional parameters for the RunbookClient.GetContent method. -type RunbookClientGetContentOptions struct { - // placeholder for future optional parameters -} - -// RunbookClientGetOptions contains the optional parameters for the RunbookClient.Get method. -type RunbookClientGetOptions struct { - // placeholder for future optional parameters -} - -// RunbookClientListByAutomationAccountOptions contains the optional parameters for the RunbookClient.NewListByAutomationAccountPager -// method. -type RunbookClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// RunbookClientUpdateOptions contains the optional parameters for the RunbookClient.Update method. -type RunbookClientUpdateOptions struct { - // placeholder for future optional parameters -} - // RunbookCreateOrUpdateDraftParameters - The parameters supplied to the create or update runbook operation. type RunbookCreateOrUpdateDraftParameters struct { // REQUIRED; Content of the Runbook. @@ -2797,28 +2171,6 @@ type RunbookDraft struct { Parameters map[string]*RunbookParameter } -// RunbookDraftClientBeginReplaceContentOptions contains the optional parameters for the RunbookDraftClient.BeginReplaceContent -// method. -type RunbookDraftClientBeginReplaceContentOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RunbookDraftClientGetContentOptions contains the optional parameters for the RunbookDraftClient.GetContent method. -type RunbookDraftClientGetContentOptions struct { - // placeholder for future optional parameters -} - -// RunbookDraftClientGetOptions contains the optional parameters for the RunbookDraftClient.Get method. -type RunbookDraftClientGetOptions struct { - // placeholder for future optional parameters -} - -// RunbookDraftClientUndoEditOptions contains the optional parameters for the RunbookDraftClient.UndoEdit method. -type RunbookDraftClientUndoEditOptions struct { - // placeholder for future optional parameters -} - // RunbookDraftUndoEditResult - The response model for the undo edit runbook operation. type RunbookDraftUndoEditResult struct { RequestID *string @@ -3005,32 +2357,6 @@ type ScheduleAssociationProperty struct { Name *string } -// ScheduleClientCreateOrUpdateOptions contains the optional parameters for the ScheduleClient.CreateOrUpdate method. -type ScheduleClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ScheduleClientDeleteOptions contains the optional parameters for the ScheduleClient.Delete method. -type ScheduleClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ScheduleClientGetOptions contains the optional parameters for the ScheduleClient.Get method. -type ScheduleClientGetOptions struct { - // placeholder for future optional parameters -} - -// ScheduleClientListByAutomationAccountOptions contains the optional parameters for the ScheduleClient.NewListByAutomationAccountPager -// method. -type ScheduleClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// ScheduleClientUpdateOptions contains the optional parameters for the ScheduleClient.Update method. -type ScheduleClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ScheduleCreateOrUpdateParameters - The parameters supplied to the create or update schedule operation. type ScheduleCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the Schedule. @@ -3217,27 +2543,6 @@ type SoftwareUpdateConfigurationMachineRunListResult struct { Value []*SoftwareUpdateConfigurationMachineRun } -// SoftwareUpdateConfigurationMachineRunsClientGetByIDOptions contains the optional parameters for the SoftwareUpdateConfigurationMachineRunsClient.GetByID -// method. -type SoftwareUpdateConfigurationMachineRunsClientGetByIDOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// SoftwareUpdateConfigurationMachineRunsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationMachineRunsClient.List -// method. -type SoftwareUpdateConfigurationMachineRunsClientListOptions struct { - // Identifies this specific client request. - ClientRequestID *string - // The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', - // and 'properties/softwareUpdateConfiguration/name' - Filter *string - // number of entries you skip before returning results - Skip *string - // Maximum number of entries returned in the results collection - Top *string -} - // SoftwareUpdateConfigurationProperties - Software update configuration properties. type SoftwareUpdateConfigurationProperties struct { // REQUIRED; Schedule information for the Software update configuration @@ -3352,27 +2657,6 @@ type SoftwareUpdateConfigurationRunTasks struct { PreTask *SoftwareUpdateConfigurationRunTaskProperties } -// SoftwareUpdateConfigurationRunsClientGetByIDOptions contains the optional parameters for the SoftwareUpdateConfigurationRunsClient.GetByID -// method. -type SoftwareUpdateConfigurationRunsClientGetByIDOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// SoftwareUpdateConfigurationRunsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationRunsClient.List -// method. -type SoftwareUpdateConfigurationRunsClientListOptions struct { - // Identifies this specific client request. - ClientRequestID *string - // The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', - // and 'properties/softwareUpdateConfiguration/name' - Filter *string - // Number of entries you skip before returning results - Skip *string - // Maximum number of entries returned in the results collection - Top *string -} - // SoftwareUpdateConfigurationTasks - Task properties of the software update configuration. type SoftwareUpdateConfigurationTasks struct { // Post task properties. @@ -3382,36 +2666,6 @@ type SoftwareUpdateConfigurationTasks struct { PreTask *TaskProperties } -// SoftwareUpdateConfigurationsClientCreateOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.Create -// method. -type SoftwareUpdateConfigurationsClientCreateOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// SoftwareUpdateConfigurationsClientDeleteOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.Delete -// method. -type SoftwareUpdateConfigurationsClientDeleteOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// SoftwareUpdateConfigurationsClientGetByNameOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.GetByName -// method. -type SoftwareUpdateConfigurationsClientGetByNameOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// SoftwareUpdateConfigurationsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.List -// method. -type SoftwareUpdateConfigurationsClientListOptions struct { - // Identifies this specific client request. - ClientRequestID *string - // The filter to apply on the operation. - Filter *string -} - // SourceControl - Definition of the source control. type SourceControl struct { // The properties of the source control. @@ -3427,33 +2681,6 @@ type SourceControl struct { Type *string } -// SourceControlClientCreateOrUpdateOptions contains the optional parameters for the SourceControlClient.CreateOrUpdate method. -type SourceControlClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SourceControlClientDeleteOptions contains the optional parameters for the SourceControlClient.Delete method. -type SourceControlClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SourceControlClientGetOptions contains the optional parameters for the SourceControlClient.Get method. -type SourceControlClientGetOptions struct { - // placeholder for future optional parameters -} - -// SourceControlClientListByAutomationAccountOptions contains the optional parameters for the SourceControlClient.NewListByAutomationAccountPager -// method. -type SourceControlClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - -// SourceControlClientUpdateOptions contains the optional parameters for the SourceControlClient.Update method. -type SourceControlClientUpdateOptions struct { - // placeholder for future optional parameters -} - // SourceControlCreateOrUpdateParameters - The parameters supplied to the create or update source control operation. type SourceControlCreateOrUpdateParameters struct { // REQUIRED; The properties of the source control. @@ -3585,23 +2812,6 @@ type SourceControlSyncJobByIDProperties struct { StartTime *time.Time } -// SourceControlSyncJobClientCreateOptions contains the optional parameters for the SourceControlSyncJobClient.Create method. -type SourceControlSyncJobClientCreateOptions struct { - // placeholder for future optional parameters -} - -// SourceControlSyncJobClientGetOptions contains the optional parameters for the SourceControlSyncJobClient.Get method. -type SourceControlSyncJobClientGetOptions struct { - // placeholder for future optional parameters -} - -// SourceControlSyncJobClientListByAutomationAccountOptions contains the optional parameters for the SourceControlSyncJobClient.NewListByAutomationAccountPager -// method. -type SourceControlSyncJobClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - // SourceControlSyncJobCreateParameters - The parameters supplied to the create source control sync job operation. type SourceControlSyncJobCreateParameters struct { // REQUIRED; The properties of the source control sync job. @@ -3698,19 +2908,6 @@ type SourceControlSyncJobStreamProperties struct { Time *time.Time } -// SourceControlSyncJobStreamsClientGetOptions contains the optional parameters for the SourceControlSyncJobStreamsClient.Get -// method. -type SourceControlSyncJobStreamsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SourceControlSyncJobStreamsClientListBySyncJobOptions contains the optional parameters for the SourceControlSyncJobStreamsClient.NewListBySyncJobPager -// method. -type SourceControlSyncJobStreamsClientListBySyncJobOptions struct { - // The filter to apply on the operation. - Filter *string -} - // SourceControlSyncJobStreamsListBySyncJob - The response model for the list source control sync job streams operation. type SourceControlSyncJobStreamsListBySyncJob struct { // The list of source control sync job streams. @@ -3765,13 +2962,6 @@ type Statistics struct { StartTime *time.Time } -// StatisticsClientListByAutomationAccountOptions contains the optional parameters for the StatisticsClient.NewListByAutomationAccountPager -// method. -type StatisticsClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - // StatisticsListResult - The response model for the list statistics operation. type StatisticsListResult struct { // Gets or sets a list of statistics. @@ -3862,31 +3052,6 @@ type TestJob struct { StatusDetails *string } -// TestJobClientCreateOptions contains the optional parameters for the TestJobClient.Create method. -type TestJobClientCreateOptions struct { - // placeholder for future optional parameters -} - -// TestJobClientGetOptions contains the optional parameters for the TestJobClient.Get method. -type TestJobClientGetOptions struct { - // placeholder for future optional parameters -} - -// TestJobClientResumeOptions contains the optional parameters for the TestJobClient.Resume method. -type TestJobClientResumeOptions struct { - // placeholder for future optional parameters -} - -// TestJobClientStopOptions contains the optional parameters for the TestJobClient.Stop method. -type TestJobClientStopOptions struct { - // placeholder for future optional parameters -} - -// TestJobClientSuspendOptions contains the optional parameters for the TestJobClient.Suspend method. -type TestJobClientSuspendOptions struct { - // placeholder for future optional parameters -} - // TestJobCreateParameters - The parameters supplied to the create test job operation. type TestJobCreateParameters struct { // Gets or sets the parameters of the test job. @@ -3896,18 +3061,6 @@ type TestJobCreateParameters struct { RunOn *string } -// TestJobStreamsClientGetOptions contains the optional parameters for the TestJobStreamsClient.Get method. -type TestJobStreamsClientGetOptions struct { - // placeholder for future optional parameters -} - -// TestJobStreamsClientListByTestJobOptions contains the optional parameters for the TestJobStreamsClient.NewListByTestJobPager -// method. -type TestJobStreamsClientListByTestJobOptions struct { - // The filter to apply on the operation. - Filter *string -} - // TrackedResource - The resource model definition for a ARM tracked top level resource type TrackedResource struct { // The Azure Region where the resource lives @@ -4059,12 +3212,6 @@ type UsageListResult struct { Value []*Usage } -// UsagesClientListByAutomationAccountOptions contains the optional parameters for the UsagesClient.NewListByAutomationAccountPager -// method. -type UsagesClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - // Variable - Definition of the variable. type Variable struct { // Gets or sets the properties of the variable. @@ -4080,32 +3227,6 @@ type Variable struct { Type *string } -// VariableClientCreateOrUpdateOptions contains the optional parameters for the VariableClient.CreateOrUpdate method. -type VariableClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// VariableClientDeleteOptions contains the optional parameters for the VariableClient.Delete method. -type VariableClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// VariableClientGetOptions contains the optional parameters for the VariableClient.Get method. -type VariableClientGetOptions struct { - // placeholder for future optional parameters -} - -// VariableClientListByAutomationAccountOptions contains the optional parameters for the VariableClient.NewListByAutomationAccountPager -// method. -type VariableClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// VariableClientUpdateOptions contains the optional parameters for the VariableClient.Update method. -type VariableClientUpdateOptions struct { - // placeholder for future optional parameters -} - // VariableCreateOrUpdateParameters - The parameters supplied to the create or update variable operation. type VariableCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the variable. @@ -4196,43 +3317,6 @@ type Watcher struct { Type *string } -// WatcherClientCreateOrUpdateOptions contains the optional parameters for the WatcherClient.CreateOrUpdate method. -type WatcherClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WatcherClientDeleteOptions contains the optional parameters for the WatcherClient.Delete method. -type WatcherClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// WatcherClientGetOptions contains the optional parameters for the WatcherClient.Get method. -type WatcherClientGetOptions struct { - // placeholder for future optional parameters -} - -// WatcherClientListByAutomationAccountOptions contains the optional parameters for the WatcherClient.NewListByAutomationAccountPager -// method. -type WatcherClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - -// WatcherClientStartOptions contains the optional parameters for the WatcherClient.Start method. -type WatcherClientStartOptions struct { - // placeholder for future optional parameters -} - -// WatcherClientStopOptions contains the optional parameters for the WatcherClient.Stop method. -type WatcherClientStopOptions struct { - // placeholder for future optional parameters -} - -// WatcherClientUpdateOptions contains the optional parameters for the WatcherClient.Update method. -type WatcherClientUpdateOptions struct { - // placeholder for future optional parameters -} - // WatcherListResult - The response model for the list watcher operation. type WatcherListResult struct { // Gets or sets the next link. @@ -4301,38 +3385,6 @@ type Webhook struct { Type *string } -// WebhookClientCreateOrUpdateOptions contains the optional parameters for the WebhookClient.CreateOrUpdate method. -type WebhookClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WebhookClientDeleteOptions contains the optional parameters for the WebhookClient.Delete method. -type WebhookClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// WebhookClientGenerateURIOptions contains the optional parameters for the WebhookClient.GenerateURI method. -type WebhookClientGenerateURIOptions struct { - // placeholder for future optional parameters -} - -// WebhookClientGetOptions contains the optional parameters for the WebhookClient.Get method. -type WebhookClientGetOptions struct { - // placeholder for future optional parameters -} - -// WebhookClientListByAutomationAccountOptions contains the optional parameters for the WebhookClient.NewListByAutomationAccountPager -// method. -type WebhookClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - -// WebhookClientUpdateOptions contains the optional parameters for the WebhookClient.Update method. -type WebhookClientUpdateOptions struct { - // placeholder for future optional parameters -} - // WebhookCreateOrUpdateParameters - The parameters supplied to the create or update webhook operation. type WebhookCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the webhook. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/models_serde.go index 2e29468f..c82e51e7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -192,12 +191,12 @@ func (a *AccountListResult) UnmarshalJSON(data []byte) error { func (a AccountProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "automationHybridServiceUrl", a.AutomationHybridServiceURL) - populateTimeRFC3339(objectMap, "creationTime", a.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", a.CreationTime) populate(objectMap, "description", a.Description) populate(objectMap, "disableLocalAuth", a.DisableLocalAuth) populate(objectMap, "encryption", a.Encryption) populate(objectMap, "lastModifiedBy", a.LastModifiedBy) - populateTimeRFC3339(objectMap, "lastModifiedTime", a.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", a.LastModifiedTime) populate(objectMap, "privateEndpointConnections", a.PrivateEndpointConnections) populate(objectMap, "publicNetworkAccess", a.PublicNetworkAccess) populate(objectMap, "sku", a.SKU) @@ -218,7 +217,7 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AutomationHybridServiceURL", &a.AutomationHybridServiceURL) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &a.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &a.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &a.Description) @@ -233,7 +232,7 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "LastModifiedBy", &a.LastModifiedBy) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &a.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &a.LastModifiedTime) delete(rawMsg, key) case "privateEndpointConnections": err = unpopulate(val, "PrivateEndpointConnections", &a.PrivateEndpointConnections) @@ -558,10 +557,10 @@ func (a *ActivityParameterValidationSet) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ActivityProperties. func (a ActivityProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", a.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", a.CreationTime) populate(objectMap, "definition", a.Definition) populate(objectMap, "description", a.Description) - populateTimeRFC3339(objectMap, "lastModifiedTime", a.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", a.LastModifiedTime) populate(objectMap, "outputTypes", a.OutputTypes) populate(objectMap, "parameterSets", a.ParameterSets) return json.Marshal(objectMap) @@ -577,7 +576,7 @@ func (a *ActivityProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &a.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &a.CreationTime) delete(rawMsg, key) case "definition": err = unpopulate(val, "Definition", &a.Definition) @@ -586,7 +585,7 @@ func (a *ActivityProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Description", &a.Description) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &a.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &a.LastModifiedTime) delete(rawMsg, key) case "outputTypes": err = unpopulate(val, "OutputTypes", &a.OutputTypes) @@ -943,11 +942,11 @@ func (c *CertificateListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CertificateProperties. func (c CertificateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", c.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", c.CreationTime) populate(objectMap, "description", c.Description) - populateTimeRFC3339(objectMap, "expiryTime", c.ExpiryTime) + populateDateTimeRFC3339(objectMap, "expiryTime", c.ExpiryTime) populate(objectMap, "isExportable", c.IsExportable) - populateTimeRFC3339(objectMap, "lastModifiedTime", c.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", c.LastModifiedTime) populate(objectMap, "thumbprint", c.Thumbprint) return json.Marshal(objectMap) } @@ -962,19 +961,19 @@ func (c *CertificateProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &c.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &c.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &c.Description) delete(rawMsg, key) case "expiryTime": - err = unpopulateTimeRFC3339(val, "ExpiryTime", &c.ExpiryTime) + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &c.ExpiryTime) delete(rawMsg, key) case "isExportable": err = unpopulate(val, "IsExportable", &c.IsExportable) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &c.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &c.LastModifiedTime) delete(rawMsg, key) case "thumbprint": err = unpopulate(val, "Thumbprint", &c.Thumbprint) @@ -1216,10 +1215,10 @@ func (c *ConnectionListResult) UnmarshalJSON(data []byte) error { func (c ConnectionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "connectionType", c.ConnectionType) - populateTimeRFC3339(objectMap, "creationTime", c.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", c.CreationTime) populate(objectMap, "description", c.Description) populate(objectMap, "fieldDefinitionValues", c.FieldDefinitionValues) - populateTimeRFC3339(objectMap, "lastModifiedTime", c.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", c.LastModifiedTime) return json.Marshal(objectMap) } @@ -1236,7 +1235,7 @@ func (c *ConnectionProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ConnectionType", &c.ConnectionType) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &c.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &c.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &c.Description) @@ -1245,7 +1244,7 @@ func (c *ConnectionProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "FieldDefinitionValues", &c.FieldDefinitionValues) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &c.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &c.LastModifiedTime) delete(rawMsg, key) } if err != nil { @@ -1417,11 +1416,11 @@ func (c *ConnectionTypeListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionTypeProperties. func (c ConnectionTypeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", c.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", c.CreationTime) populate(objectMap, "description", c.Description) populate(objectMap, "fieldDefinitions", c.FieldDefinitions) populate(objectMap, "isGlobal", c.IsGlobal) - populateTimeRFC3339(objectMap, "lastModifiedTime", c.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", c.LastModifiedTime) return json.Marshal(objectMap) } @@ -1435,7 +1434,7 @@ func (c *ConnectionTypeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &c.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &c.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &c.Description) @@ -1447,7 +1446,7 @@ func (c *ConnectionTypeProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "IsGlobal", &c.IsGlobal) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &c.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &c.LastModifiedTime) delete(rawMsg, key) } if err != nil { @@ -1763,9 +1762,9 @@ func (c *CredentialListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CredentialProperties. func (c CredentialProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", c.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", c.CreationTime) populate(objectMap, "description", c.Description) - populateTimeRFC3339(objectMap, "lastModifiedTime", c.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", c.LastModifiedTime) populate(objectMap, "userName", c.UserName) return json.Marshal(objectMap) } @@ -1780,13 +1779,13 @@ func (c *CredentialProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &c.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &c.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &c.Description) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &c.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &c.LastModifiedTime) delete(rawMsg, key) case "userName": err = unpopulate(val, "UserName", &c.UserName) @@ -1940,7 +1939,7 @@ func (d DeletedAutomationAccountProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "automationAccountId", d.AutomationAccountID) populate(objectMap, "automationAccountResourceId", d.AutomationAccountResourceID) - populateTimeRFC3339(objectMap, "deletionTime", d.DeletionTime) + populateDateTimeRFC3339(objectMap, "deletionTime", d.DeletionTime) populate(objectMap, "location", d.Location) return json.Marshal(objectMap) } @@ -1961,7 +1960,7 @@ func (d *DeletedAutomationAccountProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AutomationAccountResourceID", &d.AutomationAccountResourceID) delete(rawMsg, key) case "deletionTime": - err = unpopulateTimeRFC3339(val, "DeletionTime", &d.DeletionTime) + err = unpopulateDateTimeRFC3339(val, "DeletionTime", &d.DeletionTime) delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &d.Location) @@ -2122,16 +2121,16 @@ func (d *DscCompilationJobListResult) UnmarshalJSON(data []byte) error { func (d DscCompilationJobProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "configuration", d.Configuration) - populateTimeRFC3339(objectMap, "creationTime", d.CreationTime) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) + populateDateTimeRFC3339(objectMap, "creationTime", d.CreationTime) + populateDateTimeRFC3339(objectMap, "endTime", d.EndTime) populate(objectMap, "exception", d.Exception) populate(objectMap, "jobId", d.JobID) - populateTimeRFC3339(objectMap, "lastModifiedTime", d.LastModifiedTime) - populateTimeRFC3339(objectMap, "lastStatusModifiedTime", d.LastStatusModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", d.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastStatusModifiedTime", d.LastStatusModifiedTime) populate(objectMap, "parameters", d.Parameters) populate(objectMap, "provisioningState", d.ProvisioningState) populate(objectMap, "runOn", d.RunOn) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", d.StartTime) populate(objectMap, "startedBy", d.StartedBy) populate(objectMap, "status", d.Status) populate(objectMap, "statusDetails", d.StatusDetails) @@ -2151,10 +2150,10 @@ func (d *DscCompilationJobProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Configuration", &d.Configuration) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &d.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &d.CreationTime) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) delete(rawMsg, key) case "exception": err = unpopulate(val, "Exception", &d.Exception) @@ -2163,10 +2162,10 @@ func (d *DscCompilationJobProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "JobID", &d.JobID) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &d.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &d.LastModifiedTime) delete(rawMsg, key) case "lastStatusModifiedTime": - err = unpopulateTimeRFC3339(val, "LastStatusModifiedTime", &d.LastStatusModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastStatusModifiedTime", &d.LastStatusModifiedTime) delete(rawMsg, key) case "parameters": err = unpopulate(val, "Parameters", &d.Parameters) @@ -2178,7 +2177,7 @@ func (d *DscCompilationJobProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "RunOn", &d.RunOn) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) delete(rawMsg, key) case "startedBy": err = unpopulate(val, "StartedBy", &d.StartedBy) @@ -2434,10 +2433,10 @@ func (d *DscConfigurationParameter) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DscConfigurationProperties. func (d DscConfigurationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", d.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", d.CreationTime) populate(objectMap, "description", d.Description) populate(objectMap, "jobCount", d.JobCount) - populateTimeRFC3339(objectMap, "lastModifiedTime", d.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", d.LastModifiedTime) populate(objectMap, "logVerbose", d.LogVerbose) populate(objectMap, "nodeConfigurationCount", d.NodeConfigurationCount) populate(objectMap, "parameters", d.Parameters) @@ -2457,7 +2456,7 @@ func (d *DscConfigurationProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &d.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &d.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &d.Description) @@ -2466,7 +2465,7 @@ func (d *DscConfigurationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "JobCount", &d.JobCount) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &d.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &d.LastModifiedTime) delete(rawMsg, key) case "logVerbose": err = unpopulate(val, "LogVerbose", &d.LogVerbose) @@ -2794,9 +2793,9 @@ func (d *DscNodeConfigurationListResult) UnmarshalJSON(data []byte) error { func (d DscNodeConfigurationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "configuration", d.Configuration) - populateTimeRFC3339(objectMap, "creationTime", d.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", d.CreationTime) populate(objectMap, "incrementNodeConfigurationBuild", d.IncrementNodeConfigurationBuild) - populateTimeRFC3339(objectMap, "lastModifiedTime", d.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", d.LastModifiedTime) populate(objectMap, "nodeCount", d.NodeCount) populate(objectMap, "source", d.Source) return json.Marshal(objectMap) @@ -2815,13 +2814,13 @@ func (d *DscNodeConfigurationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Configuration", &d.Configuration) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &d.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &d.CreationTime) delete(rawMsg, key) case "incrementNodeConfigurationBuild": err = unpopulate(val, "IncrementNodeConfigurationBuild", &d.IncrementNodeConfigurationBuild) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &d.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &d.LastModifiedTime) delete(rawMsg, key) case "nodeCount": err = unpopulate(val, "NodeCount", &d.NodeCount) @@ -2910,10 +2909,10 @@ func (d DscNodeProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "etag", d.Etag) populate(objectMap, "extensionHandler", d.ExtensionHandler) populate(objectMap, "ip", d.IP) - populateTimeRFC3339(objectMap, "lastSeen", d.LastSeen) + populateDateTimeRFC3339(objectMap, "lastSeen", d.LastSeen) populate(objectMap, "nodeConfiguration", d.NodeConfiguration) populate(objectMap, "nodeId", d.NodeID) - populateTimeRFC3339(objectMap, "registrationTime", d.RegistrationTime) + populateDateTimeRFC3339(objectMap, "registrationTime", d.RegistrationTime) populate(objectMap, "status", d.Status) populate(objectMap, "totalCount", d.TotalCount) return json.Marshal(objectMap) @@ -2941,7 +2940,7 @@ func (d *DscNodeProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "IP", &d.IP) delete(rawMsg, key) case "lastSeen": - err = unpopulateTimeRFC3339(val, "LastSeen", &d.LastSeen) + err = unpopulateDateTimeRFC3339(val, "LastSeen", &d.LastSeen) delete(rawMsg, key) case "nodeConfiguration": err = unpopulate(val, "NodeConfiguration", &d.NodeConfiguration) @@ -2950,7 +2949,7 @@ func (d *DscNodeProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "NodeID", &d.NodeID) delete(rawMsg, key) case "registrationTime": - err = unpopulateTimeRFC3339(val, "RegistrationTime", &d.RegistrationTime) + err = unpopulateDateTimeRFC3339(val, "RegistrationTime", &d.RegistrationTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &d.Status) @@ -2970,13 +2969,13 @@ func (d *DscNodeProperties) UnmarshalJSON(data []byte) error { func (d DscNodeReport) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "configurationVersion", d.ConfigurationVersion) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", d.EndTime) populate(objectMap, "errors", d.Errors) populate(objectMap, "hostName", d.HostName) populate(objectMap, "id", d.ID) populate(objectMap, "iPV4Addresses", d.IPV4Addresses) populate(objectMap, "iPV6Addresses", d.IPV6Addresses) - populateTimeRFC3339(objectMap, "lastModifiedTime", d.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", d.LastModifiedTime) populate(objectMap, "metaConfiguration", d.MetaConfiguration) populate(objectMap, "numberOfResources", d.NumberOfResources) populate(objectMap, "rawErrors", d.RawErrors) @@ -2985,7 +2984,7 @@ func (d DscNodeReport) MarshalJSON() ([]byte, error) { populate(objectMap, "reportFormatVersion", d.ReportFormatVersion) populate(objectMap, "reportId", d.ReportID) populate(objectMap, "resources", d.Resources) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", d.StartTime) populate(objectMap, "status", d.Status) populate(objectMap, "type", d.Type) return json.Marshal(objectMap) @@ -3004,7 +3003,7 @@ func (d *DscNodeReport) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ConfigurationVersion", &d.ConfigurationVersion) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) delete(rawMsg, key) case "errors": err = unpopulate(val, "Errors", &d.Errors) @@ -3022,7 +3021,7 @@ func (d *DscNodeReport) UnmarshalJSON(data []byte) error { err = unpopulate(val, "IPV6Addresses", &d.IPV6Addresses) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &d.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &d.LastModifiedTime) delete(rawMsg, key) case "metaConfiguration": err = unpopulate(val, "MetaConfiguration", &d.MetaConfiguration) @@ -3049,7 +3048,7 @@ func (d *DscNodeReport) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Resources", &d.Resources) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &d.Status) @@ -3212,7 +3211,7 @@ func (d DscReportResource) MarshalJSON() ([]byte, error) { populate(objectMap, "resourceId", d.ResourceID) populate(objectMap, "resourceName", d.ResourceName) populate(objectMap, "sourceInfo", d.SourceInfo) - populateTimeRFC3339(objectMap, "startDate", d.StartDate) + populateDateTimeRFC3339(objectMap, "startDate", d.StartDate) populate(objectMap, "status", d.Status) return json.Marshal(objectMap) } @@ -3251,7 +3250,7 @@ func (d *DscReportResource) UnmarshalJSON(data []byte) error { err = unpopulate(val, "SourceInfo", &d.SourceInfo) delete(rawMsg, key) case "startDate": - err = unpopulateTimeRFC3339(val, "StartDate", &d.StartDate) + err = unpopulateDateTimeRFC3339(val, "StartDate", &d.StartDate) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &d.Status) @@ -3745,8 +3744,8 @@ func (h *HybridRunbookWorkerMoveParameters) UnmarshalJSON(data []byte) error { func (h HybridRunbookWorkerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "ip", h.IP) - populateTimeRFC3339(objectMap, "lastSeenDateTime", h.LastSeenDateTime) - populateTimeRFC3339(objectMap, "registeredDateTime", h.RegisteredDateTime) + populateDateTimeRFC3339(objectMap, "lastSeenDateTime", h.LastSeenDateTime) + populateDateTimeRFC3339(objectMap, "registeredDateTime", h.RegisteredDateTime) populate(objectMap, "vmResourceId", h.VMResourceID) populate(objectMap, "workerName", h.WorkerName) populate(objectMap, "workerType", h.WorkerType) @@ -3766,10 +3765,10 @@ func (h *HybridRunbookWorkerProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "IP", &h.IP) delete(rawMsg, key) case "lastSeenDateTime": - err = unpopulateTimeRFC3339(val, "LastSeenDateTime", &h.LastSeenDateTime) + err = unpopulateDateTimeRFC3339(val, "LastSeenDateTime", &h.LastSeenDateTime) delete(rawMsg, key) case "registeredDateTime": - err = unpopulateTimeRFC3339(val, "RegisteredDateTime", &h.RegisteredDateTime) + err = unpopulateDateTimeRFC3339(val, "RegisteredDateTime", &h.RegisteredDateTime) delete(rawMsg, key) case "vmResourceId": err = unpopulate(val, "VMResourceID", &h.VMResourceID) @@ -3939,14 +3938,14 @@ func (j *JobCollectionItem) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobCollectionItemProperties. func (j JobCollectionItemProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", j.CreationTime) - populateTimeRFC3339(objectMap, "endTime", j.EndTime) + populateDateTimeRFC3339(objectMap, "creationTime", j.CreationTime) + populateDateTimeRFC3339(objectMap, "endTime", j.EndTime) populate(objectMap, "jobId", j.JobID) - populateTimeRFC3339(objectMap, "lastModifiedTime", j.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", j.LastModifiedTime) populate(objectMap, "provisioningState", j.ProvisioningState) populate(objectMap, "runOn", j.RunOn) populate(objectMap, "runbook", j.Runbook) - populateTimeRFC3339(objectMap, "startTime", j.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", j.StartTime) populate(objectMap, "status", j.Status) return json.Marshal(objectMap) } @@ -3961,16 +3960,16 @@ func (j *JobCollectionItemProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &j.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &j.CreationTime) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &j.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &j.EndTime) delete(rawMsg, key) case "jobId": err = unpopulate(val, "JobID", &j.JobID) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &j.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &j.LastModifiedTime) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &j.ProvisioningState) @@ -3982,7 +3981,7 @@ func (j *JobCollectionItemProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Runbook", &j.Runbook) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &j.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &j.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &j.Status) @@ -4118,17 +4117,17 @@ func (j *JobNavigation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobProperties. func (j JobProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", j.CreationTime) - populateTimeRFC3339(objectMap, "endTime", j.EndTime) + populateDateTimeRFC3339(objectMap, "creationTime", j.CreationTime) + populateDateTimeRFC3339(objectMap, "endTime", j.EndTime) populate(objectMap, "exception", j.Exception) populate(objectMap, "jobId", j.JobID) - populateTimeRFC3339(objectMap, "lastModifiedTime", j.LastModifiedTime) - populateTimeRFC3339(objectMap, "lastStatusModifiedTime", j.LastStatusModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", j.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastStatusModifiedTime", j.LastStatusModifiedTime) populate(objectMap, "parameters", j.Parameters) populate(objectMap, "provisioningState", j.ProvisioningState) populate(objectMap, "runOn", j.RunOn) populate(objectMap, "runbook", j.Runbook) - populateTimeRFC3339(objectMap, "startTime", j.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", j.StartTime) populate(objectMap, "startedBy", j.StartedBy) populate(objectMap, "status", j.Status) populate(objectMap, "statusDetails", j.StatusDetails) @@ -4145,10 +4144,10 @@ func (j *JobProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &j.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &j.CreationTime) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &j.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &j.EndTime) delete(rawMsg, key) case "exception": err = unpopulate(val, "Exception", &j.Exception) @@ -4157,10 +4156,10 @@ func (j *JobProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "JobID", &j.JobID) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &j.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &j.LastModifiedTime) delete(rawMsg, key) case "lastStatusModifiedTime": - err = unpopulateTimeRFC3339(val, "LastStatusModifiedTime", &j.LastStatusModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastStatusModifiedTime", &j.LastStatusModifiedTime) delete(rawMsg, key) case "parameters": err = unpopulate(val, "Parameters", &j.Parameters) @@ -4175,7 +4174,7 @@ func (j *JobProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Runbook", &j.Runbook) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &j.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &j.StartTime) delete(rawMsg, key) case "startedBy": err = unpopulate(val, "StartedBy", &j.StartedBy) @@ -4442,7 +4441,7 @@ func (j JobStreamProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "streamText", j.StreamText) populate(objectMap, "streamType", j.StreamType) populate(objectMap, "summary", j.Summary) - populateTimeRFC3339(objectMap, "time", j.Time) + populateDateTimeRFC3339(objectMap, "time", j.Time) populate(objectMap, "value", j.Value) return json.Marshal(objectMap) } @@ -4469,7 +4468,7 @@ func (j *JobStreamProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Summary", &j.Summary) delete(rawMsg, key) case "time": - err = unpopulateTimeRFC3339(val, "Time", &j.Time) + err = unpopulateDateTimeRFC3339(val, "Time", &j.Time) delete(rawMsg, key) case "value": err = unpopulate(val, "Value", &j.Value) @@ -4829,12 +4828,12 @@ func (m ModuleProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "activityCount", m.ActivityCount) populate(objectMap, "contentLink", m.ContentLink) - populateTimeRFC3339(objectMap, "creationTime", m.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", m.CreationTime) populate(objectMap, "description", m.Description) populate(objectMap, "error", m.Error) populate(objectMap, "isComposite", m.IsComposite) populate(objectMap, "isGlobal", m.IsGlobal) - populateTimeRFC3339(objectMap, "lastModifiedTime", m.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", m.LastModifiedTime) populate(objectMap, "provisioningState", m.ProvisioningState) populate(objectMap, "sizeInBytes", m.SizeInBytes) populate(objectMap, "version", m.Version) @@ -4857,7 +4856,7 @@ func (m *ModuleProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ContentLink", &m.ContentLink) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &m.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &m.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &m.Description) @@ -4872,7 +4871,7 @@ func (m *ModuleProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "IsGlobal", &m.IsGlobal) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &m.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &m.LastModifiedTime) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) @@ -5892,10 +5891,10 @@ func (r *RunbookCreateOrUpdateProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RunbookDraft. func (r RunbookDraft) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", r.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", r.CreationTime) populate(objectMap, "draftContentLink", r.DraftContentLink) populate(objectMap, "inEdit", r.InEdit) - populateTimeRFC3339(objectMap, "lastModifiedTime", r.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", r.LastModifiedTime) populate(objectMap, "outputTypes", r.OutputTypes) populate(objectMap, "parameters", r.Parameters) return json.Marshal(objectMap) @@ -5911,7 +5910,7 @@ func (r *RunbookDraft) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &r.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &r.CreationTime) delete(rawMsg, key) case "draftContentLink": err = unpopulate(val, "DraftContentLink", &r.DraftContentLink) @@ -5920,7 +5919,7 @@ func (r *RunbookDraft) UnmarshalJSON(data []byte) error { err = unpopulate(val, "InEdit", &r.InEdit) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &r.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &r.LastModifiedTime) delete(rawMsg, key) case "outputTypes": err = unpopulate(val, "OutputTypes", &r.OutputTypes) @@ -6040,12 +6039,12 @@ func (r *RunbookParameter) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RunbookProperties. func (r RunbookProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", r.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", r.CreationTime) populate(objectMap, "description", r.Description) populate(objectMap, "draft", r.Draft) populate(objectMap, "jobCount", r.JobCount) populate(objectMap, "lastModifiedBy", r.LastModifiedBy) - populateTimeRFC3339(objectMap, "lastModifiedTime", r.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", r.LastModifiedTime) populate(objectMap, "logActivityTrace", r.LogActivityTrace) populate(objectMap, "logProgress", r.LogProgress) populate(objectMap, "logVerbose", r.LogVerbose) @@ -6068,7 +6067,7 @@ func (r *RunbookProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &r.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &r.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &r.Description) @@ -6083,7 +6082,7 @@ func (r *RunbookProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "LastModifiedBy", &r.LastModifiedBy) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &r.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &r.LastModifiedTime) delete(rawMsg, key) case "logActivityTrace": err = unpopulate(val, "LogActivityTrace", &r.LogActivityTrace) @@ -6237,17 +6236,17 @@ func (s *SKU) UnmarshalJSON(data []byte) error { func (s SUCScheduleProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "advancedSchedule", s.AdvancedSchedule) - populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", s.CreationTime) populate(objectMap, "description", s.Description) - populateTimeRFC3339(objectMap, "expiryTime", s.ExpiryTime) + populateDateTimeRFC3339(objectMap, "expiryTime", s.ExpiryTime) populate(objectMap, "expiryTimeOffsetMinutes", s.ExpiryTimeOffsetMinutes) populate(objectMap, "frequency", s.Frequency) populate(objectMap, "interval", s.Interval) populate(objectMap, "isEnabled", s.IsEnabled) - populateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) - populateTimeRFC3339(objectMap, "nextRun", s.NextRun) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "nextRun", s.NextRun) populate(objectMap, "nextRunOffsetMinutes", s.NextRunOffsetMinutes) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) populate(objectMap, "startTimeOffsetMinutes", s.StartTimeOffsetMinutes) populate(objectMap, "timeZone", s.TimeZone) return json.Marshal(objectMap) @@ -6266,13 +6265,13 @@ func (s *SUCScheduleProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AdvancedSchedule", &s.AdvancedSchedule) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &s.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &s.Description) delete(rawMsg, key) case "expiryTime": - err = unpopulateTimeRFC3339(val, "ExpiryTime", &s.ExpiryTime) + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &s.ExpiryTime) delete(rawMsg, key) case "expiryTimeOffsetMinutes": err = unpopulate(val, "ExpiryTimeOffsetMinutes", &s.ExpiryTimeOffsetMinutes) @@ -6287,16 +6286,16 @@ func (s *SUCScheduleProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "IsEnabled", &s.IsEnabled) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) delete(rawMsg, key) case "nextRun": - err = unpopulateTimeRFC3339(val, "NextRun", &s.NextRun) + err = unpopulateDateTimeRFC3339(val, "NextRun", &s.NextRun) delete(rawMsg, key) case "nextRunOffsetMinutes": err = unpopulate(val, "NextRunOffsetMinutes", &s.NextRunOffsetMinutes) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) delete(rawMsg, key) case "startTimeOffsetMinutes": err = unpopulate(val, "StartTimeOffsetMinutes", &s.StartTimeOffsetMinutes) @@ -6414,10 +6413,10 @@ func (s ScheduleCreateOrUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "advancedSchedule", s.AdvancedSchedule) populate(objectMap, "description", s.Description) - populateTimeRFC3339(objectMap, "expiryTime", s.ExpiryTime) + populateDateTimeRFC3339(objectMap, "expiryTime", s.ExpiryTime) populate(objectMap, "frequency", s.Frequency) populateAny(objectMap, "interval", s.Interval) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) populate(objectMap, "timeZone", s.TimeZone) return json.Marshal(objectMap) } @@ -6438,7 +6437,7 @@ func (s *ScheduleCreateOrUpdateProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Description", &s.Description) delete(rawMsg, key) case "expiryTime": - err = unpopulateTimeRFC3339(val, "ExpiryTime", &s.ExpiryTime) + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &s.ExpiryTime) delete(rawMsg, key) case "frequency": err = unpopulate(val, "Frequency", &s.Frequency) @@ -6447,7 +6446,7 @@ func (s *ScheduleCreateOrUpdateProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Interval", &s.Interval) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) delete(rawMsg, key) case "timeZone": err = unpopulate(val, "TimeZone", &s.TimeZone) @@ -6495,17 +6494,17 @@ func (s *ScheduleListResult) UnmarshalJSON(data []byte) error { func (s ScheduleProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "advancedSchedule", s.AdvancedSchedule) - populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", s.CreationTime) populate(objectMap, "description", s.Description) - populateTimeRFC3339(objectMap, "expiryTime", s.ExpiryTime) + populateDateTimeRFC3339(objectMap, "expiryTime", s.ExpiryTime) populate(objectMap, "expiryTimeOffsetMinutes", s.ExpiryTimeOffsetMinutes) populate(objectMap, "frequency", s.Frequency) populateAny(objectMap, "interval", s.Interval) populate(objectMap, "isEnabled", s.IsEnabled) - populateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) - populateTimeRFC3339(objectMap, "nextRun", s.NextRun) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "nextRun", s.NextRun) populate(objectMap, "nextRunOffsetMinutes", s.NextRunOffsetMinutes) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) populate(objectMap, "startTimeOffsetMinutes", s.StartTimeOffsetMinutes) populate(objectMap, "timeZone", s.TimeZone) return json.Marshal(objectMap) @@ -6524,13 +6523,13 @@ func (s *ScheduleProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AdvancedSchedule", &s.AdvancedSchedule) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &s.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &s.Description) delete(rawMsg, key) case "expiryTime": - err = unpopulateTimeRFC3339(val, "ExpiryTime", &s.ExpiryTime) + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &s.ExpiryTime) delete(rawMsg, key) case "expiryTimeOffsetMinutes": err = unpopulate(val, "ExpiryTimeOffsetMinutes", &s.ExpiryTimeOffsetMinutes) @@ -6545,16 +6544,16 @@ func (s *ScheduleProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "IsEnabled", &s.IsEnabled) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) delete(rawMsg, key) case "nextRun": - err = unpopulateTimeRFC3339(val, "NextRun", &s.NextRun) + err = unpopulateDateTimeRFC3339(val, "NextRun", &s.NextRun) delete(rawMsg, key) case "nextRunOffsetMinutes": err = unpopulate(val, "NextRunOffsetMinutes", &s.NextRunOffsetMinutes) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) delete(rawMsg, key) case "startTimeOffsetMinutes": err = unpopulate(val, "StartTimeOffsetMinutes", &s.StartTimeOffsetMinutes) @@ -6709,12 +6708,12 @@ func (s *SoftwareUpdateConfigurationCollectionItem) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type SoftwareUpdateConfigurationCollectionItemProperties. func (s SoftwareUpdateConfigurationCollectionItemProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", s.CreationTime) populate(objectMap, "frequency", s.Frequency) - populateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) - populateTimeRFC3339(objectMap, "nextRun", s.NextRun) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "nextRun", s.NextRun) populate(objectMap, "provisioningState", s.ProvisioningState) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) populate(objectMap, "tasks", s.Tasks) populate(objectMap, "updateConfiguration", s.UpdateConfiguration) return json.Marshal(objectMap) @@ -6730,22 +6729,22 @@ func (s *SoftwareUpdateConfigurationCollectionItemProperties) UnmarshalJSON(data var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &s.CreationTime) delete(rawMsg, key) case "frequency": err = unpopulate(val, "Frequency", &s.Frequency) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) delete(rawMsg, key) case "nextRun": - err = unpopulateTimeRFC3339(val, "NextRun", &s.NextRun) + err = unpopulateDateTimeRFC3339(val, "NextRun", &s.NextRun) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) delete(rawMsg, key) case "tasks": err = unpopulate(val, "Tasks", &s.Tasks) @@ -6858,10 +6857,10 @@ func (s *SoftwareUpdateConfigurationMachineRunListResult) UnmarshalJSON(data []b func (s SoftwareUpdateConfigurationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "createdBy", s.CreatedBy) - populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", s.CreationTime) populate(objectMap, "error", s.Error) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "scheduleInfo", s.ScheduleInfo) populate(objectMap, "tasks", s.Tasks) @@ -6882,7 +6881,7 @@ func (s *SoftwareUpdateConfigurationProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "CreatedBy", &s.CreatedBy) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &s.CreationTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &s.Error) @@ -6891,7 +6890,7 @@ func (s *SoftwareUpdateConfigurationProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) @@ -6985,14 +6984,14 @@ func (s SoftwareUpdateConfigurationRunProperties) MarshalJSON() ([]byte, error) populate(objectMap, "computerCount", s.ComputerCount) populate(objectMap, "configuredDuration", s.ConfiguredDuration) populate(objectMap, "createdBy", s.CreatedBy) - populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) - populateTimeRFC3339(objectMap, "endTime", s.EndTime) + populateDateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populateDateTimeRFC3339(objectMap, "endTime", s.EndTime) populate(objectMap, "failedCount", s.FailedCount) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) populate(objectMap, "osType", s.OSType) populate(objectMap, "softwareUpdateConfiguration", s.SoftwareUpdateConfiguration) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) populate(objectMap, "status", s.Status) populate(objectMap, "tasks", s.Tasks) return json.Marshal(objectMap) @@ -7017,10 +7016,10 @@ func (s *SoftwareUpdateConfigurationRunProperties) UnmarshalJSON(data []byte) er err = unpopulate(val, "CreatedBy", &s.CreatedBy) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &s.CreationTime) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &s.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &s.EndTime) delete(rawMsg, key) case "failedCount": err = unpopulate(val, "FailedCount", &s.FailedCount) @@ -7029,7 +7028,7 @@ func (s *SoftwareUpdateConfigurationRunProperties) UnmarshalJSON(data []byte) er err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) delete(rawMsg, key) case "osType": err = unpopulate(val, "OSType", &s.OSType) @@ -7038,7 +7037,7 @@ func (s *SoftwareUpdateConfigurationRunProperties) UnmarshalJSON(data []byte) er err = unpopulate(val, "SoftwareUpdateConfiguration", &s.SoftwareUpdateConfiguration) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &s.Status) @@ -7308,10 +7307,10 @@ func (s SourceControlProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "autoSync", s.AutoSync) populate(objectMap, "branch", s.Branch) - populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", s.CreationTime) populate(objectMap, "description", s.Description) populate(objectMap, "folderPath", s.FolderPath) - populateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) populate(objectMap, "publishRunbook", s.PublishRunbook) populate(objectMap, "repoUrl", s.RepoURL) populate(objectMap, "sourceType", s.SourceType) @@ -7334,7 +7333,7 @@ func (s *SourceControlProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Branch", &s.Branch) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &s.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &s.Description) @@ -7343,7 +7342,7 @@ func (s *SourceControlProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "FolderPath", &s.FolderPath) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) delete(rawMsg, key) case "publishRunbook": err = unpopulate(val, "PublishRunbook", &s.PublishRunbook) @@ -7470,12 +7469,12 @@ func (s *SourceControlSyncJobByID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SourceControlSyncJobByIDProperties. func (s SourceControlSyncJobByIDProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) - populateTimeRFC3339(objectMap, "endTime", s.EndTime) + populateDateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populateDateTimeRFC3339(objectMap, "endTime", s.EndTime) populate(objectMap, "exception", s.Exception) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "sourceControlSyncJobId", s.SourceControlSyncJobID) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) populate(objectMap, "syncType", s.SyncType) return json.Marshal(objectMap) } @@ -7490,10 +7489,10 @@ func (s *SourceControlSyncJobByIDProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &s.CreationTime) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &s.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &s.EndTime) delete(rawMsg, key) case "exception": err = unpopulate(val, "Exception", &s.Exception) @@ -7505,7 +7504,7 @@ func (s *SourceControlSyncJobByIDProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "SourceControlSyncJobID", &s.SourceControlSyncJobID) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) delete(rawMsg, key) case "syncType": err = unpopulate(val, "SyncType", &s.SyncType) @@ -7606,11 +7605,11 @@ func (s *SourceControlSyncJobListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SourceControlSyncJobProperties. func (s SourceControlSyncJobProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) - populateTimeRFC3339(objectMap, "endTime", s.EndTime) + populateDateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populateDateTimeRFC3339(objectMap, "endTime", s.EndTime) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "sourceControlSyncJobId", s.SourceControlSyncJobID) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) populate(objectMap, "syncType", s.SyncType) return json.Marshal(objectMap) } @@ -7625,10 +7624,10 @@ func (s *SourceControlSyncJobProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &s.CreationTime) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &s.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &s.EndTime) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) @@ -7637,7 +7636,7 @@ func (s *SourceControlSyncJobProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "SourceControlSyncJobID", &s.SourceControlSyncJobID) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) delete(rawMsg, key) case "syncType": err = unpopulate(val, "SyncType", &s.SyncType) @@ -7719,7 +7718,7 @@ func (s SourceControlSyncJobStreamByIDProperties) MarshalJSON() ([]byte, error) populate(objectMap, "streamText", s.StreamText) populate(objectMap, "streamType", s.StreamType) populate(objectMap, "summary", s.Summary) - populateTimeRFC3339(objectMap, "time", s.Time) + populateDateTimeRFC3339(objectMap, "time", s.Time) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) } @@ -7746,7 +7745,7 @@ func (s *SourceControlSyncJobStreamByIDProperties) UnmarshalJSON(data []byte) er err = unpopulate(val, "Summary", &s.Summary) delete(rawMsg, key) case "time": - err = unpopulateTimeRFC3339(val, "Time", &s.Time) + err = unpopulateDateTimeRFC3339(val, "Time", &s.Time) delete(rawMsg, key) case "value": err = unpopulate(val, "Value", &s.Value) @@ -7765,7 +7764,7 @@ func (s SourceControlSyncJobStreamProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "sourceControlSyncJobStreamId", s.SourceControlSyncJobStreamID) populate(objectMap, "streamType", s.StreamType) populate(objectMap, "summary", s.Summary) - populateTimeRFC3339(objectMap, "time", s.Time) + populateDateTimeRFC3339(objectMap, "time", s.Time) return json.Marshal(objectMap) } @@ -7788,7 +7787,7 @@ func (s *SourceControlSyncJobStreamProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "Summary", &s.Summary) delete(rawMsg, key) case "time": - err = unpopulateTimeRFC3339(val, "Time", &s.Time) + err = unpopulateDateTimeRFC3339(val, "Time", &s.Time) delete(rawMsg, key) } if err != nil { @@ -7908,9 +7907,9 @@ func (s Statistics) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "counterProperty", s.CounterProperty) populate(objectMap, "counterValue", s.CounterValue) - populateTimeRFC3339(objectMap, "endTime", s.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", s.EndTime) populate(objectMap, "id", s.ID) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) return json.Marshal(objectMap) } @@ -7930,13 +7929,13 @@ func (s *Statistics) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CounterValue", &s.CounterValue) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &s.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &s.EndTime) delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) delete(rawMsg, key) } if err != nil { @@ -7976,10 +7975,10 @@ func (s *StatisticsListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -7995,7 +7994,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -8004,7 +8003,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) @@ -8116,15 +8115,15 @@ func (t *TaskProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TestJob. func (t TestJob) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", t.CreationTime) - populateTimeRFC3339(objectMap, "endTime", t.EndTime) + populateDateTimeRFC3339(objectMap, "creationTime", t.CreationTime) + populateDateTimeRFC3339(objectMap, "endTime", t.EndTime) populate(objectMap, "exception", t.Exception) - populateTimeRFC3339(objectMap, "lastModifiedTime", t.LastModifiedTime) - populateTimeRFC3339(objectMap, "lastStatusModifiedTime", t.LastStatusModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", t.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastStatusModifiedTime", t.LastStatusModifiedTime) populate(objectMap, "logActivityTrace", t.LogActivityTrace) populate(objectMap, "parameters", t.Parameters) populate(objectMap, "runOn", t.RunOn) - populateTimeRFC3339(objectMap, "startTime", t.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", t.StartTime) populate(objectMap, "status", t.Status) populate(objectMap, "statusDetails", t.StatusDetails) return json.Marshal(objectMap) @@ -8140,19 +8139,19 @@ func (t *TestJob) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &t.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &t.CreationTime) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &t.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &t.EndTime) delete(rawMsg, key) case "exception": err = unpopulate(val, "Exception", &t.Exception) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &t.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &t.LastModifiedTime) delete(rawMsg, key) case "lastStatusModifiedTime": - err = unpopulateTimeRFC3339(val, "LastStatusModifiedTime", &t.LastStatusModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastStatusModifiedTime", &t.LastStatusModifiedTime) delete(rawMsg, key) case "logActivityTrace": err = unpopulate(val, "LogActivityTrace", &t.LogActivityTrace) @@ -8164,7 +8163,7 @@ func (t *TestJob) UnmarshalJSON(data []byte) error { err = unpopulate(val, "RunOn", &t.RunOn) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &t.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &t.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &t.Status) @@ -8369,16 +8368,16 @@ func (u UpdateConfigurationMachineRunProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "configuredDuration", u.ConfiguredDuration) populate(objectMap, "correlationId", u.CorrelationID) populate(objectMap, "createdBy", u.CreatedBy) - populateTimeRFC3339(objectMap, "creationTime", u.CreationTime) - populateTimeRFC3339(objectMap, "endTime", u.EndTime) + populateDateTimeRFC3339(objectMap, "creationTime", u.CreationTime) + populateDateTimeRFC3339(objectMap, "endTime", u.EndTime) populate(objectMap, "error", u.Error) populate(objectMap, "job", u.Job) populate(objectMap, "lastModifiedBy", u.LastModifiedBy) - populateTimeRFC3339(objectMap, "lastModifiedTime", u.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", u.LastModifiedTime) populate(objectMap, "osType", u.OSType) populate(objectMap, "softwareUpdateConfiguration", u.SoftwareUpdateConfiguration) populate(objectMap, "sourceComputerId", u.SourceComputerID) - populateTimeRFC3339(objectMap, "startTime", u.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", u.StartTime) populate(objectMap, "status", u.Status) populate(objectMap, "targetComputer", u.TargetComputer) populate(objectMap, "targetComputerType", u.TargetComputerType) @@ -8404,10 +8403,10 @@ func (u *UpdateConfigurationMachineRunProperties) UnmarshalJSON(data []byte) err err = unpopulate(val, "CreatedBy", &u.CreatedBy) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &u.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &u.CreationTime) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &u.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &u.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &u.Error) @@ -8419,7 +8418,7 @@ func (u *UpdateConfigurationMachineRunProperties) UnmarshalJSON(data []byte) err err = unpopulate(val, "LastModifiedBy", &u.LastModifiedBy) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &u.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &u.LastModifiedTime) delete(rawMsg, key) case "osType": err = unpopulate(val, "OSType", &u.OSType) @@ -8431,7 +8430,7 @@ func (u *UpdateConfigurationMachineRunProperties) UnmarshalJSON(data []byte) err err = unpopulate(val, "SourceComputerID", &u.SourceComputerID) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &u.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &u.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &u.Status) @@ -8721,10 +8720,10 @@ func (v *VariableListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VariableProperties. func (v VariableProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", v.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", v.CreationTime) populate(objectMap, "description", v.Description) populate(objectMap, "isEncrypted", v.IsEncrypted) - populateTimeRFC3339(objectMap, "lastModifiedTime", v.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", v.LastModifiedTime) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) } @@ -8739,7 +8738,7 @@ func (v *VariableProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &v.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &v.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &v.Description) @@ -8748,7 +8747,7 @@ func (v *VariableProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "IsEncrypted", &v.IsEncrypted) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &v.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &v.LastModifiedTime) delete(rawMsg, key) case "value": err = unpopulate(val, "Value", &v.Value) @@ -8908,11 +8907,11 @@ func (w *WatcherListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WatcherProperties. func (w WatcherProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", w.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", w.CreationTime) populate(objectMap, "description", w.Description) populate(objectMap, "executionFrequencyInSeconds", w.ExecutionFrequencyInSeconds) populate(objectMap, "lastModifiedBy", w.LastModifiedBy) - populateTimeRFC3339(objectMap, "lastModifiedTime", w.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", w.LastModifiedTime) populate(objectMap, "scriptName", w.ScriptName) populate(objectMap, "scriptParameters", w.ScriptParameters) populate(objectMap, "scriptRunOn", w.ScriptRunOn) @@ -8930,7 +8929,7 @@ func (w *WatcherProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &w.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &w.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &w.Description) @@ -8942,7 +8941,7 @@ func (w *WatcherProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "LastModifiedBy", &w.LastModifiedBy) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &w.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &w.LastModifiedTime) delete(rawMsg, key) case "scriptName": err = unpopulate(val, "ScriptName", &w.ScriptName) @@ -9095,7 +9094,7 @@ func (w *WebhookCreateOrUpdateParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WebhookCreateOrUpdateProperties. func (w WebhookCreateOrUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "expiryTime", w.ExpiryTime) + populateDateTimeRFC3339(objectMap, "expiryTime", w.ExpiryTime) populate(objectMap, "isEnabled", w.IsEnabled) populate(objectMap, "parameters", w.Parameters) populate(objectMap, "runOn", w.RunOn) @@ -9114,7 +9113,7 @@ func (w *WebhookCreateOrUpdateProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "expiryTime": - err = unpopulateTimeRFC3339(val, "ExpiryTime", &w.ExpiryTime) + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &w.ExpiryTime) delete(rawMsg, key) case "isEnabled": err = unpopulate(val, "IsEnabled", &w.IsEnabled) @@ -9173,13 +9172,13 @@ func (w *WebhookListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WebhookProperties. func (w WebhookProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", w.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", w.CreationTime) populate(objectMap, "description", w.Description) - populateTimeRFC3339(objectMap, "expiryTime", w.ExpiryTime) + populateDateTimeRFC3339(objectMap, "expiryTime", w.ExpiryTime) populate(objectMap, "isEnabled", w.IsEnabled) - populateTimeRFC3339(objectMap, "lastInvokedTime", w.LastInvokedTime) + populateDateTimeRFC3339(objectMap, "lastInvokedTime", w.LastInvokedTime) populate(objectMap, "lastModifiedBy", w.LastModifiedBy) - populateTimeRFC3339(objectMap, "lastModifiedTime", w.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", w.LastModifiedTime) populate(objectMap, "parameters", w.Parameters) populate(objectMap, "runOn", w.RunOn) populate(objectMap, "runbook", w.Runbook) @@ -9197,25 +9196,25 @@ func (w *WebhookProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &w.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &w.CreationTime) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &w.Description) delete(rawMsg, key) case "expiryTime": - err = unpopulateTimeRFC3339(val, "ExpiryTime", &w.ExpiryTime) + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &w.ExpiryTime) delete(rawMsg, key) case "isEnabled": err = unpopulate(val, "IsEnabled", &w.IsEnabled) delete(rawMsg, key) case "lastInvokedTime": - err = unpopulateTimeRFC3339(val, "LastInvokedTime", &w.LastInvokedTime) + err = unpopulateDateTimeRFC3339(val, "LastInvokedTime", &w.LastInvokedTime) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &w.LastModifiedBy) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &w.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &w.LastModifiedTime) delete(rawMsg, key) case "parameters": err = unpopulate(val, "Parameters", &w.Parameters) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/module_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/module_client.go index a086774f..831d486c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/module_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/module_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type ModuleClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewModuleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ModuleClient, error) { - cl, err := arm.NewClient(moduleName+".ModuleClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewModuleClient(subscriptionID string, credential azcore.TokenCredential, o // - parameters - The create or update parameters for module. // - options - ModuleClientCreateOrUpdateOptions contains the optional parameters for the ModuleClient.CreateOrUpdate method. func (client *ModuleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters, options *ModuleClientCreateOrUpdateOptions) (ModuleClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ModuleClient.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, automationAccountName, moduleName, parameters, options) if err != nil { return ModuleClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ModuleClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ModuleClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ModuleClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *ModuleClient) createOrUpdateCreateRequest(ctx context.Context, res reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *ModuleClient) createOrUpdateHandleResponse(resp *http.Response) (M // - moduleName - The module name. // - options - ModuleClientDeleteOptions contains the optional parameters for the ModuleClient.Delete method. func (client *ModuleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, options *ModuleClientDeleteOptions) (ModuleClientDeleteResponse, error) { + var err error + const operationName = "ModuleClient.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, automationAccountName, moduleName, options) if err != nil { return ModuleClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ModuleClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ModuleClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ModuleClientDeleteResponse{}, err } return ModuleClientDeleteResponse{}, nil } @@ -170,18 +185,25 @@ func (client *ModuleClient) deleteCreateRequest(ctx context.Context, resourceGro // - moduleName - The module name. // - options - ModuleClientGetOptions contains the optional parameters for the ModuleClient.Get method. func (client *ModuleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, options *ModuleClientGetOptions) (ModuleClientGetResponse, error) { + var err error + const operationName = "ModuleClient.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, automationAccountName, moduleName, options) if err != nil { return ModuleClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ModuleClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ModuleClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ModuleClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -236,25 +258,20 @@ func (client *ModuleClient) NewListByAutomationAccountPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ModuleClientListByAutomationAccountResponse) (ModuleClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ModuleClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ModuleClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return ModuleClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ModuleClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -303,18 +320,25 @@ func (client *ModuleClient) listByAutomationAccountHandleResponse(resp *http.Res // - parameters - The update parameters for module. // - options - ModuleClientUpdateOptions contains the optional parameters for the ModuleClient.Update method. func (client *ModuleClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters, options *ModuleClientUpdateOptions) (ModuleClientUpdateResponse, error) { + var err error + const operationName = "ModuleClient.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, automationAccountName, moduleName, parameters, options) if err != nil { return ModuleClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ModuleClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ModuleClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ModuleClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -344,7 +368,10 @@ func (client *ModuleClient) updateCreateRequest(ctx context.Context, resourceGro reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/nodecountinformation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/nodecountinformation_client.go index 23271732..21fe6390 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/nodecountinformation_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/nodecountinformation_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type NodeCountInformationClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewNodeCountInformationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NodeCountInformationClient, error) { - cl, err := arm.NewClient(moduleName+".NodeCountInformationClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewNodeCountInformationClient(subscriptionID string, credential azcore.Toke // - options - NodeCountInformationClientGetOptions contains the optional parameters for the NodeCountInformationClient.Get // method. func (client *NodeCountInformationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, countType CountType, options *NodeCountInformationClientGetOptions) (NodeCountInformationClientGetResponse, error) { + var err error + const operationName = "NodeCountInformationClient.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, automationAccountName, countType, options) if err != nil { return NodeCountInformationClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NodeCountInformationClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NodeCountInformationClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NodeCountInformationClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/nodereports_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/nodereports_client.go index 2f898b0d..4cdf95b2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/nodereports_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/nodereports_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type NodeReportsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewNodeReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NodeReportsClient, error) { - cl, err := arm.NewClient(moduleName+".NodeReportsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewNodeReportsClient(subscriptionID string, credential azcore.TokenCredenti // - reportID - The report id. // - options - NodeReportsClientGetOptions contains the optional parameters for the NodeReportsClient.Get method. func (client *NodeReportsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string, options *NodeReportsClientGetOptions) (NodeReportsClientGetResponse, error) { + var err error + const operationName = "NodeReportsClient.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, automationAccountName, nodeID, reportID, options) if err != nil { return NodeReportsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NodeReportsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NodeReportsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NodeReportsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -122,18 +128,25 @@ func (client *NodeReportsClient) getHandleResponse(resp *http.Response) (NodeRep // - reportID - The report id. // - options - NodeReportsClientGetContentOptions contains the optional parameters for the NodeReportsClient.GetContent method. func (client *NodeReportsClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string, options *NodeReportsClientGetContentOptions) (NodeReportsClientGetContentResponse, error) { + var err error + const operationName = "NodeReportsClient.GetContent" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getContentCreateRequest(ctx, resourceGroupName, automationAccountName, nodeID, reportID, options) if err != nil { return NodeReportsClientGetContentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NodeReportsClientGetContentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NodeReportsClientGetContentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NodeReportsClientGetContentResponse{}, err } - return client.getContentHandleResponse(resp) + resp, err := client.getContentHandleResponse(httpResp) + return resp, err } // getContentCreateRequest creates the GetContent request. @@ -193,25 +206,20 @@ func (client *NodeReportsClient) NewListByNodePager(resourceGroupName string, au return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *NodeReportsClientListByNodeResponse) (NodeReportsClientListByNodeResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByNodeCreateRequest(ctx, resourceGroupName, automationAccountName, nodeID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return NodeReportsClientListByNodeResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NodeReportsClient.NewListByNodePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByNodeCreateRequest(ctx, resourceGroupName, automationAccountName, nodeID, options) + }, nil) if err != nil { return NodeReportsClientListByNodeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NodeReportsClientListByNodeResponse{}, runtime.NewResponseError(resp) - } return client.listByNodeHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/objectdatatypes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/objectdatatypes_client.go index bae877fd..9102cd9f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/objectdatatypes_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/objectdatatypes_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type ObjectDataTypesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewObjectDataTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ObjectDataTypesClient, error) { - cl, err := arm.NewClient(moduleName+".ObjectDataTypesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,6 +59,7 @@ func (client *ObjectDataTypesClient) NewListFieldsByModuleAndTypePager(resourceG return false }, Fetcher: func(ctx context.Context, page *ObjectDataTypesClientListFieldsByModuleAndTypeResponse) (ObjectDataTypesClientListFieldsByModuleAndTypeResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ObjectDataTypesClient.NewListFieldsByModuleAndTypePager") req, err := client.listFieldsByModuleAndTypeCreateRequest(ctx, resourceGroupName, automationAccountName, moduleName, typeName, options) if err != nil { return ObjectDataTypesClientListFieldsByModuleAndTypeResponse{}, err @@ -73,6 +73,7 @@ func (client *ObjectDataTypesClient) NewListFieldsByModuleAndTypePager(resourceG } return client.listFieldsByModuleAndTypeHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -133,6 +134,7 @@ func (client *ObjectDataTypesClient) NewListFieldsByTypePager(resourceGroupName return false }, Fetcher: func(ctx context.Context, page *ObjectDataTypesClientListFieldsByTypeResponse) (ObjectDataTypesClientListFieldsByTypeResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ObjectDataTypesClient.NewListFieldsByTypePager") req, err := client.listFieldsByTypeCreateRequest(ctx, resourceGroupName, automationAccountName, typeName, options) if err != nil { return ObjectDataTypesClientListFieldsByTypeResponse{}, err @@ -146,6 +148,7 @@ func (client *ObjectDataTypesClient) NewListFieldsByTypePager(resourceGroupName } return client.listFieldsByTypeHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/operations_client.go index 2d6d872f..9814d76c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,6 +47,7 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return false }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") req, err := client.listCreateRequest(ctx, options) if err != nil { return OperationsClientListResponse{}, err @@ -61,6 +61,7 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/options.go new file mode 100644 index 00000000..3b0838a3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/options.go @@ -0,0 +1,974 @@ +//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 armautomation + +// AccountClientCreateOrUpdateOptions contains the optional parameters for the AccountClient.CreateOrUpdate method. +type AccountClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// AccountClientDeleteOptions contains the optional parameters for the AccountClient.Delete method. +type AccountClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AccountClientGetOptions contains the optional parameters for the AccountClient.Get method. +type AccountClientGetOptions struct { + // placeholder for future optional parameters +} + +// AccountClientListByResourceGroupOptions contains the optional parameters for the AccountClient.NewListByResourceGroupPager +// method. +type AccountClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// AccountClientListOptions contains the optional parameters for the AccountClient.NewListPager method. +type AccountClientListOptions struct { + // placeholder for future optional parameters +} + +// AccountClientUpdateOptions contains the optional parameters for the AccountClient.Update method. +type AccountClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ActivityClientGetOptions contains the optional parameters for the ActivityClient.Get method. +type ActivityClientGetOptions struct { + // placeholder for future optional parameters +} + +// ActivityClientListByModuleOptions contains the optional parameters for the ActivityClient.NewListByModulePager method. +type ActivityClientListByModuleOptions struct { + // placeholder for future optional parameters +} + +// AgentRegistrationInformationClientGetOptions contains the optional parameters for the AgentRegistrationInformationClient.Get +// method. +type AgentRegistrationInformationClientGetOptions struct { + // placeholder for future optional parameters +} + +// AgentRegistrationInformationClientRegenerateKeyOptions contains the optional parameters for the AgentRegistrationInformationClient.RegenerateKey +// method. +type AgentRegistrationInformationClientRegenerateKeyOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientCreateOrUpdateOptions contains the optional parameters for the CertificateClient.CreateOrUpdate method. +type CertificateClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientDeleteOptions contains the optional parameters for the CertificateClient.Delete method. +type CertificateClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method. +type CertificateClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientListByAutomationAccountOptions contains the optional parameters for the CertificateClient.NewListByAutomationAccountPager +// method. +type CertificateClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientUpdateOptions contains the optional parameters for the CertificateClient.Update method. +type CertificateClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ClientConvertGraphRunbookContentOptions contains the optional parameters for the Client.ConvertGraphRunbookContent method. +type ClientConvertGraphRunbookContentOptions struct { + // placeholder for future optional parameters +} + +// ConnectionClientCreateOrUpdateOptions contains the optional parameters for the ConnectionClient.CreateOrUpdate method. +type ConnectionClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConnectionClientDeleteOptions contains the optional parameters for the ConnectionClient.Delete method. +type ConnectionClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ConnectionClientGetOptions contains the optional parameters for the ConnectionClient.Get method. +type ConnectionClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConnectionClientListByAutomationAccountOptions contains the optional parameters for the ConnectionClient.NewListByAutomationAccountPager +// method. +type ConnectionClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// ConnectionClientUpdateOptions contains the optional parameters for the ConnectionClient.Update method. +type ConnectionClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConnectionTypeClientCreateOrUpdateOptions contains the optional parameters for the ConnectionTypeClient.CreateOrUpdate +// method. +type ConnectionTypeClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConnectionTypeClientDeleteOptions contains the optional parameters for the ConnectionTypeClient.Delete method. +type ConnectionTypeClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ConnectionTypeClientGetOptions contains the optional parameters for the ConnectionTypeClient.Get method. +type ConnectionTypeClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConnectionTypeClientListByAutomationAccountOptions contains the optional parameters for the ConnectionTypeClient.NewListByAutomationAccountPager +// method. +type ConnectionTypeClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// CredentialClientCreateOrUpdateOptions contains the optional parameters for the CredentialClient.CreateOrUpdate method. +type CredentialClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// CredentialClientDeleteOptions contains the optional parameters for the CredentialClient.Delete method. +type CredentialClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CredentialClientGetOptions contains the optional parameters for the CredentialClient.Get method. +type CredentialClientGetOptions struct { + // placeholder for future optional parameters +} + +// CredentialClientListByAutomationAccountOptions contains the optional parameters for the CredentialClient.NewListByAutomationAccountPager +// method. +type CredentialClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// CredentialClientUpdateOptions contains the optional parameters for the CredentialClient.Update method. +type CredentialClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// DeletedAutomationAccountsClientListBySubscriptionOptions contains the optional parameters for the DeletedAutomationAccountsClient.ListBySubscription +// method. +type DeletedAutomationAccountsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// DscCompilationJobClientBeginCreateOptions contains the optional parameters for the DscCompilationJobClient.BeginCreate +// method. +type DscCompilationJobClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DscCompilationJobClientGetOptions contains the optional parameters for the DscCompilationJobClient.Get method. +type DscCompilationJobClientGetOptions struct { + // placeholder for future optional parameters +} + +// DscCompilationJobClientGetStreamOptions contains the optional parameters for the DscCompilationJobClient.GetStream method. +type DscCompilationJobClientGetStreamOptions struct { + // placeholder for future optional parameters +} + +// DscCompilationJobClientListByAutomationAccountOptions contains the optional parameters for the DscCompilationJobClient.NewListByAutomationAccountPager +// method. +type DscCompilationJobClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// DscCompilationJobStreamClientListByJobOptions contains the optional parameters for the DscCompilationJobStreamClient.ListByJob +// method. +type DscCompilationJobStreamClientListByJobOptions struct { + // placeholder for future optional parameters +} + +// DscConfigurationClientCreateOrUpdateWithJSONOptions contains the optional parameters for the DscConfigurationClient.CreateOrUpdateWithJSON +// method. +type DscConfigurationClientCreateOrUpdateWithJSONOptions struct { + // placeholder for future optional parameters +} + +// DscConfigurationClientCreateOrUpdateWithTextOptions contains the optional parameters for the DscConfigurationClient.CreateOrUpdateWithText +// method. +type DscConfigurationClientCreateOrUpdateWithTextOptions struct { + // placeholder for future optional parameters +} + +// DscConfigurationClientDeleteOptions contains the optional parameters for the DscConfigurationClient.Delete method. +type DscConfigurationClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DscConfigurationClientGetContentOptions contains the optional parameters for the DscConfigurationClient.GetContent method. +type DscConfigurationClientGetContentOptions struct { + // placeholder for future optional parameters +} + +// DscConfigurationClientGetOptions contains the optional parameters for the DscConfigurationClient.Get method. +type DscConfigurationClientGetOptions struct { + // placeholder for future optional parameters +} + +// DscConfigurationClientListByAutomationAccountOptions contains the optional parameters for the DscConfigurationClient.NewListByAutomationAccountPager +// method. +type DscConfigurationClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string + + // Return total rows. + Inlinecount *string + + // The number of rows to skip. + Skip *int32 + + // The number of rows to take. + Top *int32 +} + +// DscConfigurationClientUpdateWithJSONOptions contains the optional parameters for the DscConfigurationClient.UpdateWithJSON +// method. +type DscConfigurationClientUpdateWithJSONOptions struct { + // The create or update parameters for configuration. + Parameters *DscConfigurationUpdateParameters +} + +// DscConfigurationClientUpdateWithTextOptions contains the optional parameters for the DscConfigurationClient.UpdateWithText +// method. +type DscConfigurationClientUpdateWithTextOptions struct { + // The create or update parameters for configuration. + Parameters *string +} + +// DscNodeClientDeleteOptions contains the optional parameters for the DscNodeClient.Delete method. +type DscNodeClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DscNodeClientGetOptions contains the optional parameters for the DscNodeClient.Get method. +type DscNodeClientGetOptions struct { + // placeholder for future optional parameters +} + +// DscNodeClientListByAutomationAccountOptions contains the optional parameters for the DscNodeClient.NewListByAutomationAccountPager +// method. +type DscNodeClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string + + // Return total rows. + Inlinecount *string + + // The number of rows to skip. + Skip *int32 + + // The number of rows to take. + Top *int32 +} + +// DscNodeClientUpdateOptions contains the optional parameters for the DscNodeClient.Update method. +type DscNodeClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// DscNodeConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscNodeConfigurationClient.BeginCreateOrUpdate +// method. +type DscNodeConfigurationClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DscNodeConfigurationClientDeleteOptions contains the optional parameters for the DscNodeConfigurationClient.Delete method. +type DscNodeConfigurationClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DscNodeConfigurationClientGetOptions contains the optional parameters for the DscNodeConfigurationClient.Get method. +type DscNodeConfigurationClientGetOptions struct { + // placeholder for future optional parameters +} + +// DscNodeConfigurationClientListByAutomationAccountOptions contains the optional parameters for the DscNodeConfigurationClient.NewListByAutomationAccountPager +// method. +type DscNodeConfigurationClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string + + // Return total rows. + Inlinecount *string + + // The number of rows to skip. + Skip *int32 + + // The number of rows to take. + Top *int32 +} + +// FieldsClientListByTypeOptions contains the optional parameters for the FieldsClient.NewListByTypePager method. +type FieldsClientListByTypeOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkerGroupClientCreateOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Create +// method. +type HybridRunbookWorkerGroupClientCreateOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkerGroupClientDeleteOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Delete +// method. +type HybridRunbookWorkerGroupClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkerGroupClientGetOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Get method. +type HybridRunbookWorkerGroupClientGetOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkerGroupClientListByAutomationAccountOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.NewListByAutomationAccountPager +// method. +type HybridRunbookWorkerGroupClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// HybridRunbookWorkerGroupClientUpdateOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Update +// method. +type HybridRunbookWorkerGroupClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkersClientCreateOptions contains the optional parameters for the HybridRunbookWorkersClient.Create method. +type HybridRunbookWorkersClientCreateOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkersClientDeleteOptions contains the optional parameters for the HybridRunbookWorkersClient.Delete method. +type HybridRunbookWorkersClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkersClientGetOptions contains the optional parameters for the HybridRunbookWorkersClient.Get method. +type HybridRunbookWorkersClientGetOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkersClientListByHybridRunbookWorkerGroupOptions contains the optional parameters for the HybridRunbookWorkersClient.NewListByHybridRunbookWorkerGroupPager +// method. +type HybridRunbookWorkersClientListByHybridRunbookWorkerGroupOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// HybridRunbookWorkersClientMoveOptions contains the optional parameters for the HybridRunbookWorkersClient.Move method. +type HybridRunbookWorkersClientMoveOptions struct { + // placeholder for future optional parameters +} + +// JobClientCreateOptions contains the optional parameters for the JobClient.Create method. +type JobClientCreateOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobClientGetOptions contains the optional parameters for the JobClient.Get method. +type JobClientGetOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobClientGetOutputOptions contains the optional parameters for the JobClient.GetOutput method. +type JobClientGetOutputOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobClientGetRunbookContentOptions contains the optional parameters for the JobClient.GetRunbookContent method. +type JobClientGetRunbookContentOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobClientListByAutomationAccountOptions contains the optional parameters for the JobClient.NewListByAutomationAccountPager +// method. +type JobClientListByAutomationAccountOptions struct { + // Identifies this specific client request. + ClientRequestID *string + + // The filter to apply on the operation. + Filter *string +} + +// JobClientResumeOptions contains the optional parameters for the JobClient.Resume method. +type JobClientResumeOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobClientStopOptions contains the optional parameters for the JobClient.Stop method. +type JobClientStopOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobClientSuspendOptions contains the optional parameters for the JobClient.Suspend method. +type JobClientSuspendOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobScheduleClientCreateOptions contains the optional parameters for the JobScheduleClient.Create method. +type JobScheduleClientCreateOptions struct { + // placeholder for future optional parameters +} + +// JobScheduleClientDeleteOptions contains the optional parameters for the JobScheduleClient.Delete method. +type JobScheduleClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// JobScheduleClientGetOptions contains the optional parameters for the JobScheduleClient.Get method. +type JobScheduleClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobScheduleClientListByAutomationAccountOptions contains the optional parameters for the JobScheduleClient.NewListByAutomationAccountPager +// method. +type JobScheduleClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// JobStreamClientGetOptions contains the optional parameters for the JobStreamClient.Get method. +type JobStreamClientGetOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobStreamClientListByJobOptions contains the optional parameters for the JobStreamClient.NewListByJobPager method. +type JobStreamClientListByJobOptions struct { + // Identifies this specific client request. + ClientRequestID *string + + // The filter to apply on the operation. + Filter *string +} + +// KeysClientListByAutomationAccountOptions contains the optional parameters for the KeysClient.ListByAutomationAccount method. +type KeysClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// LinkedWorkspaceClientGetOptions contains the optional parameters for the LinkedWorkspaceClient.Get method. +type LinkedWorkspaceClientGetOptions struct { + // placeholder for future optional parameters +} + +// ModuleClientCreateOrUpdateOptions contains the optional parameters for the ModuleClient.CreateOrUpdate method. +type ModuleClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ModuleClientDeleteOptions contains the optional parameters for the ModuleClient.Delete method. +type ModuleClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ModuleClientGetOptions contains the optional parameters for the ModuleClient.Get method. +type ModuleClientGetOptions struct { + // placeholder for future optional parameters +} + +// ModuleClientListByAutomationAccountOptions contains the optional parameters for the ModuleClient.NewListByAutomationAccountPager +// method. +type ModuleClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// ModuleClientUpdateOptions contains the optional parameters for the ModuleClient.Update method. +type ModuleClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// NodeCountInformationClientGetOptions contains the optional parameters for the NodeCountInformationClient.Get method. +type NodeCountInformationClientGetOptions struct { + // placeholder for future optional parameters +} + +// NodeReportsClientGetContentOptions contains the optional parameters for the NodeReportsClient.GetContent method. +type NodeReportsClientGetContentOptions struct { + // placeholder for future optional parameters +} + +// NodeReportsClientGetOptions contains the optional parameters for the NodeReportsClient.Get method. +type NodeReportsClientGetOptions struct { + // placeholder for future optional parameters +} + +// NodeReportsClientListByNodeOptions contains the optional parameters for the NodeReportsClient.NewListByNodePager method. +type NodeReportsClientListByNodeOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// ObjectDataTypesClientListFieldsByModuleAndTypeOptions contains the optional parameters for the ObjectDataTypesClient.NewListFieldsByModuleAndTypePager +// method. +type ObjectDataTypesClientListFieldsByModuleAndTypeOptions struct { + // placeholder for future optional parameters +} + +// ObjectDataTypesClientListFieldsByTypeOptions contains the optional parameters for the ObjectDataTypesClient.NewListFieldsByTypePager +// method. +type ObjectDataTypesClientListFieldsByTypeOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions 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 +} + +// PrivateEndpointConnectionsClientListByAutomationAccountOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByAutomationAccountPager +// method. +type PrivateEndpointConnectionsClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientAutomationOptions contains the optional parameters for the PrivateLinkResourcesClient.NewAutomationPager +// method. +type PrivateLinkResourcesClientAutomationOptions struct { + // placeholder for future optional parameters +} + +// Python2PackageClientCreateOrUpdateOptions contains the optional parameters for the Python2PackageClient.CreateOrUpdate +// method. +type Python2PackageClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// Python2PackageClientDeleteOptions contains the optional parameters for the Python2PackageClient.Delete method. +type Python2PackageClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// Python2PackageClientGetOptions contains the optional parameters for the Python2PackageClient.Get method. +type Python2PackageClientGetOptions struct { + // placeholder for future optional parameters +} + +// Python2PackageClientListByAutomationAccountOptions contains the optional parameters for the Python2PackageClient.NewListByAutomationAccountPager +// method. +type Python2PackageClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// Python2PackageClientUpdateOptions contains the optional parameters for the Python2PackageClient.Update method. +type Python2PackageClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// RunbookClientBeginPublishOptions contains the optional parameters for the RunbookClient.BeginPublish method. +type RunbookClientBeginPublishOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RunbookClientCreateOrUpdateOptions contains the optional parameters for the RunbookClient.CreateOrUpdate method. +type RunbookClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// RunbookClientDeleteOptions contains the optional parameters for the RunbookClient.Delete method. +type RunbookClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// RunbookClientGetContentOptions contains the optional parameters for the RunbookClient.GetContent method. +type RunbookClientGetContentOptions struct { + // placeholder for future optional parameters +} + +// RunbookClientGetOptions contains the optional parameters for the RunbookClient.Get method. +type RunbookClientGetOptions struct { + // placeholder for future optional parameters +} + +// RunbookClientListByAutomationAccountOptions contains the optional parameters for the RunbookClient.NewListByAutomationAccountPager +// method. +type RunbookClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// RunbookClientUpdateOptions contains the optional parameters for the RunbookClient.Update method. +type RunbookClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// RunbookDraftClientBeginReplaceContentOptions contains the optional parameters for the RunbookDraftClient.BeginReplaceContent +// method. +type RunbookDraftClientBeginReplaceContentOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RunbookDraftClientGetContentOptions contains the optional parameters for the RunbookDraftClient.GetContent method. +type RunbookDraftClientGetContentOptions struct { + // placeholder for future optional parameters +} + +// RunbookDraftClientGetOptions contains the optional parameters for the RunbookDraftClient.Get method. +type RunbookDraftClientGetOptions struct { + // placeholder for future optional parameters +} + +// RunbookDraftClientUndoEditOptions contains the optional parameters for the RunbookDraftClient.UndoEdit method. +type RunbookDraftClientUndoEditOptions struct { + // placeholder for future optional parameters +} + +// ScheduleClientCreateOrUpdateOptions contains the optional parameters for the ScheduleClient.CreateOrUpdate method. +type ScheduleClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ScheduleClientDeleteOptions contains the optional parameters for the ScheduleClient.Delete method. +type ScheduleClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ScheduleClientGetOptions contains the optional parameters for the ScheduleClient.Get method. +type ScheduleClientGetOptions struct { + // placeholder for future optional parameters +} + +// ScheduleClientListByAutomationAccountOptions contains the optional parameters for the ScheduleClient.NewListByAutomationAccountPager +// method. +type ScheduleClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// ScheduleClientUpdateOptions contains the optional parameters for the ScheduleClient.Update method. +type ScheduleClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// SoftwareUpdateConfigurationMachineRunsClientGetByIDOptions contains the optional parameters for the SoftwareUpdateConfigurationMachineRunsClient.GetByID +// method. +type SoftwareUpdateConfigurationMachineRunsClientGetByIDOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// SoftwareUpdateConfigurationMachineRunsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationMachineRunsClient.List +// method. +type SoftwareUpdateConfigurationMachineRunsClientListOptions struct { + // Identifies this specific client request. + ClientRequestID *string + + // The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', + // and 'properties/softwareUpdateConfiguration/name' + Filter *string + + // number of entries you skip before returning results + Skip *string + + // Maximum number of entries returned in the results collection + Top *string +} + +// SoftwareUpdateConfigurationRunsClientGetByIDOptions contains the optional parameters for the SoftwareUpdateConfigurationRunsClient.GetByID +// method. +type SoftwareUpdateConfigurationRunsClientGetByIDOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// SoftwareUpdateConfigurationRunsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationRunsClient.List +// method. +type SoftwareUpdateConfigurationRunsClientListOptions struct { + // Identifies this specific client request. + ClientRequestID *string + + // The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', + // and 'properties/softwareUpdateConfiguration/name' + Filter *string + + // Number of entries you skip before returning results + Skip *string + + // Maximum number of entries returned in the results collection + Top *string +} + +// SoftwareUpdateConfigurationsClientCreateOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.Create +// method. +type SoftwareUpdateConfigurationsClientCreateOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// SoftwareUpdateConfigurationsClientDeleteOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.Delete +// method. +type SoftwareUpdateConfigurationsClientDeleteOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// SoftwareUpdateConfigurationsClientGetByNameOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.GetByName +// method. +type SoftwareUpdateConfigurationsClientGetByNameOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// SoftwareUpdateConfigurationsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.List +// method. +type SoftwareUpdateConfigurationsClientListOptions struct { + // Identifies this specific client request. + ClientRequestID *string + + // The filter to apply on the operation. + Filter *string +} + +// SourceControlClientCreateOrUpdateOptions contains the optional parameters for the SourceControlClient.CreateOrUpdate method. +type SourceControlClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SourceControlClientDeleteOptions contains the optional parameters for the SourceControlClient.Delete method. +type SourceControlClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SourceControlClientGetOptions contains the optional parameters for the SourceControlClient.Get method. +type SourceControlClientGetOptions struct { + // placeholder for future optional parameters +} + +// SourceControlClientListByAutomationAccountOptions contains the optional parameters for the SourceControlClient.NewListByAutomationAccountPager +// method. +type SourceControlClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// SourceControlClientUpdateOptions contains the optional parameters for the SourceControlClient.Update method. +type SourceControlClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// SourceControlSyncJobClientCreateOptions contains the optional parameters for the SourceControlSyncJobClient.Create method. +type SourceControlSyncJobClientCreateOptions struct { + // placeholder for future optional parameters +} + +// SourceControlSyncJobClientGetOptions contains the optional parameters for the SourceControlSyncJobClient.Get method. +type SourceControlSyncJobClientGetOptions struct { + // placeholder for future optional parameters +} + +// SourceControlSyncJobClientListByAutomationAccountOptions contains the optional parameters for the SourceControlSyncJobClient.NewListByAutomationAccountPager +// method. +type SourceControlSyncJobClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// SourceControlSyncJobStreamsClientGetOptions contains the optional parameters for the SourceControlSyncJobStreamsClient.Get +// method. +type SourceControlSyncJobStreamsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SourceControlSyncJobStreamsClientListBySyncJobOptions contains the optional parameters for the SourceControlSyncJobStreamsClient.NewListBySyncJobPager +// method. +type SourceControlSyncJobStreamsClientListBySyncJobOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// StatisticsClientListByAutomationAccountOptions contains the optional parameters for the StatisticsClient.NewListByAutomationAccountPager +// method. +type StatisticsClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// TestJobClientCreateOptions contains the optional parameters for the TestJobClient.Create method. +type TestJobClientCreateOptions struct { + // placeholder for future optional parameters +} + +// TestJobClientGetOptions contains the optional parameters for the TestJobClient.Get method. +type TestJobClientGetOptions struct { + // placeholder for future optional parameters +} + +// TestJobClientResumeOptions contains the optional parameters for the TestJobClient.Resume method. +type TestJobClientResumeOptions struct { + // placeholder for future optional parameters +} + +// TestJobClientStopOptions contains the optional parameters for the TestJobClient.Stop method. +type TestJobClientStopOptions struct { + // placeholder for future optional parameters +} + +// TestJobClientSuspendOptions contains the optional parameters for the TestJobClient.Suspend method. +type TestJobClientSuspendOptions struct { + // placeholder for future optional parameters +} + +// TestJobStreamsClientGetOptions contains the optional parameters for the TestJobStreamsClient.Get method. +type TestJobStreamsClientGetOptions struct { + // placeholder for future optional parameters +} + +// TestJobStreamsClientListByTestJobOptions contains the optional parameters for the TestJobStreamsClient.NewListByTestJobPager +// method. +type TestJobStreamsClientListByTestJobOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// UsagesClientListByAutomationAccountOptions contains the optional parameters for the UsagesClient.NewListByAutomationAccountPager +// method. +type UsagesClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// VariableClientCreateOrUpdateOptions contains the optional parameters for the VariableClient.CreateOrUpdate method. +type VariableClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// VariableClientDeleteOptions contains the optional parameters for the VariableClient.Delete method. +type VariableClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// VariableClientGetOptions contains the optional parameters for the VariableClient.Get method. +type VariableClientGetOptions struct { + // placeholder for future optional parameters +} + +// VariableClientListByAutomationAccountOptions contains the optional parameters for the VariableClient.NewListByAutomationAccountPager +// method. +type VariableClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// VariableClientUpdateOptions contains the optional parameters for the VariableClient.Update method. +type VariableClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WatcherClientCreateOrUpdateOptions contains the optional parameters for the WatcherClient.CreateOrUpdate method. +type WatcherClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WatcherClientDeleteOptions contains the optional parameters for the WatcherClient.Delete method. +type WatcherClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WatcherClientGetOptions contains the optional parameters for the WatcherClient.Get method. +type WatcherClientGetOptions struct { + // placeholder for future optional parameters +} + +// WatcherClientListByAutomationAccountOptions contains the optional parameters for the WatcherClient.NewListByAutomationAccountPager +// method. +type WatcherClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// WatcherClientStartOptions contains the optional parameters for the WatcherClient.Start method. +type WatcherClientStartOptions struct { + // placeholder for future optional parameters +} + +// WatcherClientStopOptions contains the optional parameters for the WatcherClient.Stop method. +type WatcherClientStopOptions struct { + // placeholder for future optional parameters +} + +// WatcherClientUpdateOptions contains the optional parameters for the WatcherClient.Update method. +type WatcherClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WebhookClientCreateOrUpdateOptions contains the optional parameters for the WebhookClient.CreateOrUpdate method. +type WebhookClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WebhookClientDeleteOptions contains the optional parameters for the WebhookClient.Delete method. +type WebhookClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WebhookClientGenerateURIOptions contains the optional parameters for the WebhookClient.GenerateURI method. +type WebhookClientGenerateURIOptions struct { + // placeholder for future optional parameters +} + +// WebhookClientGetOptions contains the optional parameters for the WebhookClient.Get method. +type WebhookClientGetOptions struct { + // placeholder for future optional parameters +} + +// WebhookClientListByAutomationAccountOptions contains the optional parameters for the WebhookClient.NewListByAutomationAccountPager +// method. +type WebhookClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// WebhookClientUpdateOptions contains the optional parameters for the WebhookClient.Update method. +type WebhookClientUpdateOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/privateendpointconnections_client.go index 6abdee0c..ab7b9c32 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/privateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/privateendpointconnections_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type PrivateEndpointConnectionsClient struct { // - 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+".PrivateEndpointConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. // // Generated from API version 2020-01-13-preview func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName 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, automationAccountName, privateEndpointConnectionName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -112,7 +122,10 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a private endpoint connection with a given name. @@ -130,9 +143,14 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -141,18 +159,24 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // // Generated from API version 2020-01-13-preview func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, automationAccountName 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, automationAccountName, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -195,18 +219,25 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get // method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName 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, automationAccountName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -261,6 +292,7 @@ func (client *PrivateEndpointConnectionsClient) NewListByAutomationAccountPager( return false }, Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsClientListByAutomationAccountResponse) (PrivateEndpointConnectionsClientListByAutomationAccountResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointConnectionsClient.NewListByAutomationAccountPager") req, err := client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return PrivateEndpointConnectionsClientListByAutomationAccountResponse{}, err @@ -274,6 +306,7 @@ func (client *PrivateEndpointConnectionsClient) NewListByAutomationAccountPager( } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/privatelinkresources_client.go index 2f03a61d..5fefe58a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/privatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/privatelinkresources_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type PrivateLinkResourcesClient struct { // - 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+".PrivateLinkResourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,6 +57,7 @@ func (client *PrivateLinkResourcesClient) NewAutomationPager(resourceGroupName s return false }, Fetcher: func(ctx context.Context, page *PrivateLinkResourcesClientAutomationResponse) (PrivateLinkResourcesClientAutomationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkResourcesClient.NewAutomationPager") req, err := client.automationCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return PrivateLinkResourcesClientAutomationResponse{}, err @@ -71,6 +71,7 @@ func (client *PrivateLinkResourcesClient) NewAutomationPager(resourceGroupName s } return client.automationHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/python2package_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/python2package_client.go index 52d68223..95080731 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/python2package_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/python2package_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type Python2PackageClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPython2PackageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Python2PackageClient, error) { - cl, err := arm.NewClient(moduleName+".Python2PackageClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewPython2PackageClient(subscriptionID string, credential azcore.TokenCrede // - options - Python2PackageClientCreateOrUpdateOptions contains the optional parameters for the Python2PackageClient.CreateOrUpdate // method. func (client *Python2PackageClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, parameters PythonPackageCreateParameters, options *Python2PackageClientCreateOrUpdateOptions) (Python2PackageClientCreateOrUpdateResponse, error) { + var err error + const operationName = "Python2PackageClient.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, automationAccountName, packageName, parameters, options) if err != nil { return Python2PackageClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return Python2PackageClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return Python2PackageClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return Python2PackageClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *Python2PackageClient) createOrUpdateCreateRequest(ctx context.Cont reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *Python2PackageClient) createOrUpdateHandleResponse(resp *http.Resp // - packageName - The python package name. // - options - Python2PackageClientDeleteOptions contains the optional parameters for the Python2PackageClient.Delete method. func (client *Python2PackageClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, options *Python2PackageClientDeleteOptions) (Python2PackageClientDeleteResponse, error) { + var err error + const operationName = "Python2PackageClient.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, automationAccountName, packageName, options) if err != nil { return Python2PackageClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return Python2PackageClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return Python2PackageClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return Python2PackageClientDeleteResponse{}, err } return Python2PackageClientDeleteResponse{}, nil } @@ -171,18 +186,25 @@ func (client *Python2PackageClient) deleteCreateRequest(ctx context.Context, res // - packageName - The python package name. // - options - Python2PackageClientGetOptions contains the optional parameters for the Python2PackageClient.Get method. func (client *Python2PackageClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, options *Python2PackageClientGetOptions) (Python2PackageClientGetResponse, error) { + var err error + const operationName = "Python2PackageClient.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, automationAccountName, packageName, options) if err != nil { return Python2PackageClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return Python2PackageClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return Python2PackageClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return Python2PackageClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -237,25 +259,20 @@ func (client *Python2PackageClient) NewListByAutomationAccountPager(resourceGrou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *Python2PackageClientListByAutomationAccountResponse) (Python2PackageClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return Python2PackageClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Python2PackageClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return Python2PackageClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return Python2PackageClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -304,18 +321,25 @@ func (client *Python2PackageClient) listByAutomationAccountHandleResponse(resp * // - parameters - The update parameters for python package. // - options - Python2PackageClientUpdateOptions contains the optional parameters for the Python2PackageClient.Update method. func (client *Python2PackageClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, parameters PythonPackageUpdateParameters, options *Python2PackageClientUpdateOptions) (Python2PackageClientUpdateResponse, error) { + var err error + const operationName = "Python2PackageClient.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, automationAccountName, packageName, parameters, options) if err != nil { return Python2PackageClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return Python2PackageClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return Python2PackageClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return Python2PackageClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -345,7 +369,10 @@ func (client *Python2PackageClient) updateCreateRequest(ctx context.Context, res reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/response_types.go index dae8d22d..8afe6a7c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/response_types.go @@ -3,19 +3,16 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation -import ( - "encoding/json" - "io" -) +import "io" // AccountClientCreateOrUpdateResponse contains the response from method AccountClient.CreateOrUpdate. type AccountClientCreateOrUpdateResponse struct { + // Definition of the automation account type. Account } @@ -26,46 +23,55 @@ type AccountClientDeleteResponse struct { // AccountClientGetResponse contains the response from method AccountClient.Get. type AccountClientGetResponse struct { + // Definition of the automation account type. Account } // AccountClientListByResourceGroupResponse contains the response from method AccountClient.NewListByResourceGroupPager. type AccountClientListByResourceGroupResponse struct { + // The response model for the list account operation. AccountListResult } // AccountClientListResponse contains the response from method AccountClient.NewListPager. type AccountClientListResponse struct { + // The response model for the list account operation. AccountListResult } // AccountClientUpdateResponse contains the response from method AccountClient.Update. type AccountClientUpdateResponse struct { + // Definition of the automation account type. Account } // ActivityClientGetResponse contains the response from method ActivityClient.Get. type ActivityClientGetResponse struct { + // Definition of the activity. Activity } // ActivityClientListByModuleResponse contains the response from method ActivityClient.NewListByModulePager. type ActivityClientListByModuleResponse struct { + // The response model for the list activity operation. ActivityListResult } // AgentRegistrationInformationClientGetResponse contains the response from method AgentRegistrationInformationClient.Get. type AgentRegistrationInformationClientGetResponse struct { + // Definition of the agent registration information type. AgentRegistration } // AgentRegistrationInformationClientRegenerateKeyResponse contains the response from method AgentRegistrationInformationClient.RegenerateKey. type AgentRegistrationInformationClientRegenerateKeyResponse struct { + // Definition of the agent registration information type. AgentRegistration } // CertificateClientCreateOrUpdateResponse contains the response from method CertificateClient.CreateOrUpdate. type CertificateClientCreateOrUpdateResponse struct { + // Definition of the certificate. Certificate } @@ -76,26 +82,31 @@ type CertificateClientDeleteResponse struct { // CertificateClientGetResponse contains the response from method CertificateClient.Get. type CertificateClientGetResponse struct { + // Definition of the certificate. Certificate } // CertificateClientListByAutomationAccountResponse contains the response from method CertificateClient.NewListByAutomationAccountPager. type CertificateClientListByAutomationAccountResponse struct { + // The response model for the list certificate operation. CertificateListResult } // CertificateClientUpdateResponse contains the response from method CertificateClient.Update. type CertificateClientUpdateResponse struct { + // Definition of the certificate. Certificate } // ClientConvertGraphRunbookContentResponse contains the response from method Client.ConvertGraphRunbookContent. type ClientConvertGraphRunbookContentResponse struct { + // Graphical Runbook Content GraphicalRunbookContent } // ConnectionClientCreateOrUpdateResponse contains the response from method ConnectionClient.CreateOrUpdate. type ConnectionClientCreateOrUpdateResponse struct { + // Definition of the connection. Connection } @@ -106,21 +117,25 @@ type ConnectionClientDeleteResponse struct { // ConnectionClientGetResponse contains the response from method ConnectionClient.Get. type ConnectionClientGetResponse struct { + // Definition of the connection. Connection } // ConnectionClientListByAutomationAccountResponse contains the response from method ConnectionClient.NewListByAutomationAccountPager. type ConnectionClientListByAutomationAccountResponse struct { + // The response model for the list connection operation. ConnectionListResult } // ConnectionClientUpdateResponse contains the response from method ConnectionClient.Update. type ConnectionClientUpdateResponse struct { + // Definition of the connection. Connection } // ConnectionTypeClientCreateOrUpdateResponse contains the response from method ConnectionTypeClient.CreateOrUpdate. type ConnectionTypeClientCreateOrUpdateResponse struct { + // Definition of the connection type. ConnectionType } @@ -131,16 +146,19 @@ type ConnectionTypeClientDeleteResponse struct { // ConnectionTypeClientGetResponse contains the response from method ConnectionTypeClient.Get. type ConnectionTypeClientGetResponse struct { + // Definition of the connection type. ConnectionType } // ConnectionTypeClientListByAutomationAccountResponse contains the response from method ConnectionTypeClient.NewListByAutomationAccountPager. type ConnectionTypeClientListByAutomationAccountResponse struct { + // The response model for the list connection type operation. ConnectionTypeListResult } // CredentialClientCreateOrUpdateResponse contains the response from method CredentialClient.CreateOrUpdate. type CredentialClientCreateOrUpdateResponse struct { + // Definition of the credential. Credential } @@ -151,56 +169,67 @@ type CredentialClientDeleteResponse struct { // CredentialClientGetResponse contains the response from method CredentialClient.Get. type CredentialClientGetResponse struct { + // Definition of the credential. Credential } // CredentialClientListByAutomationAccountResponse contains the response from method CredentialClient.NewListByAutomationAccountPager. type CredentialClientListByAutomationAccountResponse struct { + // The response model for the list credential operation. CredentialListResult } // CredentialClientUpdateResponse contains the response from method CredentialClient.Update. type CredentialClientUpdateResponse struct { + // Definition of the credential. Credential } // DeletedAutomationAccountsClientListBySubscriptionResponse contains the response from method DeletedAutomationAccountsClient.ListBySubscription. type DeletedAutomationAccountsClientListBySubscriptionResponse struct { + // The response model for the list deleted automation account. DeletedAutomationAccountListResult } // DscCompilationJobClientCreateResponse contains the response from method DscCompilationJobClient.BeginCreate. type DscCompilationJobClientCreateResponse struct { + // Definition of the Dsc Compilation job. DscCompilationJob } // DscCompilationJobClientGetResponse contains the response from method DscCompilationJobClient.Get. type DscCompilationJobClientGetResponse struct { + // Definition of the Dsc Compilation job. DscCompilationJob } // DscCompilationJobClientGetStreamResponse contains the response from method DscCompilationJobClient.GetStream. type DscCompilationJobClientGetStreamResponse struct { + // Definition of the job stream. JobStream } // DscCompilationJobClientListByAutomationAccountResponse contains the response from method DscCompilationJobClient.NewListByAutomationAccountPager. type DscCompilationJobClientListByAutomationAccountResponse struct { + // The response model for the list job operation. DscCompilationJobListResult } // DscCompilationJobStreamClientListByJobResponse contains the response from method DscCompilationJobStreamClient.ListByJob. type DscCompilationJobStreamClientListByJobResponse struct { + // The response model for the list job stream operation. JobStreamListResult } // DscConfigurationClientCreateOrUpdateWithJSONResponse contains the response from method DscConfigurationClient.CreateOrUpdateWithJSON. type DscConfigurationClientCreateOrUpdateWithJSONResponse struct { + // Definition of the configuration type. DscConfiguration } // DscConfigurationClientCreateOrUpdateWithTextResponse contains the response from method DscConfigurationClient.CreateOrUpdateWithText. type DscConfigurationClientCreateOrUpdateWithTextResponse struct { + // Definition of the configuration type. DscConfiguration } @@ -216,21 +245,25 @@ type DscConfigurationClientGetContentResponse struct { // DscConfigurationClientGetResponse contains the response from method DscConfigurationClient.Get. type DscConfigurationClientGetResponse struct { + // Definition of the configuration type. DscConfiguration } // DscConfigurationClientListByAutomationAccountResponse contains the response from method DscConfigurationClient.NewListByAutomationAccountPager. type DscConfigurationClientListByAutomationAccountResponse struct { + // The response model for the list configuration operation. DscConfigurationListResult } // DscConfigurationClientUpdateWithJSONResponse contains the response from method DscConfigurationClient.UpdateWithJSON. type DscConfigurationClientUpdateWithJSONResponse struct { + // Definition of the configuration type. DscConfiguration } // DscConfigurationClientUpdateWithTextResponse contains the response from method DscConfigurationClient.UpdateWithText. type DscConfigurationClientUpdateWithTextResponse struct { + // Definition of the configuration type. DscConfiguration } @@ -241,21 +274,25 @@ type DscNodeClientDeleteResponse struct { // DscNodeClientGetResponse contains the response from method DscNodeClient.Get. type DscNodeClientGetResponse struct { + // Definition of a DscNode DscNode } // DscNodeClientListByAutomationAccountResponse contains the response from method DscNodeClient.NewListByAutomationAccountPager. type DscNodeClientListByAutomationAccountResponse struct { + // The response model for the list dsc nodes operation. DscNodeListResult } // DscNodeClientUpdateResponse contains the response from method DscNodeClient.Update. type DscNodeClientUpdateResponse struct { + // Definition of a DscNode DscNode } // DscNodeConfigurationClientCreateOrUpdateResponse contains the response from method DscNodeConfigurationClient.BeginCreateOrUpdate. type DscNodeConfigurationClientCreateOrUpdateResponse struct { + // Definition of the dsc node configuration. DscNodeConfiguration } @@ -266,21 +303,25 @@ type DscNodeConfigurationClientDeleteResponse struct { // DscNodeConfigurationClientGetResponse contains the response from method DscNodeConfigurationClient.Get. type DscNodeConfigurationClientGetResponse struct { + // Definition of the dsc node configuration. DscNodeConfiguration } // DscNodeConfigurationClientListByAutomationAccountResponse contains the response from method DscNodeConfigurationClient.NewListByAutomationAccountPager. type DscNodeConfigurationClientListByAutomationAccountResponse struct { + // The response model for the list job operation. DscNodeConfigurationListResult } // FieldsClientListByTypeResponse contains the response from method FieldsClient.NewListByTypePager. type FieldsClientListByTypeResponse struct { + // The response model for the list fields operation. TypeFieldListResult } // HybridRunbookWorkerGroupClientCreateResponse contains the response from method HybridRunbookWorkerGroupClient.Create. type HybridRunbookWorkerGroupClientCreateResponse struct { + // Definition of hybrid runbook worker group. HybridRunbookWorkerGroup } @@ -291,21 +332,25 @@ type HybridRunbookWorkerGroupClientDeleteResponse struct { // HybridRunbookWorkerGroupClientGetResponse contains the response from method HybridRunbookWorkerGroupClient.Get. type HybridRunbookWorkerGroupClientGetResponse struct { + // Definition of hybrid runbook worker group. HybridRunbookWorkerGroup } // HybridRunbookWorkerGroupClientListByAutomationAccountResponse contains the response from method HybridRunbookWorkerGroupClient.NewListByAutomationAccountPager. type HybridRunbookWorkerGroupClientListByAutomationAccountResponse struct { + // The response model for the list hybrid runbook worker groups. HybridRunbookWorkerGroupsListResult } // HybridRunbookWorkerGroupClientUpdateResponse contains the response from method HybridRunbookWorkerGroupClient.Update. type HybridRunbookWorkerGroupClientUpdateResponse struct { + // Definition of hybrid runbook worker group. HybridRunbookWorkerGroup } // HybridRunbookWorkersClientCreateResponse contains the response from method HybridRunbookWorkersClient.Create. type HybridRunbookWorkersClientCreateResponse struct { + // Definition of hybrid runbook worker. HybridRunbookWorker } @@ -316,11 +361,13 @@ type HybridRunbookWorkersClientDeleteResponse struct { // HybridRunbookWorkersClientGetResponse contains the response from method HybridRunbookWorkersClient.Get. type HybridRunbookWorkersClientGetResponse struct { + // Definition of hybrid runbook worker. HybridRunbookWorker } // HybridRunbookWorkersClientListByHybridRunbookWorkerGroupResponse contains the response from method HybridRunbookWorkersClient.NewListByHybridRunbookWorkerGroupPager. type HybridRunbookWorkersClientListByHybridRunbookWorkerGroupResponse struct { + // The response model for the list hybrid runbook workers. HybridRunbookWorkersListResult } @@ -331,6 +378,7 @@ type HybridRunbookWorkersClientMoveResponse struct { // JobClientCreateResponse contains the response from method JobClient.Create. type JobClientCreateResponse struct { + // Definition of the job. Job } @@ -341,6 +389,7 @@ type JobClientGetOutputResponse struct { // JobClientGetResponse contains the response from method JobClient.Get. type JobClientGetResponse struct { + // Definition of the job. Job } @@ -351,6 +400,7 @@ type JobClientGetRunbookContentResponse struct { // JobClientListByAutomationAccountResponse contains the response from method JobClient.NewListByAutomationAccountPager. type JobClientListByAutomationAccountResponse struct { + // The response model for the list job operation. JobListResultV2 } @@ -371,6 +421,7 @@ type JobClientSuspendResponse struct { // JobScheduleClientCreateResponse contains the response from method JobScheduleClient.Create. type JobScheduleClientCreateResponse struct { + // Definition of the job schedule. JobSchedule } @@ -381,21 +432,25 @@ type JobScheduleClientDeleteResponse struct { // JobScheduleClientGetResponse contains the response from method JobScheduleClient.Get. type JobScheduleClientGetResponse struct { + // Definition of the job schedule. JobSchedule } // JobScheduleClientListByAutomationAccountResponse contains the response from method JobScheduleClient.NewListByAutomationAccountPager. type JobScheduleClientListByAutomationAccountResponse struct { + // The response model for the list job schedule operation. JobScheduleListResult } // JobStreamClientGetResponse contains the response from method JobStreamClient.Get. type JobStreamClientGetResponse struct { + // Definition of the job stream. JobStream } // JobStreamClientListByJobResponse contains the response from method JobStreamClient.NewListByJobPager. type JobStreamClientListByJobResponse struct { + // The response model for the list job stream operation. JobStreamListResult } @@ -406,11 +461,13 @@ type KeysClientListByAutomationAccountResponse struct { // LinkedWorkspaceClientGetResponse contains the response from method LinkedWorkspaceClient.Get. type LinkedWorkspaceClientGetResponse struct { + // Definition of the linked workspace. LinkedWorkspace } // ModuleClientCreateOrUpdateResponse contains the response from method ModuleClient.CreateOrUpdate. type ModuleClientCreateOrUpdateResponse struct { + // Definition of the module type. Module } @@ -421,21 +478,25 @@ type ModuleClientDeleteResponse struct { // ModuleClientGetResponse contains the response from method ModuleClient.Get. type ModuleClientGetResponse struct { + // Definition of the module type. Module } // ModuleClientListByAutomationAccountResponse contains the response from method ModuleClient.NewListByAutomationAccountPager. type ModuleClientListByAutomationAccountResponse struct { + // The response model for the list module operation. ModuleListResult } // ModuleClientUpdateResponse contains the response from method ModuleClient.Update. type ModuleClientUpdateResponse struct { + // Definition of the module type. Module } // NodeCountInformationClientGetResponse contains the response from method NodeCountInformationClient.Get. type NodeCountInformationClientGetResponse struct { + // Gets the count of nodes by count type NodeCounts } @@ -447,31 +508,37 @@ type NodeReportsClientGetContentResponse struct { // NodeReportsClientGetResponse contains the response from method NodeReportsClient.Get. type NodeReportsClientGetResponse struct { + // Definition of the dsc node report type. DscNodeReport } // NodeReportsClientListByNodeResponse contains the response from method NodeReportsClient.NewListByNodePager. type NodeReportsClientListByNodeResponse struct { + // The response model for the list dsc nodes operation. DscNodeReportListResult } // ObjectDataTypesClientListFieldsByModuleAndTypeResponse contains the response from method ObjectDataTypesClient.NewListFieldsByModuleAndTypePager. type ObjectDataTypesClientListFieldsByModuleAndTypeResponse struct { + // The response model for the list fields operation. TypeFieldListResult } // ObjectDataTypesClientListFieldsByTypeResponse contains the response from method ObjectDataTypesClient.NewListFieldsByTypePager. type ObjectDataTypesClientListFieldsByTypeResponse struct { + // The response model for the list fields operation. TypeFieldListResult } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // The response model for the list of Automation operations OperationListResult } // PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate. type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct { + // A private endpoint connection PrivateEndpointConnection } @@ -482,21 +549,25 @@ type PrivateEndpointConnectionsClientDeleteResponse struct { // PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. type PrivateEndpointConnectionsClientGetResponse struct { + // A private endpoint connection PrivateEndpointConnection } // PrivateEndpointConnectionsClientListByAutomationAccountResponse contains the response from method PrivateEndpointConnectionsClient.NewListByAutomationAccountPager. type PrivateEndpointConnectionsClientListByAutomationAccountResponse struct { + // A list of private endpoint connections PrivateEndpointConnectionListResult } // PrivateLinkResourcesClientAutomationResponse contains the response from method PrivateLinkResourcesClient.NewAutomationPager. type PrivateLinkResourcesClientAutomationResponse struct { + // A list of private link resources PrivateLinkResourceListResult } // Python2PackageClientCreateOrUpdateResponse contains the response from method Python2PackageClient.CreateOrUpdate. type Python2PackageClientCreateOrUpdateResponse struct { + // Definition of the module type. Module } @@ -507,21 +578,25 @@ type Python2PackageClientDeleteResponse struct { // Python2PackageClientGetResponse contains the response from method Python2PackageClient.Get. type Python2PackageClientGetResponse struct { + // Definition of the module type. Module } // Python2PackageClientListByAutomationAccountResponse contains the response from method Python2PackageClient.NewListByAutomationAccountPager. type Python2PackageClientListByAutomationAccountResponse struct { + // The response model for the list module operation. ModuleListResult } // Python2PackageClientUpdateResponse contains the response from method Python2PackageClient.Update. type Python2PackageClientUpdateResponse struct { + // Definition of the module type. Module } // RunbookClientCreateOrUpdateResponse contains the response from method RunbookClient.CreateOrUpdate. type RunbookClientCreateOrUpdateResponse struct { + // Definition of the runbook type. Runbook } @@ -537,11 +612,13 @@ type RunbookClientGetContentResponse struct { // RunbookClientGetResponse contains the response from method RunbookClient.Get. type RunbookClientGetResponse struct { + // Definition of the runbook type. Runbook } // RunbookClientListByAutomationAccountResponse contains the response from method RunbookClient.NewListByAutomationAccountPager. type RunbookClientListByAutomationAccountResponse struct { + // The response model for the list runbook operation. RunbookListResult } @@ -552,6 +629,7 @@ type RunbookClientPublishResponse struct { // RunbookClientUpdateResponse contains the response from method RunbookClient.Update. type RunbookClientUpdateResponse struct { + // Definition of the runbook type. Runbook } @@ -571,18 +649,15 @@ type RunbookDraftClientReplaceContentResponse struct { Body io.ReadCloser } -// UnmarshalJSON implements the json.Unmarshaller interface for type RunbookDraftClientReplaceContentResponse. -func (r *RunbookDraftClientReplaceContentResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &r.Body) -} - // RunbookDraftClientUndoEditResponse contains the response from method RunbookDraftClient.UndoEdit. type RunbookDraftClientUndoEditResponse struct { + // The response model for the undo edit runbook operation. RunbookDraftUndoEditResult } // ScheduleClientCreateOrUpdateResponse contains the response from method ScheduleClient.CreateOrUpdate. type ScheduleClientCreateOrUpdateResponse struct { + // Definition of the schedule. Schedule } @@ -593,41 +668,49 @@ type ScheduleClientDeleteResponse struct { // ScheduleClientGetResponse contains the response from method ScheduleClient.Get. type ScheduleClientGetResponse struct { + // Definition of the schedule. Schedule } // ScheduleClientListByAutomationAccountResponse contains the response from method ScheduleClient.NewListByAutomationAccountPager. type ScheduleClientListByAutomationAccountResponse struct { + // The response model for the list schedule operation. ScheduleListResult } // ScheduleClientUpdateResponse contains the response from method ScheduleClient.Update. type ScheduleClientUpdateResponse struct { + // Definition of the schedule. Schedule } // SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse contains the response from method SoftwareUpdateConfigurationMachineRunsClient.GetByID. type SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse struct { + // Software update configuration machine run model. SoftwareUpdateConfigurationMachineRun } // SoftwareUpdateConfigurationMachineRunsClientListResponse contains the response from method SoftwareUpdateConfigurationMachineRunsClient.List. type SoftwareUpdateConfigurationMachineRunsClientListResponse struct { + // result of listing all software update configuration machine runs SoftwareUpdateConfigurationMachineRunListResult } // SoftwareUpdateConfigurationRunsClientGetByIDResponse contains the response from method SoftwareUpdateConfigurationRunsClient.GetByID. type SoftwareUpdateConfigurationRunsClientGetByIDResponse struct { + // Software update configuration Run properties. SoftwareUpdateConfigurationRun } // SoftwareUpdateConfigurationRunsClientListResponse contains the response from method SoftwareUpdateConfigurationRunsClient.List. type SoftwareUpdateConfigurationRunsClientListResponse struct { + // result of listing all software update configuration runs SoftwareUpdateConfigurationRunListResult } // SoftwareUpdateConfigurationsClientCreateResponse contains the response from method SoftwareUpdateConfigurationsClient.Create. type SoftwareUpdateConfigurationsClientCreateResponse struct { + // Software update configuration properties. SoftwareUpdateConfiguration } @@ -638,16 +721,19 @@ type SoftwareUpdateConfigurationsClientDeleteResponse struct { // SoftwareUpdateConfigurationsClientGetByNameResponse contains the response from method SoftwareUpdateConfigurationsClient.GetByName. type SoftwareUpdateConfigurationsClientGetByNameResponse struct { + // Software update configuration properties. SoftwareUpdateConfiguration } // SoftwareUpdateConfigurationsClientListResponse contains the response from method SoftwareUpdateConfigurationsClient.List. type SoftwareUpdateConfigurationsClientListResponse struct { + // result of listing all software update configuration SoftwareUpdateConfigurationListResult } // SourceControlClientCreateOrUpdateResponse contains the response from method SourceControlClient.CreateOrUpdate. type SourceControlClientCreateOrUpdateResponse struct { + // Definition of the source control. SourceControl } @@ -658,56 +744,67 @@ type SourceControlClientDeleteResponse struct { // SourceControlClientGetResponse contains the response from method SourceControlClient.Get. type SourceControlClientGetResponse struct { + // Definition of the source control. SourceControl } // SourceControlClientListByAutomationAccountResponse contains the response from method SourceControlClient.NewListByAutomationAccountPager. type SourceControlClientListByAutomationAccountResponse struct { + // The response model for the list source controls operation. SourceControlListResult } // SourceControlClientUpdateResponse contains the response from method SourceControlClient.Update. type SourceControlClientUpdateResponse struct { + // Definition of the source control. SourceControl } // SourceControlSyncJobClientCreateResponse contains the response from method SourceControlSyncJobClient.Create. type SourceControlSyncJobClientCreateResponse struct { + // Definition of the source control sync job. SourceControlSyncJob } // SourceControlSyncJobClientGetResponse contains the response from method SourceControlSyncJobClient.Get. type SourceControlSyncJobClientGetResponse struct { + // Definition of the source control sync job. SourceControlSyncJobByID } // SourceControlSyncJobClientListByAutomationAccountResponse contains the response from method SourceControlSyncJobClient.NewListByAutomationAccountPager. type SourceControlSyncJobClientListByAutomationAccountResponse struct { + // The response model for the list source control sync jobs operation. SourceControlSyncJobListResult } // SourceControlSyncJobStreamsClientGetResponse contains the response from method SourceControlSyncJobStreamsClient.Get. type SourceControlSyncJobStreamsClientGetResponse struct { + // Definition of the source control sync job stream by id. SourceControlSyncJobStreamByID } // SourceControlSyncJobStreamsClientListBySyncJobResponse contains the response from method SourceControlSyncJobStreamsClient.NewListBySyncJobPager. type SourceControlSyncJobStreamsClientListBySyncJobResponse struct { + // The response model for the list source control sync job streams operation. SourceControlSyncJobStreamsListBySyncJob } // StatisticsClientListByAutomationAccountResponse contains the response from method StatisticsClient.NewListByAutomationAccountPager. type StatisticsClientListByAutomationAccountResponse struct { + // The response model for the list statistics operation. StatisticsListResult } // TestJobClientCreateResponse contains the response from method TestJobClient.Create. type TestJobClientCreateResponse struct { + // Definition of the test job. TestJob } // TestJobClientGetResponse contains the response from method TestJobClient.Get. type TestJobClientGetResponse struct { + // Definition of the test job. TestJob } @@ -728,21 +825,25 @@ type TestJobClientSuspendResponse struct { // TestJobStreamsClientGetResponse contains the response from method TestJobStreamsClient.Get. type TestJobStreamsClientGetResponse struct { + // Definition of the job stream. JobStream } // TestJobStreamsClientListByTestJobResponse contains the response from method TestJobStreamsClient.NewListByTestJobPager. type TestJobStreamsClientListByTestJobResponse struct { + // The response model for the list job stream operation. JobStreamListResult } // UsagesClientListByAutomationAccountResponse contains the response from method UsagesClient.NewListByAutomationAccountPager. type UsagesClientListByAutomationAccountResponse struct { + // The response model for the get usage operation. UsageListResult } // VariableClientCreateOrUpdateResponse contains the response from method VariableClient.CreateOrUpdate. type VariableClientCreateOrUpdateResponse struct { + // Definition of the variable. Variable } @@ -753,21 +854,25 @@ type VariableClientDeleteResponse struct { // VariableClientGetResponse contains the response from method VariableClient.Get. type VariableClientGetResponse struct { + // Definition of the variable. Variable } // VariableClientListByAutomationAccountResponse contains the response from method VariableClient.NewListByAutomationAccountPager. type VariableClientListByAutomationAccountResponse struct { + // The response model for the list variables operation. VariableListResult } // VariableClientUpdateResponse contains the response from method VariableClient.Update. type VariableClientUpdateResponse struct { + // Definition of the variable. Variable } // WatcherClientCreateOrUpdateResponse contains the response from method WatcherClient.CreateOrUpdate. type WatcherClientCreateOrUpdateResponse struct { + // Definition of the watcher type. Watcher } @@ -778,11 +883,13 @@ type WatcherClientDeleteResponse struct { // WatcherClientGetResponse contains the response from method WatcherClient.Get. type WatcherClientGetResponse struct { + // Definition of the watcher type. Watcher } // WatcherClientListByAutomationAccountResponse contains the response from method WatcherClient.NewListByAutomationAccountPager. type WatcherClientListByAutomationAccountResponse struct { + // The response model for the list watcher operation. WatcherListResult } @@ -798,11 +905,13 @@ type WatcherClientStopResponse struct { // WatcherClientUpdateResponse contains the response from method WatcherClient.Update. type WatcherClientUpdateResponse struct { + // Definition of the watcher type. Watcher } // WebhookClientCreateOrUpdateResponse contains the response from method WebhookClient.CreateOrUpdate. type WebhookClientCreateOrUpdateResponse struct { + // Definition of the webhook type. Webhook } @@ -818,15 +927,18 @@ type WebhookClientGenerateURIResponse struct { // WebhookClientGetResponse contains the response from method WebhookClient.Get. type WebhookClientGetResponse struct { + // Definition of the webhook type. Webhook } // WebhookClientListByAutomationAccountResponse contains the response from method WebhookClient.NewListByAutomationAccountPager. type WebhookClientListByAutomationAccountResponse struct { + // The response model for the list webhook operation. WebhookListResult } // WebhookClientUpdateResponse contains the response from method WebhookClient.Update. type WebhookClientUpdateResponse struct { + // Definition of the webhook type. Webhook } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/runbook_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/runbook_client.go index 7a884393..301e37b1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/runbook_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/runbook_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type RunbookClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRunbookClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RunbookClient, error) { - cl, err := arm.NewClient(moduleName+".RunbookClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewRunbookClient(subscriptionID string, credential azcore.TokenCredential, // not both. // - options - RunbookClientCreateOrUpdateOptions contains the optional parameters for the RunbookClient.CreateOrUpdate method. func (client *RunbookClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters, options *RunbookClientCreateOrUpdateOptions) (RunbookClientCreateOrUpdateResponse, error) { + var err error + const operationName = "RunbookClient.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, automationAccountName, runbookName, parameters, options) if err != nil { return RunbookClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return RunbookClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return RunbookClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *RunbookClient) createOrUpdateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2018-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *RunbookClient) createOrUpdateHandleResponse(resp *http.Response) ( // - runbookName - The runbook name. // - options - RunbookClientDeleteOptions contains the optional parameters for the RunbookClient.Delete method. func (client *RunbookClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookClientDeleteOptions) (RunbookClientDeleteResponse, error) { + var err error + const operationName = "RunbookClient.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, automationAccountName, runbookName, options) if err != nil { return RunbookClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return RunbookClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RunbookClientDeleteResponse{}, err } return RunbookClientDeleteResponse{}, nil } @@ -171,18 +186,25 @@ func (client *RunbookClient) deleteCreateRequest(ctx context.Context, resourceGr // - runbookName - The runbook name. // - options - RunbookClientGetOptions contains the optional parameters for the RunbookClient.Get method. func (client *RunbookClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookClientGetOptions) (RunbookClientGetResponse, error) { + var err error + const operationName = "RunbookClient.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, automationAccountName, runbookName, options) if err != nil { return RunbookClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RunbookClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RunbookClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -233,16 +255,22 @@ func (client *RunbookClient) getHandleResponse(resp *http.Response) (RunbookClie // - runbookName - The runbook name. // - options - RunbookClientGetContentOptions contains the optional parameters for the RunbookClient.GetContent method. func (client *RunbookClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookClientGetContentOptions) (RunbookClientGetContentResponse, error) { + var err error + const operationName = "RunbookClient.GetContent" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getContentCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return RunbookClientGetContentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookClientGetContentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent) { - return RunbookClientGetContentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RunbookClientGetContentResponse{}, err } return RunbookClientGetContentResponse{}, nil } @@ -290,25 +318,20 @@ func (client *RunbookClient) NewListByAutomationAccountPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *RunbookClientListByAutomationAccountResponse) (RunbookClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RunbookClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RunbookClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return RunbookClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RunbookClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -361,9 +384,14 @@ func (client *RunbookClient) BeginPublish(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[RunbookClientPublishResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RunbookClientPublishResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[RunbookClientPublishResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RunbookClientPublishResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -372,18 +400,24 @@ func (client *RunbookClient) BeginPublish(ctx context.Context, resourceGroupName // // Generated from API version 2018-06-30 func (client *RunbookClient) publish(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookClientBeginPublishOptions) (*http.Response, error) { + var err error + const operationName = "RunbookClient.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, automationAccountName, runbookName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // publishCreateRequest creates the Publish request. @@ -426,18 +460,25 @@ func (client *RunbookClient) publishCreateRequest(ctx context.Context, resourceG // - parameters - The update parameters for runbook. // - options - RunbookClientUpdateOptions contains the optional parameters for the RunbookClient.Update method. func (client *RunbookClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookUpdateParameters, options *RunbookClientUpdateOptions) (RunbookClientUpdateResponse, error) { + var err error + const operationName = "RunbookClient.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, automationAccountName, runbookName, parameters, options) if err != nil { return RunbookClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RunbookClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RunbookClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -467,7 +508,10 @@ func (client *RunbookClient) updateCreateRequest(ctx context.Context, resourceGr reqQP.Set("api-version", "2018-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/runbookdraft_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/runbookdraft_client.go index 6c9e0e58..c905538b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/runbookdraft_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/runbookdraft_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -35,7 +34,7 @@ type RunbookDraftClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRunbookDraftClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RunbookDraftClient, error) { - cl, err := arm.NewClient(moduleName+".RunbookDraftClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewRunbookDraftClient(subscriptionID string, credential azcore.TokenCredent // - runbookName - The runbook name. // - options - RunbookDraftClientGetOptions contains the optional parameters for the RunbookDraftClient.Get method. func (client *RunbookDraftClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookDraftClientGetOptions) (RunbookDraftClientGetResponse, error) { + var err error + const operationName = "RunbookDraftClient.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, automationAccountName, runbookName, options) if err != nil { return RunbookDraftClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookDraftClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RunbookDraftClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RunbookDraftClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -117,16 +123,22 @@ func (client *RunbookDraftClient) getHandleResponse(resp *http.Response) (Runboo // - runbookName - The runbook name. // - options - RunbookDraftClientGetContentOptions contains the optional parameters for the RunbookDraftClient.GetContent method. func (client *RunbookDraftClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookDraftClientGetContentOptions) (RunbookDraftClientGetContentResponse, error) { + var err error + const operationName = "RunbookDraftClient.GetContent" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getContentCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return RunbookDraftClientGetContentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookDraftClientGetContentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent) { - return RunbookDraftClientGetContentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RunbookDraftClientGetContentResponse{}, err } return RunbookDraftClientGetContentResponse{}, nil } @@ -177,9 +189,14 @@ func (client *RunbookDraftClient) BeginReplaceContent(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller[RunbookDraftClientReplaceContentResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RunbookDraftClientReplaceContentResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[RunbookDraftClientReplaceContentResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RunbookDraftClientReplaceContentResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -188,18 +205,24 @@ func (client *RunbookDraftClient) BeginReplaceContent(ctx context.Context, resou // // Generated from API version 2018-06-30 func (client *RunbookDraftClient) replaceContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, runbookContent io.ReadSeekCloser, options *RunbookDraftClientBeginReplaceContentOptions) (*http.Response, error) { + var err error + const operationName = "RunbookDraftClient.BeginReplaceContent" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.replaceContentCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, runbookContent, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // replaceContentCreateRequest creates the ReplaceContent request. @@ -230,7 +253,10 @@ func (client *RunbookDraftClient) replaceContentCreateRequest(ctx context.Contex req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} - return req, req.SetBody(runbookContent, "text/powershell") + if err := req.SetBody(runbookContent, "text/powershell"); err != nil { + return nil, err + } + return req, nil } // UndoEdit - Undo draft edit to last known published state identified by runbook name. @@ -242,18 +268,25 @@ func (client *RunbookDraftClient) replaceContentCreateRequest(ctx context.Contex // - runbookName - The runbook name. // - options - RunbookDraftClientUndoEditOptions contains the optional parameters for the RunbookDraftClient.UndoEdit method. func (client *RunbookDraftClient) UndoEdit(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookDraftClientUndoEditOptions) (RunbookDraftClientUndoEditResponse, error) { + var err error + const operationName = "RunbookDraftClient.UndoEdit" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.undoEditCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return RunbookDraftClientUndoEditResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookDraftClientUndoEditResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RunbookDraftClientUndoEditResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RunbookDraftClientUndoEditResponse{}, err } - return client.undoEditHandleResponse(resp) + resp, err := client.undoEditHandleResponse(httpResp) + return resp, err } // undoEditCreateRequest creates the UndoEdit request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/schedule_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/schedule_client.go index 64509716..e44ad11b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/schedule_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/schedule_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type ScheduleClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewScheduleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScheduleClient, error) { - cl, err := arm.NewClient(moduleName+".ScheduleClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewScheduleClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - The parameters supplied to the create or update schedule operation. // - options - ScheduleClientCreateOrUpdateOptions contains the optional parameters for the ScheduleClient.CreateOrUpdate method. func (client *ScheduleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters, options *ScheduleClientCreateOrUpdateOptions) (ScheduleClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ScheduleClient.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, automationAccountName, scheduleName, parameters, options) if err != nil { return ScheduleClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduleClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusConflict) { - return ScheduleClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusConflict) { + err = runtime.NewResponseError(httpResp) + return ScheduleClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *ScheduleClient) createOrUpdateCreateRequest(ctx context.Context, r reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *ScheduleClient) createOrUpdateHandleResponse(resp *http.Response) // - scheduleName - The schedule name. // - options - ScheduleClientDeleteOptions contains the optional parameters for the ScheduleClient.Delete method. func (client *ScheduleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, options *ScheduleClientDeleteOptions) (ScheduleClientDeleteResponse, error) { + var err error + const operationName = "ScheduleClient.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, automationAccountName, scheduleName, options) if err != nil { return ScheduleClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduleClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduleClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScheduleClientDeleteResponse{}, err } return ScheduleClientDeleteResponse{}, nil } @@ -170,18 +185,25 @@ func (client *ScheduleClient) deleteCreateRequest(ctx context.Context, resourceG // - scheduleName - The schedule name. // - options - ScheduleClientGetOptions contains the optional parameters for the ScheduleClient.Get method. func (client *ScheduleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, options *ScheduleClientGetOptions) (ScheduleClientGetResponse, error) { + var err error + const operationName = "ScheduleClient.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, automationAccountName, scheduleName, options) if err != nil { return ScheduleClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduleClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduleClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScheduleClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -236,25 +258,20 @@ func (client *ScheduleClient) NewListByAutomationAccountPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ScheduleClientListByAutomationAccountResponse) (ScheduleClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ScheduleClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ScheduleClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return ScheduleClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduleClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -303,18 +320,25 @@ func (client *ScheduleClient) listByAutomationAccountHandleResponse(resp *http.R // - parameters - The parameters supplied to the update schedule operation. // - options - ScheduleClientUpdateOptions contains the optional parameters for the ScheduleClient.Update method. func (client *ScheduleClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters, options *ScheduleClientUpdateOptions) (ScheduleClientUpdateResponse, error) { + var err error + const operationName = "ScheduleClient.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, automationAccountName, scheduleName, parameters, options) if err != nil { return ScheduleClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduleClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduleClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScheduleClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -344,7 +368,10 @@ func (client *ScheduleClient) updateCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationmachineruns_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationmachineruns_client.go index f812199b..d6baebea 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationmachineruns_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationmachineruns_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type SoftwareUpdateConfigurationMachineRunsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSoftwareUpdateConfigurationMachineRunsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SoftwareUpdateConfigurationMachineRunsClient, error) { - cl, err := arm.NewClient(moduleName+".SoftwareUpdateConfigurationMachineRunsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewSoftwareUpdateConfigurationMachineRunsClient(subscriptionID string, cred // - options - SoftwareUpdateConfigurationMachineRunsClientGetByIDOptions contains the optional parameters for the SoftwareUpdateConfigurationMachineRunsClient.GetByID // method. func (client *SoftwareUpdateConfigurationMachineRunsClient) GetByID(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationMachineRunID string, options *SoftwareUpdateConfigurationMachineRunsClientGetByIDOptions) (SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse, error) { + var err error + const operationName = "SoftwareUpdateConfigurationMachineRunsClient.GetByID" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByIDCreateRequest(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunID, options) if err != nil { return SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse{}, err } - return client.getByIDHandleResponse(resp) + resp, err := client.getByIDHandleResponse(httpResp) + return resp, err } // getByIDCreateRequest creates the GetByID request. @@ -84,6 +90,9 @@ func (client *SoftwareUpdateConfigurationMachineRunsClient) getByIDCreateRequest return nil, errors.New("parameter automationAccountName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if softwareUpdateConfigurationMachineRunID == "" { + return nil, errors.New("parameter softwareUpdateConfigurationMachineRunID cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{softwareUpdateConfigurationMachineRunId}", url.PathEscape(softwareUpdateConfigurationMachineRunID)) req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { @@ -117,18 +126,25 @@ func (client *SoftwareUpdateConfigurationMachineRunsClient) getByIDHandleRespons // - options - SoftwareUpdateConfigurationMachineRunsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationMachineRunsClient.List // method. func (client *SoftwareUpdateConfigurationMachineRunsClient) List(ctx context.Context, resourceGroupName string, automationAccountName string, options *SoftwareUpdateConfigurationMachineRunsClientListOptions) (SoftwareUpdateConfigurationMachineRunsClientListResponse, error) { + var err error + const operationName = "SoftwareUpdateConfigurationMachineRunsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return SoftwareUpdateConfigurationMachineRunsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationMachineRunsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SoftwareUpdateConfigurationMachineRunsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationMachineRunsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationruns_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationruns_client.go index 84b7c8a4..701c3fbe 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationruns_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationruns_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type SoftwareUpdateConfigurationRunsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSoftwareUpdateConfigurationRunsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SoftwareUpdateConfigurationRunsClient, error) { - cl, err := arm.NewClient(moduleName+".SoftwareUpdateConfigurationRunsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewSoftwareUpdateConfigurationRunsClient(subscriptionID string, credential // - options - SoftwareUpdateConfigurationRunsClientGetByIDOptions contains the optional parameters for the SoftwareUpdateConfigurationRunsClient.GetByID // method. func (client *SoftwareUpdateConfigurationRunsClient) GetByID(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationRunID string, options *SoftwareUpdateConfigurationRunsClientGetByIDOptions) (SoftwareUpdateConfigurationRunsClientGetByIDResponse, error) { + var err error + const operationName = "SoftwareUpdateConfigurationRunsClient.GetByID" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByIDCreateRequest(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationRunID, options) if err != nil { return SoftwareUpdateConfigurationRunsClientGetByIDResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationRunsClientGetByIDResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SoftwareUpdateConfigurationRunsClientGetByIDResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationRunsClientGetByIDResponse{}, err } - return client.getByIDHandleResponse(resp) + resp, err := client.getByIDHandleResponse(httpResp) + return resp, err } // getByIDCreateRequest creates the GetByID request. @@ -84,6 +90,9 @@ func (client *SoftwareUpdateConfigurationRunsClient) getByIDCreateRequest(ctx co return nil, errors.New("parameter automationAccountName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if softwareUpdateConfigurationRunID == "" { + return nil, errors.New("parameter softwareUpdateConfigurationRunID cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{softwareUpdateConfigurationRunId}", url.PathEscape(softwareUpdateConfigurationRunID)) req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { @@ -117,18 +126,25 @@ func (client *SoftwareUpdateConfigurationRunsClient) getByIDHandleResponse(resp // - options - SoftwareUpdateConfigurationRunsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationRunsClient.List // method. func (client *SoftwareUpdateConfigurationRunsClient) List(ctx context.Context, resourceGroupName string, automationAccountName string, options *SoftwareUpdateConfigurationRunsClientListOptions) (SoftwareUpdateConfigurationRunsClientListResponse, error) { + var err error + const operationName = "SoftwareUpdateConfigurationRunsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return SoftwareUpdateConfigurationRunsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationRunsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SoftwareUpdateConfigurationRunsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationRunsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurations_client.go index 7754fd3c..8173d17f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type SoftwareUpdateConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSoftwareUpdateConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SoftwareUpdateConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".SoftwareUpdateConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewSoftwareUpdateConfigurationsClient(subscriptionID string, credential azc // - options - SoftwareUpdateConfigurationsClientCreateOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.Create // method. func (client *SoftwareUpdateConfigurationsClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, parameters SoftwareUpdateConfiguration, options *SoftwareUpdateConfigurationsClientCreateOptions) (SoftwareUpdateConfigurationsClientCreateResponse, error) { + var err error + const operationName = "SoftwareUpdateConfigurationsClient.Create" + 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, automationAccountName, softwareUpdateConfigurationName, parameters, options) if err != nil { return SoftwareUpdateConfigurationsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SoftwareUpdateConfigurationsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -100,7 +106,10 @@ func (client *SoftwareUpdateConfigurationsClient) createCreateRequest(ctx contex req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -122,16 +131,22 @@ func (client *SoftwareUpdateConfigurationsClient) createHandleResponse(resp *htt // - options - SoftwareUpdateConfigurationsClientDeleteOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.Delete // method. func (client *SoftwareUpdateConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, options *SoftwareUpdateConfigurationsClientDeleteOptions) (SoftwareUpdateConfigurationsClientDeleteResponse, error) { + var err error + const operationName = "SoftwareUpdateConfigurationsClient.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, automationAccountName, softwareUpdateConfigurationName, options) if err != nil { return SoftwareUpdateConfigurationsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SoftwareUpdateConfigurationsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationsClientDeleteResponse{}, err } return SoftwareUpdateConfigurationsClientDeleteResponse{}, nil } @@ -179,18 +194,25 @@ func (client *SoftwareUpdateConfigurationsClient) deleteCreateRequest(ctx contex // - options - SoftwareUpdateConfigurationsClientGetByNameOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.GetByName // method. func (client *SoftwareUpdateConfigurationsClient) GetByName(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, options *SoftwareUpdateConfigurationsClientGetByNameOptions) (SoftwareUpdateConfigurationsClientGetByNameResponse, error) { + var err error + const operationName = "SoftwareUpdateConfigurationsClient.GetByName" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByNameCreateRequest(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options) if err != nil { return SoftwareUpdateConfigurationsClientGetByNameResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationsClientGetByNameResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SoftwareUpdateConfigurationsClientGetByNameResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationsClientGetByNameResponse{}, err } - return client.getByNameHandleResponse(resp) + resp, err := client.getByNameHandleResponse(httpResp) + return resp, err } // getByNameCreateRequest creates the GetByName request. @@ -244,18 +266,25 @@ func (client *SoftwareUpdateConfigurationsClient) getByNameHandleResponse(resp * // - options - SoftwareUpdateConfigurationsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.List // method. func (client *SoftwareUpdateConfigurationsClient) List(ctx context.Context, resourceGroupName string, automationAccountName string, options *SoftwareUpdateConfigurationsClientListOptions) (SoftwareUpdateConfigurationsClientListResponse, error) { + var err error + const operationName = "SoftwareUpdateConfigurationsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return SoftwareUpdateConfigurationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SoftwareUpdateConfigurationsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/sourcecontrol_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/sourcecontrol_client.go index 19ad7a30..3dbc2981 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/sourcecontrol_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/sourcecontrol_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type SourceControlClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSourceControlClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SourceControlClient, error) { - cl, err := arm.NewClient(moduleName+".SourceControlClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewSourceControlClient(subscriptionID string, credential azcore.TokenCreden // - options - SourceControlClientCreateOrUpdateOptions contains the optional parameters for the SourceControlClient.CreateOrUpdate // method. func (client *SourceControlClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, parameters SourceControlCreateOrUpdateParameters, options *SourceControlClientCreateOrUpdateOptions) (SourceControlClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SourceControlClient.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, automationAccountName, sourceControlName, parameters, options) if err != nil { return SourceControlClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SourceControlClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SourceControlClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *SourceControlClient) createOrUpdateCreateRequest(ctx context.Conte reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *SourceControlClient) createOrUpdateHandleResponse(resp *http.Respo // - sourceControlName - The name of source control. // - options - SourceControlClientDeleteOptions contains the optional parameters for the SourceControlClient.Delete method. func (client *SourceControlClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, options *SourceControlClientDeleteOptions) (SourceControlClientDeleteResponse, error) { + var err error + const operationName = "SourceControlClient.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, automationAccountName, sourceControlName, options) if err != nil { return SourceControlClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SourceControlClientDeleteResponse{}, err } return SourceControlClientDeleteResponse{}, nil } @@ -171,18 +186,25 @@ func (client *SourceControlClient) deleteCreateRequest(ctx context.Context, reso // - sourceControlName - The name of source control. // - options - SourceControlClientGetOptions contains the optional parameters for the SourceControlClient.Get method. func (client *SourceControlClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, options *SourceControlClientGetOptions) (SourceControlClientGetResponse, error) { + var err error + const operationName = "SourceControlClient.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, automationAccountName, sourceControlName, options) if err != nil { return SourceControlClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SourceControlClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -237,25 +259,20 @@ func (client *SourceControlClient) NewListByAutomationAccountPager(resourceGroup return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SourceControlClientListByAutomationAccountResponse) (SourceControlClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SourceControlClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SourceControlClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return SourceControlClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -307,18 +324,25 @@ func (client *SourceControlClient) listByAutomationAccountHandleResponse(resp *h // - parameters - The parameters supplied to the update source control operation. // - options - SourceControlClientUpdateOptions contains the optional parameters for the SourceControlClient.Update method. func (client *SourceControlClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, parameters SourceControlUpdateParameters, options *SourceControlClientUpdateOptions) (SourceControlClientUpdateResponse, error) { + var err error + const operationName = "SourceControlClient.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, automationAccountName, sourceControlName, parameters, options) if err != nil { return SourceControlClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SourceControlClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -348,7 +372,10 @@ func (client *SourceControlClient) updateCreateRequest(ctx context.Context, reso reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjob_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjob_client.go index 00317202..9b7df7ef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjob_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjob_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type SourceControlSyncJobClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSourceControlSyncJobClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SourceControlSyncJobClient, error) { - cl, err := arm.NewClient(moduleName+".SourceControlSyncJobClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,18 +56,25 @@ func NewSourceControlSyncJobClient(subscriptionID string, credential azcore.Toke // - options - SourceControlSyncJobClientCreateOptions contains the optional parameters for the SourceControlSyncJobClient.Create // method. func (client *SourceControlSyncJobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID string, parameters SourceControlSyncJobCreateParameters, options *SourceControlSyncJobClientCreateOptions) (SourceControlSyncJobClientCreateResponse, error) { + var err error + const operationName = "SourceControlSyncJobClient.Create" + 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, automationAccountName, sourceControlName, sourceControlSyncJobID, parameters, options) if err != nil { return SourceControlSyncJobClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlSyncJobClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return SourceControlSyncJobClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SourceControlSyncJobClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -86,6 +92,9 @@ func (client *SourceControlSyncJobClient) createCreateRequest(ctx context.Contex return nil, errors.New("parameter sourceControlName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{sourceControlName}", url.PathEscape(sourceControlName)) + if sourceControlSyncJobID == "" { + return nil, errors.New("parameter sourceControlSyncJobID cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{sourceControlSyncJobId}", url.PathEscape(sourceControlSyncJobID)) if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -99,7 +108,10 @@ func (client *SourceControlSyncJobClient) createCreateRequest(ctx context.Contex reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -122,18 +134,25 @@ func (client *SourceControlSyncJobClient) createHandleResponse(resp *http.Respon // - options - SourceControlSyncJobClientGetOptions contains the optional parameters for the SourceControlSyncJobClient.Get // method. func (client *SourceControlSyncJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID string, options *SourceControlSyncJobClientGetOptions) (SourceControlSyncJobClientGetResponse, error) { + var err error + const operationName = "SourceControlSyncJobClient.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, automationAccountName, sourceControlName, sourceControlSyncJobID, options) if err != nil { return SourceControlSyncJobClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlSyncJobClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlSyncJobClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SourceControlSyncJobClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -151,6 +170,9 @@ func (client *SourceControlSyncJobClient) getCreateRequest(ctx context.Context, return nil, errors.New("parameter sourceControlName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{sourceControlName}", url.PathEscape(sourceControlName)) + if sourceControlSyncJobID == "" { + return nil, errors.New("parameter sourceControlSyncJobID cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{sourceControlSyncJobId}", url.PathEscape(sourceControlSyncJobID)) if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -190,25 +212,20 @@ func (client *SourceControlSyncJobClient) NewListByAutomationAccountPager(resour return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SourceControlSyncJobClientListByAutomationAccountResponse) (SourceControlSyncJobClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, sourceControlName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SourceControlSyncJobClient.NewListByAutomationAccountPager") + 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.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, sourceControlName, options) + }, nil) if err != nil { return SourceControlSyncJobClientListByAutomationAccountResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SourceControlSyncJobClientListByAutomationAccountResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlSyncJobClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjobstreams_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjobstreams_client.go index 132779b4..9d17671b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjobstreams_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjobstreams_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type SourceControlSyncJobStreamsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSourceControlSyncJobStreamsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SourceControlSyncJobStreamsClient, error) { - cl, err := arm.NewClient(moduleName+".SourceControlSyncJobStreamsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,18 +56,25 @@ func NewSourceControlSyncJobStreamsClient(subscriptionID string, credential azco // - options - SourceControlSyncJobStreamsClientGetOptions contains the optional parameters for the SourceControlSyncJobStreamsClient.Get // method. func (client *SourceControlSyncJobStreamsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID string, streamID string, options *SourceControlSyncJobStreamsClientGetOptions) (SourceControlSyncJobStreamsClientGetResponse, error) { + var err error + const operationName = "SourceControlSyncJobStreamsClient.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, automationAccountName, sourceControlName, sourceControlSyncJobID, streamID, options) if err != nil { return SourceControlSyncJobStreamsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlSyncJobStreamsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlSyncJobStreamsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SourceControlSyncJobStreamsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -86,6 +92,9 @@ func (client *SourceControlSyncJobStreamsClient) getCreateRequest(ctx context.Co return nil, errors.New("parameter sourceControlName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{sourceControlName}", url.PathEscape(sourceControlName)) + if sourceControlSyncJobID == "" { + return nil, errors.New("parameter sourceControlSyncJobID cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{sourceControlSyncJobId}", url.PathEscape(sourceControlSyncJobID)) if streamID == "" { return nil, errors.New("parameter streamID cannot be empty") @@ -130,25 +139,20 @@ func (client *SourceControlSyncJobStreamsClient) NewListBySyncJobPager(resourceG return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SourceControlSyncJobStreamsClientListBySyncJobResponse) (SourceControlSyncJobStreamsClientListBySyncJobResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySyncJobCreateRequest(ctx, resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SourceControlSyncJobStreamsClient.NewListBySyncJobPager") + 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.listBySyncJobCreateRequest(ctx, resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobID, options) + }, nil) if err != nil { return SourceControlSyncJobStreamsClientListBySyncJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SourceControlSyncJobStreamsClientListBySyncJobResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlSyncJobStreamsClientListBySyncJobResponse{}, runtime.NewResponseError(resp) - } return client.listBySyncJobHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -167,6 +171,9 @@ func (client *SourceControlSyncJobStreamsClient) listBySyncJobCreateRequest(ctx return nil, errors.New("parameter sourceControlName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{sourceControlName}", url.PathEscape(sourceControlName)) + if sourceControlSyncJobID == "" { + return nil, errors.New("parameter sourceControlSyncJobID cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{sourceControlSyncJobId}", url.PathEscape(sourceControlSyncJobID)) if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/statistics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/statistics_client.go index db556372..f220e127 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/statistics_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/statistics_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type StatisticsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewStatisticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StatisticsClient, error) { - cl, err := arm.NewClient(moduleName+".StatisticsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,6 +57,7 @@ func (client *StatisticsClient) NewListByAutomationAccountPager(resourceGroupNam return false }, Fetcher: func(ctx context.Context, page *StatisticsClientListByAutomationAccountResponse) (StatisticsClientListByAutomationAccountResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StatisticsClient.NewListByAutomationAccountPager") req, err := client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return StatisticsClientListByAutomationAccountResponse{}, err @@ -71,6 +71,7 @@ func (client *StatisticsClient) NewListByAutomationAccountPager(resourceGroupNam } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/testjob_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/testjob_client.go index 9892eea5..1f2fa18d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/testjob_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/testjob_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type TestJobClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTestJobClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TestJobClient, error) { - cl, err := arm.NewClient(moduleName+".TestJobClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewTestJobClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - The parameters supplied to the create test job operation. // - options - TestJobClientCreateOptions contains the optional parameters for the TestJobClient.Create method. func (client *TestJobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters TestJobCreateParameters, options *TestJobClientCreateOptions) (TestJobClientCreateResponse, error) { + var err error + const operationName = "TestJobClient.Create" + 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, automationAccountName, runbookName, parameters, options) if err != nil { return TestJobClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TestJobClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return TestJobClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return TestJobClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -96,7 +102,10 @@ func (client *TestJobClient) createCreateRequest(ctx context.Context, resourceGr reqQP.Set("api-version", "2018-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -117,18 +126,25 @@ func (client *TestJobClient) createHandleResponse(resp *http.Response) (TestJobC // - runbookName - The runbook name. // - options - TestJobClientGetOptions contains the optional parameters for the TestJobClient.Get method. func (client *TestJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *TestJobClientGetOptions) (TestJobClientGetResponse, error) { + var err error + const operationName = "TestJobClient.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, automationAccountName, runbookName, options) if err != nil { return TestJobClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TestJobClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TestJobClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TestJobClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -179,16 +195,22 @@ func (client *TestJobClient) getHandleResponse(resp *http.Response) (TestJobClie // - runbookName - The runbook name. // - options - TestJobClientResumeOptions contains the optional parameters for the TestJobClient.Resume method. func (client *TestJobClient) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *TestJobClientResumeOptions) (TestJobClientResumeResponse, error) { + var err error + const operationName = "TestJobClient.Resume" + 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, automationAccountName, runbookName, options) if err != nil { return TestJobClientResumeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TestJobClientResumeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TestJobClientResumeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TestJobClientResumeResponse{}, err } return TestJobClientResumeResponse{}, nil } @@ -232,16 +254,22 @@ func (client *TestJobClient) resumeCreateRequest(ctx context.Context, resourceGr // - runbookName - The runbook name. // - options - TestJobClientStopOptions contains the optional parameters for the TestJobClient.Stop method. func (client *TestJobClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *TestJobClientStopOptions) (TestJobClientStopResponse, error) { + var err error + const operationName = "TestJobClient.Stop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return TestJobClientStopResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TestJobClientStopResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TestJobClientStopResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TestJobClientStopResponse{}, err } return TestJobClientStopResponse{}, nil } @@ -285,16 +313,22 @@ func (client *TestJobClient) stopCreateRequest(ctx context.Context, resourceGrou // - runbookName - The runbook name. // - options - TestJobClientSuspendOptions contains the optional parameters for the TestJobClient.Suspend method. func (client *TestJobClient) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *TestJobClientSuspendOptions) (TestJobClientSuspendResponse, error) { + var err error + const operationName = "TestJobClient.Suspend" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.suspendCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return TestJobClientSuspendResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TestJobClientSuspendResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TestJobClientSuspendResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TestJobClientSuspendResponse{}, err } return TestJobClientSuspendResponse{}, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/testjobstreams_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/testjobstreams_client.go index 8e5d6467..a473e406 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/testjobstreams_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/testjobstreams_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type TestJobStreamsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTestJobStreamsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TestJobStreamsClient, error) { - cl, err := arm.NewClient(moduleName+".TestJobStreamsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewTestJobStreamsClient(subscriptionID string, credential azcore.TokenCrede // - jobStreamID - The job stream id. // - options - TestJobStreamsClientGetOptions contains the optional parameters for the TestJobStreamsClient.Get method. func (client *TestJobStreamsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string, options *TestJobStreamsClientGetOptions) (TestJobStreamsClientGetResponse, error) { + var err error + const operationName = "TestJobStreamsClient.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, automationAccountName, runbookName, jobStreamID, options) if err != nil { return TestJobStreamsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TestJobStreamsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TestJobStreamsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TestJobStreamsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -126,25 +132,20 @@ func (client *TestJobStreamsClient) NewListByTestJobPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *TestJobStreamsClientListByTestJobResponse) (TestJobStreamsClientListByTestJobResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByTestJobCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TestJobStreamsClient.NewListByTestJobPager") + 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.listByTestJobCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) + }, nil) if err != nil { return TestJobStreamsClientListByTestJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return TestJobStreamsClientListByTestJobResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TestJobStreamsClientListByTestJobResponse{}, runtime.NewResponseError(resp) - } return client.listByTestJobHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/time_rfc3339.go index 01abb60f..05ac6f22 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/usages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/usages_client.go index a68929d2..a93ade17 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/usages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/usages_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type UsagesClient struct { // - 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+".UsagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,6 +57,7 @@ func (client *UsagesClient) NewListByAutomationAccountPager(resourceGroupName st return false }, Fetcher: func(ctx context.Context, page *UsagesClientListByAutomationAccountResponse) (UsagesClientListByAutomationAccountResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UsagesClient.NewListByAutomationAccountPager") req, err := client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return UsagesClientListByAutomationAccountResponse{}, err @@ -71,6 +71,7 @@ func (client *UsagesClient) NewListByAutomationAccountPager(resourceGroupName st } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/variable_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/variable_client.go index 6b229595..a3b765ca 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/variable_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/variable_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type VariableClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVariableClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VariableClient, error) { - cl, err := arm.NewClient(moduleName+".VariableClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewVariableClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - The parameters supplied to the create or update variable operation. // - options - VariableClientCreateOrUpdateOptions contains the optional parameters for the VariableClient.CreateOrUpdate method. func (client *VariableClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters, options *VariableClientCreateOrUpdateOptions) (VariableClientCreateOrUpdateResponse, error) { + var err error + const operationName = "VariableClient.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, automationAccountName, variableName, parameters, options) if err != nil { return VariableClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VariableClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return VariableClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return VariableClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *VariableClient) createOrUpdateCreateRequest(ctx context.Context, r reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *VariableClient) createOrUpdateHandleResponse(resp *http.Response) // - variableName - The name of variable. // - options - VariableClientDeleteOptions contains the optional parameters for the VariableClient.Delete method. func (client *VariableClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, options *VariableClientDeleteOptions) (VariableClientDeleteResponse, error) { + var err error + const operationName = "VariableClient.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, automationAccountName, variableName, options) if err != nil { return VariableClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VariableClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VariableClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VariableClientDeleteResponse{}, err } return VariableClientDeleteResponse{}, nil } @@ -170,18 +185,25 @@ func (client *VariableClient) deleteCreateRequest(ctx context.Context, resourceG // - variableName - The name of variable. // - options - VariableClientGetOptions contains the optional parameters for the VariableClient.Get method. func (client *VariableClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, options *VariableClientGetOptions) (VariableClientGetResponse, error) { + var err error + const operationName = "VariableClient.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, automationAccountName, variableName, options) if err != nil { return VariableClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VariableClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VariableClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VariableClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -236,25 +258,20 @@ func (client *VariableClient) NewListByAutomationAccountPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *VariableClientListByAutomationAccountResponse) (VariableClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VariableClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VariableClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return VariableClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VariableClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -303,18 +320,25 @@ func (client *VariableClient) listByAutomationAccountHandleResponse(resp *http.R // - parameters - The parameters supplied to the update variable operation. // - options - VariableClientUpdateOptions contains the optional parameters for the VariableClient.Update method. func (client *VariableClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableUpdateParameters, options *VariableClientUpdateOptions) (VariableClientUpdateResponse, error) { + var err error + const operationName = "VariableClient.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, automationAccountName, variableName, parameters, options) if err != nil { return VariableClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VariableClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VariableClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VariableClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -344,7 +368,10 @@ func (client *VariableClient) updateCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/watcher_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/watcher_client.go index eae28646..35247c46 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/watcher_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/watcher_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type WatcherClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWatcherClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WatcherClient, error) { - cl, err := arm.NewClient(moduleName+".WatcherClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewWatcherClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - The create or update parameters for watcher. // - options - WatcherClientCreateOrUpdateOptions contains the optional parameters for the WatcherClient.CreateOrUpdate method. func (client *WatcherClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, parameters Watcher, options *WatcherClientCreateOrUpdateOptions) (WatcherClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WatcherClient.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, automationAccountName, watcherName, parameters, options) if err != nil { return WatcherClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatcherClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WatcherClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WatcherClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *WatcherClient) createOrUpdateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *WatcherClient) createOrUpdateHandleResponse(resp *http.Response) ( // - watcherName - The watcher name. // - options - WatcherClientDeleteOptions contains the optional parameters for the WatcherClient.Delete method. func (client *WatcherClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, options *WatcherClientDeleteOptions) (WatcherClientDeleteResponse, error) { + var err error + const operationName = "WatcherClient.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, automationAccountName, watcherName, options) if err != nil { return WatcherClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatcherClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatcherClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatcherClientDeleteResponse{}, err } return WatcherClientDeleteResponse{}, nil } @@ -170,18 +185,25 @@ func (client *WatcherClient) deleteCreateRequest(ctx context.Context, resourceGr // - watcherName - The watcher name. // - options - WatcherClientGetOptions contains the optional parameters for the WatcherClient.Get method. func (client *WatcherClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, options *WatcherClientGetOptions) (WatcherClientGetResponse, error) { + var err error + const operationName = "WatcherClient.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, automationAccountName, watcherName, options) if err != nil { return WatcherClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatcherClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatcherClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatcherClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -236,25 +258,20 @@ func (client *WatcherClient) NewListByAutomationAccountPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WatcherClientListByAutomationAccountResponse) (WatcherClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WatcherClientListByAutomationAccountResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WatcherClient.NewListByAutomationAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return WatcherClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatcherClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -305,16 +322,22 @@ func (client *WatcherClient) listByAutomationAccountHandleResponse(resp *http.Re // - watcherName - The watcher name. // - options - WatcherClientStartOptions contains the optional parameters for the WatcherClient.Start method. func (client *WatcherClient) Start(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, options *WatcherClientStartOptions) (WatcherClientStartResponse, error) { + var err error + const operationName = "WatcherClient.Start" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startCreateRequest(ctx, resourceGroupName, automationAccountName, watcherName, options) if err != nil { return WatcherClientStartResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatcherClientStartResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatcherClientStartResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatcherClientStartResponse{}, err } return WatcherClientStartResponse{}, nil } @@ -358,16 +381,22 @@ func (client *WatcherClient) startCreateRequest(ctx context.Context, resourceGro // - watcherName - The watcher name. // - options - WatcherClientStopOptions contains the optional parameters for the WatcherClient.Stop method. func (client *WatcherClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, options *WatcherClientStopOptions) (WatcherClientStopResponse, error) { + var err error + const operationName = "WatcherClient.Stop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopCreateRequest(ctx, resourceGroupName, automationAccountName, watcherName, options) if err != nil { return WatcherClientStopResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatcherClientStopResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatcherClientStopResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatcherClientStopResponse{}, err } return WatcherClientStopResponse{}, nil } @@ -412,18 +441,25 @@ func (client *WatcherClient) stopCreateRequest(ctx context.Context, resourceGrou // - parameters - The update parameters for watcher. // - options - WatcherClientUpdateOptions contains the optional parameters for the WatcherClient.Update method. func (client *WatcherClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, parameters WatcherUpdateParameters, options *WatcherClientUpdateOptions) (WatcherClientUpdateResponse, error) { + var err error + const operationName = "WatcherClient.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, automationAccountName, watcherName, parameters, options) if err != nil { return WatcherClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatcherClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatcherClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatcherClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -453,7 +489,10 @@ func (client *WatcherClient) updateCreateRequest(ctx context.Context, resourceGr reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/webhook_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/webhook_client.go index dfc84571..02ba6152 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/webhook_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation/webhook_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armautomation @@ -34,7 +33,7 @@ type WebhookClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWebhookClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebhookClient, error) { - cl, err := arm.NewClient(moduleName+".WebhookClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewWebhookClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - The create or update parameters for webhook. // - options - WebhookClientCreateOrUpdateOptions contains the optional parameters for the WebhookClient.CreateOrUpdate method. func (client *WebhookClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters, options *WebhookClientCreateOrUpdateOptions) (WebhookClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WebhookClient.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, automationAccountName, webhookName, parameters, options) if err != nil { return WebhookClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebhookClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WebhookClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WebhookClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *WebhookClient) createOrUpdateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2015-10-31") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *WebhookClient) createOrUpdateHandleResponse(resp *http.Response) ( // - webhookName - The webhook name. // - options - WebhookClientDeleteOptions contains the optional parameters for the WebhookClient.Delete method. func (client *WebhookClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, options *WebhookClientDeleteOptions) (WebhookClientDeleteResponse, error) { + var err error + const operationName = "WebhookClient.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, automationAccountName, webhookName, options) if err != nil { return WebhookClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebhookClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebhookClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebhookClientDeleteResponse{}, err } return WebhookClientDeleteResponse{}, nil } @@ -169,18 +184,25 @@ func (client *WebhookClient) deleteCreateRequest(ctx context.Context, resourceGr // - automationAccountName - The name of the automation account. // - options - WebhookClientGenerateURIOptions contains the optional parameters for the WebhookClient.GenerateURI method. func (client *WebhookClient) GenerateURI(ctx context.Context, resourceGroupName string, automationAccountName string, options *WebhookClientGenerateURIOptions) (WebhookClientGenerateURIResponse, error) { + var err error + const operationName = "WebhookClient.GenerateURI" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.generateURICreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return WebhookClientGenerateURIResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebhookClientGenerateURIResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebhookClientGenerateURIResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebhookClientGenerateURIResponse{}, err } - return client.generateURIHandleResponse(resp) + resp, err := client.generateURIHandleResponse(httpResp) + return resp, err } // generateURICreateRequest creates the GenerateURI request. @@ -227,18 +249,25 @@ func (client *WebhookClient) generateURIHandleResponse(resp *http.Response) (Web // - webhookName - The webhook name. // - options - WebhookClientGetOptions contains the optional parameters for the WebhookClient.Get method. func (client *WebhookClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, options *WebhookClientGetOptions) (WebhookClientGetResponse, error) { + var err error + const operationName = "WebhookClient.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, automationAccountName, webhookName, options) if err != nil { return WebhookClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebhookClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebhookClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebhookClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -293,25 +322,20 @@ func (client *WebhookClient) NewListByAutomationAccountPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebhookClientListByAutomationAccountResponse) (WebhookClientListByAutomationAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebhookClient.NewListByAutomationAccountPager") + 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.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + }, nil) if err != nil { return WebhookClientListByAutomationAccountResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebhookClientListByAutomationAccountResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebhookClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAutomationAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -363,18 +387,25 @@ func (client *WebhookClient) listByAutomationAccountHandleResponse(resp *http.Re // - parameters - The update parameters for webhook. // - options - WebhookClientUpdateOptions contains the optional parameters for the WebhookClient.Update method. func (client *WebhookClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookUpdateParameters, options *WebhookClientUpdateOptions) (WebhookClientUpdateResponse, error) { + var err error + const operationName = "WebhookClient.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, automationAccountName, webhookName, parameters, options) if err != nil { return WebhookClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebhookClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebhookClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebhookClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -404,7 +435,10 @@ func (client *WebhookClient) updateCreateRequest(ctx context.Context, resourceGr reqQP.Set("api-version", "2015-10-31") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/CHANGELOG.md index 0aaa0291..6ad7813b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/CHANGELOG.md @@ -1,5 +1,11 @@ # 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/README.md index e356ed48..1c2cfd5f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewBotsClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/assets.json new file mode 100644 index 00000000..0fc726d7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/botservice/armbotservice", + "Tag": "go/resourcemanager/botservice/armbotservice_ef1ce590df" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/autorest.md index 40bc96e3..6fc18ed9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/autorest.md @@ -8,5 +8,5 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/botservice/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/botservice/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 +module-version: 1.2.0 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/botconnection_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/botconnection_client.go index 60384eb9..faa0b848 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/botconnection_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/botconnection_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -33,7 +32,7 @@ type BotConnectionClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBotConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BotConnectionClient, error) { - cl, err := arm.NewClient(moduleName+".BotConnectionClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewBotConnectionClient(subscriptionID string, credential azcore.TokenCreden // - parameters - The parameters to provide for creating the Connection Setting. // - options - BotConnectionClientCreateOptions contains the optional parameters for the BotConnectionClient.Create method. func (client *BotConnectionClient) Create(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, parameters ConnectionSetting, options *BotConnectionClientCreateOptions) (BotConnectionClientCreateResponse, error) { + var err error + const operationName = "BotConnectionClient.Create" + 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, resourceName, connectionName, parameters, options) if err != nil { return BotConnectionClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BotConnectionClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return BotConnectionClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return BotConnectionClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -95,7 +101,10 @@ func (client *BotConnectionClient) createCreateRequest(ctx context.Context, reso reqQP.Set("api-version", "2022-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -116,16 +125,22 @@ func (client *BotConnectionClient) createHandleResponse(resp *http.Response) (Bo // - connectionName - The name of the Bot Service Connection Setting resource. // - options - BotConnectionClientDeleteOptions contains the optional parameters for the BotConnectionClient.Delete method. func (client *BotConnectionClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, options *BotConnectionClientDeleteOptions) (BotConnectionClientDeleteResponse, error) { + var err error + const operationName = "BotConnectionClient.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, resourceName, connectionName, options) if err != nil { return BotConnectionClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BotConnectionClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return BotConnectionClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return BotConnectionClientDeleteResponse{}, err } return BotConnectionClientDeleteResponse{}, nil } @@ -169,18 +184,25 @@ func (client *BotConnectionClient) deleteCreateRequest(ctx context.Context, reso // - connectionName - The name of the Bot Service Connection Setting resource. // - options - BotConnectionClientGetOptions contains the optional parameters for the BotConnectionClient.Get method. func (client *BotConnectionClient) Get(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, options *BotConnectionClientGetOptions) (BotConnectionClientGetResponse, error) { + var err error + const operationName = "BotConnectionClient.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, resourceName, connectionName, options) if err != nil { return BotConnectionClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BotConnectionClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BotConnectionClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BotConnectionClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -235,25 +257,20 @@ func (client *BotConnectionClient) NewListByBotServicePager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *BotConnectionClientListByBotServiceResponse) (BotConnectionClientListByBotServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByBotServiceCreateRequest(ctx, resourceGroupName, resourceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BotConnectionClientListByBotServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BotConnectionClient.NewListByBotServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByBotServiceCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) if err != nil { return BotConnectionClientListByBotServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BotConnectionClientListByBotServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByBotServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -299,18 +316,25 @@ func (client *BotConnectionClient) listByBotServiceHandleResponse(resp *http.Res // - options - BotConnectionClientListServiceProvidersOptions contains the optional parameters for the BotConnectionClient.ListServiceProviders // method. func (client *BotConnectionClient) ListServiceProviders(ctx context.Context, options *BotConnectionClientListServiceProvidersOptions) (BotConnectionClientListServiceProvidersResponse, error) { + var err error + const operationName = "BotConnectionClient.ListServiceProviders" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listServiceProvidersCreateRequest(ctx, options) if err != nil { return BotConnectionClientListServiceProvidersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BotConnectionClientListServiceProvidersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BotConnectionClientListServiceProvidersResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BotConnectionClientListServiceProvidersResponse{}, err } - return client.listServiceProvidersHandleResponse(resp) + resp, err := client.listServiceProvidersHandleResponse(httpResp) + return resp, err } // listServiceProvidersCreateRequest creates the ListServiceProviders request. @@ -350,18 +374,25 @@ func (client *BotConnectionClient) listServiceProvidersHandleResponse(resp *http // - options - BotConnectionClientListWithSecretsOptions contains the optional parameters for the BotConnectionClient.ListWithSecrets // method. func (client *BotConnectionClient) ListWithSecrets(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, options *BotConnectionClientListWithSecretsOptions) (BotConnectionClientListWithSecretsResponse, error) { + var err error + const operationName = "BotConnectionClient.ListWithSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listWithSecretsCreateRequest(ctx, resourceGroupName, resourceName, connectionName, options) if err != nil { return BotConnectionClientListWithSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BotConnectionClientListWithSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BotConnectionClientListWithSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BotConnectionClientListWithSecretsResponse{}, err } - return client.listWithSecretsHandleResponse(resp) + resp, err := client.listWithSecretsHandleResponse(httpResp) + return resp, err } // listWithSecretsCreateRequest creates the ListWithSecrets request. @@ -413,18 +444,25 @@ func (client *BotConnectionClient) listWithSecretsHandleResponse(resp *http.Resp // - parameters - The parameters to provide for updating the Connection Setting. // - options - BotConnectionClientUpdateOptions contains the optional parameters for the BotConnectionClient.Update method. func (client *BotConnectionClient) Update(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, parameters ConnectionSetting, options *BotConnectionClientUpdateOptions) (BotConnectionClientUpdateResponse, error) { + var err error + const operationName = "BotConnectionClient.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, resourceName, connectionName, parameters, options) if err != nil { return BotConnectionClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BotConnectionClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return BotConnectionClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return BotConnectionClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -454,7 +492,10 @@ func (client *BotConnectionClient) updateCreateRequest(ctx context.Context, reso reqQP.Set("api-version", "2022-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/bots_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/bots_client.go index b1187a91..cb61b5f3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/bots_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/bots_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -33,7 +32,7 @@ type BotsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBotsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BotsClient, error) { - cl, err := arm.NewClient(moduleName+".BotsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewBotsClient(subscriptionID string, credential azcore.TokenCredential, opt // - parameters - The parameters to provide for the created bot. // - options - BotsClientCreateOptions contains the optional parameters for the BotsClient.Create method. func (client *BotsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, parameters Bot, options *BotsClientCreateOptions) (BotsClientCreateResponse, error) { + var err error + const operationName = "BotsClient.Create" + 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, resourceName, parameters, options) if err != nil { return BotsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BotsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return BotsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return BotsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -90,7 +96,10 @@ func (client *BotsClient) createCreateRequest(ctx context.Context, resourceGroup reqQP.Set("api-version", "2022-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -110,16 +119,22 @@ func (client *BotsClient) createHandleResponse(resp *http.Response) (BotsClientC // - resourceName - The name of the Bot resource. // - options - BotsClientDeleteOptions contains the optional parameters for the BotsClient.Delete method. func (client *BotsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, options *BotsClientDeleteOptions) (BotsClientDeleteResponse, error) { + var err error + const operationName = "BotsClient.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, resourceName, options) if err != nil { return BotsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BotsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return BotsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return BotsClientDeleteResponse{}, err } return BotsClientDeleteResponse{}, nil } @@ -158,18 +173,25 @@ func (client *BotsClient) deleteCreateRequest(ctx context.Context, resourceGroup // - resourceName - The name of the Bot resource. // - options - BotsClientGetOptions contains the optional parameters for the BotsClient.Get method. func (client *BotsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *BotsClientGetOptions) (BotsClientGetResponse, error) { + var err error + const operationName = "BotsClient.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, resourceName, options) if err != nil { return BotsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BotsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BotsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BotsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -215,18 +237,25 @@ func (client *BotsClient) getHandleResponse(resp *http.Response) (BotsClientGetR // - options - BotsClientGetCheckNameAvailabilityOptions contains the optional parameters for the BotsClient.GetCheckNameAvailability // method. func (client *BotsClient) GetCheckNameAvailability(ctx context.Context, parameters CheckNameAvailabilityRequestBody, options *BotsClientGetCheckNameAvailabilityOptions) (BotsClientGetCheckNameAvailabilityResponse, error) { + var err error + const operationName = "BotsClient.GetCheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCheckNameAvailabilityCreateRequest(ctx, parameters, options) if err != nil { return BotsClientGetCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BotsClientGetCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BotsClientGetCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BotsClientGetCheckNameAvailabilityResponse{}, err } - return client.getCheckNameAvailabilityHandleResponse(resp) + resp, err := client.getCheckNameAvailabilityHandleResponse(httpResp) + return resp, err } // getCheckNameAvailabilityCreateRequest creates the GetCheckNameAvailability request. @@ -240,7 +269,10 @@ func (client *BotsClient) getCheckNameAvailabilityCreateRequest(ctx context.Cont reqQP.Set("api-version", "2022-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // getCheckNameAvailabilityHandleResponse handles the GetCheckNameAvailability response. @@ -262,25 +294,20 @@ func (client *BotsClient) NewListPager(options *BotsClientListOptions) *runtime. return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *BotsClientListResponse) (BotsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BotsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BotsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 BotsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BotsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -323,25 +350,20 @@ func (client *BotsClient) NewListByResourceGroupPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *BotsClientListByResourceGroupResponse) (BotsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BotsClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BotsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 BotsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BotsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -385,18 +407,25 @@ func (client *BotsClient) listByResourceGroupHandleResponse(resp *http.Response) // - parameters - The parameters to provide for the created bot. // - options - BotsClientUpdateOptions contains the optional parameters for the BotsClient.Update method. func (client *BotsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters Bot, options *BotsClientUpdateOptions) (BotsClientUpdateResponse, error) { + var err error + const operationName = "BotsClient.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, resourceName, parameters, options) if err != nil { return BotsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BotsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return BotsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return BotsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -422,7 +451,10 @@ func (client *BotsClient) updateCreateRequest(ctx context.Context, resourceGroup reqQP.Set("api-version", "2022-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/channels_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/channels_client.go index b21a52d7..47e9ee6f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/channels_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/channels_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -33,7 +32,7 @@ type ChannelsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewChannelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ChannelsClient, error) { - cl, err := arm.NewClient(moduleName+".ChannelsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewChannelsClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - The parameters to provide for the created bot. // - options - ChannelsClientCreateOptions contains the optional parameters for the ChannelsClient.Create method. func (client *ChannelsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, channelName ChannelName, parameters BotChannel, options *ChannelsClientCreateOptions) (ChannelsClientCreateResponse, error) { + var err error + const operationName = "ChannelsClient.Create" + 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, resourceName, channelName, parameters, options) if err != nil { return ChannelsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ChannelsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ChannelsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ChannelsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -95,7 +101,10 @@ func (client *ChannelsClient) createCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2022-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -116,16 +125,22 @@ func (client *ChannelsClient) createHandleResponse(resp *http.Response) (Channel // - channelName - The name of the Bot resource. // - options - ChannelsClientDeleteOptions contains the optional parameters for the ChannelsClient.Delete method. func (client *ChannelsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, channelName string, options *ChannelsClientDeleteOptions) (ChannelsClientDeleteResponse, error) { + var err error + const operationName = "ChannelsClient.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, resourceName, channelName, options) if err != nil { return ChannelsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ChannelsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ChannelsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ChannelsClientDeleteResponse{}, err } return ChannelsClientDeleteResponse{}, nil } @@ -169,18 +184,25 @@ func (client *ChannelsClient) deleteCreateRequest(ctx context.Context, resourceG // - channelName - The name of the Bot resource. // - options - ChannelsClientGetOptions contains the optional parameters for the ChannelsClient.Get method. func (client *ChannelsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, channelName string, options *ChannelsClientGetOptions) (ChannelsClientGetResponse, error) { + var err error + const operationName = "ChannelsClient.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, resourceName, channelName, options) if err != nil { return ChannelsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ChannelsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ChannelsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ChannelsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -235,25 +257,20 @@ func (client *ChannelsClient) NewListByResourceGroupPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ChannelsClientListByResourceGroupResponse) (ChannelsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, resourceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ChannelsClient.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, resourceName, options) + }, nil) if err != nil { return ChannelsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ChannelsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ChannelsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -301,18 +318,25 @@ func (client *ChannelsClient) listByResourceGroupHandleResponse(resp *http.Respo // - channelName - The name of the Channel resource. // - options - ChannelsClientListWithKeysOptions contains the optional parameters for the ChannelsClient.ListWithKeys method. func (client *ChannelsClient) ListWithKeys(ctx context.Context, resourceGroupName string, resourceName string, channelName ChannelName, options *ChannelsClientListWithKeysOptions) (ChannelsClientListWithKeysResponse, error) { + var err error + const operationName = "ChannelsClient.ListWithKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listWithKeysCreateRequest(ctx, resourceGroupName, resourceName, channelName, options) if err != nil { return ChannelsClientListWithKeysResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ChannelsClientListWithKeysResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ChannelsClientListWithKeysResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ChannelsClientListWithKeysResponse{}, err } - return client.listWithKeysHandleResponse(resp) + resp, err := client.listWithKeysHandleResponse(httpResp) + return resp, err } // listWithKeysCreateRequest creates the ListWithKeys request. @@ -364,18 +388,25 @@ func (client *ChannelsClient) listWithKeysHandleResponse(resp *http.Response) (C // - parameters - The parameters to provide for the created bot. // - options - ChannelsClientUpdateOptions contains the optional parameters for the ChannelsClient.Update method. func (client *ChannelsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, channelName ChannelName, parameters BotChannel, options *ChannelsClientUpdateOptions) (ChannelsClientUpdateResponse, error) { + var err error + const operationName = "ChannelsClient.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, resourceName, channelName, parameters, options) if err != nil { return ChannelsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ChannelsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ChannelsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ChannelsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -405,7 +436,10 @@ func (client *ChannelsClient) updateCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2022-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/client_factory.go index a2b2957a..3ba9cf6f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -28,7 +27,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,57 +37,68 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } +// NewBotConnectionClient creates a new instance of BotConnectionClient. +func (c *ClientFactory) NewBotConnectionClient() *BotConnectionClient { + subClient, _ := NewBotConnectionClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewBotsClient creates a new instance of BotsClient. func (c *ClientFactory) NewBotsClient() *BotsClient { subClient, _ := NewBotsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewChannelsClient creates a new instance of ChannelsClient. func (c *ClientFactory) NewChannelsClient() *ChannelsClient { subClient, _ := NewChannelsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDirectLineClient creates a new instance of DirectLineClient. func (c *ClientFactory) NewDirectLineClient() *DirectLineClient { subClient, _ := NewDirectLineClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewEmailClient creates a new instance of EmailClient. func (c *ClientFactory) NewEmailClient() *EmailClient { subClient, _ := NewEmailClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewBotConnectionClient() *BotConnectionClient { - subClient, _ := NewBotConnectionClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewQnAMakerEndpointKeysClient() *QnAMakerEndpointKeysClient { - subClient, _ := NewQnAMakerEndpointKeysClient(c.subscriptionID, c.credential, c.options) - return subClient -} - +// NewHostSettingsClient creates a new instance of HostSettingsClient. func (c *ClientFactory) NewHostSettingsClient() *HostSettingsClient { subClient, _ := NewHostSettingsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewOperationResultsClient creates a new instance of OperationResultsClient. func (c *ClientFactory) NewOperationResultsClient() *OperationResultsClient { subClient, _ := NewOperationResultsClient(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 } + +// NewQnAMakerEndpointKeysClient creates a new instance of QnAMakerEndpointKeysClient. +func (c *ClientFactory) NewQnAMakerEndpointKeysClient() *QnAMakerEndpointKeysClient { + subClient, _ := NewQnAMakerEndpointKeysClient(c.subscriptionID, c.credential, c.options) + return subClient +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/constants.go index 91ad5970..149e38bc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/constants.go @@ -3,63 +3,62 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice const ( - moduleName = "armbotservice" - moduleVersion = "v1.1.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice" + moduleVersion = "v1.2.0" ) type ChannelName string const ( + ChannelNameAcsChatChannel ChannelName = "AcsChatChannel" ChannelNameAlexaChannel ChannelName = "AlexaChannel" - ChannelNameFacebookChannel ChannelName = "FacebookChannel" + ChannelNameDirectLineChannel ChannelName = "DirectLineChannel" + ChannelNameDirectLineSpeechChannel ChannelName = "DirectLineSpeechChannel" ChannelNameEmailChannel ChannelName = "EmailChannel" + ChannelNameFacebookChannel ChannelName = "FacebookChannel" ChannelNameKikChannel ChannelName = "KikChannel" - ChannelNameTelegramChannel ChannelName = "TelegramChannel" - ChannelNameSlackChannel ChannelName = "SlackChannel" + ChannelNameLineChannel ChannelName = "LineChannel" + ChannelNameM365Extensions ChannelName = "M365Extensions" ChannelNameMsTeamsChannel ChannelName = "MsTeamsChannel" + ChannelNameOmnichannel ChannelName = "Omnichannel" + ChannelNameOutlookChannel ChannelName = "OutlookChannel" + ChannelNameSearchAssistant ChannelName = "SearchAssistant" ChannelNameSkypeChannel ChannelName = "SkypeChannel" - ChannelNameWebChatChannel ChannelName = "WebChatChannel" - ChannelNameDirectLineChannel ChannelName = "DirectLineChannel" + ChannelNameSlackChannel ChannelName = "SlackChannel" ChannelNameSmsChannel ChannelName = "SmsChannel" - ChannelNameLineChannel ChannelName = "LineChannel" - ChannelNameDirectLineSpeechChannel ChannelName = "DirectLineSpeechChannel" - ChannelNameOutlookChannel ChannelName = "OutlookChannel" - ChannelNameOmnichannel ChannelName = "Omnichannel" + ChannelNameTelegramChannel ChannelName = "TelegramChannel" ChannelNameTelephonyChannel ChannelName = "TelephonyChannel" - ChannelNameAcsChatChannel ChannelName = "AcsChatChannel" - ChannelNameSearchAssistant ChannelName = "SearchAssistant" - ChannelNameM365Extensions ChannelName = "M365Extensions" + ChannelNameWebChatChannel ChannelName = "WebChatChannel" ) // PossibleChannelNameValues returns the possible values for the ChannelName const type. func PossibleChannelNameValues() []ChannelName { return []ChannelName{ + ChannelNameAcsChatChannel, ChannelNameAlexaChannel, - ChannelNameFacebookChannel, + ChannelNameDirectLineChannel, + ChannelNameDirectLineSpeechChannel, ChannelNameEmailChannel, + ChannelNameFacebookChannel, ChannelNameKikChannel, - ChannelNameTelegramChannel, - ChannelNameSlackChannel, + ChannelNameLineChannel, + ChannelNameM365Extensions, ChannelNameMsTeamsChannel, + ChannelNameOmnichannel, + ChannelNameOutlookChannel, + ChannelNameSearchAssistant, ChannelNameSkypeChannel, - ChannelNameWebChatChannel, - ChannelNameDirectLineChannel, + ChannelNameSlackChannel, ChannelNameSmsChannel, - ChannelNameLineChannel, - ChannelNameDirectLineSpeechChannel, - ChannelNameOutlookChannel, - ChannelNameOmnichannel, + ChannelNameTelegramChannel, ChannelNameTelephonyChannel, - ChannelNameAcsChatChannel, - ChannelNameSearchAssistant, - ChannelNameM365Extensions, + ChannelNameWebChatChannel, } } @@ -67,17 +66,17 @@ func PossibleChannelNameValues() []ChannelName { type EmailChannelAuthMethod float32 const ( - // EmailChannelAuthMethodPassword - Basic authentication. - EmailChannelAuthMethodPassword EmailChannelAuthMethod = 0 // EmailChannelAuthMethodGraph - Modern authentication. EmailChannelAuthMethodGraph EmailChannelAuthMethod = 1 + // EmailChannelAuthMethodPassword - Basic authentication. + EmailChannelAuthMethodPassword EmailChannelAuthMethod = 0 ) // PossibleEmailChannelAuthMethodValues returns the possible values for the EmailChannelAuthMethod const type. func PossibleEmailChannelAuthMethodValues() []EmailChannelAuthMethod { return []EmailChannelAuthMethod{ - EmailChannelAuthMethodPassword, EmailChannelAuthMethodGraph, + EmailChannelAuthMethodPassword, } } @@ -216,15 +215,15 @@ func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { type RegenerateKeysChannelName string const ( - RegenerateKeysChannelNameWebChatChannel RegenerateKeysChannelName = "WebChatChannel" RegenerateKeysChannelNameDirectLineChannel RegenerateKeysChannelName = "DirectLineChannel" + RegenerateKeysChannelNameWebChatChannel RegenerateKeysChannelName = "WebChatChannel" ) // PossibleRegenerateKeysChannelNameValues returns the possible values for the RegenerateKeysChannelName const type. func PossibleRegenerateKeysChannelNameValues() []RegenerateKeysChannelName { return []RegenerateKeysChannelName{ - RegenerateKeysChannelNameWebChatChannel, RegenerateKeysChannelNameDirectLineChannel, + RegenerateKeysChannelNameWebChatChannel, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/directline_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/directline_client.go index d8833ef8..78469527 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/directline_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/directline_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -33,7 +32,7 @@ type DirectLineClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDirectLineClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DirectLineClient, error) { - cl, err := arm.NewClient(moduleName+".DirectLineClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewDirectLineClient(subscriptionID string, credential azcore.TokenCredentia // - options - DirectLineClientRegenerateKeysOptions contains the optional parameters for the DirectLineClient.RegenerateKeys // method. func (client *DirectLineClient) RegenerateKeys(ctx context.Context, resourceGroupName string, resourceName string, channelName RegenerateKeysChannelName, parameters SiteInfo, options *DirectLineClientRegenerateKeysOptions) (DirectLineClientRegenerateKeysResponse, error) { + var err error + const operationName = "DirectLineClient.RegenerateKeys" + 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, resourceName, channelName, parameters, options) if err != nil { return DirectLineClientRegenerateKeysResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DirectLineClientRegenerateKeysResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DirectLineClientRegenerateKeysResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DirectLineClientRegenerateKeysResponse{}, err } - return client.regenerateKeysHandleResponse(resp) + resp, err := client.regenerateKeysHandleResponse(httpResp) + return resp, err } // regenerateKeysCreateRequest creates the RegenerateKeys request. @@ -96,7 +102,10 @@ func (client *DirectLineClient) regenerateKeysCreateRequest(ctx context.Context, reqQP.Set("api-version", "2022-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // regenerateKeysHandleResponse handles the RegenerateKeys response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/email_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/email_client.go index a0d8dca4..6e96e20b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/email_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/email_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -33,7 +32,7 @@ type EmailClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEmailClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EmailClient, error) { - cl, err := arm.NewClient(moduleName+".EmailClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -52,18 +51,25 @@ func NewEmailClient(subscriptionID string, credential azcore.TokenCredential, op // - resourceName - The name of the Bot resource. // - options - EmailClientCreateSignInURLOptions contains the optional parameters for the EmailClient.CreateSignInURL method. func (client *EmailClient) CreateSignInURL(ctx context.Context, resourceGroupName string, resourceName string, options *EmailClientCreateSignInURLOptions) (EmailClientCreateSignInURLResponse, error) { + var err error + const operationName = "EmailClient.CreateSignInURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createSignInURLCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return EmailClientCreateSignInURLResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EmailClientCreateSignInURLResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EmailClientCreateSignInURLResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EmailClientCreateSignInURLResponse{}, err } - return client.createSignInURLHandleResponse(resp) + resp, err := client.createSignInURLHandleResponse(httpResp) + return resp, err } // createSignInURLCreateRequest creates the CreateSignInURL request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/hostsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/hostsettings_client.go index 83c06d11..62526082 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/hostsettings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/hostsettings_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -33,7 +32,7 @@ type HostSettingsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewHostSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HostSettingsClient, error) { - cl, err := arm.NewClient(moduleName+".HostSettingsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -50,18 +49,25 @@ func NewHostSettingsClient(subscriptionID string, credential azcore.TokenCredent // Generated from API version 2022-09-15 // - options - HostSettingsClientGetOptions contains the optional parameters for the HostSettingsClient.Get method. func (client *HostSettingsClient) Get(ctx context.Context, options *HostSettingsClientGetOptions) (HostSettingsClientGetResponse, error) { + var err error + const operationName = "HostSettingsClient.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, options) if err != nil { return HostSettingsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HostSettingsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HostSettingsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HostSettingsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/interfaces.go new file mode 100644 index 00000000..42a17dcb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/interfaces.go @@ -0,0 +1,20 @@ +//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 armbotservice + +// ChannelClassification provides polymorphic access to related types. +// Call the interface's GetChannel() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AcsChatChannel, *AlexaChannel, *Channel, *DirectLineChannel, *DirectLineSpeechChannel, *EmailChannel, *FacebookChannel, +// - *KikChannel, *LineChannel, *M365Extensions, *MsTeamsChannel, *Omnichannel, *OutlookChannel, *SearchAssistant, *SkypeChannel, +// - *SlackChannel, *SmsChannel, *TelegramChannel, *TelephonyChannel, *WebChatChannel +type ChannelClassification interface { + // GetChannel returns the Channel content of the underlying type. + GetChannel() *Channel +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/models.go index a73b60f4..4d85c45a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -31,8 +30,8 @@ func (a *AcsChatChannel) GetChannel() *Channel { return &Channel{ ChannelName: a.ChannelName, Etag: a.Etag, - ProvisioningState: a.ProvisioningState, Location: a.Location, + ProvisioningState: a.ProvisioningState, } } @@ -59,8 +58,8 @@ func (a *AlexaChannel) GetChannel() *Channel { return &Channel{ ChannelName: a.ChannelName, Etag: a.Etag, - ProvisioningState: a.ProvisioningState, Location: a.Location, + ProvisioningState: a.ProvisioningState, } } @@ -145,44 +144,6 @@ type BotChannel struct { Zones []*string } -// BotConnectionClientCreateOptions contains the optional parameters for the BotConnectionClient.Create method. -type BotConnectionClientCreateOptions struct { - // placeholder for future optional parameters -} - -// BotConnectionClientDeleteOptions contains the optional parameters for the BotConnectionClient.Delete method. -type BotConnectionClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// BotConnectionClientGetOptions contains the optional parameters for the BotConnectionClient.Get method. -type BotConnectionClientGetOptions struct { - // placeholder for future optional parameters -} - -// BotConnectionClientListByBotServiceOptions contains the optional parameters for the BotConnectionClient.NewListByBotServicePager -// method. -type BotConnectionClientListByBotServiceOptions struct { - // placeholder for future optional parameters -} - -// BotConnectionClientListServiceProvidersOptions contains the optional parameters for the BotConnectionClient.ListServiceProviders -// method. -type BotConnectionClientListServiceProvidersOptions struct { - // placeholder for future optional parameters -} - -// BotConnectionClientListWithSecretsOptions contains the optional parameters for the BotConnectionClient.ListWithSecrets -// method. -type BotConnectionClientListWithSecretsOptions struct { - // placeholder for future optional parameters -} - -// BotConnectionClientUpdateOptions contains the optional parameters for the BotConnectionClient.Update method. -type BotConnectionClientUpdateOptions struct { - // placeholder for future optional parameters -} - // BotProperties - The parameters to provide for the Bot. type BotProperties struct { // REQUIRED; The Name of the bot @@ -300,53 +261,6 @@ type BotResponseList struct { Value []*Bot } -// BotsClientCreateOptions contains the optional parameters for the BotsClient.Create method. -type BotsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// BotsClientDeleteOptions contains the optional parameters for the BotsClient.Delete method. -type BotsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// BotsClientGetCheckNameAvailabilityOptions contains the optional parameters for the BotsClient.GetCheckNameAvailability -// method. -type BotsClientGetCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// BotsClientGetOptions contains the optional parameters for the BotsClient.Get method. -type BotsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BotsClientListByResourceGroupOptions contains the optional parameters for the BotsClient.NewListByResourceGroupPager method. -type BotsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// BotsClientListOptions contains the optional parameters for the BotsClient.NewListPager method. -type BotsClientListOptions struct { - // placeholder for future optional parameters -} - -// BotsClientUpdateOptions contains the optional parameters for the BotsClient.Update method. -type BotsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// ChannelClassification provides polymorphic access to related types. -// Call the interface's GetChannel() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AcsChatChannel, *AlexaChannel, *Channel, *DirectLineChannel, *DirectLineSpeechChannel, *EmailChannel, *FacebookChannel, -// - *KikChannel, *LineChannel, *M365Extensions, *MsTeamsChannel, *Omnichannel, *OutlookChannel, *SearchAssistant, *SkypeChannel, -// - *SlackChannel, *SmsChannel, *TelegramChannel, *TelephonyChannel, *WebChatChannel -type ChannelClassification interface { - // GetChannel returns the Channel content of the underlying type. - GetChannel() *Channel -} - // Channel definition type Channel struct { // REQUIRED; The channel name @@ -407,37 +321,6 @@ type ChannelSettings struct { Sites []*Site } -// ChannelsClientCreateOptions contains the optional parameters for the ChannelsClient.Create method. -type ChannelsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// ChannelsClientDeleteOptions contains the optional parameters for the ChannelsClient.Delete method. -type ChannelsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ChannelsClientGetOptions contains the optional parameters for the ChannelsClient.Get method. -type ChannelsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ChannelsClientListByResourceGroupOptions contains the optional parameters for the ChannelsClient.NewListByResourceGroupPager -// method. -type ChannelsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ChannelsClientListWithKeysOptions contains the optional parameters for the ChannelsClient.ListWithKeys method. -type ChannelsClientListWithKeysOptions struct { - // placeholder for future optional parameters -} - -// ChannelsClientUpdateOptions contains the optional parameters for the ChannelsClient.Update method. -type ChannelsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // CheckNameAvailabilityRequestBody - The request body for a request to Bot Service Management to check availability of a // bot name. type CheckNameAvailabilityRequestBody struct { @@ -586,8 +469,8 @@ func (d *DirectLineChannel) GetChannel() *Channel { return &Channel{ ChannelName: d.ChannelName, Etag: d.Etag, - ProvisioningState: d.ProvisioningState, Location: d.Location, + ProvisioningState: d.ProvisioningState, } } @@ -606,11 +489,6 @@ type DirectLineChannelProperties struct { Sites []*DirectLineSite } -// DirectLineClientRegenerateKeysOptions contains the optional parameters for the DirectLineClient.RegenerateKeys method. -type DirectLineClientRegenerateKeysOptions struct { - // placeholder for future optional parameters -} - // DirectLineSite - A site for the Direct Line channel type DirectLineSite struct { // REQUIRED; Whether this site is enabled for DirectLine channel @@ -694,8 +572,8 @@ func (d *DirectLineSpeechChannel) GetChannel() *Channel { return &Channel{ ChannelName: d.ChannelName, Etag: d.Etag, - ProvisioningState: d.ProvisioningState, Location: d.Location, + ProvisioningState: d.ProvisioningState, } } @@ -746,8 +624,8 @@ func (e *EmailChannel) GetChannel() *Channel { return &Channel{ ChannelName: e.ChannelName, Etag: e.Etag, - ProvisioningState: e.ProvisioningState, Location: e.Location, + ProvisioningState: e.ProvisioningState, } } @@ -769,11 +647,6 @@ type EmailChannelProperties struct { Password *string } -// EmailClientCreateSignInURLOptions contains the optional parameters for the EmailClient.CreateSignInURL method. -type EmailClientCreateSignInURLOptions struct { - // placeholder for future optional parameters -} - // Error - Bot Service error object. type Error struct { // The error body. @@ -812,8 +685,8 @@ func (f *FacebookChannel) GetChannel() *Channel { return &Channel{ ChannelName: f.ChannelName, Etag: f.Etag, - ProvisioningState: f.ProvisioningState, Location: f.Location, + ProvisioningState: f.ProvisioningState, } } @@ -847,11 +720,6 @@ type FacebookPage struct { AccessToken *string } -// HostSettingsClientGetOptions contains the optional parameters for the HostSettingsClient.Get method. -type HostSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - // HostSettingsResponse - The response body returned for a request to Bot Service Management to check per subscription hostSettings type HostSettingsResponse struct { // Same as toBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12 @@ -902,8 +770,8 @@ func (k *KikChannel) GetChannel() *Channel { return &Channel{ ChannelName: k.ChannelName, Etag: k.Etag, - ProvisioningState: k.ProvisioningState, Location: k.Location, + ProvisioningState: k.ProvisioningState, } } @@ -945,8 +813,8 @@ func (l *LineChannel) GetChannel() *Channel { return &Channel{ ChannelName: l.ChannelName, Etag: l.Etag, - ProvisioningState: l.ProvisioningState, Location: l.Location, + ProvisioningState: l.ProvisioningState, } } @@ -1042,8 +910,8 @@ func (m *M365Extensions) GetChannel() *Channel { return &Channel{ ChannelName: m.ChannelName, Etag: m.Etag, - ProvisioningState: m.ProvisioningState, Location: m.Location, + ProvisioningState: m.ProvisioningState, } } @@ -1070,8 +938,8 @@ func (m *MsTeamsChannel) GetChannel() *Channel { return &Channel{ ChannelName: m.ChannelName, Etag: m.Etag, - ProvisioningState: m.ProvisioningState, Location: m.Location, + ProvisioningState: m.ProvisioningState, } } @@ -1116,8 +984,8 @@ func (o *Omnichannel) GetChannel() *Channel { return &Channel{ ChannelName: o.ChannelName, Etag: o.Etag, - ProvisioningState: o.ProvisioningState, Location: o.Location, + ProvisioningState: o.ProvisioningState, } } @@ -1160,12 +1028,6 @@ type OperationEntityListResult struct { Value []*OperationEntity } -// OperationResultsClientBeginGetOptions contains the optional parameters for the OperationResultsClient.BeginGet method. -type OperationResultsClientBeginGetOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // OperationResultsDescription - The properties indicating the operation result of an operation on a service. type OperationResultsDescription struct { // READ-ONLY; The ID of the operation returned. @@ -1181,11 +1043,6 @@ type OperationResultsDescription struct { Status *OperationResultStatus } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // OutlookChannel - Outlook channel definition type OutlookChannel struct { // REQUIRED; The channel name @@ -1206,8 +1063,8 @@ func (o *OutlookChannel) GetChannel() *Channel { return &Channel{ ChannelName: o.ChannelName, Etag: o.Etag, - ProvisioningState: o.ProvisioningState, Location: o.Location, + ProvisioningState: o.ProvisioningState, } } @@ -1253,30 +1110,6 @@ type PrivateEndpointConnectionProperties struct { ProvisioningState *PrivateEndpointConnectionProvisioningState } -// PrivateEndpointConnectionsClientCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Create -// method. -type PrivateEndpointConnectionsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete -// method. -type PrivateEndpointConnectionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. -type PrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager -// method. -type PrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkResource - A private link resource type PrivateLinkResource struct { // Resource properties. @@ -1322,12 +1155,6 @@ type PrivateLinkResourceProperties struct { RequiredMembers []*string } -// PrivateLinkResourcesClientListByBotResourceOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByBotResource -// method. -type PrivateLinkResourcesClientListByBotResourceOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer // and provider. type PrivateLinkServiceConnectionState struct { @@ -1341,11 +1168,6 @@ type PrivateLinkServiceConnectionState struct { Status *PrivateEndpointServiceConnectionStatus } -// QnAMakerEndpointKeysClientGetOptions contains the optional parameters for the QnAMakerEndpointKeysClient.Get method. -type QnAMakerEndpointKeysClientGetOptions struct { - // placeholder for future optional parameters -} - // QnAMakerEndpointKeysRequestBody - The request body for a request to Bot Service Management to list QnA Maker endpoint keys. type QnAMakerEndpointKeysRequestBody struct { // Subscription key which provides access to this API. @@ -1429,8 +1251,8 @@ func (s *SearchAssistant) GetChannel() *Channel { return &Channel{ ChannelName: s.ChannelName, Etag: s.Etag, - ProvisioningState: s.ProvisioningState, Location: s.Location, + ProvisioningState: s.ProvisioningState, } } @@ -1598,8 +1420,8 @@ func (s *SkypeChannel) GetChannel() *Channel { return &Channel{ ChannelName: s.ChannelName, Etag: s.Etag, - ProvisioningState: s.ProvisioningState, Location: s.Location, + ProvisioningState: s.ProvisioningState, } } @@ -1659,8 +1481,8 @@ func (s *SlackChannel) GetChannel() *Channel { return &Channel{ ChannelName: s.ChannelName, Etag: s.Etag, - ProvisioningState: s.ProvisioningState, Location: s.Location, + ProvisioningState: s.ProvisioningState, } } @@ -1723,8 +1545,8 @@ func (s *SmsChannel) GetChannel() *Channel { return &Channel{ ChannelName: s.ChannelName, Etag: s.Etag, - ProvisioningState: s.ProvisioningState, Location: s.Location, + ProvisioningState: s.ProvisioningState, } } @@ -1769,8 +1591,8 @@ func (t *TelegramChannel) GetChannel() *Channel { return &Channel{ ChannelName: t.ChannelName, Etag: t.Etag, - ProvisioningState: t.ProvisioningState, Location: t.Location, + ProvisioningState: t.ProvisioningState, } } @@ -1809,8 +1631,8 @@ func (t *TelephonyChannel) GetChannel() *Channel { return &Channel{ ChannelName: t.ChannelName, Etag: t.Etag, - ProvisioningState: t.ProvisioningState, Location: t.Location, + ProvisioningState: t.ProvisioningState, } } @@ -1915,8 +1737,8 @@ func (w *WebChatChannel) GetChannel() *Channel { return &Channel{ ChannelName: w.ChannelName, Etag: w.Etag, - ProvisioningState: w.ProvisioningState, Location: w.Location, + ProvisioningState: w.ProvisioningState, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/models_serde.go index 5fa26412..f8b6f5b4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -2080,7 +2079,7 @@ func (o OperationResultsDescription) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", o.ID) populate(objectMap, "name", o.Name) - populateTimeRFC3339(objectMap, "startTime", o.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) populate(objectMap, "status", o.Status) return json.Marshal(objectMap) } @@ -2101,7 +2100,7 @@ func (o *OperationResultsDescription) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Name", &o.Name) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &o.Status) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/operationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/operationresults_client.go index e5096bad..9530d65d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/operationresults_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/operationresults_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -33,7 +32,7 @@ type OperationResultsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationResultsClient, error) { - cl, err := arm.NewClient(moduleName+".OperationResultsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,9 +56,14 @@ func (client *OperationResultsClient) BeginGet(ctx context.Context, operationRes if err != nil { return nil, err } - return runtime.NewPoller[OperationResultsClientGetResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OperationResultsClientGetResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[OperationResultsClientGetResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[OperationResultsClientGetResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -68,18 +72,24 @@ func (client *OperationResultsClient) BeginGet(ctx context.Context, operationRes // // Generated from API version 2022-09-15 func (client *OperationResultsClient) get(ctx context.Context, operationResultID string, options *OperationResultsClientBeginGetOptions) (*http.Response, error) { + var err error + const operationName = "OperationResultsClient.BeginGet" + 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, operationResultID, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/operations_client.go index 33a677dd..c6e42780 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,20 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/options.go new file mode 100644 index 00000000..6763df9e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/options.go @@ -0,0 +1,175 @@ +//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 armbotservice + +// BotConnectionClientCreateOptions contains the optional parameters for the BotConnectionClient.Create method. +type BotConnectionClientCreateOptions struct { + // placeholder for future optional parameters +} + +// BotConnectionClientDeleteOptions contains the optional parameters for the BotConnectionClient.Delete method. +type BotConnectionClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// BotConnectionClientGetOptions contains the optional parameters for the BotConnectionClient.Get method. +type BotConnectionClientGetOptions struct { + // placeholder for future optional parameters +} + +// BotConnectionClientListByBotServiceOptions contains the optional parameters for the BotConnectionClient.NewListByBotServicePager +// method. +type BotConnectionClientListByBotServiceOptions struct { + // placeholder for future optional parameters +} + +// BotConnectionClientListServiceProvidersOptions contains the optional parameters for the BotConnectionClient.ListServiceProviders +// method. +type BotConnectionClientListServiceProvidersOptions struct { + // placeholder for future optional parameters +} + +// BotConnectionClientListWithSecretsOptions contains the optional parameters for the BotConnectionClient.ListWithSecrets +// method. +type BotConnectionClientListWithSecretsOptions struct { + // placeholder for future optional parameters +} + +// BotConnectionClientUpdateOptions contains the optional parameters for the BotConnectionClient.Update method. +type BotConnectionClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// BotsClientCreateOptions contains the optional parameters for the BotsClient.Create method. +type BotsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// BotsClientDeleteOptions contains the optional parameters for the BotsClient.Delete method. +type BotsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// BotsClientGetCheckNameAvailabilityOptions contains the optional parameters for the BotsClient.GetCheckNameAvailability +// method. +type BotsClientGetCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// BotsClientGetOptions contains the optional parameters for the BotsClient.Get method. +type BotsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BotsClientListByResourceGroupOptions contains the optional parameters for the BotsClient.NewListByResourceGroupPager method. +type BotsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// BotsClientListOptions contains the optional parameters for the BotsClient.NewListPager method. +type BotsClientListOptions struct { + // placeholder for future optional parameters +} + +// BotsClientUpdateOptions contains the optional parameters for the BotsClient.Update method. +type BotsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ChannelsClientCreateOptions contains the optional parameters for the ChannelsClient.Create method. +type ChannelsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// ChannelsClientDeleteOptions contains the optional parameters for the ChannelsClient.Delete method. +type ChannelsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ChannelsClientGetOptions contains the optional parameters for the ChannelsClient.Get method. +type ChannelsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ChannelsClientListByResourceGroupOptions contains the optional parameters for the ChannelsClient.NewListByResourceGroupPager +// method. +type ChannelsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ChannelsClientListWithKeysOptions contains the optional parameters for the ChannelsClient.ListWithKeys method. +type ChannelsClientListWithKeysOptions struct { + // placeholder for future optional parameters +} + +// ChannelsClientUpdateOptions contains the optional parameters for the ChannelsClient.Update method. +type ChannelsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// DirectLineClientRegenerateKeysOptions contains the optional parameters for the DirectLineClient.RegenerateKeys method. +type DirectLineClientRegenerateKeysOptions struct { + // placeholder for future optional parameters +} + +// EmailClientCreateSignInURLOptions contains the optional parameters for the EmailClient.CreateSignInURL method. +type EmailClientCreateSignInURLOptions struct { + // placeholder for future optional parameters +} + +// HostSettingsClientGetOptions contains the optional parameters for the HostSettingsClient.Get method. +type HostSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// OperationResultsClientBeginGetOptions contains the optional parameters for the OperationResultsClient.BeginGet method. +type OperationResultsClientBeginGetOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Create +// method. +type PrivateEndpointConnectionsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete +// method. +type PrivateEndpointConnectionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +type PrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager +// method. +type PrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListByBotResourceOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByBotResource +// method. +type PrivateLinkResourcesClientListByBotResourceOptions struct { + // placeholder for future optional parameters +} + +// QnAMakerEndpointKeysClientGetOptions contains the optional parameters for the QnAMakerEndpointKeysClient.Get method. +type QnAMakerEndpointKeysClientGetOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/polymorphic_helpers.go index 48835e72..6a816aaf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/polymorphic_helpers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/polymorphic_helpers.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -62,5 +61,8 @@ func unmarshalChannelClassification(rawMsg json.RawMessage) (ChannelClassificati default: b = &Channel{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/privateendpointconnections_client.go index 5cf42b96..c56cb9f6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/privateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/privateendpointconnections_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -33,7 +32,7 @@ type PrivateEndpointConnectionsClient struct { // - 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+".PrivateEndpointConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // - options - PrivateEndpointConnectionsClientCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Create // method. func (client *PrivateEndpointConnectionsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientCreateOptions) (PrivateEndpointConnectionsClientCreateResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.Create" + 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, resourceName, privateEndpointConnectionName, properties, options) if err != nil { return PrivateEndpointConnectionsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -96,7 +102,10 @@ func (client *PrivateEndpointConnectionsClient) createCreateRequest(ctx context. reqQP.Set("api-version", "2022-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -118,16 +127,22 @@ func (client *PrivateEndpointConnectionsClient) createHandleResponse(resp *http. // - options - PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete // method. func (client *PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientDeleteOptions) (PrivateEndpointConnectionsClientDeleteResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.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, resourceName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return PrivateEndpointConnectionsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientDeleteResponse{}, err } return PrivateEndpointConnectionsClientDeleteResponse{}, nil } @@ -172,18 +187,25 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get // method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, resourceName 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, resourceName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -238,6 +260,7 @@ func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName s return false }, Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsClientListResponse) (PrivateEndpointConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointConnectionsClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return PrivateEndpointConnectionsClientListResponse{}, err @@ -251,6 +274,7 @@ func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName s } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/privatelinkresources_client.go index c8bf6018..445c18c1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/privatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/privatelinkresources_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -33,7 +32,7 @@ type PrivateLinkResourcesClient struct { // - 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+".PrivateLinkResourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // - options - PrivateLinkResourcesClientListByBotResourceOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByBotResource // method. func (client *PrivateLinkResourcesClient) ListByBotResource(ctx context.Context, resourceGroupName string, resourceName string, options *PrivateLinkResourcesClientListByBotResourceOptions) (PrivateLinkResourcesClientListByBotResourceResponse, error) { + var err error + const operationName = "PrivateLinkResourcesClient.ListByBotResource" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByBotResourceCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return PrivateLinkResourcesClientListByBotResourceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientListByBotResourceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientListByBotResourceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientListByBotResourceResponse{}, err } - return client.listByBotResourceHandleResponse(resp) + resp, err := client.listByBotResourceHandleResponse(httpResp) + return resp, err } // listByBotResourceCreateRequest creates the ListByBotResource request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/qnamakerendpointkeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/qnamakerendpointkeys_client.go index 14b2d3ad..aabf21bb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/qnamakerendpointkeys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/qnamakerendpointkeys_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -33,7 +32,7 @@ type QnAMakerEndpointKeysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewQnAMakerEndpointKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QnAMakerEndpointKeysClient, error) { - cl, err := arm.NewClient(moduleName+".QnAMakerEndpointKeysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -52,18 +51,25 @@ func NewQnAMakerEndpointKeysClient(subscriptionID string, credential azcore.Toke // - options - QnAMakerEndpointKeysClientGetOptions contains the optional parameters for the QnAMakerEndpointKeysClient.Get // method. func (client *QnAMakerEndpointKeysClient) Get(ctx context.Context, parameters QnAMakerEndpointKeysRequestBody, options *QnAMakerEndpointKeysClientGetOptions) (QnAMakerEndpointKeysClientGetResponse, error) { + var err error + const operationName = "QnAMakerEndpointKeysClient.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, parameters, options) if err != nil { return QnAMakerEndpointKeysClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QnAMakerEndpointKeysClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return QnAMakerEndpointKeysClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return QnAMakerEndpointKeysClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -81,7 +87,10 @@ func (client *QnAMakerEndpointKeysClient) getCreateRequest(ctx context.Context, reqQP.Set("api-version", "2022-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // getHandleResponse handles the Get response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/response_types.go index d854a074..12d61186 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/response_types.go @@ -3,14 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice // BotConnectionClientCreateResponse contains the response from method BotConnectionClient.Create. type BotConnectionClientCreateResponse struct { + // Bot channel resource definition ConnectionSetting } @@ -21,31 +21,37 @@ type BotConnectionClientDeleteResponse struct { // BotConnectionClientGetResponse contains the response from method BotConnectionClient.Get. type BotConnectionClientGetResponse struct { + // Bot channel resource definition ConnectionSetting } // BotConnectionClientListByBotServiceResponse contains the response from method BotConnectionClient.NewListByBotServicePager. type BotConnectionClientListByBotServiceResponse struct { + // The list of bot service connection settings response. ConnectionSettingResponseList } // BotConnectionClientListServiceProvidersResponse contains the response from method BotConnectionClient.ListServiceProviders. type BotConnectionClientListServiceProvidersResponse struct { + // The list of bot service providers response. ServiceProviderResponseList } // BotConnectionClientListWithSecretsResponse contains the response from method BotConnectionClient.ListWithSecrets. type BotConnectionClientListWithSecretsResponse struct { + // Bot channel resource definition ConnectionSetting } // BotConnectionClientUpdateResponse contains the response from method BotConnectionClient.Update. type BotConnectionClientUpdateResponse struct { + // Bot channel resource definition ConnectionSetting } // BotsClientCreateResponse contains the response from method BotsClient.Create. type BotsClientCreateResponse struct { + // Bot resource definition Bot } @@ -56,31 +62,37 @@ type BotsClientDeleteResponse struct { // BotsClientGetCheckNameAvailabilityResponse contains the response from method BotsClient.GetCheckNameAvailability. type BotsClientGetCheckNameAvailabilityResponse struct { + // The response body returned for a request to Bot Service Management to check availability of a bot name. CheckNameAvailabilityResponseBody } // BotsClientGetResponse contains the response from method BotsClient.Get. type BotsClientGetResponse struct { + // Bot resource definition Bot } // BotsClientListByResourceGroupResponse contains the response from method BotsClient.NewListByResourceGroupPager. type BotsClientListByResourceGroupResponse struct { + // The list of bot service operation response. BotResponseList } // BotsClientListResponse contains the response from method BotsClient.NewListPager. type BotsClientListResponse struct { + // The list of bot service operation response. BotResponseList } // BotsClientUpdateResponse contains the response from method BotsClient.Update. type BotsClientUpdateResponse struct { + // Bot resource definition Bot } // ChannelsClientCreateResponse contains the response from method ChannelsClient.Create. type ChannelsClientCreateResponse struct { + // Bot channel resource definition BotChannel } @@ -91,51 +103,61 @@ type ChannelsClientDeleteResponse struct { // ChannelsClientGetResponse contains the response from method ChannelsClient.Get. type ChannelsClientGetResponse struct { + // Bot channel resource definition BotChannel } // ChannelsClientListByResourceGroupResponse contains the response from method ChannelsClient.NewListByResourceGroupPager. type ChannelsClientListByResourceGroupResponse struct { + // The list of bot service channel operation response. ChannelResponseList } // ChannelsClientListWithKeysResponse contains the response from method ChannelsClient.ListWithKeys. type ChannelsClientListWithKeysResponse struct { + // The ARM channel of list channel with keys operation response. ListChannelWithKeysResponse } // ChannelsClientUpdateResponse contains the response from method ChannelsClient.Update. type ChannelsClientUpdateResponse struct { + // Bot channel resource definition BotChannel } // DirectLineClientRegenerateKeysResponse contains the response from method DirectLineClient.RegenerateKeys. type DirectLineClientRegenerateKeysResponse struct { + // Bot channel resource definition BotChannel } // EmailClientCreateSignInURLResponse contains the response from method EmailClient.CreateSignInURL. type EmailClientCreateSignInURLResponse struct { + // The ARM create email sign in url operation response. CreateEmailSignInURLResponse } // HostSettingsClientGetResponse contains the response from method HostSettingsClient.Get. type HostSettingsClientGetResponse struct { + // The response body returned for a request to Bot Service Management to check per subscription hostSettings HostSettingsResponse } // OperationResultsClientGetResponse contains the response from method OperationResultsClient.BeginGet. type OperationResultsClientGetResponse struct { + // The properties indicating the operation result of an operation on a service. OperationResultsDescription } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // The list of bot service operation response. OperationEntityListResult } // PrivateEndpointConnectionsClientCreateResponse contains the response from method PrivateEndpointConnectionsClient.Create. type PrivateEndpointConnectionsClientCreateResponse struct { + // The Private Endpoint Connection resource. PrivateEndpointConnection } @@ -146,20 +168,24 @@ type PrivateEndpointConnectionsClientDeleteResponse struct { // PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. type PrivateEndpointConnectionsClientGetResponse struct { + // The Private Endpoint Connection resource. PrivateEndpointConnection } // PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager. type PrivateEndpointConnectionsClientListResponse struct { + // List of private endpoint connection associated with the specified storage account PrivateEndpointConnectionListResult } // PrivateLinkResourcesClientListByBotResourceResponse contains the response from method PrivateLinkResourcesClient.ListByBotResource. type PrivateLinkResourcesClientListByBotResourceResponse struct { + // A list of private link resources PrivateLinkResourceListResult } // QnAMakerEndpointKeysClientGetResponse contains the response from method QnAMakerEndpointKeysClient.Get. type QnAMakerEndpointKeysClientGetResponse struct { + // Schema for EndpointKeys generate/refresh operations. QnAMakerEndpointKeysResponse } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/time_rfc3339.go index 4e7d2d01..c1021201 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armbotservice @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } 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 a0697812..16efa805 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 86e50136..c0fdcbab 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 bd3916f2..173f3f8f 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 900c143a..a08ac854 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 7b3b514d..29b46f31 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 eda98b5e..c3644d91 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 8ec8b1b0..e3c1f3b2 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 790015c0..8d1078d9 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 e42f8185..9cf5b256 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 00000000..444cb837 --- /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 f3e3acb9..692a0bbf 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 c045f05c..50c4d053 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 00000000..6f3b137e --- /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 00000000..514e8b35 --- /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 fb576233..07bfa4f2 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 00000000..9a4be0a6 --- /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 813eec5f..2acc9553 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 820c1ced..ccebf9f8 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 91ad242e..8f2ab623 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 00000000..5387c0db --- /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 c20be400..48be898d 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 c76660eb..d309b9f6 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 8e4b9972..e26bedfd 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 2cb99f9c..0284f57a 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 00000000..add24233 --- /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 00000000..89a321d9 --- /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 00000000..b6e74785 --- /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 00000000..5655ab83 --- /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 78a95040..bc5b832c 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 bbfb2256..2f41b58b 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 8e31b6f3..9024c258 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 429bc67d..efc7a4db 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/costmanagement/armcostmanagement/v2/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/CHANGELOG.md index c2df8a43..14bd641b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 2.1.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + ## 2.0.0 (2023-05-26) ### Breaking Changes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/README.md index 3c4ee27b..87547a9f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewAlertsClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/alerts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/alerts_client.go index af5e860b..d06f91cd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/alerts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/alerts_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -31,7 +30,7 @@ type AlertsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAlertsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertsClient, error) { - cl, err := arm.NewClient(moduleName+".AlertsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,18 +58,25 @@ func NewAlertsClient(credential azcore.TokenCredential, options *arm.ClientOptio // - parameters - Parameters supplied to the Dismiss Alert operation. // - options - AlertsClientDismissOptions contains the optional parameters for the AlertsClient.Dismiss method. func (client *AlertsClient) Dismiss(ctx context.Context, scope string, alertID string, parameters DismissAlertPayload, options *AlertsClientDismissOptions) (AlertsClientDismissResponse, error) { + var err error + const operationName = "AlertsClient.Dismiss" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.dismissCreateRequest(ctx, scope, alertID, parameters, options) if err != nil { return AlertsClientDismissResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertsClientDismissResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertsClientDismissResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AlertsClientDismissResponse{}, err } - return client.dismissHandleResponse(resp) + resp, err := client.dismissHandleResponse(httpResp) + return resp, err } // dismissCreateRequest creates the Dismiss request. @@ -86,7 +92,10 @@ func (client *AlertsClient) dismissCreateRequest(ctx context.Context, scope stri reqQP.Set("api-version", "2022-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // dismissHandleResponse handles the Dismiss response. @@ -115,18 +124,25 @@ func (client *AlertsClient) dismissHandleResponse(resp *http.Response) (AlertsCl // - alertID - Alert ID // - options - AlertsClientGetOptions contains the optional parameters for the AlertsClient.Get method. func (client *AlertsClient) Get(ctx context.Context, scope string, alertID string, options *AlertsClientGetOptions) (AlertsClientGetResponse, error) { + var err error + const operationName = "AlertsClient.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, scope, alertID, options) if err != nil { return AlertsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AlertsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -170,18 +186,25 @@ func (client *AlertsClient) getHandleResponse(resp *http.Response) (AlertsClient // '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. // - options - AlertsClientListOptions contains the optional parameters for the AlertsClient.List method. func (client *AlertsClient) List(ctx context.Context, scope string, options *AlertsClientListOptions) (AlertsClientListResponse, error) { + var err error + const operationName = "AlertsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, scope, options) if err != nil { return AlertsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AlertsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -218,18 +241,25 @@ func (client *AlertsClient) listHandleResponse(resp *http.Response) (AlertsClien // consolidated account used with dimension/query operations. // - options - AlertsClientListExternalOptions contains the optional parameters for the AlertsClient.ListExternal method. func (client *AlertsClient) ListExternal(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, options *AlertsClientListExternalOptions) (AlertsClientListExternalResponse, error) { + var err error + const operationName = "AlertsClient.ListExternal" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listExternalCreateRequest(ctx, externalCloudProviderType, externalCloudProviderID, options) if err != nil { return AlertsClientListExternalResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertsClientListExternalResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertsClientListExternalResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AlertsClientListExternalResponse{}, err } - return client.listExternalHandleResponse(resp) + resp, err := client.listExternalHandleResponse(httpResp) + return resp, err } // listExternalCreateRequest creates the ListExternal request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/autorest.md index 3bebc0b2..4feb493f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/autorest.md @@ -8,6 +8,6 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/cost-management/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/cost-management/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.0.0 +module-version: 2.1.0 tag: package-2022-10 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/benefitrecommendations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/benefitrecommendations_client.go index 134c2043..2777c9e9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/benefitrecommendations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/benefitrecommendations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -29,7 +28,7 @@ type BenefitRecommendationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBenefitRecommendationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*BenefitRecommendationsClient, error) { - cl, err := arm.NewClient(moduleName+".BenefitRecommendationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,25 +55,20 @@ func (client *BenefitRecommendationsClient) NewListPager(billingScope string, op return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *BenefitRecommendationsClientListResponse) (BenefitRecommendationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, billingScope, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BenefitRecommendationsClient.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, billingScope, options) + }, nil) if err != nil { return BenefitRecommendationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BenefitRecommendationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BenefitRecommendationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/benefitutilizationsummaries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/benefitutilizationsummaries_client.go index 38a82e04..9c3f1fca 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/benefitutilizationsummaries_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/benefitutilizationsummaries_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -31,7 +30,7 @@ type BenefitUtilizationSummariesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBenefitUtilizationSummariesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*BenefitUtilizationSummariesClient, error) { - cl, err := arm.NewClient(moduleName+".BenefitUtilizationSummariesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,25 +53,20 @@ func (client *BenefitUtilizationSummariesClient) NewListByBillingAccountIDPager( return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *BenefitUtilizationSummariesClientListByBillingAccountIDResponse) (BenefitUtilizationSummariesClientListByBillingAccountIDResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByBillingAccountIDCreateRequest(ctx, billingAccountID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BenefitUtilizationSummariesClient.NewListByBillingAccountIDPager") + 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.listByBillingAccountIDCreateRequest(ctx, billingAccountID, options) + }, nil) if err != nil { return BenefitUtilizationSummariesClientListByBillingAccountIDResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BenefitUtilizationSummariesClientListByBillingAccountIDResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BenefitUtilizationSummariesClientListByBillingAccountIDResponse{}, runtime.NewResponseError(resp) - } return client.listByBillingAccountIDHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -123,25 +117,20 @@ func (client *BenefitUtilizationSummariesClient) NewListByBillingProfileIDPager( return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *BenefitUtilizationSummariesClientListByBillingProfileIDResponse) (BenefitUtilizationSummariesClientListByBillingProfileIDResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByBillingProfileIDCreateRequest(ctx, billingAccountID, billingProfileID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BenefitUtilizationSummariesClient.NewListByBillingProfileIDPager") + 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.listByBillingProfileIDCreateRequest(ctx, billingAccountID, billingProfileID, options) + }, nil) if err != nil { return BenefitUtilizationSummariesClientListByBillingProfileIDResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BenefitUtilizationSummariesClientListByBillingProfileIDResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BenefitUtilizationSummariesClientListByBillingProfileIDResponse{}, runtime.NewResponseError(resp) - } return client.listByBillingProfileIDHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -195,25 +184,20 @@ func (client *BenefitUtilizationSummariesClient) NewListBySavingsPlanIDPager(sav return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *BenefitUtilizationSummariesClientListBySavingsPlanIDResponse) (BenefitUtilizationSummariesClientListBySavingsPlanIDResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySavingsPlanIDCreateRequest(ctx, savingsPlanOrderID, savingsPlanID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BenefitUtilizationSummariesClient.NewListBySavingsPlanIDPager") + 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.listBySavingsPlanIDCreateRequest(ctx, savingsPlanOrderID, savingsPlanID, options) + }, nil) if err != nil { return BenefitUtilizationSummariesClientListBySavingsPlanIDResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BenefitUtilizationSummariesClientListBySavingsPlanIDResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BenefitUtilizationSummariesClientListBySavingsPlanIDResponse{}, runtime.NewResponseError(resp) - } return client.listBySavingsPlanIDHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -266,25 +250,20 @@ func (client *BenefitUtilizationSummariesClient) NewListBySavingsPlanOrderPager( return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *BenefitUtilizationSummariesClientListBySavingsPlanOrderResponse) (BenefitUtilizationSummariesClientListBySavingsPlanOrderResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySavingsPlanOrderCreateRequest(ctx, savingsPlanOrderID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BenefitUtilizationSummariesClient.NewListBySavingsPlanOrderPager") + 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.listBySavingsPlanOrderCreateRequest(ctx, savingsPlanOrderID, options) + }, nil) if err != nil { return BenefitUtilizationSummariesClientListBySavingsPlanOrderResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BenefitUtilizationSummariesClientListBySavingsPlanOrderResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BenefitUtilizationSummariesClientListBySavingsPlanOrderResponse{}, runtime.NewResponseError(resp) - } return client.listBySavingsPlanOrderHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/client_factory.go index f5fd008f..a4d60d2f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -26,7 +25,7 @@ type ClientFactory struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClientFactory(credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -36,82 +35,98 @@ func NewClientFactory(credential azcore.TokenCredential, options *arm.ClientOpti }, nil } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewViewsClient() *ViewsClient { - subClient, _ := NewViewsClient(c.credential, c.options) - return subClient -} - +// NewAlertsClient creates a new instance of AlertsClient. func (c *ClientFactory) NewAlertsClient() *AlertsClient { subClient, _ := NewAlertsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewForecastClient() *ForecastClient { - subClient, _ := NewForecastClient(c.credential, c.options) +// NewBenefitRecommendationsClient creates a new instance of BenefitRecommendationsClient. +func (c *ClientFactory) NewBenefitRecommendationsClient() *BenefitRecommendationsClient { + subClient, _ := NewBenefitRecommendationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewDimensionsClient() *DimensionsClient { - subClient, _ := NewDimensionsClient(c.credential, c.options) +// NewBenefitUtilizationSummariesClient creates a new instance of BenefitUtilizationSummariesClient. +func (c *ClientFactory) NewBenefitUtilizationSummariesClient() *BenefitUtilizationSummariesClient { + subClient, _ := NewBenefitUtilizationSummariesClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewQueryClient() *QueryClient { - subClient, _ := NewQueryClient(c.credential, c.options) +// NewDimensionsClient creates a new instance of DimensionsClient. +func (c *ClientFactory) NewDimensionsClient() *DimensionsClient { + subClient, _ := NewDimensionsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewGenerateReservationDetailsReportClient() *GenerateReservationDetailsReportClient { - subClient, _ := NewGenerateReservationDetailsReportClient(c.credential, c.options) +// NewExportsClient creates a new instance of ExportsClient. +func (c *ClientFactory) NewExportsClient() *ExportsClient { + subClient, _ := NewExportsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewExportsClient() *ExportsClient { - subClient, _ := NewExportsClient(c.credential, c.options) +// NewForecastClient creates a new instance of ForecastClient. +func (c *ClientFactory) NewForecastClient() *ForecastClient { + subClient, _ := NewForecastClient(c.credential, c.options) return subClient } +// NewGenerateCostDetailsReportClient creates a new instance of GenerateCostDetailsReportClient. func (c *ClientFactory) NewGenerateCostDetailsReportClient() *GenerateCostDetailsReportClient { subClient, _ := NewGenerateCostDetailsReportClient(c.credential, c.options) return subClient } +// NewGenerateDetailedCostReportClient creates a new instance of GenerateDetailedCostReportClient. func (c *ClientFactory) NewGenerateDetailedCostReportClient() *GenerateDetailedCostReportClient { subClient, _ := NewGenerateDetailedCostReportClient(c.credential, c.options) return subClient } +// NewGenerateDetailedCostReportOperationResultsClient creates a new instance of GenerateDetailedCostReportOperationResultsClient. func (c *ClientFactory) NewGenerateDetailedCostReportOperationResultsClient() *GenerateDetailedCostReportOperationResultsClient { subClient, _ := NewGenerateDetailedCostReportOperationResultsClient(c.credential, c.options) return subClient } +// NewGenerateDetailedCostReportOperationStatusClient creates a new instance of GenerateDetailedCostReportOperationStatusClient. func (c *ClientFactory) NewGenerateDetailedCostReportOperationStatusClient() *GenerateDetailedCostReportOperationStatusClient { subClient, _ := NewGenerateDetailedCostReportOperationStatusClient(c.credential, c.options) return subClient } +// NewGenerateReservationDetailsReportClient creates a new instance of GenerateReservationDetailsReportClient. +func (c *ClientFactory) NewGenerateReservationDetailsReportClient() *GenerateReservationDetailsReportClient { + subClient, _ := NewGenerateReservationDetailsReportClient(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 +} + +// NewPriceSheetClient creates a new instance of PriceSheetClient. func (c *ClientFactory) NewPriceSheetClient() *PriceSheetClient { subClient, _ := NewPriceSheetClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewScheduledActionsClient() *ScheduledActionsClient { - subClient, _ := NewScheduledActionsClient(c.credential, c.options) +// NewQueryClient creates a new instance of QueryClient. +func (c *ClientFactory) NewQueryClient() *QueryClient { + subClient, _ := NewQueryClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewBenefitRecommendationsClient() *BenefitRecommendationsClient { - subClient, _ := NewBenefitRecommendationsClient(c.credential, c.options) +// NewScheduledActionsClient creates a new instance of ScheduledActionsClient. +func (c *ClientFactory) NewScheduledActionsClient() *ScheduledActionsClient { + subClient, _ := NewScheduledActionsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewBenefitUtilizationSummariesClient() *BenefitUtilizationSummariesClient { - subClient, _ := NewBenefitUtilizationSummariesClient(c.credential, c.options) +// NewViewsClient creates a new instance of ViewsClient. +func (c *ClientFactory) NewViewsClient() *ViewsClient { + subClient, _ := NewViewsClient(c.credential, c.options) return subClient } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/constants.go index 7321602a..04c9be36 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement const ( - moduleName = "armcostmanagement" - moduleVersion = "v2.0.0" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement" + moduleVersion = "v2.1.0" ) // AccumulatedType - Show costs accumulated over time. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/dimensions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/dimensions_client.go index f23b4810..f2c2c622 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/dimensions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/dimensions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -32,7 +31,7 @@ type DimensionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDimensionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*DimensionsClient, error) { - cl, err := arm.NewClient(moduleName+".DimensionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,6 +56,7 @@ func (client *DimensionsClient) NewByExternalCloudProviderTypePager(externalClou return false }, Fetcher: func(ctx context.Context, page *DimensionsClientByExternalCloudProviderTypeResponse) (DimensionsClientByExternalCloudProviderTypeResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DimensionsClient.NewByExternalCloudProviderTypePager") req, err := client.byExternalCloudProviderTypeCreateRequest(ctx, externalCloudProviderType, externalCloudProviderID, options) if err != nil { return DimensionsClientByExternalCloudProviderTypeResponse{}, err @@ -70,6 +70,7 @@ func (client *DimensionsClient) NewByExternalCloudProviderTypePager(externalClou } return client.byExternalCloudProviderTypeHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -136,6 +137,7 @@ func (client *DimensionsClient) NewListPager(scope string, options *DimensionsCl return false }, Fetcher: func(ctx context.Context, page *DimensionsClientListResponse) (DimensionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DimensionsClient.NewListPager") req, err := client.listCreateRequest(ctx, scope, options) if err != nil { return DimensionsClientListResponse{}, err @@ -149,6 +151,7 @@ func (client *DimensionsClient) NewListPager(scope string, options *DimensionsCl } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/exports_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/exports_client.go index e38930a7..f62913de 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/exports_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/exports_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -31,7 +30,7 @@ type ExportsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExportsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ExportsClient, error) { - cl, err := arm.NewClient(moduleName+".ExportsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,18 +60,25 @@ func NewExportsClient(credential azcore.TokenCredential, options *arm.ClientOpti // - parameters - Parameters supplied to the CreateOrUpdate Export operation. // - options - ExportsClientCreateOrUpdateOptions contains the optional parameters for the ExportsClient.CreateOrUpdate method. func (client *ExportsClient) CreateOrUpdate(ctx context.Context, scope string, exportName string, parameters Export, options *ExportsClientCreateOrUpdateOptions) (ExportsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ExportsClient.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, scope, exportName, parameters, options) if err != nil { return ExportsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExportsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ExportsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ExportsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -91,7 +97,10 @@ func (client *ExportsClient) createOrUpdateCreateRequest(ctx context.Context, sc reqQP.Set("api-version", "2022-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -120,16 +129,22 @@ func (client *ExportsClient) createOrUpdateHandleResponse(resp *http.Response) ( // - exportName - Export Name. // - options - ExportsClientDeleteOptions contains the optional parameters for the ExportsClient.Delete method. func (client *ExportsClient) Delete(ctx context.Context, scope string, exportName string, options *ExportsClientDeleteOptions) (ExportsClientDeleteResponse, error) { + var err error + const operationName = "ExportsClient.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, scope, exportName, options) if err != nil { return ExportsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExportsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExportsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExportsClientDeleteResponse{}, err } return ExportsClientDeleteResponse{}, nil } @@ -170,16 +185,22 @@ func (client *ExportsClient) deleteCreateRequest(ctx context.Context, scope stri // - exportName - Export Name. // - options - ExportsClientExecuteOptions contains the optional parameters for the ExportsClient.Execute method. func (client *ExportsClient) Execute(ctx context.Context, scope string, exportName string, options *ExportsClientExecuteOptions) (ExportsClientExecuteResponse, error) { + var err error + const operationName = "ExportsClient.Execute" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.executeCreateRequest(ctx, scope, exportName, options) if err != nil { return ExportsClientExecuteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExportsClientExecuteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExportsClientExecuteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExportsClientExecuteResponse{}, err } return ExportsClientExecuteResponse{}, nil } @@ -220,18 +241,25 @@ func (client *ExportsClient) executeCreateRequest(ctx context.Context, scope str // - exportName - Export Name. // - options - ExportsClientGetOptions contains the optional parameters for the ExportsClient.Get method. func (client *ExportsClient) Get(ctx context.Context, scope string, exportName string, options *ExportsClientGetOptions) (ExportsClientGetResponse, error) { + var err error + const operationName = "ExportsClient.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, scope, exportName, options) if err != nil { return ExportsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExportsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExportsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExportsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -283,18 +311,25 @@ func (client *ExportsClient) getHandleResponse(resp *http.Response) (ExportsClie // - options - ExportsClientGetExecutionHistoryOptions contains the optional parameters for the ExportsClient.GetExecutionHistory // method. func (client *ExportsClient) GetExecutionHistory(ctx context.Context, scope string, exportName string, options *ExportsClientGetExecutionHistoryOptions) (ExportsClientGetExecutionHistoryResponse, error) { + var err error + const operationName = "ExportsClient.GetExecutionHistory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getExecutionHistoryCreateRequest(ctx, scope, exportName, options) if err != nil { return ExportsClientGetExecutionHistoryResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExportsClientGetExecutionHistoryResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExportsClientGetExecutionHistoryResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExportsClientGetExecutionHistoryResponse{}, err } - return client.getExecutionHistoryHandleResponse(resp) + resp, err := client.getExecutionHistoryHandleResponse(httpResp) + return resp, err } // getExecutionHistoryCreateRequest creates the GetExecutionHistory request. @@ -341,18 +376,25 @@ func (client *ExportsClient) getExecutionHistoryHandleResponse(resp *http.Respon // '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. // - options - ExportsClientListOptions contains the optional parameters for the ExportsClient.List method. func (client *ExportsClient) List(ctx context.Context, scope string, options *ExportsClientListOptions) (ExportsClientListResponse, error) { + var err error + const operationName = "ExportsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, scope, options) if err != nil { return ExportsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExportsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExportsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExportsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/forecast_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/forecast_client.go index 91d73d2b..5ad60bd5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/forecast_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/forecast_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -31,7 +30,7 @@ type ForecastClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewForecastClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ForecastClient, error) { - cl, err := arm.NewClient(moduleName+".ForecastClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewForecastClient(credential azcore.TokenCredential, options *arm.ClientOpt // - options - ForecastClientExternalCloudProviderUsageOptions contains the optional parameters for the ForecastClient.ExternalCloudProviderUsage // method. func (client *ForecastClient) ExternalCloudProviderUsage(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, parameters ForecastDefinition, options *ForecastClientExternalCloudProviderUsageOptions) (ForecastClientExternalCloudProviderUsageResponse, error) { + var err error + const operationName = "ForecastClient.ExternalCloudProviderUsage" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.externalCloudProviderUsageCreateRequest(ctx, externalCloudProviderType, externalCloudProviderID, parameters, options) if err != nil { return ForecastClientExternalCloudProviderUsageResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ForecastClientExternalCloudProviderUsageResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ForecastClientExternalCloudProviderUsageResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ForecastClientExternalCloudProviderUsageResponse{}, err } - return client.externalCloudProviderUsageHandleResponse(resp) + resp, err := client.externalCloudProviderUsageHandleResponse(httpResp) + return resp, err } // externalCloudProviderUsageCreateRequest creates the ExternalCloudProviderUsage request. @@ -89,7 +95,10 @@ func (client *ForecastClient) externalCloudProviderUsageCreateRequest(ctx contex reqQP.Set("api-version", "2022-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // externalCloudProviderUsageHandleResponse handles the ExternalCloudProviderUsage response. @@ -118,18 +127,25 @@ func (client *ForecastClient) externalCloudProviderUsageHandleResponse(resp *htt // - parameters - Parameters supplied to the CreateOrUpdate Forecast Config operation. // - options - ForecastClientUsageOptions contains the optional parameters for the ForecastClient.Usage method. func (client *ForecastClient) Usage(ctx context.Context, scope string, parameters ForecastDefinition, options *ForecastClientUsageOptions) (ForecastClientUsageResponse, error) { + var err error + const operationName = "ForecastClient.Usage" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.usageCreateRequest(ctx, scope, parameters, options) if err != nil { return ForecastClientUsageResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ForecastClientUsageResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ForecastClientUsageResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ForecastClientUsageResponse{}, err } - return client.usageHandleResponse(resp) + resp, err := client.usageHandleResponse(httpResp) + return resp, err } // usageCreateRequest creates the Usage request. @@ -147,7 +163,10 @@ func (client *ForecastClient) usageCreateRequest(ctx context.Context, scope stri reqQP.Set("api-version", "2022-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // usageHandleResponse handles the Usage response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatecostdetailsreport_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatecostdetailsreport_client.go index 5e79fec9..6a7ec78a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatecostdetailsreport_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatecostdetailsreport_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -31,7 +30,7 @@ type GenerateCostDetailsReportClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGenerateCostDetailsReportClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GenerateCostDetailsReportClient, error) { - cl, err := arm.NewClient(moduleName+".GenerateCostDetailsReportClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -66,11 +65,15 @@ func (client *GenerateCostDetailsReportClient) BeginCreateOperation(ctx context. if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GenerateCostDetailsReportClientCreateOperationResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GenerateCostDetailsReportClientCreateOperationResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GenerateCostDetailsReportClientCreateOperationResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GenerateCostDetailsReportClientCreateOperationResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -89,18 +92,24 @@ func (client *GenerateCostDetailsReportClient) BeginCreateOperation(ctx context. // // Generated from API version 2022-10-01 func (client *GenerateCostDetailsReportClient) createOperation(ctx context.Context, scope string, parameters GenerateCostDetailsReportRequestDefinition, options *GenerateCostDetailsReportClientBeginCreateOperationOptions) (*http.Response, error) { + var err error + const operationName = "GenerateCostDetailsReportClient.BeginCreateOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOperationCreateRequest(ctx, scope, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOperationCreateRequest creates the CreateOperation request. @@ -115,7 +124,10 @@ func (client *GenerateCostDetailsReportClient) createOperationCreateRequest(ctx reqQP.Set("api-version", "2022-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginGetOperationResults - Get the result of the specified operation. This link is provided in the CostDetails creation @@ -134,11 +146,15 @@ func (client *GenerateCostDetailsReportClient) BeginGetOperationResults(ctx cont if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GenerateCostDetailsReportClientGetOperationResultsResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GenerateCostDetailsReportClientGetOperationResultsResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GenerateCostDetailsReportClientGetOperationResultsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GenerateCostDetailsReportClientGetOperationResultsResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -148,18 +164,24 @@ func (client *GenerateCostDetailsReportClient) BeginGetOperationResults(ctx cont // // Generated from API version 2022-10-01 func (client *GenerateCostDetailsReportClient) getOperationResults(ctx context.Context, scope string, operationID string, options *GenerateCostDetailsReportClientBeginGetOperationResultsOptions) (*http.Response, error) { + var err error + const operationName = "GenerateCostDetailsReportClient.BeginGetOperationResults" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getOperationResultsCreateRequest(ctx, scope, operationID, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // getOperationResultsCreateRequest creates the GetOperationResults request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatedetailedcostreport_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatedetailedcostreport_client.go index 4b7a9891..2e998f29 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatedetailedcostreport_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatedetailedcostreport_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -29,7 +28,7 @@ type GenerateDetailedCostReportClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGenerateDetailedCostReportClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GenerateDetailedCostReportClient, error) { - cl, err := arm.NewClient(moduleName+".GenerateDetailedCostReportClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,11 +57,15 @@ func (client *GenerateDetailedCostReportClient) BeginCreateOperation(ctx context if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GenerateDetailedCostReportClientCreateOperationResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GenerateDetailedCostReportClientCreateOperationResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GenerateDetailedCostReportClientCreateOperationResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GenerateDetailedCostReportClientCreateOperationResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -75,18 +78,24 @@ func (client *GenerateDetailedCostReportClient) BeginCreateOperation(ctx context // // Generated from API version 2022-10-01 func (client *GenerateDetailedCostReportClient) createOperation(ctx context.Context, scope string, parameters GenerateDetailedCostReportDefinition, options *GenerateDetailedCostReportClientBeginCreateOperationOptions) (*http.Response, error) { + var err error + const operationName = "GenerateDetailedCostReportClient.BeginCreateOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOperationCreateRequest(ctx, scope, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOperationCreateRequest creates the CreateOperation request. @@ -101,5 +110,8 @@ func (client *GenerateDetailedCostReportClient) createOperationCreateRequest(ctx reqQP.Set("api-version", "2022-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + 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/costmanagement/armcostmanagement/v2/generatedetailedcostreportoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatedetailedcostreportoperationresults_client.go index 562e1c03..6c7891e6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatedetailedcostreportoperationresults_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatedetailedcostreportoperationresults_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -31,7 +30,7 @@ type GenerateDetailedCostReportOperationResultsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGenerateDetailedCostReportOperationResultsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GenerateDetailedCostReportOperationResultsClient, error) { - cl, err := arm.NewClient(moduleName+".GenerateDetailedCostReportOperationResultsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,9 +56,14 @@ func (client *GenerateDetailedCostReportOperationResultsClient) BeginGet(ctx con if err != nil { return nil, err } - return runtime.NewPoller[GenerateDetailedCostReportOperationResultsClientGetResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GenerateDetailedCostReportOperationResultsClientGetResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GenerateDetailedCostReportOperationResultsClientGetResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GenerateDetailedCostReportOperationResultsClientGetResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -69,18 +73,24 @@ func (client *GenerateDetailedCostReportOperationResultsClient) BeginGet(ctx con // // Generated from API version 2022-10-01 func (client *GenerateDetailedCostReportOperationResultsClient) get(ctx context.Context, operationID string, scope string, options *GenerateDetailedCostReportOperationResultsClientBeginGetOptions) (*http.Response, error) { + var err error + const operationName = "GenerateDetailedCostReportOperationResultsClient.BeginGet" + 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, operationID, scope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatedetailedcostreportoperationstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatedetailedcostreportoperationstatus_client.go index aea14591..872a972c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatedetailedcostreportoperationstatus_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatedetailedcostreportoperationstatus_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -31,7 +30,7 @@ type GenerateDetailedCostReportOperationStatusClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGenerateDetailedCostReportOperationStatusClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GenerateDetailedCostReportOperationStatusClient, error) { - cl, err := arm.NewClient(moduleName+".GenerateDetailedCostReportOperationStatusClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -52,18 +51,25 @@ func NewGenerateDetailedCostReportOperationStatusClient(credential azcore.TokenC // - options - GenerateDetailedCostReportOperationStatusClientGetOptions contains the optional parameters for the GenerateDetailedCostReportOperationStatusClient.Get // method. func (client *GenerateDetailedCostReportOperationStatusClient) Get(ctx context.Context, operationID string, scope string, options *GenerateDetailedCostReportOperationStatusClientGetOptions) (GenerateDetailedCostReportOperationStatusClientGetResponse, error) { + var err error + const operationName = "GenerateDetailedCostReportOperationStatusClient.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, operationID, scope, options) if err != nil { return GenerateDetailedCostReportOperationStatusClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GenerateDetailedCostReportOperationStatusClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GenerateDetailedCostReportOperationStatusClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GenerateDetailedCostReportOperationStatusClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatereservationdetailsreport_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatereservationdetailsreport_client.go index b61a4091..e1f7194b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatereservationdetailsreport_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/generatereservationdetailsreport_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -31,7 +30,7 @@ type GenerateReservationDetailsReportClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGenerateReservationDetailsReportClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GenerateReservationDetailsReportClient, error) { - cl, err := arm.NewClient(moduleName+".GenerateReservationDetailsReportClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,11 +57,15 @@ func (client *GenerateReservationDetailsReportClient) BeginByBillingAccountID(ct if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GenerateReservationDetailsReportClientByBillingAccountIDResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GenerateReservationDetailsReportClientByBillingAccountIDResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GenerateReservationDetailsReportClientByBillingAccountIDResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GenerateReservationDetailsReportClientByBillingAccountIDResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +76,24 @@ func (client *GenerateReservationDetailsReportClient) BeginByBillingAccountID(ct // // Generated from API version 2022-10-01 func (client *GenerateReservationDetailsReportClient) byBillingAccountID(ctx context.Context, billingAccountID string, startDate string, endDate string, options *GenerateReservationDetailsReportClientBeginByBillingAccountIDOptions) (*http.Response, error) { + var err error + const operationName = "GenerateReservationDetailsReportClient.BeginByBillingAccountID" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.byBillingAccountIDCreateRequest(ctx, billingAccountID, startDate, endDate, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // byBillingAccountIDCreateRequest creates the ByBillingAccountID request. @@ -125,11 +134,15 @@ func (client *GenerateReservationDetailsReportClient) BeginByBillingProfileID(ct if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GenerateReservationDetailsReportClientByBillingProfileIDResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GenerateReservationDetailsReportClientByBillingProfileIDResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GenerateReservationDetailsReportClientByBillingProfileIDResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GenerateReservationDetailsReportClientByBillingProfileIDResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -140,18 +153,24 @@ func (client *GenerateReservationDetailsReportClient) BeginByBillingProfileID(ct // // Generated from API version 2022-10-01 func (client *GenerateReservationDetailsReportClient) byBillingProfileID(ctx context.Context, billingAccountID string, billingProfileID string, startDate string, endDate string, options *GenerateReservationDetailsReportClientBeginByBillingProfileIDOptions) (*http.Response, error) { + var err error + const operationName = "GenerateReservationDetailsReportClient.BeginByBillingProfileID" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.byBillingProfileIDCreateRequest(ctx, billingAccountID, billingProfileID, startDate, endDate, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // byBillingProfileIDCreateRequest creates the ByBillingProfileID request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/interfaces.go new file mode 100644 index 00000000..e4a993d5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/interfaces.go @@ -0,0 +1,27 @@ +//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 armcostmanagement + +// BenefitRecommendationPropertiesClassification provides polymorphic access to related types. +// Call the interface's GetBenefitRecommendationProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *BenefitRecommendationProperties, *SharedScopeBenefitRecommendationProperties, *SingleScopeBenefitRecommendationProperties +type BenefitRecommendationPropertiesClassification interface { + // GetBenefitRecommendationProperties returns the BenefitRecommendationProperties content of the underlying type. + GetBenefitRecommendationProperties() *BenefitRecommendationProperties +} + +// BenefitUtilizationSummaryClassification provides polymorphic access to related types. +// Call the interface's GetBenefitUtilizationSummary() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *BenefitUtilizationSummary, *IncludedQuantityUtilizationSummary, *SavingsPlanUtilizationSummary +type BenefitUtilizationSummaryClassification interface { + // GetBenefitUtilizationSummary returns the BenefitUtilizationSummary content of the underlying type. + GetBenefitUtilizationSummary() *BenefitUtilizationSummary +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/models.go index 56511a7e..6e45b683 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -147,26 +146,6 @@ type AlertPropertiesDetails struct { Unit *string } -// AlertsClientDismissOptions contains the optional parameters for the AlertsClient.Dismiss method. -type AlertsClientDismissOptions struct { - // placeholder for future optional parameters -} - -// AlertsClientGetOptions contains the optional parameters for the AlertsClient.Get method. -type AlertsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AlertsClientListExternalOptions contains the optional parameters for the AlertsClient.ListExternal method. -type AlertsClientListExternalOptions struct { - // placeholder for future optional parameters -} - -// AlertsClientListOptions contains the optional parameters for the AlertsClient.List method. -type AlertsClientListOptions struct { - // placeholder for future optional parameters -} - // AlertsResult - Result of alerts. type AlertsResult struct { // READ-ONLY; URL to get the next set of alerts results if there are any. @@ -236,15 +215,6 @@ type BenefitRecommendationModel struct { Type *string } -// BenefitRecommendationPropertiesClassification provides polymorphic access to related types. -// Call the interface's GetBenefitRecommendationProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *BenefitRecommendationProperties, *SharedScopeBenefitRecommendationProperties, *SingleScopeBenefitRecommendationProperties -type BenefitRecommendationPropertiesClassification interface { - // GetBenefitRecommendationProperties returns the BenefitRecommendationProperties content of the underlying type. - GetBenefitRecommendationProperties() *BenefitRecommendationProperties -} - // BenefitRecommendationProperties - The properties of the benefit recommendations. type BenefitRecommendationProperties struct { // REQUIRED; Benefit scope. For example, Single or Shared. @@ -292,21 +262,6 @@ func (b *BenefitRecommendationProperties) GetBenefitRecommendationProperties() * return b } -// BenefitRecommendationsClientListOptions contains the optional parameters for the BenefitRecommendationsClient.NewListPager -// method. -type BenefitRecommendationsClientListOptions struct { - // May be used to expand the properties by: properties/usage, properties/allRecommendationDetails - Expand *string - // Can be used to filter benefitRecommendations by: properties/scope with allowed values ['Single', 'Shared'] and default - // value 'Shared'; and properties/lookBackPeriod with allowed values ['Last7Days', - // 'Last30Days', 'Last60Days'] and default value 'Last60Days'; properties/term with allowed values ['P1Y', 'P3Y'] and default - // value 'P3Y'; properties/subscriptionId; properties/resourceGroup - Filter *string - // May be used to order the recommendations by: properties/armSkuName. For the savings plan, the results are in order by default. - // There is no need to use this clause. - Orderby *string -} - // BenefitRecommendationsListResult - Result of listing benefit recommendations. type BenefitRecommendationsListResult struct { // READ-ONLY; The link (URL) to the next page of results. @@ -316,42 +271,6 @@ type BenefitRecommendationsListResult struct { Value []*BenefitRecommendationModel } -// BenefitUtilizationSummariesClientListByBillingAccountIDOptions contains the optional parameters for the BenefitUtilizationSummariesClient.NewListByBillingAccountIDPager -// method. -type BenefitUtilizationSummariesClientListByBillingAccountIDOptions struct { - // Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate. - Filter *string - // Grain. - GrainParameter *GrainParameter -} - -// BenefitUtilizationSummariesClientListByBillingProfileIDOptions contains the optional parameters for the BenefitUtilizationSummariesClient.NewListByBillingProfileIDPager -// method. -type BenefitUtilizationSummariesClientListByBillingProfileIDOptions struct { - // Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate. - Filter *string - // Grain. - GrainParameter *GrainParameter -} - -// BenefitUtilizationSummariesClientListBySavingsPlanIDOptions contains the optional parameters for the BenefitUtilizationSummariesClient.NewListBySavingsPlanIDPager -// method. -type BenefitUtilizationSummariesClientListBySavingsPlanIDOptions struct { - // Supports filtering by properties/usageDate. - Filter *string - // Grain. - GrainParameter *GrainParameter -} - -// BenefitUtilizationSummariesClientListBySavingsPlanOrderOptions contains the optional parameters for the BenefitUtilizationSummariesClient.NewListBySavingsPlanOrderPager -// method. -type BenefitUtilizationSummariesClientListBySavingsPlanOrderOptions struct { - // Supports filtering by properties/usageDate. - Filter *string - // Grain. - GrainParameter *GrainParameter -} - // BenefitUtilizationSummariesListResult - List of benefit utilization summaries. type BenefitUtilizationSummariesListResult struct { // READ-ONLY; The link (URL) to the next page of results. @@ -361,15 +280,6 @@ type BenefitUtilizationSummariesListResult struct { Value []BenefitUtilizationSummaryClassification } -// BenefitUtilizationSummaryClassification provides polymorphic access to related types. -// Call the interface's GetBenefitUtilizationSummary() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *BenefitUtilizationSummary, *IncludedQuantityUtilizationSummary, *SavingsPlanUtilizationSummary -type BenefitUtilizationSummaryClassification interface { - // GetBenefitUtilizationSummary returns the BenefitUtilizationSummary content of the underlying type. - GetBenefitUtilizationSummary() *BenefitUtilizationSummary -} - // BenefitUtilizationSummary - Benefit utilization summary resource. type BenefitUtilizationSummary struct { // REQUIRED; Supported values: 'SavingsPlan'. @@ -534,37 +444,6 @@ type DimensionProperties struct { UsageStart *time.Time } -// DimensionsClientByExternalCloudProviderTypeOptions contains the optional parameters for the DimensionsClient.NewByExternalCloudProviderTypePager -// method. -type DimensionsClientByExternalCloudProviderTypeOptions struct { - // May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions. - Expand *string - // May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators - // are 'eq','lt', 'gt', 'le', 'ge'. - Filter *string - // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skiptoken parameter that - // specifies a starting point to use for subsequent calls. - Skiptoken *string - // May be used to limit the number of results to the most recent N dimension data. - Top *int32 -} - -// DimensionsClientListOptions contains the optional parameters for the DimensionsClient.NewListPager method. -type DimensionsClientListOptions struct { - // May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions. - Expand *string - // May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators - // are 'eq','lt', 'gt', 'le', 'ge'. - Filter *string - // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skiptoken parameter that - // specifies a starting point to use for subsequent calls. - Skiptoken *string - // May be used to limit the number of results to the most recent N dimension data. - Top *int32 -} - // DimensionsListResult - Result of listing dimensions. It contains a list of available dimensions. type DimensionsListResult struct { // READ-ONLY; The list of dimensions. @@ -812,40 +691,6 @@ type ExportTimePeriod struct { To *time.Time } -// ExportsClientCreateOrUpdateOptions contains the optional parameters for the ExportsClient.CreateOrUpdate method. -type ExportsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ExportsClientDeleteOptions contains the optional parameters for the ExportsClient.Delete method. -type ExportsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ExportsClientExecuteOptions contains the optional parameters for the ExportsClient.Execute method. -type ExportsClientExecuteOptions struct { - // placeholder for future optional parameters -} - -// ExportsClientGetExecutionHistoryOptions contains the optional parameters for the ExportsClient.GetExecutionHistory method. -type ExportsClientGetExecutionHistoryOptions struct { - // placeholder for future optional parameters -} - -// ExportsClientGetOptions contains the optional parameters for the ExportsClient.Get method. -type ExportsClientGetOptions struct { - // May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information - // for the last 10 runs of the export. - Expand *string -} - -// ExportsClientListOptions contains the optional parameters for the ExportsClient.List method. -type ExportsClientListOptions struct { - // May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information - // for the last run of each export. - Expand *string -} - // FileDestination - Destination of the view data. This is optional. Currently only CSV format is supported. type FileDestination struct { // Destination of the view data. Currently only CSV format is supported. @@ -861,23 +706,6 @@ type ForecastAggregation struct { Name *FunctionName } -// ForecastClientExternalCloudProviderUsageOptions contains the optional parameters for the ForecastClient.ExternalCloudProviderUsage -// method. -type ForecastClientExternalCloudProviderUsageOptions struct { - // May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter - // supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently - // support 'ne', 'or', or 'not'. - Filter *string -} - -// ForecastClientUsageOptions contains the optional parameters for the ForecastClient.Usage method. -type ForecastClientUsageOptions struct { - // May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter - // supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently - // support 'ne', 'or', or 'not'. - Filter *string -} - // ForecastColumn - Forecast column properties type ForecastColumn struct { // The name of column. @@ -1007,20 +835,6 @@ type ForecastTimePeriod struct { To *time.Time } -// GenerateCostDetailsReportClientBeginCreateOperationOptions contains the optional parameters for the GenerateCostDetailsReportClient.BeginCreateOperation -// method. -type GenerateCostDetailsReportClientBeginCreateOperationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GenerateCostDetailsReportClientBeginGetOperationResultsOptions contains the optional parameters for the GenerateCostDetailsReportClient.BeginGetOperationResults -// method. -type GenerateCostDetailsReportClientBeginGetOperationResultsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // GenerateCostDetailsReportRequestDefinition - The definition of a cost detailed report. type GenerateCostDetailsReportRequestDefinition struct { // This parameter can be used only by Enterprise Agreement customers. Use the YearMonth(e.g. 202008) format. This parameter @@ -1046,13 +860,6 @@ type GenerateCostDetailsReportRequestDefinition struct { TimePeriod *CostDetailsTimePeriod } -// GenerateDetailedCostReportClientBeginCreateOperationOptions contains the optional parameters for the GenerateDetailedCostReportClient.BeginCreateOperation -// method. -type GenerateDetailedCostReportClientBeginCreateOperationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // GenerateDetailedCostReportDefinition - The definition of a cost detailed report. type GenerateDetailedCostReportDefinition struct { // Billing period in YearMonth(e.g. 202008) format. Only for legacy enterprise customers can use this. Can only have one of @@ -1090,19 +897,6 @@ type GenerateDetailedCostReportOperationResult struct { Type *string } -// GenerateDetailedCostReportOperationResultsClientBeginGetOptions contains the optional parameters for the GenerateDetailedCostReportOperationResultsClient.BeginGet -// method. -type GenerateDetailedCostReportOperationResultsClientBeginGetOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GenerateDetailedCostReportOperationStatusClientGetOptions contains the optional parameters for the GenerateDetailedCostReportOperationStatusClient.Get -// method. -type GenerateDetailedCostReportOperationStatusClientGetOptions struct { - // placeholder for future optional parameters -} - // GenerateDetailedCostReportOperationStatuses - The status of the long running operation for cost detailed report. type GenerateDetailedCostReportOperationStatuses struct { // The endTime of the operation. @@ -1139,20 +933,6 @@ type GenerateDetailedCostReportTimePeriod struct { Start *string } -// GenerateReservationDetailsReportClientBeginByBillingAccountIDOptions contains the optional parameters for the GenerateReservationDetailsReportClient.BeginByBillingAccountID -// method. -type GenerateReservationDetailsReportClientBeginByBillingAccountIDOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GenerateReservationDetailsReportClientBeginByBillingProfileIDOptions contains the optional parameters for the GenerateReservationDetailsReportClient.BeginByBillingProfileID -// method. -type GenerateReservationDetailsReportClientBeginByBillingProfileIDOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // IncludedQuantityUtilizationSummary - Included Quantity utilization summary resource. type IncludedQuantityUtilizationSummary struct { // REQUIRED; Supported values: 'SavingsPlan'. @@ -1174,8 +954,8 @@ type IncludedQuantityUtilizationSummary struct { // GetBenefitUtilizationSummary implements the BenefitUtilizationSummaryClassification interface for type IncludedQuantityUtilizationSummary. func (i *IncludedQuantityUtilizationSummary) GetBenefitUtilizationSummary() *BenefitUtilizationSummary { return &BenefitUtilizationSummary{ - Kind: i.Kind, ID: i.ID, + Kind: i.Kind, Name: i.Name, Type: i.Type, } @@ -1294,11 +1074,6 @@ type OperationStatus struct { Status *OperationStatusType } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // PivotProperties - Each pivot must contain a 'type' and 'name'. type PivotProperties struct { // Data field to show in view. @@ -1308,19 +1083,6 @@ type PivotProperties struct { Type *PivotType } -// PriceSheetClientBeginDownloadByBillingProfileOptions contains the optional parameters for the PriceSheetClient.BeginDownloadByBillingProfile -// method. -type PriceSheetClientBeginDownloadByBillingProfileOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PriceSheetClientBeginDownloadOptions contains the optional parameters for the PriceSheetClient.BeginDownload method. -type PriceSheetClientBeginDownloadOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // QueryAggregation - The aggregation expression to be used in the query. type QueryAggregation struct { // REQUIRED; The name of the aggregation function to use. @@ -1330,17 +1092,6 @@ type QueryAggregation struct { Name *string } -// QueryClientUsageByExternalCloudProviderTypeOptions contains the optional parameters for the QueryClient.UsageByExternalCloudProviderType -// method. -type QueryClientUsageByExternalCloudProviderTypeOptions struct { - // placeholder for future optional parameters -} - -// QueryClientUsageOptions contains the optional parameters for the QueryClient.Usage method. -type QueryClientUsageOptions struct { - // placeholder for future optional parameters -} - // QueryColumn properties type QueryColumn struct { // The name of column. @@ -1664,8 +1415,8 @@ type SavingsPlanUtilizationSummary struct { // GetBenefitUtilizationSummary implements the BenefitUtilizationSummaryClassification interface for type SavingsPlanUtilizationSummary. func (s *SavingsPlanUtilizationSummary) GetBenefitUtilizationSummary() *BenefitUtilizationSummary { return &BenefitUtilizationSummary{ - Kind: s.Kind, ID: s.ID, + Kind: s.Kind, Name: s.Name, Type: s.Type, } @@ -1816,78 +1567,6 @@ type ScheduledActionProperties struct { Scope *string } -// ScheduledActionsClientCheckNameAvailabilityByScopeOptions contains the optional parameters for the ScheduledActionsClient.CheckNameAvailabilityByScope -// method. -type ScheduledActionsClientCheckNameAvailabilityByScopeOptions struct { - // placeholder for future optional parameters -} - -// ScheduledActionsClientCheckNameAvailabilityOptions contains the optional parameters for the ScheduledActionsClient.CheckNameAvailability -// method. -type ScheduledActionsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ScheduledActionsClientCreateOrUpdateByScopeOptions contains the optional parameters for the ScheduledActionsClient.CreateOrUpdateByScope -// method. -type ScheduledActionsClientCreateOrUpdateByScopeOptions struct { - // ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve - // optimistic concurrency. - IfMatch *string -} - -// ScheduledActionsClientCreateOrUpdateOptions contains the optional parameters for the ScheduledActionsClient.CreateOrUpdate -// method. -type ScheduledActionsClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve - // optimistic concurrency. - IfMatch *string -} - -// ScheduledActionsClientDeleteByScopeOptions contains the optional parameters for the ScheduledActionsClient.DeleteByScope -// method. -type ScheduledActionsClientDeleteByScopeOptions struct { - // placeholder for future optional parameters -} - -// ScheduledActionsClientDeleteOptions contains the optional parameters for the ScheduledActionsClient.Delete method. -type ScheduledActionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ScheduledActionsClientGetByScopeOptions contains the optional parameters for the ScheduledActionsClient.GetByScope method. -type ScheduledActionsClientGetByScopeOptions struct { - // placeholder for future optional parameters -} - -// ScheduledActionsClientGetOptions contains the optional parameters for the ScheduledActionsClient.Get method. -type ScheduledActionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ScheduledActionsClientListByScopeOptions contains the optional parameters for the ScheduledActionsClient.NewListByScopePager -// method. -type ScheduledActionsClientListByScopeOptions struct { - // May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'. - Filter *string -} - -// ScheduledActionsClientListOptions contains the optional parameters for the ScheduledActionsClient.NewListPager method. -type ScheduledActionsClientListOptions struct { - // May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'. - Filter *string -} - -// ScheduledActionsClientRunByScopeOptions contains the optional parameters for the ScheduledActionsClient.RunByScope method. -type ScheduledActionsClientRunByScopeOptions struct { - // placeholder for future optional parameters -} - -// ScheduledActionsClientRunOptions contains the optional parameters for the ScheduledActionsClient.Run method. -type ScheduledActionsClientRunOptions struct { - // placeholder for future optional parameters -} - // SharedScopeBenefitRecommendationProperties - The properties of the benefit recommendation when scope is 'Shared'. type SharedScopeBenefitRecommendationProperties struct { // REQUIRED; Benefit scope. For example, Single or Shared. @@ -1933,19 +1612,19 @@ type SharedScopeBenefitRecommendationProperties struct { // GetBenefitRecommendationProperties implements the BenefitRecommendationPropertiesClassification interface for type SharedScopeBenefitRecommendationProperties. func (s *SharedScopeBenefitRecommendationProperties) GetBenefitRecommendationProperties() *BenefitRecommendationProperties { return &BenefitRecommendationProperties{ - FirstConsumptionDate: s.FirstConsumptionDate, - LastConsumptionDate: s.LastConsumptionDate, - LookBackPeriod: s.LookBackPeriod, - TotalHours: s.TotalHours, - Usage: s.Usage, + AllRecommendationDetails: s.AllRecommendationDetails, ArmSKUName: s.ArmSKUName, - Term: s.Term, CommitmentGranularity: s.CommitmentGranularity, - CurrencyCode: s.CurrencyCode, CostWithoutBenefit: s.CostWithoutBenefit, + CurrencyCode: s.CurrencyCode, + FirstConsumptionDate: s.FirstConsumptionDate, + LastConsumptionDate: s.LastConsumptionDate, + LookBackPeriod: s.LookBackPeriod, RecommendationDetails: s.RecommendationDetails, - AllRecommendationDetails: s.AllRecommendationDetails, Scope: s.Scope, + Term: s.Term, + TotalHours: s.TotalHours, + Usage: s.Usage, } } @@ -2002,19 +1681,19 @@ type SingleScopeBenefitRecommendationProperties struct { // GetBenefitRecommendationProperties implements the BenefitRecommendationPropertiesClassification interface for type SingleScopeBenefitRecommendationProperties. func (s *SingleScopeBenefitRecommendationProperties) GetBenefitRecommendationProperties() *BenefitRecommendationProperties { return &BenefitRecommendationProperties{ - FirstConsumptionDate: s.FirstConsumptionDate, - LastConsumptionDate: s.LastConsumptionDate, - LookBackPeriod: s.LookBackPeriod, - TotalHours: s.TotalHours, - Usage: s.Usage, + AllRecommendationDetails: s.AllRecommendationDetails, ArmSKUName: s.ArmSKUName, - Term: s.Term, CommitmentGranularity: s.CommitmentGranularity, - CurrencyCode: s.CurrencyCode, CostWithoutBenefit: s.CostWithoutBenefit, + CurrencyCode: s.CurrencyCode, + FirstConsumptionDate: s.FirstConsumptionDate, + LastConsumptionDate: s.LastConsumptionDate, + LookBackPeriod: s.LookBackPeriod, RecommendationDetails: s.RecommendationDetails, - AllRecommendationDetails: s.AllRecommendationDetails, Scope: s.Scope, + Term: s.Term, + TotalHours: s.TotalHours, + Usage: s.Usage, } } @@ -2123,43 +1802,3 @@ type ViewProperties struct { // READ-ONLY; Date when the user last modified this view. ModifiedOn *time.Time } - -// ViewsClientCreateOrUpdateByScopeOptions contains the optional parameters for the ViewsClient.CreateOrUpdateByScope method. -type ViewsClientCreateOrUpdateByScopeOptions struct { - // placeholder for future optional parameters -} - -// ViewsClientCreateOrUpdateOptions contains the optional parameters for the ViewsClient.CreateOrUpdate method. -type ViewsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ViewsClientDeleteByScopeOptions contains the optional parameters for the ViewsClient.DeleteByScope method. -type ViewsClientDeleteByScopeOptions struct { - // placeholder for future optional parameters -} - -// ViewsClientDeleteOptions contains the optional parameters for the ViewsClient.Delete method. -type ViewsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ViewsClientGetByScopeOptions contains the optional parameters for the ViewsClient.GetByScope method. -type ViewsClientGetByScopeOptions struct { - // placeholder for future optional parameters -} - -// ViewsClientGetOptions contains the optional parameters for the ViewsClient.Get method. -type ViewsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ViewsClientListByScopeOptions contains the optional parameters for the ViewsClient.NewListByScopePager method. -type ViewsClientListByScopeOptions struct { - // placeholder for future optional parameters -} - -// ViewsClientListOptions contains the optional parameters for the ViewsClient.NewListPager method. -type ViewsClientListOptions struct { - // placeholder for future optional parameters -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/models_serde.go index 54906dcc..d32fca77 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -444,8 +443,8 @@ func (b BenefitRecommendationProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "commitmentGranularity", b.CommitmentGranularity) populate(objectMap, "costWithoutBenefit", b.CostWithoutBenefit) populate(objectMap, "currencyCode", b.CurrencyCode) - populateTimeRFC3339(objectMap, "firstConsumptionDate", b.FirstConsumptionDate) - populateTimeRFC3339(objectMap, "lastConsumptionDate", b.LastConsumptionDate) + populateDateTimeRFC3339(objectMap, "firstConsumptionDate", b.FirstConsumptionDate) + populateDateTimeRFC3339(objectMap, "lastConsumptionDate", b.LastConsumptionDate) populate(objectMap, "lookBackPeriod", b.LookBackPeriod) populate(objectMap, "recommendationDetails", b.RecommendationDetails) objectMap["scope"] = b.Scope @@ -480,10 +479,10 @@ func (b *BenefitRecommendationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CurrencyCode", &b.CurrencyCode) delete(rawMsg, key) case "firstConsumptionDate": - err = unpopulateTimeRFC3339(val, "FirstConsumptionDate", &b.FirstConsumptionDate) + err = unpopulateDateTimeRFC3339(val, "FirstConsumptionDate", &b.FirstConsumptionDate) delete(rawMsg, key) case "lastConsumptionDate": - err = unpopulateTimeRFC3339(val, "LastConsumptionDate", &b.LastConsumptionDate) + err = unpopulateDateTimeRFC3339(val, "LastConsumptionDate", &b.LastConsumptionDate) delete(rawMsg, key) case "lookBackPeriod": err = unpopulate(val, "LookBackPeriod", &b.LookBackPeriod) @@ -715,7 +714,7 @@ func (c CommonExportProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "definition", c.Definition) populate(objectMap, "deliveryInfo", c.DeliveryInfo) populate(objectMap, "format", c.Format) - populateTimeRFC3339(objectMap, "nextRunTimeEstimate", c.NextRunTimeEstimate) + populateDateTimeRFC3339(objectMap, "nextRunTimeEstimate", c.NextRunTimeEstimate) populate(objectMap, "partitionData", c.PartitionData) populate(objectMap, "runHistory", c.RunHistory) return json.Marshal(objectMap) @@ -740,7 +739,7 @@ func (c *CommonExportProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Format", &c.Format) delete(rawMsg, key) case "nextRunTimeEstimate": - err = unpopulateTimeRFC3339(val, "NextRunTimeEstimate", &c.NextRunTimeEstimate) + err = unpopulateDateTimeRFC3339(val, "NextRunTimeEstimate", &c.NextRunTimeEstimate) delete(rawMsg, key) case "partitionData": err = unpopulate(val, "PartitionData", &c.PartitionData) @@ -765,7 +764,7 @@ func (c CostDetailsOperationResults) MarshalJSON() ([]byte, error) { populate(objectMap, "name", c.Name) populate(objectMap, "status", c.Status) populate(objectMap, "type", c.Type) - populateTimeRFC3339(objectMap, "validTill", c.ValidTill) + populateDateTimeRFC3339(objectMap, "validTill", c.ValidTill) return json.Marshal(objectMap) } @@ -797,7 +796,7 @@ func (c *CostDetailsOperationResults) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) case "validTill": - err = unpopulateTimeRFC3339(val, "ValidTill", &c.ValidTill) + err = unpopulateDateTimeRFC3339(val, "ValidTill", &c.ValidTill) delete(rawMsg, key) } if err != nil { @@ -903,8 +902,8 @@ func (d DimensionProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "groupingEnabled", d.GroupingEnabled) populate(objectMap, "nextLink", d.NextLink) populate(objectMap, "total", d.Total) - populateTimeRFC3339(objectMap, "usageEnd", d.UsageEnd) - populateTimeRFC3339(objectMap, "usageStart", d.UsageStart) + populateDateTimeRFC3339(objectMap, "usageEnd", d.UsageEnd) + populateDateTimeRFC3339(objectMap, "usageStart", d.UsageStart) return json.Marshal(objectMap) } @@ -939,10 +938,10 @@ func (d *DimensionProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Total", &d.Total) delete(rawMsg, key) case "usageEnd": - err = unpopulateTimeRFC3339(val, "UsageEnd", &d.UsageEnd) + err = unpopulateDateTimeRFC3339(val, "UsageEnd", &d.UsageEnd) delete(rawMsg, key) case "usageStart": - err = unpopulateTimeRFC3339(val, "UsageStart", &d.UsageStart) + err = unpopulateDateTimeRFC3339(val, "UsageStart", &d.UsageStart) delete(rawMsg, key) } if err != nil { @@ -1010,8 +1009,8 @@ func (d *DismissAlertPayload) UnmarshalJSON(data []byte) error { func (d DownloadURL) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "downloadUrl", d.DownloadURL) - populateTimeRFC3339(objectMap, "expiryTime", d.ExpiryTime) - populateTimeRFC3339(objectMap, "validTill", d.ValidTill) + populateDateTimeRFC3339(objectMap, "expiryTime", d.ExpiryTime) + populateDateTimeRFC3339(objectMap, "validTill", d.ValidTill) return json.Marshal(objectMap) } @@ -1028,10 +1027,10 @@ func (d *DownloadURL) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DownloadURL", &d.DownloadURL) delete(rawMsg, key) case "expiryTime": - err = unpopulateTimeRFC3339(val, "ExpiryTime", &d.ExpiryTime) + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &d.ExpiryTime) delete(rawMsg, key) case "validTill": - err = unpopulateTimeRFC3339(val, "ValidTill", &d.ValidTill) + err = unpopulateDateTimeRFC3339(val, "ValidTill", &d.ValidTill) delete(rawMsg, key) } if err != nil { @@ -1342,7 +1341,7 @@ func (e ExportProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "definition", e.Definition) populate(objectMap, "deliveryInfo", e.DeliveryInfo) populate(objectMap, "format", e.Format) - populateTimeRFC3339(objectMap, "nextRunTimeEstimate", e.NextRunTimeEstimate) + populateDateTimeRFC3339(objectMap, "nextRunTimeEstimate", e.NextRunTimeEstimate) populate(objectMap, "partitionData", e.PartitionData) populate(objectMap, "runHistory", e.RunHistory) populate(objectMap, "schedule", e.Schedule) @@ -1368,7 +1367,7 @@ func (e *ExportProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Format", &e.Format) delete(rawMsg, key) case "nextRunTimeEstimate": - err = unpopulateTimeRFC3339(val, "NextRunTimeEstimate", &e.NextRunTimeEstimate) + err = unpopulateDateTimeRFC3339(val, "NextRunTimeEstimate", &e.NextRunTimeEstimate) delete(rawMsg, key) case "partitionData": err = unpopulate(val, "PartitionData", &e.PartitionData) @@ -1390,8 +1389,8 @@ func (e *ExportProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExportRecurrencePeriod. func (e ExportRecurrencePeriod) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "from", e.From) - populateTimeRFC3339(objectMap, "to", e.To) + populateDateTimeRFC3339(objectMap, "from", e.From) + populateDateTimeRFC3339(objectMap, "to", e.To) return json.Marshal(objectMap) } @@ -1405,10 +1404,10 @@ func (e *ExportRecurrencePeriod) UnmarshalJSON(data []byte) error { var err error switch key { case "from": - err = unpopulateTimeRFC3339(val, "From", &e.From) + err = unpopulateDateTimeRFC3339(val, "From", &e.From) delete(rawMsg, key) case "to": - err = unpopulateTimeRFC3339(val, "To", &e.To) + err = unpopulateDateTimeRFC3339(val, "To", &e.To) delete(rawMsg, key) } if err != nil { @@ -1467,12 +1466,12 @@ func (e ExportRunProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "error", e.Error) populate(objectMap, "executionType", e.ExecutionType) populate(objectMap, "fileName", e.FileName) - populateTimeRFC3339(objectMap, "processingEndTime", e.ProcessingEndTime) - populateTimeRFC3339(objectMap, "processingStartTime", e.ProcessingStartTime) + populateDateTimeRFC3339(objectMap, "processingEndTime", e.ProcessingEndTime) + populateDateTimeRFC3339(objectMap, "processingStartTime", e.ProcessingStartTime) populate(objectMap, "runSettings", e.RunSettings) populate(objectMap, "status", e.Status) populate(objectMap, "submittedBy", e.SubmittedBy) - populateTimeRFC3339(objectMap, "submittedTime", e.SubmittedTime) + populateDateTimeRFC3339(objectMap, "submittedTime", e.SubmittedTime) return json.Marshal(objectMap) } @@ -1495,10 +1494,10 @@ func (e *ExportRunProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "FileName", &e.FileName) delete(rawMsg, key) case "processingEndTime": - err = unpopulateTimeRFC3339(val, "ProcessingEndTime", &e.ProcessingEndTime) + err = unpopulateDateTimeRFC3339(val, "ProcessingEndTime", &e.ProcessingEndTime) delete(rawMsg, key) case "processingStartTime": - err = unpopulateTimeRFC3339(val, "ProcessingStartTime", &e.ProcessingStartTime) + err = unpopulateDateTimeRFC3339(val, "ProcessingStartTime", &e.ProcessingStartTime) delete(rawMsg, key) case "runSettings": err = unpopulate(val, "RunSettings", &e.RunSettings) @@ -1510,7 +1509,7 @@ func (e *ExportRunProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "SubmittedBy", &e.SubmittedBy) delete(rawMsg, key) case "submittedTime": - err = unpopulateTimeRFC3339(val, "SubmittedTime", &e.SubmittedTime) + err = unpopulateDateTimeRFC3339(val, "SubmittedTime", &e.SubmittedTime) delete(rawMsg, key) } if err != nil { @@ -1558,8 +1557,8 @@ func (e *ExportSchedule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExportTimePeriod. func (e ExportTimePeriod) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "from", e.From) - populateTimeRFC3339(objectMap, "to", e.To) + populateDateTimeRFC3339(objectMap, "from", e.From) + populateDateTimeRFC3339(objectMap, "to", e.To) return json.Marshal(objectMap) } @@ -1573,10 +1572,10 @@ func (e *ExportTimePeriod) UnmarshalJSON(data []byte) error { var err error switch key { case "from": - err = unpopulateTimeRFC3339(val, "From", &e.From) + err = unpopulateDateTimeRFC3339(val, "From", &e.From) delete(rawMsg, key) case "to": - err = unpopulateTimeRFC3339(val, "To", &e.To) + err = unpopulateDateTimeRFC3339(val, "To", &e.To) delete(rawMsg, key) } if err != nil { @@ -1955,8 +1954,8 @@ func (f *ForecastResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ForecastTimePeriod. func (f ForecastTimePeriod) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "from", f.From) - populateTimeRFC3339(objectMap, "to", f.To) + populateDateTimeRFC3339(objectMap, "from", f.From) + populateDateTimeRFC3339(objectMap, "to", f.To) return json.Marshal(objectMap) } @@ -1970,10 +1969,10 @@ func (f *ForecastTimePeriod) UnmarshalJSON(data []byte) error { var err error switch key { case "from": - err = unpopulateTimeRFC3339(val, "From", &f.From) + err = unpopulateDateTimeRFC3339(val, "From", &f.From) delete(rawMsg, key) case "to": - err = unpopulateTimeRFC3339(val, "To", &f.To) + err = unpopulateDateTimeRFC3339(val, "To", &f.To) delete(rawMsg, key) } if err != nil { @@ -2240,7 +2239,7 @@ func (i IncludedQuantityUtilizationSummaryProperties) MarshalJSON() ([]byte, err populate(objectMap, "benefitId", i.BenefitID) populate(objectMap, "benefitOrderId", i.BenefitOrderID) populate(objectMap, "benefitType", i.BenefitType) - populateTimeRFC3339(objectMap, "usageDate", i.UsageDate) + populateDateTimeRFC3339(objectMap, "usageDate", i.UsageDate) populate(objectMap, "utilizationPercentage", i.UtilizationPercentage) return json.Marshal(objectMap) } @@ -2267,7 +2266,7 @@ func (i *IncludedQuantityUtilizationSummaryProperties) UnmarshalJSON(data []byte err = unpopulate(val, "BenefitType", &i.BenefitType) delete(rawMsg, key) case "usageDate": - err = unpopulateTimeRFC3339(val, "UsageDate", &i.UsageDate) + err = unpopulateDateTimeRFC3339(val, "UsageDate", &i.UsageDate) delete(rawMsg, key) case "utilizationPercentage": err = unpopulate(val, "UtilizationPercentage", &i.UtilizationPercentage) @@ -2906,8 +2905,8 @@ func (q *QueryResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QueryTimePeriod. func (q QueryTimePeriod) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "from", q.From) - populateTimeRFC3339(objectMap, "to", q.To) + populateDateTimeRFC3339(objectMap, "from", q.From) + populateDateTimeRFC3339(objectMap, "to", q.To) return json.Marshal(objectMap) } @@ -2921,10 +2920,10 @@ func (q *QueryTimePeriod) UnmarshalJSON(data []byte) error { var err error switch key { case "from": - err = unpopulateTimeRFC3339(val, "From", &q.From) + err = unpopulateDateTimeRFC3339(val, "From", &q.From) delete(rawMsg, key) case "to": - err = unpopulateTimeRFC3339(val, "To", &q.To) + err = unpopulateDateTimeRFC3339(val, "To", &q.To) delete(rawMsg, key) } if err != nil { @@ -3252,8 +3251,8 @@ func (r *ReportConfigSorting) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ReportConfigTimePeriod. func (r ReportConfigTimePeriod) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "from", r.From) - populateTimeRFC3339(objectMap, "to", r.To) + populateDateTimeRFC3339(objectMap, "from", r.From) + populateDateTimeRFC3339(objectMap, "to", r.To) return json.Marshal(objectMap) } @@ -3267,10 +3266,10 @@ func (r *ReportConfigTimePeriod) UnmarshalJSON(data []byte) error { var err error switch key { case "from": - err = unpopulateTimeRFC3339(val, "From", &r.From) + err = unpopulateDateTimeRFC3339(val, "From", &r.From) delete(rawMsg, key) case "to": - err = unpopulateTimeRFC3339(val, "To", &r.To) + err = unpopulateDateTimeRFC3339(val, "To", &r.To) delete(rawMsg, key) } if err != nil { @@ -3335,7 +3334,7 @@ func (r *ReportManifest) UnmarshalJSON(data []byte) error { func (r ReportURL) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "reportUrl", r.ReportURL) - populateTimeRFC3339(objectMap, "validUntil", r.ValidUntil) + populateDateTimeRFC3339(objectMap, "validUntil", r.ValidUntil) return json.Marshal(objectMap) } @@ -3352,7 +3351,7 @@ func (r *ReportURL) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ReportURL", &r.ReportURL) delete(rawMsg, key) case "validUntil": - err = unpopulateTimeRFC3339(val, "ValidUntil", &r.ValidUntil) + err = unpopulateDateTimeRFC3339(val, "ValidUntil", &r.ValidUntil) delete(rawMsg, key) } if err != nil { @@ -3446,7 +3445,7 @@ func (s SavingsPlanUtilizationSummaryProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "benefitType", s.BenefitType) populate(objectMap, "maxUtilizationPercentage", s.MaxUtilizationPercentage) populate(objectMap, "minUtilizationPercentage", s.MinUtilizationPercentage) - populateTimeRFC3339(objectMap, "usageDate", s.UsageDate) + populateDateTimeRFC3339(objectMap, "usageDate", s.UsageDate) return json.Marshal(objectMap) } @@ -3481,7 +3480,7 @@ func (s *SavingsPlanUtilizationSummaryProperties) UnmarshalJSON(data []byte) err err = unpopulate(val, "MinUtilizationPercentage", &s.MinUtilizationPercentage) delete(rawMsg, key) case "usageDate": - err = unpopulateTimeRFC3339(val, "UsageDate", &s.UsageDate) + err = unpopulateDateTimeRFC3339(val, "UsageDate", &s.UsageDate) delete(rawMsg, key) } if err != nil { @@ -3496,10 +3495,10 @@ func (s ScheduleProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "dayOfMonth", s.DayOfMonth) populate(objectMap, "daysOfWeek", s.DaysOfWeek) - populateTimeRFC3339(objectMap, "endDate", s.EndDate) + populateDateTimeRFC3339(objectMap, "endDate", s.EndDate) populate(objectMap, "frequency", s.Frequency) populate(objectMap, "hourOfDay", s.HourOfDay) - populateTimeRFC3339(objectMap, "startDate", s.StartDate) + populateDateTimeRFC3339(objectMap, "startDate", s.StartDate) populate(objectMap, "weeksOfMonth", s.WeeksOfMonth) return json.Marshal(objectMap) } @@ -3520,7 +3519,7 @@ func (s *ScheduleProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DaysOfWeek", &s.DaysOfWeek) delete(rawMsg, key) case "endDate": - err = unpopulateTimeRFC3339(val, "EndDate", &s.EndDate) + err = unpopulateDateTimeRFC3339(val, "EndDate", &s.EndDate) delete(rawMsg, key) case "frequency": err = unpopulate(val, "Frequency", &s.Frequency) @@ -3529,7 +3528,7 @@ func (s *ScheduleProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "HourOfDay", &s.HourOfDay) delete(rawMsg, key) case "startDate": - err = unpopulateTimeRFC3339(val, "StartDate", &s.StartDate) + err = unpopulateDateTimeRFC3339(val, "StartDate", &s.StartDate) delete(rawMsg, key) case "weeksOfMonth": err = unpopulate(val, "WeeksOfMonth", &s.WeeksOfMonth) @@ -3687,8 +3686,8 @@ func (s SharedScopeBenefitRecommendationProperties) MarshalJSON() ([]byte, error populate(objectMap, "commitmentGranularity", s.CommitmentGranularity) populate(objectMap, "costWithoutBenefit", s.CostWithoutBenefit) populate(objectMap, "currencyCode", s.CurrencyCode) - populateTimeRFC3339(objectMap, "firstConsumptionDate", s.FirstConsumptionDate) - populateTimeRFC3339(objectMap, "lastConsumptionDate", s.LastConsumptionDate) + populateDateTimeRFC3339(objectMap, "firstConsumptionDate", s.FirstConsumptionDate) + populateDateTimeRFC3339(objectMap, "lastConsumptionDate", s.LastConsumptionDate) populate(objectMap, "lookBackPeriod", s.LookBackPeriod) populate(objectMap, "recommendationDetails", s.RecommendationDetails) objectMap["scope"] = ScopeShared @@ -3723,10 +3722,10 @@ func (s *SharedScopeBenefitRecommendationProperties) UnmarshalJSON(data []byte) err = unpopulate(val, "CurrencyCode", &s.CurrencyCode) delete(rawMsg, key) case "firstConsumptionDate": - err = unpopulateTimeRFC3339(val, "FirstConsumptionDate", &s.FirstConsumptionDate) + err = unpopulateDateTimeRFC3339(val, "FirstConsumptionDate", &s.FirstConsumptionDate) delete(rawMsg, key) case "lastConsumptionDate": - err = unpopulateTimeRFC3339(val, "LastConsumptionDate", &s.LastConsumptionDate) + err = unpopulateDateTimeRFC3339(val, "LastConsumptionDate", &s.LastConsumptionDate) delete(rawMsg, key) case "lookBackPeriod": err = unpopulate(val, "LookBackPeriod", &s.LookBackPeriod) @@ -3762,8 +3761,8 @@ func (s SingleScopeBenefitRecommendationProperties) MarshalJSON() ([]byte, error populate(objectMap, "commitmentGranularity", s.CommitmentGranularity) populate(objectMap, "costWithoutBenefit", s.CostWithoutBenefit) populate(objectMap, "currencyCode", s.CurrencyCode) - populateTimeRFC3339(objectMap, "firstConsumptionDate", s.FirstConsumptionDate) - populateTimeRFC3339(objectMap, "lastConsumptionDate", s.LastConsumptionDate) + populateDateTimeRFC3339(objectMap, "firstConsumptionDate", s.FirstConsumptionDate) + populateDateTimeRFC3339(objectMap, "lastConsumptionDate", s.LastConsumptionDate) populate(objectMap, "lookBackPeriod", s.LookBackPeriod) populate(objectMap, "recommendationDetails", s.RecommendationDetails) populate(objectMap, "resourceGroup", s.ResourceGroup) @@ -3800,10 +3799,10 @@ func (s *SingleScopeBenefitRecommendationProperties) UnmarshalJSON(data []byte) err = unpopulate(val, "CurrencyCode", &s.CurrencyCode) delete(rawMsg, key) case "firstConsumptionDate": - err = unpopulateTimeRFC3339(val, "FirstConsumptionDate", &s.FirstConsumptionDate) + err = unpopulateDateTimeRFC3339(val, "FirstConsumptionDate", &s.FirstConsumptionDate) delete(rawMsg, key) case "lastConsumptionDate": - err = unpopulateTimeRFC3339(val, "LastConsumptionDate", &s.LastConsumptionDate) + err = unpopulateDateTimeRFC3339(val, "LastConsumptionDate", &s.LastConsumptionDate) delete(rawMsg, key) case "lookBackPeriod": err = unpopulate(val, "LookBackPeriod", &s.LookBackPeriod) @@ -3867,10 +3866,10 @@ func (s *Status) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -3886,7 +3885,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -3895,7 +3894,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) @@ -3990,13 +3989,13 @@ func (v ViewProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "accumulated", v.Accumulated) populate(objectMap, "chart", v.Chart) - populateTimeRFC3339(objectMap, "createdOn", v.CreatedOn) + populateDateTimeRFC3339(objectMap, "createdOn", v.CreatedOn) populate(objectMap, "currency", v.Currency) populate(objectMap, "dateRange", v.DateRange) populate(objectMap, "displayName", v.DisplayName) populate(objectMap, "kpis", v.Kpis) populate(objectMap, "metric", v.Metric) - populateTimeRFC3339(objectMap, "modifiedOn", v.ModifiedOn) + populateDateTimeRFC3339(objectMap, "modifiedOn", v.ModifiedOn) populate(objectMap, "pivots", v.Pivots) populate(objectMap, "query", v.Query) populate(objectMap, "scope", v.Scope) @@ -4019,7 +4018,7 @@ func (v *ViewProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Chart", &v.Chart) delete(rawMsg, key) case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &v.CreatedOn) + err = unpopulateDateTimeRFC3339(val, "CreatedOn", &v.CreatedOn) delete(rawMsg, key) case "currency": err = unpopulate(val, "Currency", &v.Currency) @@ -4037,7 +4036,7 @@ func (v *ViewProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Metric", &v.Metric) delete(rawMsg, key) case "modifiedOn": - err = unpopulateTimeRFC3339(val, "ModifiedOn", &v.ModifiedOn) + err = unpopulateDateTimeRFC3339(val, "ModifiedOn", &v.ModifiedOn) delete(rawMsg, key) case "pivots": err = unpopulate(val, "Pivots", &v.Pivots) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/operations_client.go index f5fc8244..aa78c15c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,20 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/options.go new file mode 100644 index 00000000..e0fee6a2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/options.go @@ -0,0 +1,363 @@ +//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 armcostmanagement + +// AlertsClientDismissOptions contains the optional parameters for the AlertsClient.Dismiss method. +type AlertsClientDismissOptions struct { + // placeholder for future optional parameters +} + +// AlertsClientGetOptions contains the optional parameters for the AlertsClient.Get method. +type AlertsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AlertsClientListExternalOptions contains the optional parameters for the AlertsClient.ListExternal method. +type AlertsClientListExternalOptions struct { + // placeholder for future optional parameters +} + +// AlertsClientListOptions contains the optional parameters for the AlertsClient.List method. +type AlertsClientListOptions struct { + // placeholder for future optional parameters +} + +// BenefitRecommendationsClientListOptions contains the optional parameters for the BenefitRecommendationsClient.NewListPager +// method. +type BenefitRecommendationsClientListOptions struct { + // May be used to expand the properties by: properties/usage, properties/allRecommendationDetails + Expand *string + + // Can be used to filter benefitRecommendations by: properties/scope with allowed values ['Single', 'Shared'] and default + // value 'Shared'; and properties/lookBackPeriod with allowed values ['Last7Days', + // 'Last30Days', 'Last60Days'] and default value 'Last60Days'; properties/term with allowed values ['P1Y', 'P3Y'] and default + // value 'P3Y'; properties/subscriptionId; properties/resourceGroup + Filter *string + + // May be used to order the recommendations by: properties/armSkuName. For the savings plan, the results are in order by default. + // There is no need to use this clause. + Orderby *string +} + +// BenefitUtilizationSummariesClientListByBillingAccountIDOptions contains the optional parameters for the BenefitUtilizationSummariesClient.NewListByBillingAccountIDPager +// method. +type BenefitUtilizationSummariesClientListByBillingAccountIDOptions struct { + // Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate. + Filter *string + + // Grain. + GrainParameter *GrainParameter +} + +// BenefitUtilizationSummariesClientListByBillingProfileIDOptions contains the optional parameters for the BenefitUtilizationSummariesClient.NewListByBillingProfileIDPager +// method. +type BenefitUtilizationSummariesClientListByBillingProfileIDOptions struct { + // Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate. + Filter *string + + // Grain. + GrainParameter *GrainParameter +} + +// BenefitUtilizationSummariesClientListBySavingsPlanIDOptions contains the optional parameters for the BenefitUtilizationSummariesClient.NewListBySavingsPlanIDPager +// method. +type BenefitUtilizationSummariesClientListBySavingsPlanIDOptions struct { + // Supports filtering by properties/usageDate. + Filter *string + + // Grain. + GrainParameter *GrainParameter +} + +// BenefitUtilizationSummariesClientListBySavingsPlanOrderOptions contains the optional parameters for the BenefitUtilizationSummariesClient.NewListBySavingsPlanOrderPager +// method. +type BenefitUtilizationSummariesClientListBySavingsPlanOrderOptions struct { + // Supports filtering by properties/usageDate. + Filter *string + + // Grain. + GrainParameter *GrainParameter +} + +// DimensionsClientByExternalCloudProviderTypeOptions contains the optional parameters for the DimensionsClient.NewByExternalCloudProviderTypePager +// method. +type DimensionsClientByExternalCloudProviderTypeOptions struct { + // May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions. + Expand *string + + // May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators + // are 'eq','lt', 'gt', 'le', 'ge'. + Filter *string + + // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skiptoken parameter that + // specifies a starting point to use for subsequent calls. + Skiptoken *string + + // May be used to limit the number of results to the most recent N dimension data. + Top *int32 +} + +// DimensionsClientListOptions contains the optional parameters for the DimensionsClient.NewListPager method. +type DimensionsClientListOptions struct { + // May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions. + Expand *string + + // May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators + // are 'eq','lt', 'gt', 'le', 'ge'. + Filter *string + + // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skiptoken parameter that + // specifies a starting point to use for subsequent calls. + Skiptoken *string + + // May be used to limit the number of results to the most recent N dimension data. + Top *int32 +} + +// ExportsClientCreateOrUpdateOptions contains the optional parameters for the ExportsClient.CreateOrUpdate method. +type ExportsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ExportsClientDeleteOptions contains the optional parameters for the ExportsClient.Delete method. +type ExportsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ExportsClientExecuteOptions contains the optional parameters for the ExportsClient.Execute method. +type ExportsClientExecuteOptions struct { + // placeholder for future optional parameters +} + +// ExportsClientGetExecutionHistoryOptions contains the optional parameters for the ExportsClient.GetExecutionHistory method. +type ExportsClientGetExecutionHistoryOptions struct { + // placeholder for future optional parameters +} + +// ExportsClientGetOptions contains the optional parameters for the ExportsClient.Get method. +type ExportsClientGetOptions struct { + // May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information + // for the last 10 runs of the export. + Expand *string +} + +// ExportsClientListOptions contains the optional parameters for the ExportsClient.List method. +type ExportsClientListOptions struct { + // May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information + // for the last run of each export. + Expand *string +} + +// ForecastClientExternalCloudProviderUsageOptions contains the optional parameters for the ForecastClient.ExternalCloudProviderUsage +// method. +type ForecastClientExternalCloudProviderUsageOptions struct { + // May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter + // supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently + // support 'ne', 'or', or 'not'. + Filter *string +} + +// ForecastClientUsageOptions contains the optional parameters for the ForecastClient.Usage method. +type ForecastClientUsageOptions struct { + // May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter + // supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently + // support 'ne', 'or', or 'not'. + Filter *string +} + +// GenerateCostDetailsReportClientBeginCreateOperationOptions contains the optional parameters for the GenerateCostDetailsReportClient.BeginCreateOperation +// method. +type GenerateCostDetailsReportClientBeginCreateOperationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GenerateCostDetailsReportClientBeginGetOperationResultsOptions contains the optional parameters for the GenerateCostDetailsReportClient.BeginGetOperationResults +// method. +type GenerateCostDetailsReportClientBeginGetOperationResultsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GenerateDetailedCostReportClientBeginCreateOperationOptions contains the optional parameters for the GenerateDetailedCostReportClient.BeginCreateOperation +// method. +type GenerateDetailedCostReportClientBeginCreateOperationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GenerateDetailedCostReportOperationResultsClientBeginGetOptions contains the optional parameters for the GenerateDetailedCostReportOperationResultsClient.BeginGet +// method. +type GenerateDetailedCostReportOperationResultsClientBeginGetOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GenerateDetailedCostReportOperationStatusClientGetOptions contains the optional parameters for the GenerateDetailedCostReportOperationStatusClient.Get +// method. +type GenerateDetailedCostReportOperationStatusClientGetOptions struct { + // placeholder for future optional parameters +} + +// GenerateReservationDetailsReportClientBeginByBillingAccountIDOptions contains the optional parameters for the GenerateReservationDetailsReportClient.BeginByBillingAccountID +// method. +type GenerateReservationDetailsReportClientBeginByBillingAccountIDOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GenerateReservationDetailsReportClientBeginByBillingProfileIDOptions contains the optional parameters for the GenerateReservationDetailsReportClient.BeginByBillingProfileID +// method. +type GenerateReservationDetailsReportClientBeginByBillingProfileIDOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PriceSheetClientBeginDownloadByBillingProfileOptions contains the optional parameters for the PriceSheetClient.BeginDownloadByBillingProfile +// method. +type PriceSheetClientBeginDownloadByBillingProfileOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PriceSheetClientBeginDownloadOptions contains the optional parameters for the PriceSheetClient.BeginDownload method. +type PriceSheetClientBeginDownloadOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// QueryClientUsageByExternalCloudProviderTypeOptions contains the optional parameters for the QueryClient.UsageByExternalCloudProviderType +// method. +type QueryClientUsageByExternalCloudProviderTypeOptions struct { + // placeholder for future optional parameters +} + +// QueryClientUsageOptions contains the optional parameters for the QueryClient.Usage method. +type QueryClientUsageOptions struct { + // placeholder for future optional parameters +} + +// ScheduledActionsClientCheckNameAvailabilityByScopeOptions contains the optional parameters for the ScheduledActionsClient.CheckNameAvailabilityByScope +// method. +type ScheduledActionsClientCheckNameAvailabilityByScopeOptions struct { + // placeholder for future optional parameters +} + +// ScheduledActionsClientCheckNameAvailabilityOptions contains the optional parameters for the ScheduledActionsClient.CheckNameAvailability +// method. +type ScheduledActionsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ScheduledActionsClientCreateOrUpdateByScopeOptions contains the optional parameters for the ScheduledActionsClient.CreateOrUpdateByScope +// method. +type ScheduledActionsClientCreateOrUpdateByScopeOptions struct { + // ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve + // optimistic concurrency. + IfMatch *string +} + +// ScheduledActionsClientCreateOrUpdateOptions contains the optional parameters for the ScheduledActionsClient.CreateOrUpdate +// method. +type ScheduledActionsClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve + // optimistic concurrency. + IfMatch *string +} + +// ScheduledActionsClientDeleteByScopeOptions contains the optional parameters for the ScheduledActionsClient.DeleteByScope +// method. +type ScheduledActionsClientDeleteByScopeOptions struct { + // placeholder for future optional parameters +} + +// ScheduledActionsClientDeleteOptions contains the optional parameters for the ScheduledActionsClient.Delete method. +type ScheduledActionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ScheduledActionsClientGetByScopeOptions contains the optional parameters for the ScheduledActionsClient.GetByScope method. +type ScheduledActionsClientGetByScopeOptions struct { + // placeholder for future optional parameters +} + +// ScheduledActionsClientGetOptions contains the optional parameters for the ScheduledActionsClient.Get method. +type ScheduledActionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ScheduledActionsClientListByScopeOptions contains the optional parameters for the ScheduledActionsClient.NewListByScopePager +// method. +type ScheduledActionsClientListByScopeOptions struct { + // May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'. + Filter *string +} + +// ScheduledActionsClientListOptions contains the optional parameters for the ScheduledActionsClient.NewListPager method. +type ScheduledActionsClientListOptions struct { + // May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'. + Filter *string +} + +// ScheduledActionsClientRunByScopeOptions contains the optional parameters for the ScheduledActionsClient.RunByScope method. +type ScheduledActionsClientRunByScopeOptions struct { + // placeholder for future optional parameters +} + +// ScheduledActionsClientRunOptions contains the optional parameters for the ScheduledActionsClient.Run method. +type ScheduledActionsClientRunOptions struct { + // placeholder for future optional parameters +} + +// ViewsClientCreateOrUpdateByScopeOptions contains the optional parameters for the ViewsClient.CreateOrUpdateByScope method. +type ViewsClientCreateOrUpdateByScopeOptions struct { + // placeholder for future optional parameters +} + +// ViewsClientCreateOrUpdateOptions contains the optional parameters for the ViewsClient.CreateOrUpdate method. +type ViewsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ViewsClientDeleteByScopeOptions contains the optional parameters for the ViewsClient.DeleteByScope method. +type ViewsClientDeleteByScopeOptions struct { + // placeholder for future optional parameters +} + +// ViewsClientDeleteOptions contains the optional parameters for the ViewsClient.Delete method. +type ViewsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ViewsClientGetByScopeOptions contains the optional parameters for the ViewsClient.GetByScope method. +type ViewsClientGetByScopeOptions struct { + // placeholder for future optional parameters +} + +// ViewsClientGetOptions contains the optional parameters for the ViewsClient.Get method. +type ViewsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ViewsClientListByScopeOptions contains the optional parameters for the ViewsClient.NewListByScopePager method. +type ViewsClientListByScopeOptions struct { + // placeholder for future optional parameters +} + +// ViewsClientListOptions contains the optional parameters for the ViewsClient.NewListPager method. +type ViewsClientListOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/polymorphic_helpers.go index e0e6de74..d6147d4c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/polymorphic_helpers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/polymorphic_helpers.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -28,7 +27,10 @@ func unmarshalBenefitRecommendationPropertiesClassification(rawMsg json.RawMessa default: b = &BenefitRecommendationProperties{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalBenefitUtilizationSummaryClassification(rawMsg json.RawMessage) (BenefitUtilizationSummaryClassification, error) { @@ -48,7 +50,10 @@ func unmarshalBenefitUtilizationSummaryClassification(rawMsg json.RawMessage) (B default: b = &BenefitUtilizationSummary{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalBenefitUtilizationSummaryClassificationArray(rawMsg json.RawMessage) ([]BenefitUtilizationSummaryClassification, error) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/pricesheet_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/pricesheet_client.go index 2e657b17..5e99cebe 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/pricesheet_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/pricesheet_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -31,7 +30,7 @@ type PriceSheetClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPriceSheetClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*PriceSheetClient, error) { - cl, err := arm.NewClient(moduleName+".PriceSheetClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,11 +56,15 @@ func (client *PriceSheetClient) BeginDownload(ctx context.Context, billingAccoun if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PriceSheetClientDownloadResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PriceSheetClientDownloadResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PriceSheetClientDownloadResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PriceSheetClientDownloadResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +74,24 @@ func (client *PriceSheetClient) BeginDownload(ctx context.Context, billingAccoun // // Generated from API version 2022-10-01 func (client *PriceSheetClient) download(ctx context.Context, billingAccountName string, billingProfileName string, invoiceName string, options *PriceSheetClientBeginDownloadOptions) (*http.Response, error) { + var err error + const operationName = "PriceSheetClient.BeginDownload" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.downloadCreateRequest(ctx, billingAccountName, billingProfileName, invoiceName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // downloadCreateRequest creates the Download request. @@ -129,11 +138,15 @@ func (client *PriceSheetClient) BeginDownloadByBillingProfile(ctx context.Contex if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PriceSheetClientDownloadByBillingProfileResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PriceSheetClientDownloadByBillingProfileResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PriceSheetClientDownloadByBillingProfileResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PriceSheetClientDownloadByBillingProfileResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -146,18 +159,24 @@ func (client *PriceSheetClient) BeginDownloadByBillingProfile(ctx context.Contex // // Generated from API version 2022-10-01 func (client *PriceSheetClient) downloadByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, options *PriceSheetClientBeginDownloadByBillingProfileOptions) (*http.Response, error) { + var err error + const operationName = "PriceSheetClient.BeginDownloadByBillingProfile" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.downloadByBillingProfileCreateRequest(ctx, billingAccountName, billingProfileName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // downloadByBillingProfileCreateRequest creates the DownloadByBillingProfile request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/query_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/query_client.go index 847d61a9..0edd2048 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/query_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/query_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -31,7 +30,7 @@ type QueryClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewQueryClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*QueryClient, error) { - cl, err := arm.NewClient(moduleName+".QueryClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,18 +57,25 @@ func NewQueryClient(credential azcore.TokenCredential, options *arm.ClientOption // - parameters - Parameters supplied to the CreateOrUpdate Query Config operation. // - options - QueryClientUsageOptions contains the optional parameters for the QueryClient.Usage method. func (client *QueryClient) Usage(ctx context.Context, scope string, parameters QueryDefinition, options *QueryClientUsageOptions) (QueryClientUsageResponse, error) { + var err error + const operationName = "QueryClient.Usage" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.usageCreateRequest(ctx, scope, parameters, options) if err != nil { return QueryClientUsageResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QueryClientUsageResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return QueryClientUsageResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return QueryClientUsageResponse{}, err } - return client.usageHandleResponse(resp) + resp, err := client.usageHandleResponse(httpResp) + return resp, err } // usageCreateRequest creates the Usage request. @@ -84,7 +90,10 @@ func (client *QueryClient) usageCreateRequest(ctx context.Context, scope string, reqQP.Set("api-version", "2022-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // usageHandleResponse handles the Usage response. @@ -108,18 +117,25 @@ func (client *QueryClient) usageHandleResponse(resp *http.Response) (QueryClient // - options - QueryClientUsageByExternalCloudProviderTypeOptions contains the optional parameters for the QueryClient.UsageByExternalCloudProviderType // method. func (client *QueryClient) UsageByExternalCloudProviderType(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, parameters QueryDefinition, options *QueryClientUsageByExternalCloudProviderTypeOptions) (QueryClientUsageByExternalCloudProviderTypeResponse, error) { + var err error + const operationName = "QueryClient.UsageByExternalCloudProviderType" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.usageByExternalCloudProviderTypeCreateRequest(ctx, externalCloudProviderType, externalCloudProviderID, parameters, options) if err != nil { return QueryClientUsageByExternalCloudProviderTypeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QueryClientUsageByExternalCloudProviderTypeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return QueryClientUsageByExternalCloudProviderTypeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return QueryClientUsageByExternalCloudProviderTypeResponse{}, err } - return client.usageByExternalCloudProviderTypeHandleResponse(resp) + resp, err := client.usageByExternalCloudProviderTypeHandleResponse(httpResp) + return resp, err } // usageByExternalCloudProviderTypeCreateRequest creates the UsageByExternalCloudProviderType request. @@ -141,7 +157,10 @@ func (client *QueryClient) usageByExternalCloudProviderTypeCreateRequest(ctx con reqQP.Set("api-version", "2022-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // usageByExternalCloudProviderTypeHandleResponse handles the UsageByExternalCloudProviderType response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/response_types.go index 0cc64c1e..009ad137 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/response_types.go @@ -3,69 +3,80 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement // AlertsClientDismissResponse contains the response from method AlertsClient.Dismiss. type AlertsClientDismissResponse struct { + // An individual alert. Alert } // AlertsClientGetResponse contains the response from method AlertsClient.Get. type AlertsClientGetResponse struct { + // An individual alert. Alert } // AlertsClientListExternalResponse contains the response from method AlertsClient.ListExternal. type AlertsClientListExternalResponse struct { + // Result of alerts. AlertsResult } // AlertsClientListResponse contains the response from method AlertsClient.List. type AlertsClientListResponse struct { + // Result of alerts. AlertsResult } // BenefitRecommendationsClientListResponse contains the response from method BenefitRecommendationsClient.NewListPager. type BenefitRecommendationsClientListResponse struct { + // Result of listing benefit recommendations. BenefitRecommendationsListResult } // BenefitUtilizationSummariesClientListByBillingAccountIDResponse contains the response from method BenefitUtilizationSummariesClient.NewListByBillingAccountIDPager. type BenefitUtilizationSummariesClientListByBillingAccountIDResponse struct { + // List of benefit utilization summaries. BenefitUtilizationSummariesListResult } // BenefitUtilizationSummariesClientListByBillingProfileIDResponse contains the response from method BenefitUtilizationSummariesClient.NewListByBillingProfileIDPager. type BenefitUtilizationSummariesClientListByBillingProfileIDResponse struct { + // List of benefit utilization summaries. BenefitUtilizationSummariesListResult } // BenefitUtilizationSummariesClientListBySavingsPlanIDResponse contains the response from method BenefitUtilizationSummariesClient.NewListBySavingsPlanIDPager. type BenefitUtilizationSummariesClientListBySavingsPlanIDResponse struct { + // List of benefit utilization summaries. BenefitUtilizationSummariesListResult } // BenefitUtilizationSummariesClientListBySavingsPlanOrderResponse contains the response from method BenefitUtilizationSummariesClient.NewListBySavingsPlanOrderPager. type BenefitUtilizationSummariesClientListBySavingsPlanOrderResponse struct { + // List of benefit utilization summaries. BenefitUtilizationSummariesListResult } // DimensionsClientByExternalCloudProviderTypeResponse contains the response from method DimensionsClient.NewByExternalCloudProviderTypePager. type DimensionsClientByExternalCloudProviderTypeResponse struct { + // Result of listing dimensions. It contains a list of available dimensions. DimensionsListResult } // DimensionsClientListResponse contains the response from method DimensionsClient.NewListPager. type DimensionsClientListResponse struct { + // Result of listing dimensions. It contains a list of available dimensions. DimensionsListResult } // ExportsClientCreateOrUpdateResponse contains the response from method ExportsClient.CreateOrUpdate. type ExportsClientCreateOrUpdateResponse struct { + // An export resource. Export } @@ -81,106 +92,127 @@ type ExportsClientExecuteResponse struct { // ExportsClientGetExecutionHistoryResponse contains the response from method ExportsClient.GetExecutionHistory. type ExportsClientGetExecutionHistoryResponse struct { + // Result of listing the run history of an export. ExportExecutionListResult } // ExportsClientGetResponse contains the response from method ExportsClient.Get. type ExportsClientGetResponse struct { + // An export resource. Export } // ExportsClientListResponse contains the response from method ExportsClient.List. type ExportsClientListResponse struct { + // Result of listing exports. It contains a list of available exports in the scope provided. ExportListResult } // ForecastClientExternalCloudProviderUsageResponse contains the response from method ForecastClient.ExternalCloudProviderUsage. type ForecastClientExternalCloudProviderUsageResponse struct { + // Result of forecast. It contains all columns listed under groupings and aggregation. ForecastResult } // ForecastClientUsageResponse contains the response from method ForecastClient.Usage. type ForecastClientUsageResponse struct { + // Result of forecast. It contains all columns listed under groupings and aggregation. ForecastResult } // GenerateCostDetailsReportClientCreateOperationResponse contains the response from method GenerateCostDetailsReportClient.BeginCreateOperation. type GenerateCostDetailsReportClientCreateOperationResponse struct { + // The result of the long running operation for cost details Api. CostDetailsOperationResults } // GenerateCostDetailsReportClientGetOperationResultsResponse contains the response from method GenerateCostDetailsReportClient.BeginGetOperationResults. type GenerateCostDetailsReportClientGetOperationResultsResponse struct { + // The result of the long running operation for cost details Api. CostDetailsOperationResults } // GenerateDetailedCostReportClientCreateOperationResponse contains the response from method GenerateDetailedCostReportClient.BeginCreateOperation. type GenerateDetailedCostReportClientCreateOperationResponse struct { + // The result of the long running operation for cost detailed report. GenerateDetailedCostReportOperationResult } // GenerateDetailedCostReportOperationResultsClientGetResponse contains the response from method GenerateDetailedCostReportOperationResultsClient.BeginGet. type GenerateDetailedCostReportOperationResultsClientGetResponse struct { + // The result of the long running operation for cost detailed report. GenerateDetailedCostReportOperationResult } // GenerateDetailedCostReportOperationStatusClientGetResponse contains the response from method GenerateDetailedCostReportOperationStatusClient.Get. type GenerateDetailedCostReportOperationStatusClientGetResponse struct { + // The status of the long running operation for cost detailed report. GenerateDetailedCostReportOperationStatuses } // GenerateReservationDetailsReportClientByBillingAccountIDResponse contains the response from method GenerateReservationDetailsReportClient.BeginByBillingAccountID. type GenerateReservationDetailsReportClientByBillingAccountIDResponse struct { + // The status of the long running operation. OperationStatus } // GenerateReservationDetailsReportClientByBillingProfileIDResponse contains the response from method GenerateReservationDetailsReportClient.BeginByBillingProfileID. type GenerateReservationDetailsReportClientByBillingProfileIDResponse struct { + // The status of the long running operation. OperationStatus } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results. OperationListResult } // PriceSheetClientDownloadByBillingProfileResponse contains the response from method PriceSheetClient.BeginDownloadByBillingProfile. type PriceSheetClientDownloadByBillingProfileResponse struct { + // The URL to download the generated report. DownloadURL } // PriceSheetClientDownloadResponse contains the response from method PriceSheetClient.BeginDownload. type PriceSheetClientDownloadResponse struct { + // The URL to download the generated report. DownloadURL } // QueryClientUsageByExternalCloudProviderTypeResponse contains the response from method QueryClient.UsageByExternalCloudProviderType. type QueryClientUsageByExternalCloudProviderTypeResponse struct { + // Result of query. It contains all columns listed under groupings and aggregation. QueryResult } // QueryClientUsageResponse contains the response from method QueryClient.Usage. type QueryClientUsageResponse struct { + // Result of query. It contains all columns listed under groupings and aggregation. QueryResult } // ScheduledActionsClientCheckNameAvailabilityByScopeResponse contains the response from method ScheduledActionsClient.CheckNameAvailabilityByScope. type ScheduledActionsClientCheckNameAvailabilityByScopeResponse struct { + // The check availability result. CheckNameAvailabilityResponse } // ScheduledActionsClientCheckNameAvailabilityResponse contains the response from method ScheduledActionsClient.CheckNameAvailability. type ScheduledActionsClientCheckNameAvailabilityResponse struct { + // The check availability result. CheckNameAvailabilityResponse } // ScheduledActionsClientCreateOrUpdateByScopeResponse contains the response from method ScheduledActionsClient.CreateOrUpdateByScope. type ScheduledActionsClientCreateOrUpdateByScopeResponse struct { + // Scheduled action definition. ScheduledAction } // ScheduledActionsClientCreateOrUpdateResponse contains the response from method ScheduledActionsClient.CreateOrUpdate. type ScheduledActionsClientCreateOrUpdateResponse struct { + // Scheduled action definition. ScheduledAction } @@ -196,21 +228,25 @@ type ScheduledActionsClientDeleteResponse struct { // ScheduledActionsClientGetByScopeResponse contains the response from method ScheduledActionsClient.GetByScope. type ScheduledActionsClientGetByScopeResponse struct { + // Scheduled action definition. ScheduledAction } // ScheduledActionsClientGetResponse contains the response from method ScheduledActionsClient.Get. type ScheduledActionsClientGetResponse struct { + // Scheduled action definition. ScheduledAction } // ScheduledActionsClientListByScopeResponse contains the response from method ScheduledActionsClient.NewListByScopePager. type ScheduledActionsClientListByScopeResponse struct { + // Scheduled actions list result. It contains a list of scheduled actions. ScheduledActionListResult } // ScheduledActionsClientListResponse contains the response from method ScheduledActionsClient.NewListPager. type ScheduledActionsClientListResponse struct { + // Scheduled actions list result. It contains a list of scheduled actions. ScheduledActionListResult } @@ -226,11 +262,13 @@ type ScheduledActionsClientRunResponse struct { // ViewsClientCreateOrUpdateByScopeResponse contains the response from method ViewsClient.CreateOrUpdateByScope. type ViewsClientCreateOrUpdateByScopeResponse struct { + // States and configurations of Cost Analysis. View } // ViewsClientCreateOrUpdateResponse contains the response from method ViewsClient.CreateOrUpdate. type ViewsClientCreateOrUpdateResponse struct { + // States and configurations of Cost Analysis. View } @@ -246,20 +284,24 @@ type ViewsClientDeleteResponse struct { // ViewsClientGetByScopeResponse contains the response from method ViewsClient.GetByScope. type ViewsClientGetByScopeResponse struct { + // States and configurations of Cost Analysis. View } // ViewsClientGetResponse contains the response from method ViewsClient.Get. type ViewsClientGetResponse struct { + // States and configurations of Cost Analysis. View } // ViewsClientListByScopeResponse contains the response from method ViewsClient.NewListByScopePager. type ViewsClientListByScopeResponse struct { + // Result of listing views. It contains a list of available views. ViewListResult } // ViewsClientListResponse contains the response from method ViewsClient.NewListPager. type ViewsClientListResponse struct { + // Result of listing views. It contains a list of available views. ViewListResult } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/scheduledactions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/scheduledactions_client.go index 32d6536a..a0ae7cfc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/scheduledactions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/scheduledactions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -31,7 +30,7 @@ type ScheduledActionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewScheduledActionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ScheduledActionsClient, error) { - cl, err := arm.NewClient(moduleName+".ScheduledActionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,18 +48,25 @@ func NewScheduledActionsClient(credential azcore.TokenCredential, options *arm.C // - options - ScheduledActionsClientCheckNameAvailabilityOptions contains the optional parameters for the ScheduledActionsClient.CheckNameAvailability // method. func (client *ScheduledActionsClient) CheckNameAvailability(ctx context.Context, checkNameAvailabilityRequest CheckNameAvailabilityRequest, options *ScheduledActionsClientCheckNameAvailabilityOptions) (ScheduledActionsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "ScheduledActionsClient.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, checkNameAvailabilityRequest, options) if err != nil { return ScheduledActionsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduledActionsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduledActionsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScheduledActionsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -74,7 +80,10 @@ func (client *ScheduledActionsClient) checkNameAvailabilityCreateRequest(ctx con reqQP.Set("api-version", "2022-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, checkNameAvailabilityRequest) + if err := runtime.MarshalAsJSON(req, checkNameAvailabilityRequest); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -109,18 +118,25 @@ func (client *ScheduledActionsClient) checkNameAvailabilityHandleResponse(resp * // - options - ScheduledActionsClientCheckNameAvailabilityByScopeOptions contains the optional parameters for the ScheduledActionsClient.CheckNameAvailabilityByScope // method. func (client *ScheduledActionsClient) CheckNameAvailabilityByScope(ctx context.Context, scope string, checkNameAvailabilityRequest CheckNameAvailabilityRequest, options *ScheduledActionsClientCheckNameAvailabilityByScopeOptions) (ScheduledActionsClientCheckNameAvailabilityByScopeResponse, error) { + var err error + const operationName = "ScheduledActionsClient.CheckNameAvailabilityByScope" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkNameAvailabilityByScopeCreateRequest(ctx, scope, checkNameAvailabilityRequest, options) if err != nil { return ScheduledActionsClientCheckNameAvailabilityByScopeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduledActionsClientCheckNameAvailabilityByScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduledActionsClientCheckNameAvailabilityByScopeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScheduledActionsClientCheckNameAvailabilityByScopeResponse{}, err } - return client.checkNameAvailabilityByScopeHandleResponse(resp) + resp, err := client.checkNameAvailabilityByScopeHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityByScopeCreateRequest creates the CheckNameAvailabilityByScope request. @@ -138,7 +154,10 @@ func (client *ScheduledActionsClient) checkNameAvailabilityByScopeCreateRequest( reqQP.Set("api-version", "2022-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, checkNameAvailabilityRequest) + if err := runtime.MarshalAsJSON(req, checkNameAvailabilityRequest); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityByScopeHandleResponse handles the CheckNameAvailabilityByScope response. @@ -159,18 +178,25 @@ func (client *ScheduledActionsClient) checkNameAvailabilityByScopeHandleResponse // - options - ScheduledActionsClientCreateOrUpdateOptions contains the optional parameters for the ScheduledActionsClient.CreateOrUpdate // method. func (client *ScheduledActionsClient) CreateOrUpdate(ctx context.Context, name string, scheduledAction ScheduledAction, options *ScheduledActionsClientCreateOrUpdateOptions) (ScheduledActionsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ScheduledActionsClient.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, name, scheduledAction, options) if err != nil { return ScheduledActionsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduledActionsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ScheduledActionsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ScheduledActionsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -191,7 +217,10 @@ func (client *ScheduledActionsClient) createOrUpdateCreateRequest(ctx context.Co req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, scheduledAction) + if err := runtime.MarshalAsJSON(req, scheduledAction); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -226,18 +255,25 @@ func (client *ScheduledActionsClient) createOrUpdateHandleResponse(resp *http.Re // - options - ScheduledActionsClientCreateOrUpdateByScopeOptions contains the optional parameters for the ScheduledActionsClient.CreateOrUpdateByScope // method. func (client *ScheduledActionsClient) CreateOrUpdateByScope(ctx context.Context, scope string, name string, scheduledAction ScheduledAction, options *ScheduledActionsClientCreateOrUpdateByScopeOptions) (ScheduledActionsClientCreateOrUpdateByScopeResponse, error) { + var err error + const operationName = "ScheduledActionsClient.CreateOrUpdateByScope" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateByScopeCreateRequest(ctx, scope, name, scheduledAction, options) if err != nil { return ScheduledActionsClientCreateOrUpdateByScopeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduledActionsClientCreateOrUpdateByScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ScheduledActionsClientCreateOrUpdateByScopeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ScheduledActionsClientCreateOrUpdateByScopeResponse{}, err } - return client.createOrUpdateByScopeHandleResponse(resp) + resp, err := client.createOrUpdateByScopeHandleResponse(httpResp) + return resp, err } // createOrUpdateByScopeCreateRequest creates the CreateOrUpdateByScope request. @@ -262,7 +298,10 @@ func (client *ScheduledActionsClient) createOrUpdateByScopeCreateRequest(ctx con req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, scheduledAction) + if err := runtime.MarshalAsJSON(req, scheduledAction); err != nil { + return nil, err + } + return req, nil } // createOrUpdateByScopeHandleResponse handles the CreateOrUpdateByScope response. @@ -281,16 +320,22 @@ func (client *ScheduledActionsClient) createOrUpdateByScopeHandleResponse(resp * // - name - Scheduled action name. // - options - ScheduledActionsClientDeleteOptions contains the optional parameters for the ScheduledActionsClient.Delete method. func (client *ScheduledActionsClient) Delete(ctx context.Context, name string, options *ScheduledActionsClientDeleteOptions) (ScheduledActionsClientDeleteResponse, error) { + var err error + const operationName = "ScheduledActionsClient.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, name, options) if err != nil { return ScheduledActionsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduledActionsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ScheduledActionsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ScheduledActionsClientDeleteResponse{}, err } return ScheduledActionsClientDeleteResponse{}, nil } @@ -335,16 +380,22 @@ func (client *ScheduledActionsClient) deleteCreateRequest(ctx context.Context, n // - options - ScheduledActionsClientDeleteByScopeOptions contains the optional parameters for the ScheduledActionsClient.DeleteByScope // method. func (client *ScheduledActionsClient) DeleteByScope(ctx context.Context, scope string, name string, options *ScheduledActionsClientDeleteByScopeOptions) (ScheduledActionsClientDeleteByScopeResponse, error) { + var err error + const operationName = "ScheduledActionsClient.DeleteByScope" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteByScopeCreateRequest(ctx, scope, name, options) if err != nil { return ScheduledActionsClientDeleteByScopeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduledActionsClientDeleteByScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ScheduledActionsClientDeleteByScopeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ScheduledActionsClientDeleteByScopeResponse{}, err } return ScheduledActionsClientDeleteByScopeResponse{}, nil } @@ -378,18 +429,25 @@ func (client *ScheduledActionsClient) deleteByScopeCreateRequest(ctx context.Con // - name - Scheduled action name. // - options - ScheduledActionsClientGetOptions contains the optional parameters for the ScheduledActionsClient.Get method. func (client *ScheduledActionsClient) Get(ctx context.Context, name string, options *ScheduledActionsClientGetOptions) (ScheduledActionsClientGetResponse, error) { + var err error + const operationName = "ScheduledActionsClient.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, name, options) if err != nil { return ScheduledActionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduledActionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduledActionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScheduledActionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -441,18 +499,25 @@ func (client *ScheduledActionsClient) getHandleResponse(resp *http.Response) (Sc // - options - ScheduledActionsClientGetByScopeOptions contains the optional parameters for the ScheduledActionsClient.GetByScope // method. func (client *ScheduledActionsClient) GetByScope(ctx context.Context, scope string, name string, options *ScheduledActionsClientGetByScopeOptions) (ScheduledActionsClientGetByScopeResponse, error) { + var err error + const operationName = "ScheduledActionsClient.GetByScope" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByScopeCreateRequest(ctx, scope, name, options) if err != nil { return ScheduledActionsClientGetByScopeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduledActionsClientGetByScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduledActionsClientGetByScopeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScheduledActionsClientGetByScopeResponse{}, err } - return client.getByScopeHandleResponse(resp) + resp, err := client.getByScopeHandleResponse(httpResp) + return resp, err } // getByScopeCreateRequest creates the GetByScope request. @@ -497,25 +562,20 @@ func (client *ScheduledActionsClient) NewListPager(options *ScheduledActionsClie return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ScheduledActionsClientListResponse) (ScheduledActionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ScheduledActionsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ScheduledActionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 ScheduledActionsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduledActionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -570,25 +630,20 @@ func (client *ScheduledActionsClient) NewListByScopePager(scope string, options return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ScheduledActionsClientListByScopeResponse) (ScheduledActionsClientListByScopeResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByScopeCreateRequest(ctx, scope, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ScheduledActionsClientListByScopeResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ScheduledActionsClient.NewListByScopePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByScopeCreateRequest(ctx, scope, options) + }, nil) if err != nil { return ScheduledActionsClientListByScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduledActionsClientListByScopeResponse{}, runtime.NewResponseError(resp) - } return client.listByScopeHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -629,16 +684,22 @@ func (client *ScheduledActionsClient) listByScopeHandleResponse(resp *http.Respo // - name - Scheduled action name. // - options - ScheduledActionsClientRunOptions contains the optional parameters for the ScheduledActionsClient.Run method. func (client *ScheduledActionsClient) Run(ctx context.Context, name string, options *ScheduledActionsClientRunOptions) (ScheduledActionsClientRunResponse, error) { + var err error + const operationName = "ScheduledActionsClient.Run" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.runCreateRequest(ctx, name, options) if err != nil { return ScheduledActionsClientRunResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduledActionsClientRunResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduledActionsClientRunResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScheduledActionsClientRunResponse{}, err } return ScheduledActionsClientRunResponse{}, nil } @@ -683,16 +744,22 @@ func (client *ScheduledActionsClient) runCreateRequest(ctx context.Context, name // - options - ScheduledActionsClientRunByScopeOptions contains the optional parameters for the ScheduledActionsClient.RunByScope // method. func (client *ScheduledActionsClient) RunByScope(ctx context.Context, scope string, name string, options *ScheduledActionsClientRunByScopeOptions) (ScheduledActionsClientRunByScopeResponse, error) { + var err error + const operationName = "ScheduledActionsClient.RunByScope" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.runByScopeCreateRequest(ctx, scope, name, options) if err != nil { return ScheduledActionsClientRunByScopeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduledActionsClientRunByScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduledActionsClientRunByScopeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScheduledActionsClientRunByScopeResponse{}, err } return ScheduledActionsClientRunByScopeResponse{}, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/time_rfc3339.go index 91525711..5d1c47a6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/views_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/views_client.go index 85763292..1e79aee4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/views_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2/views_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armcostmanagement @@ -31,7 +30,7 @@ type ViewsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewViewsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ViewsClient, error) { - cl, err := arm.NewClient(moduleName+".ViewsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -51,18 +50,25 @@ func NewViewsClient(credential azcore.TokenCredential, options *arm.ClientOption // - parameters - Parameters supplied to the CreateOrUpdate View operation. // - options - ViewsClientCreateOrUpdateOptions contains the optional parameters for the ViewsClient.CreateOrUpdate method. func (client *ViewsClient) CreateOrUpdate(ctx context.Context, viewName string, parameters View, options *ViewsClientCreateOrUpdateOptions) (ViewsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ViewsClient.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, viewName, parameters, options) if err != nil { return ViewsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ViewsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ViewsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ViewsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -80,7 +86,10 @@ func (client *ViewsClient) createOrUpdateCreateRequest(ctx context.Context, view reqQP.Set("api-version", "2022-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -116,18 +125,25 @@ func (client *ViewsClient) createOrUpdateHandleResponse(resp *http.Response) (Vi // - options - ViewsClientCreateOrUpdateByScopeOptions contains the optional parameters for the ViewsClient.CreateOrUpdateByScope // method. func (client *ViewsClient) CreateOrUpdateByScope(ctx context.Context, scope string, viewName string, parameters View, options *ViewsClientCreateOrUpdateByScopeOptions) (ViewsClientCreateOrUpdateByScopeResponse, error) { + var err error + const operationName = "ViewsClient.CreateOrUpdateByScope" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateByScopeCreateRequest(ctx, scope, viewName, parameters, options) if err != nil { return ViewsClientCreateOrUpdateByScopeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ViewsClientCreateOrUpdateByScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ViewsClientCreateOrUpdateByScopeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ViewsClientCreateOrUpdateByScopeResponse{}, err } - return client.createOrUpdateByScopeHandleResponse(resp) + resp, err := client.createOrUpdateByScopeHandleResponse(httpResp) + return resp, err } // createOrUpdateByScopeCreateRequest creates the CreateOrUpdateByScope request. @@ -149,7 +165,10 @@ func (client *ViewsClient) createOrUpdateByScopeCreateRequest(ctx context.Contex reqQP.Set("api-version", "2022-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateByScopeHandleResponse handles the CreateOrUpdateByScope response. @@ -168,16 +187,22 @@ func (client *ViewsClient) createOrUpdateByScopeHandleResponse(resp *http.Respon // - viewName - View name // - options - ViewsClientDeleteOptions contains the optional parameters for the ViewsClient.Delete method. func (client *ViewsClient) Delete(ctx context.Context, viewName string, options *ViewsClientDeleteOptions) (ViewsClientDeleteResponse, error) { + var err error + const operationName = "ViewsClient.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, viewName, options) if err != nil { return ViewsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ViewsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ViewsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ViewsClientDeleteResponse{}, err } return ViewsClientDeleteResponse{}, nil } @@ -220,16 +245,22 @@ func (client *ViewsClient) deleteCreateRequest(ctx context.Context, viewName str // - viewName - View name // - options - ViewsClientDeleteByScopeOptions contains the optional parameters for the ViewsClient.DeleteByScope method. func (client *ViewsClient) DeleteByScope(ctx context.Context, scope string, viewName string, options *ViewsClientDeleteByScopeOptions) (ViewsClientDeleteByScopeResponse, error) { + var err error + const operationName = "ViewsClient.DeleteByScope" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteByScopeCreateRequest(ctx, scope, viewName, options) if err != nil { return ViewsClientDeleteByScopeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ViewsClientDeleteByScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ViewsClientDeleteByScopeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ViewsClientDeleteByScopeResponse{}, err } return ViewsClientDeleteByScopeResponse{}, nil } @@ -263,18 +294,25 @@ func (client *ViewsClient) deleteByScopeCreateRequest(ctx context.Context, scope // - viewName - View name // - options - ViewsClientGetOptions contains the optional parameters for the ViewsClient.Get method. func (client *ViewsClient) Get(ctx context.Context, viewName string, options *ViewsClientGetOptions) (ViewsClientGetResponse, error) { + var err error + const operationName = "ViewsClient.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, viewName, options) if err != nil { return ViewsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ViewsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ViewsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ViewsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -324,18 +362,25 @@ func (client *ViewsClient) getHandleResponse(resp *http.Response) (ViewsClientGe // - viewName - View name // - options - ViewsClientGetByScopeOptions contains the optional parameters for the ViewsClient.GetByScope method. func (client *ViewsClient) GetByScope(ctx context.Context, scope string, viewName string, options *ViewsClientGetByScopeOptions) (ViewsClientGetByScopeResponse, error) { + var err error + const operationName = "ViewsClient.GetByScope" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByScopeCreateRequest(ctx, scope, viewName, options) if err != nil { return ViewsClientGetByScopeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ViewsClientGetByScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ViewsClientGetByScopeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ViewsClientGetByScopeResponse{}, err } - return client.getByScopeHandleResponse(resp) + resp, err := client.getByScopeHandleResponse(httpResp) + return resp, err } // getByScopeCreateRequest creates the GetByScope request. @@ -379,25 +424,20 @@ func (client *ViewsClient) NewListPager(options *ViewsClientListOptions) *runtim return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ViewsClientListResponse) (ViewsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ViewsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ViewsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 ViewsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ViewsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -447,25 +487,20 @@ func (client *ViewsClient) NewListByScopePager(scope string, options *ViewsClien return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ViewsClientListByScopeResponse) (ViewsClientListByScopeResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByScopeCreateRequest(ctx, scope, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ViewsClient.NewListByScopePager") + 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.listByScopeCreateRequest(ctx, scope, options) + }, nil) if err != nil { return ViewsClientListByScopeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ViewsClientListByScopeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ViewsClientListByScopeResponse{}, runtime.NewResponseError(resp) - } return client.listByScopeHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/CHANGELOG.md index e952135b..78332a2e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.2.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + ## 1.1.0 (2023-03-28) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/README.md index 61ea9f43..d101c746 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewAccountsClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/accounts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/accounts_client.go index 86a1c9ce..e027f1f0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/accounts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/accounts_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -33,7 +32,7 @@ type AccountsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountsClient, error) { - cl, err := arm.NewClient(moduleName+".AccountsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,9 +57,14 @@ func (client *AccountsClient) BeginCreate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[AccountsClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AccountsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -69,18 +73,24 @@ func (client *AccountsClient) BeginCreate(ctx context.Context, resourceGroupName // // Generated from API version 2020-09-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" + 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, accountName, account, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -106,7 +116,10 @@ func (client *AccountsClient) createCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, account) + if err := runtime.MarshalAsJSON(req, account); err != nil { + return nil, err + } + return req, nil } // BeginDelete - DeleteAccount @@ -122,9 +135,14 @@ func (client *AccountsClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[AccountsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AccountsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -133,18 +151,24 @@ func (client *AccountsClient) BeginDelete(ctx context.Context, resourceGroupName // // Generated from API version 2020-09-01 func (client *AccountsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.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, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -181,18 +205,25 @@ func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceG // - accountName - The name of the share account. // - options - AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method. func (client *AccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientGetOptions) (AccountsClientGetResponse, error) { + var err error + const operationName = "AccountsClient.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, options) if err != nil { return AccountsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -242,25 +273,20 @@ func (client *AccountsClient) NewListByResourceGroupPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AccountsClientListByResourceGroupResponse) (AccountsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AccountsClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AccountsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 AccountsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -309,25 +335,20 @@ func (client *AccountsClient) NewListBySubscriptionPager(options *AccountsClient return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AccountsClientListBySubscriptionResponse) (AccountsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AccountsClient.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 AccountsClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AccountsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -370,18 +391,25 @@ func (client *AccountsClient) listBySubscriptionHandleResponse(resp *http.Respon // - accountUpdateParameters - The account update parameters. // - options - AccountsClientUpdateOptions contains the optional parameters for the AccountsClient.Update method. func (client *AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, accountUpdateParameters AccountUpdateParameters, options *AccountsClientUpdateOptions) (AccountsClientUpdateResponse, error) { + var err error + const operationName = "AccountsClient.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, accountUpdateParameters, options) if err != nil { return AccountsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -407,7 +435,10 @@ func (client *AccountsClient) updateCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, accountUpdateParameters) + if err := runtime.MarshalAsJSON(req, accountUpdateParameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/autorest.md index 7d826ede..889bb191 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/autorest.md @@ -8,5 +8,5 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/datashare/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/datashare/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0 +module-version: 1.2.0 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/client_factory.go index 39cc2048..3bae5a78 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -28,7 +27,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,66 +37,79 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } +// NewAccountsClient creates a new instance of AccountsClient. func (c *ClientFactory) NewAccountsClient() *AccountsClient { subClient, _ := NewAccountsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewConsumerInvitationsClient creates a new instance of ConsumerInvitationsClient. func (c *ClientFactory) NewConsumerInvitationsClient() *ConsumerInvitationsClient { subClient, _ := NewConsumerInvitationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewDataSetsClient() *DataSetsClient { - subClient, _ := NewDataSetsClient(c.subscriptionID, c.credential, c.options) +// NewConsumerSourceDataSetsClient creates a new instance of ConsumerSourceDataSetsClient. +func (c *ClientFactory) NewConsumerSourceDataSetsClient() *ConsumerSourceDataSetsClient { + subClient, _ := NewConsumerSourceDataSetsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDataSetMappingsClient creates a new instance of DataSetMappingsClient. func (c *ClientFactory) NewDataSetMappingsClient() *DataSetMappingsClient { subClient, _ := NewDataSetMappingsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDataSetsClient creates a new instance of DataSetsClient. +func (c *ClientFactory) NewDataSetsClient() *DataSetsClient { + subClient, _ := NewDataSetsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewEmailRegistrationsClient creates a new instance of EmailRegistrationsClient. func (c *ClientFactory) NewEmailRegistrationsClient() *EmailRegistrationsClient { subClient, _ := NewEmailRegistrationsClient(c.credential, c.options) return subClient } +// NewInvitationsClient creates a new instance of InvitationsClient. func (c *ClientFactory) NewInvitationsClient() *InvitationsClient { subClient, _ := NewInvitationsClient(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 } -func (c *ClientFactory) NewSharesClient() *SharesClient { - subClient, _ := NewSharesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - +// NewProviderShareSubscriptionsClient creates a new instance of ProviderShareSubscriptionsClient. func (c *ClientFactory) NewProviderShareSubscriptionsClient() *ProviderShareSubscriptionsClient { subClient, _ := NewProviderShareSubscriptionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewShareSubscriptionsClient creates a new instance of ShareSubscriptionsClient. func (c *ClientFactory) NewShareSubscriptionsClient() *ShareSubscriptionsClient { subClient, _ := NewShareSubscriptionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewConsumerSourceDataSetsClient() *ConsumerSourceDataSetsClient { - subClient, _ := NewConsumerSourceDataSetsClient(c.subscriptionID, c.credential, c.options) +// NewSharesClient creates a new instance of SharesClient. +func (c *ClientFactory) NewSharesClient() *SharesClient { + subClient, _ := NewSharesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSynchronizationSettingsClient creates a new instance of SynchronizationSettingsClient. func (c *ClientFactory) NewSynchronizationSettingsClient() *SynchronizationSettingsClient { subClient, _ := NewSynchronizationSettingsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewTriggersClient creates a new instance of TriggersClient. func (c *ClientFactory) NewTriggersClient() *TriggersClient { subClient, _ := NewTriggersClient(c.subscriptionID, c.credential, c.options) return subClient diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/constants.go index 5e6edeca..88c13ccf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare const ( - moduleName = "armdatashare" - moduleVersion = "v1.1.0" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare" + moduleVersion = "v1.2.0" ) // CreatedByType - The type of identity that created the resource. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/consumerinvitations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/consumerinvitations_client.go index dd789c18..7ff29495 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/consumerinvitations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/consumerinvitations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -31,7 +30,7 @@ type ConsumerInvitationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewConsumerInvitationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ConsumerInvitationsClient, error) { - cl, err := arm.NewClient(moduleName+".ConsumerInvitationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,18 +48,25 @@ func NewConsumerInvitationsClient(credential azcore.TokenCredential, options *ar // - invitationID - An invitation id // - options - ConsumerInvitationsClientGetOptions contains the optional parameters for the ConsumerInvitationsClient.Get method. func (client *ConsumerInvitationsClient) Get(ctx context.Context, location string, invitationID string, options *ConsumerInvitationsClientGetOptions) (ConsumerInvitationsClientGetResponse, error) { + var err error + const operationName = "ConsumerInvitationsClient.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, invitationID, options) if err != nil { return ConsumerInvitationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConsumerInvitationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConsumerInvitationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConsumerInvitationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -105,25 +111,20 @@ func (client *ConsumerInvitationsClient) NewListInvitationsPager(options *Consum return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ConsumerInvitationsClientListInvitationsResponse) (ConsumerInvitationsClientListInvitationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInvitationsCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ConsumerInvitationsClient.NewListInvitationsPager") + 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.listInvitationsCreateRequest(ctx, options) + }, nil) if err != nil { return ConsumerInvitationsClientListInvitationsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConsumerInvitationsClientListInvitationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConsumerInvitationsClientListInvitationsResponse{}, runtime.NewResponseError(resp) - } return client.listInvitationsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -162,18 +163,25 @@ func (client *ConsumerInvitationsClient) listInvitationsHandleResponse(resp *htt // - options - ConsumerInvitationsClientRejectInvitationOptions contains the optional parameters for the ConsumerInvitationsClient.RejectInvitation // method. func (client *ConsumerInvitationsClient) RejectInvitation(ctx context.Context, location string, invitation ConsumerInvitation, options *ConsumerInvitationsClientRejectInvitationOptions) (ConsumerInvitationsClientRejectInvitationResponse, error) { + var err error + const operationName = "ConsumerInvitationsClient.RejectInvitation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.rejectInvitationCreateRequest(ctx, location, invitation, options) if err != nil { return ConsumerInvitationsClientRejectInvitationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConsumerInvitationsClientRejectInvitationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConsumerInvitationsClientRejectInvitationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConsumerInvitationsClientRejectInvitationResponse{}, err } - return client.rejectInvitationHandleResponse(resp) + resp, err := client.rejectInvitationHandleResponse(httpResp) + return resp, err } // rejectInvitationCreateRequest creates the RejectInvitation request. @@ -191,7 +199,10 @@ func (client *ConsumerInvitationsClient) rejectInvitationCreateRequest(ctx conte reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, invitation) + if err := runtime.MarshalAsJSON(req, invitation); err != nil { + return nil, err + } + return req, nil } // rejectInvitationHandleResponse handles the RejectInvitation response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/consumersourcedatasets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/consumersourcedatasets_client.go index 77c70bce..ff76765c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/consumersourcedatasets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/consumersourcedatasets_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -33,7 +32,7 @@ type ConsumerSourceDataSetsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewConsumerSourceDataSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConsumerSourceDataSetsClient, error) { - cl, err := arm.NewClient(moduleName+".ConsumerSourceDataSetsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,25 +57,20 @@ func (client *ConsumerSourceDataSetsClient) NewListByShareSubscriptionPager(reso return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ConsumerSourceDataSetsClientListByShareSubscriptionResponse) (ConsumerSourceDataSetsClientListByShareSubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByShareSubscriptionCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ConsumerSourceDataSetsClient.NewListByShareSubscriptionPager") + 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.listByShareSubscriptionCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, options) + }, nil) if err != nil { return ConsumerSourceDataSetsClientListByShareSubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConsumerSourceDataSetsClientListByShareSubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConsumerSourceDataSetsClientListByShareSubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listByShareSubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/datasetmappings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/datasetmappings_client.go index 487a51be..d10a4768 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/datasetmappings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/datasetmappings_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -33,7 +32,7 @@ type DataSetMappingsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDataSetMappingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataSetMappingsClient, error) { - cl, err := arm.NewClient(moduleName+".DataSetMappingsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewDataSetMappingsClient(subscriptionID string, credential azcore.TokenCred // - dataSetMapping - Destination data set configuration details. // - options - DataSetMappingsClientCreateOptions contains the optional parameters for the DataSetMappingsClient.Create method. func (client *DataSetMappingsClient) Create(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, dataSetMappingName string, dataSetMapping DataSetMappingClassification, options *DataSetMappingsClientCreateOptions) (DataSetMappingsClientCreateResponse, error) { + var err error + const operationName = "DataSetMappingsClient.Create" + 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, accountName, shareSubscriptionName, dataSetMappingName, dataSetMapping, options) if err != nil { return DataSetMappingsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataSetMappingsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DataSetMappingsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DataSetMappingsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -100,7 +106,10 @@ func (client *DataSetMappingsClient) createCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, dataSetMapping) + if err := runtime.MarshalAsJSON(req, dataSetMapping); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -122,16 +131,22 @@ func (client *DataSetMappingsClient) createHandleResponse(resp *http.Response) ( // - dataSetMappingName - The name of the dataSetMapping. // - options - DataSetMappingsClientDeleteOptions contains the optional parameters for the DataSetMappingsClient.Delete method. func (client *DataSetMappingsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, dataSetMappingName string, options *DataSetMappingsClientDeleteOptions) (DataSetMappingsClientDeleteResponse, error) { + var err error + const operationName = "DataSetMappingsClient.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, accountName, shareSubscriptionName, dataSetMappingName, options) if err != nil { return DataSetMappingsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataSetMappingsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DataSetMappingsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DataSetMappingsClientDeleteResponse{}, err } return DataSetMappingsClientDeleteResponse{}, nil } @@ -180,18 +195,25 @@ func (client *DataSetMappingsClient) deleteCreateRequest(ctx context.Context, re // - dataSetMappingName - The name of the dataSetMapping. // - options - DataSetMappingsClientGetOptions contains the optional parameters for the DataSetMappingsClient.Get method. func (client *DataSetMappingsClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, dataSetMappingName string, options *DataSetMappingsClientGetOptions) (DataSetMappingsClientGetResponse, error) { + var err error + const operationName = "DataSetMappingsClient.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, shareSubscriptionName, dataSetMappingName, options) if err != nil { return DataSetMappingsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataSetMappingsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataSetMappingsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataSetMappingsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -251,25 +273,20 @@ func (client *DataSetMappingsClient) NewListByShareSubscriptionPager(resourceGro return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DataSetMappingsClientListByShareSubscriptionResponse) (DataSetMappingsClientListByShareSubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByShareSubscriptionCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DataSetMappingsClient.NewListByShareSubscriptionPager") + 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.listByShareSubscriptionCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, options) + }, nil) if err != nil { return DataSetMappingsClientListByShareSubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DataSetMappingsClientListByShareSubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataSetMappingsClientListByShareSubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listByShareSubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/datasets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/datasets_client.go index 313ddd0e..ba0dd1d8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/datasets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/datasets_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -33,7 +32,7 @@ type DataSetsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDataSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataSetsClient, error) { - cl, err := arm.NewClient(moduleName+".DataSetsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewDataSetsClient(subscriptionID string, credential azcore.TokenCredential, // - dataSet - The new data set information. // - options - DataSetsClientCreateOptions contains the optional parameters for the DataSetsClient.Create method. func (client *DataSetsClient) Create(ctx context.Context, resourceGroupName string, accountName string, shareName string, dataSetName string, dataSet DataSetClassification, options *DataSetsClientCreateOptions) (DataSetsClientCreateResponse, error) { + var err error + const operationName = "DataSetsClient.Create" + 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, accountName, shareName, dataSetName, dataSet, options) if err != nil { return DataSetsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataSetsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DataSetsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DataSetsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -100,7 +106,10 @@ func (client *DataSetsClient) createCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, dataSet) + if err := runtime.MarshalAsJSON(req, dataSet); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -127,9 +136,14 @@ func (client *DataSetsClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[DataSetsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DataSetsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DataSetsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DataSetsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,18 +152,24 @@ func (client *DataSetsClient) BeginDelete(ctx context.Context, resourceGroupName // // Generated from API version 2020-09-01 func (client *DataSetsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, shareName string, dataSetName string, options *DataSetsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DataSetsClient.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, shareName, dataSetName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -196,18 +216,25 @@ func (client *DataSetsClient) deleteCreateRequest(ctx context.Context, resourceG // - dataSetName - The name of the dataSet. // - options - DataSetsClientGetOptions contains the optional parameters for the DataSetsClient.Get method. func (client *DataSetsClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, dataSetName string, options *DataSetsClientGetOptions) (DataSetsClientGetResponse, error) { + var err error + const operationName = "DataSetsClient.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, shareName, dataSetName, options) if err != nil { return DataSetsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataSetsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataSetsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataSetsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -267,25 +294,20 @@ func (client *DataSetsClient) NewListBySharePager(resourceGroupName string, acco return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DataSetsClientListByShareResponse) (DataSetsClientListByShareResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByShareCreateRequest(ctx, resourceGroupName, accountName, shareName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DataSetsClient.NewListBySharePager") + 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.listByShareCreateRequest(ctx, resourceGroupName, accountName, shareName, options) + }, nil) if err != nil { return DataSetsClientListByShareResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DataSetsClientListByShareResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataSetsClientListByShareResponse{}, runtime.NewResponseError(resp) - } return client.listByShareHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/emailregistrations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/emailregistrations_client.go index b7191b5b..41667daf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/emailregistrations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/emailregistrations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -31,7 +30,7 @@ type EmailRegistrationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEmailRegistrationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*EmailRegistrationsClient, error) { - cl, err := arm.NewClient(moduleName+".EmailRegistrationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -50,18 +49,25 @@ func NewEmailRegistrationsClient(credential azcore.TokenCredential, options *arm // - options - EmailRegistrationsClientActivateEmailOptions contains the optional parameters for the EmailRegistrationsClient.ActivateEmail // method. func (client *EmailRegistrationsClient) ActivateEmail(ctx context.Context, location string, emailRegistration EmailRegistration, options *EmailRegistrationsClientActivateEmailOptions) (EmailRegistrationsClientActivateEmailResponse, error) { + var err error + const operationName = "EmailRegistrationsClient.ActivateEmail" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.activateEmailCreateRequest(ctx, location, emailRegistration, options) if err != nil { return EmailRegistrationsClientActivateEmailResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EmailRegistrationsClientActivateEmailResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EmailRegistrationsClientActivateEmailResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EmailRegistrationsClientActivateEmailResponse{}, err } - return client.activateEmailHandleResponse(resp) + resp, err := client.activateEmailHandleResponse(httpResp) + return resp, err } // activateEmailCreateRequest creates the ActivateEmail request. @@ -79,7 +85,10 @@ func (client *EmailRegistrationsClient) activateEmailCreateRequest(ctx context.C reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, emailRegistration) + if err := runtime.MarshalAsJSON(req, emailRegistration); err != nil { + return nil, err + } + return req, nil } // activateEmailHandleResponse handles the ActivateEmail response. @@ -99,18 +108,25 @@ func (client *EmailRegistrationsClient) activateEmailHandleResponse(resp *http.R // - options - EmailRegistrationsClientRegisterEmailOptions contains the optional parameters for the EmailRegistrationsClient.RegisterEmail // method. func (client *EmailRegistrationsClient) RegisterEmail(ctx context.Context, location string, options *EmailRegistrationsClientRegisterEmailOptions) (EmailRegistrationsClientRegisterEmailResponse, error) { + var err error + const operationName = "EmailRegistrationsClient.RegisterEmail" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.registerEmailCreateRequest(ctx, location, options) if err != nil { return EmailRegistrationsClientRegisterEmailResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EmailRegistrationsClientRegisterEmailResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EmailRegistrationsClientRegisterEmailResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EmailRegistrationsClientRegisterEmailResponse{}, err } - return client.registerEmailHandleResponse(resp) + resp, err := client.registerEmailHandleResponse(httpResp) + return resp, err } // registerEmailCreateRequest creates the RegisterEmail request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/interfaces.go new file mode 100644 index 00000000..9a729f4e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/interfaces.go @@ -0,0 +1,58 @@ +//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 armdatashare + +// DataSetClassification provides polymorphic access to related types. +// Call the interface's GetDataSet() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ADLSGen1FileDataSet, *ADLSGen1FolderDataSet, *ADLSGen2FileDataSet, *ADLSGen2FileSystemDataSet, *ADLSGen2FolderDataSet, +// - *BlobContainerDataSet, *BlobDataSet, *BlobFolderDataSet, *DataSet, *KustoClusterDataSet, *KustoDatabaseDataSet, *SQLDBTableDataSet, +// - *SQLDWTableDataSet, *SynapseWorkspaceSQLPoolTableDataSet +type DataSetClassification interface { + // GetDataSet returns the DataSet content of the underlying type. + GetDataSet() *DataSet +} + +// DataSetMappingClassification provides polymorphic access to related types. +// Call the interface's GetDataSetMapping() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ADLSGen2FileDataSetMapping, *ADLSGen2FileSystemDataSetMapping, *ADLSGen2FolderDataSetMapping, *BlobContainerDataSetMapping, +// - *BlobDataSetMapping, *BlobFolderDataSetMapping, *DataSetMapping, *KustoClusterDataSetMapping, *KustoDatabaseDataSetMapping, +// - *SQLDBTableDataSetMapping, *SQLDWTableDataSetMapping, *SynapseWorkspaceSQLPoolTableDataSetMapping +type DataSetMappingClassification interface { + // GetDataSetMapping returns the DataSetMapping content of the underlying type. + GetDataSetMapping() *DataSetMapping +} + +// SourceShareSynchronizationSettingClassification provides polymorphic access to related types. +// Call the interface's GetSourceShareSynchronizationSetting() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ScheduledSourceSynchronizationSetting, *SourceShareSynchronizationSetting +type SourceShareSynchronizationSettingClassification interface { + // GetSourceShareSynchronizationSetting returns the SourceShareSynchronizationSetting content of the underlying type. + GetSourceShareSynchronizationSetting() *SourceShareSynchronizationSetting +} + +// SynchronizationSettingClassification provides polymorphic access to related types. +// Call the interface's GetSynchronizationSetting() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ScheduledSynchronizationSetting, *SynchronizationSetting +type SynchronizationSettingClassification interface { + // GetSynchronizationSetting returns the SynchronizationSetting content of the underlying type. + GetSynchronizationSetting() *SynchronizationSetting +} + +// TriggerClassification provides polymorphic access to related types. +// Call the interface's GetTrigger() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ScheduledTrigger, *Trigger +type TriggerClassification interface { + // GetTrigger returns the Trigger content of the underlying type. + GetTrigger() *Trigger +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/invitations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/invitations_client.go index 0a6644c4..e52c894e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/invitations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/invitations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -33,7 +32,7 @@ type InvitationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewInvitationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InvitationsClient, error) { - cl, err := arm.NewClient(moduleName+".InvitationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewInvitationsClient(subscriptionID string, credential azcore.TokenCredenti // - invitation - Invitation details. // - options - InvitationsClientCreateOptions contains the optional parameters for the InvitationsClient.Create method. func (client *InvitationsClient) Create(ctx context.Context, resourceGroupName string, accountName string, shareName string, invitationName string, invitation Invitation, options *InvitationsClientCreateOptions) (InvitationsClientCreateResponse, error) { + var err error + const operationName = "InvitationsClient.Create" + 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, accountName, shareName, invitationName, invitation, options) if err != nil { return InvitationsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return InvitationsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return InvitationsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return InvitationsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -100,7 +106,10 @@ func (client *InvitationsClient) createCreateRequest(ctx context.Context, resour reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, invitation) + if err := runtime.MarshalAsJSON(req, invitation); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -122,16 +131,22 @@ func (client *InvitationsClient) createHandleResponse(resp *http.Response) (Invi // - invitationName - The name of the invitation. // - options - InvitationsClientDeleteOptions contains the optional parameters for the InvitationsClient.Delete method. func (client *InvitationsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string, invitationName string, options *InvitationsClientDeleteOptions) (InvitationsClientDeleteResponse, error) { + var err error + const operationName = "InvitationsClient.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, accountName, shareName, invitationName, options) if err != nil { return InvitationsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return InvitationsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return InvitationsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return InvitationsClientDeleteResponse{}, err } return InvitationsClientDeleteResponse{}, nil } @@ -180,18 +195,25 @@ func (client *InvitationsClient) deleteCreateRequest(ctx context.Context, resour // - invitationName - The name of the invitation. // - options - InvitationsClientGetOptions contains the optional parameters for the InvitationsClient.Get method. func (client *InvitationsClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, invitationName string, options *InvitationsClientGetOptions) (InvitationsClientGetResponse, error) { + var err error + const operationName = "InvitationsClient.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, shareName, invitationName, options) if err != nil { return InvitationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return InvitationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InvitationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InvitationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -251,25 +273,20 @@ func (client *InvitationsClient) NewListBySharePager(resourceGroupName string, a return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *InvitationsClientListByShareResponse) (InvitationsClientListByShareResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByShareCreateRequest(ctx, resourceGroupName, accountName, shareName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InvitationsClient.NewListBySharePager") + 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.listByShareCreateRequest(ctx, resourceGroupName, accountName, shareName, options) + }, nil) if err != nil { return InvitationsClientListByShareResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return InvitationsClientListByShareResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InvitationsClientListByShareResponse{}, runtime.NewResponseError(resp) - } return client.listByShareHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/models.go index 66998291..8bc153fd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -14,29 +13,29 @@ import "time" // ADLSGen1FileDataSet - An ADLS Gen 1 file data set. type ADLSGen1FileDataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // REQUIRED; ADLS Gen 1 file data set properties. - Properties *ADLSGen1FileProperties `json:"properties,omitempty"` + Properties *ADLSGen1FileProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type ADLSGen1FileDataSet. func (a *ADLSGen1FileDataSet) GetDataSet() *DataSet { return &DataSet{ - Kind: a.Kind, ID: a.ID, + Kind: a.Kind, Name: a.Name, SystemData: a.SystemData, Type: a.Type, @@ -46,50 +45,50 @@ func (a *ADLSGen1FileDataSet) GetDataSet() *DataSet { // ADLSGen1FileProperties - Properties of the ADLS Gen1 file data set. type ADLSGen1FileProperties struct { // REQUIRED; The ADLS account name. - AccountName *string `json:"accountName,omitempty"` + AccountName *string // REQUIRED; The file name in the ADLS account. - FileName *string `json:"fileName,omitempty"` + FileName *string // REQUIRED; The folder path within the ADLS account. - FolderPath *string `json:"folderPath,omitempty"` + FolderPath *string // REQUIRED; Resource group of ADLS account. - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Subscription id of ADLS account. - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // READ-ONLY; Unique id for identifying a data set resource - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string } // ADLSGen1FolderDataSet - An ADLS Gen 1 folder data set. type ADLSGen1FolderDataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // REQUIRED; ADLS Gen 1 folder data set properties. - Properties *ADLSGen1FolderProperties `json:"properties,omitempty"` + Properties *ADLSGen1FolderProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type ADLSGen1FolderDataSet. func (a *ADLSGen1FolderDataSet) GetDataSet() *DataSet { return &DataSet{ - Kind: a.Kind, ID: a.ID, + Kind: a.Kind, Name: a.Name, SystemData: a.SystemData, Type: a.Type, @@ -99,47 +98,47 @@ func (a *ADLSGen1FolderDataSet) GetDataSet() *DataSet { // ADLSGen1FolderProperties - Properties of the ADLS Gen1 folder data set. type ADLSGen1FolderProperties struct { // REQUIRED; The ADLS account name. - AccountName *string `json:"accountName,omitempty"` + AccountName *string // REQUIRED; The folder path within the ADLS account. - FolderPath *string `json:"folderPath,omitempty"` + FolderPath *string // REQUIRED; Resource group of ADLS account. - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Subscription id of ADLS account. - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // READ-ONLY; Unique id for identifying a data set resource - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string } // ADLSGen2FileDataSet - An ADLS Gen 2 file data set. type ADLSGen2FileDataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // REQUIRED; ADLS Gen 2 file data set properties. - Properties *ADLSGen2FileProperties `json:"properties,omitempty"` + Properties *ADLSGen2FileProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type ADLSGen2FileDataSet. func (a *ADLSGen2FileDataSet) GetDataSet() *DataSet { return &DataSet{ - Kind: a.Kind, ID: a.ID, + Kind: a.Kind, Name: a.Name, SystemData: a.SystemData, Type: a.Type, @@ -149,29 +148,29 @@ func (a *ADLSGen2FileDataSet) GetDataSet() *DataSet { // ADLSGen2FileDataSetMapping - An ADLS Gen2 file data set mapping. type ADLSGen2FileDataSetMapping struct { // REQUIRED; Kind of data set mapping. - Kind *DataSetMappingKind `json:"kind,omitempty"` + Kind *DataSetMappingKind // REQUIRED; ADLS Gen2 file data set mapping properties. - Properties *ADLSGen2FileDataSetMappingProperties `json:"properties,omitempty"` + Properties *ADLSGen2FileDataSetMappingProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSetMapping implements the DataSetMappingClassification interface for type ADLSGen2FileDataSetMapping. func (a *ADLSGen2FileDataSetMapping) GetDataSetMapping() *DataSetMapping { return &DataSetMapping{ - Kind: a.Kind, ID: a.ID, + Kind: a.Kind, Name: a.Name, SystemData: a.SystemData, Type: a.Type, @@ -181,80 +180,80 @@ func (a *ADLSGen2FileDataSetMapping) GetDataSetMapping() *DataSetMapping { // ADLSGen2FileDataSetMappingProperties - ADLS Gen 2 file data set mapping property bag. type ADLSGen2FileDataSetMappingProperties struct { // REQUIRED; The id of the source data set. - DataSetID *string `json:"dataSetId,omitempty"` + DataSetID *string // REQUIRED; File path within the file system. - FilePath *string `json:"filePath,omitempty"` + FilePath *string // REQUIRED; File system to which the file belongs. - FileSystem *string `json:"fileSystem,omitempty"` + FileSystem *string // REQUIRED; Resource group of storage account. - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Storage account name of the source data set. - StorageAccountName *string `json:"storageAccountName,omitempty"` + StorageAccountName *string // REQUIRED; Subscription id of storage account. - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // Type of output file - OutputType *OutputType `json:"outputType,omitempty"` + OutputType *OutputType // READ-ONLY; Gets the status of the data set mapping. - DataSetMappingStatus *DataSetMappingStatus `json:"dataSetMappingStatus,omitempty" azure:"ro"` + DataSetMappingStatus *DataSetMappingStatus // READ-ONLY; Provisioning state of the data set mapping. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // ADLSGen2FileProperties - Properties of the ADLS Gen2 file data set. type ADLSGen2FileProperties struct { // REQUIRED; File path within the file system. - FilePath *string `json:"filePath,omitempty"` + FilePath *string // REQUIRED; File system to which the file belongs. - FileSystem *string `json:"fileSystem,omitempty"` + FileSystem *string // REQUIRED; Resource group of storage account - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Storage account name of the source data set - StorageAccountName *string `json:"storageAccountName,omitempty"` + StorageAccountName *string // REQUIRED; Subscription id of storage account - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // READ-ONLY; Unique id for identifying a data set resource - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string } // ADLSGen2FileSystemDataSet - An ADLS Gen 2 file system data set. type ADLSGen2FileSystemDataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // REQUIRED; ADLS Gen 2 file system data set properties. - Properties *ADLSGen2FileSystemProperties `json:"properties,omitempty"` + Properties *ADLSGen2FileSystemProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type ADLSGen2FileSystemDataSet. func (a *ADLSGen2FileSystemDataSet) GetDataSet() *DataSet { return &DataSet{ - Kind: a.Kind, ID: a.ID, + Kind: a.Kind, Name: a.Name, SystemData: a.SystemData, Type: a.Type, @@ -264,29 +263,29 @@ func (a *ADLSGen2FileSystemDataSet) GetDataSet() *DataSet { // ADLSGen2FileSystemDataSetMapping - An ADLS Gen2 file system data set mapping. type ADLSGen2FileSystemDataSetMapping struct { // REQUIRED; Kind of data set mapping. - Kind *DataSetMappingKind `json:"kind,omitempty"` + Kind *DataSetMappingKind // REQUIRED; ADLS Gen2 file system data set mapping properties. - Properties *ADLSGen2FileSystemDataSetMappingProperties `json:"properties,omitempty"` + Properties *ADLSGen2FileSystemDataSetMappingProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSetMapping implements the DataSetMappingClassification interface for type ADLSGen2FileSystemDataSetMapping. func (a *ADLSGen2FileSystemDataSetMapping) GetDataSetMapping() *DataSetMapping { return &DataSetMapping{ - Kind: a.Kind, ID: a.ID, + Kind: a.Kind, Name: a.Name, SystemData: a.SystemData, Type: a.Type, @@ -296,71 +295,71 @@ func (a *ADLSGen2FileSystemDataSetMapping) GetDataSetMapping() *DataSetMapping { // ADLSGen2FileSystemDataSetMappingProperties - ADLS Gen 2 file system data set mapping property bag. type ADLSGen2FileSystemDataSetMappingProperties struct { // REQUIRED; The id of the source data set. - DataSetID *string `json:"dataSetId,omitempty"` + DataSetID *string // REQUIRED; The file system name. - FileSystem *string `json:"fileSystem,omitempty"` + FileSystem *string // REQUIRED; Resource group of storage account. - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Storage account name of the source data set. - StorageAccountName *string `json:"storageAccountName,omitempty"` + StorageAccountName *string // REQUIRED; Subscription id of storage account. - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // READ-ONLY; Gets the status of the data set mapping. - DataSetMappingStatus *DataSetMappingStatus `json:"dataSetMappingStatus,omitempty" azure:"ro"` + DataSetMappingStatus *DataSetMappingStatus // READ-ONLY; Provisioning state of the data set mapping. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // ADLSGen2FileSystemProperties - Properties of the ADLS Gen2 file system data set. type ADLSGen2FileSystemProperties struct { // REQUIRED; The file system name. - FileSystem *string `json:"fileSystem,omitempty"` + FileSystem *string // REQUIRED; Resource group of storage account - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Storage account name of the source data set - StorageAccountName *string `json:"storageAccountName,omitempty"` + StorageAccountName *string // REQUIRED; Subscription id of storage account - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // READ-ONLY; Unique id for identifying a data set resource - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string } // ADLSGen2FolderDataSet - An ADLS Gen 2 folder data set. type ADLSGen2FolderDataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // REQUIRED; ADLS Gen 2 folder data set properties. - Properties *ADLSGen2FolderProperties `json:"properties,omitempty"` + Properties *ADLSGen2FolderProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type ADLSGen2FolderDataSet. func (a *ADLSGen2FolderDataSet) GetDataSet() *DataSet { return &DataSet{ - Kind: a.Kind, ID: a.ID, + Kind: a.Kind, Name: a.Name, SystemData: a.SystemData, Type: a.Type, @@ -370,29 +369,29 @@ func (a *ADLSGen2FolderDataSet) GetDataSet() *DataSet { // ADLSGen2FolderDataSetMapping - An ADLS Gen2 folder data set mapping. type ADLSGen2FolderDataSetMapping struct { // REQUIRED; Kind of data set mapping. - Kind *DataSetMappingKind `json:"kind,omitempty"` + Kind *DataSetMappingKind // REQUIRED; ADLS Gen2 folder data set mapping properties. - Properties *ADLSGen2FolderDataSetMappingProperties `json:"properties,omitempty"` + Properties *ADLSGen2FolderDataSetMappingProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSetMapping implements the DataSetMappingClassification interface for type ADLSGen2FolderDataSetMapping. func (a *ADLSGen2FolderDataSetMapping) GetDataSetMapping() *DataSetMapping { return &DataSetMapping{ - Kind: a.Kind, ID: a.ID, + Kind: a.Kind, Name: a.Name, SystemData: a.SystemData, Type: a.Type, @@ -402,170 +401,134 @@ func (a *ADLSGen2FolderDataSetMapping) GetDataSetMapping() *DataSetMapping { // ADLSGen2FolderDataSetMappingProperties - ADLS Gen 2 folder data set mapping property bag. type ADLSGen2FolderDataSetMappingProperties struct { // REQUIRED; The id of the source data set. - DataSetID *string `json:"dataSetId,omitempty"` + DataSetID *string // REQUIRED; File system to which the folder belongs. - FileSystem *string `json:"fileSystem,omitempty"` + FileSystem *string // REQUIRED; Folder path within the file system. - FolderPath *string `json:"folderPath,omitempty"` + FolderPath *string // REQUIRED; Resource group of storage account. - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Storage account name of the source data set. - StorageAccountName *string `json:"storageAccountName,omitempty"` + StorageAccountName *string // REQUIRED; Subscription id of storage account. - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // READ-ONLY; Gets the status of the data set mapping. - DataSetMappingStatus *DataSetMappingStatus `json:"dataSetMappingStatus,omitempty" azure:"ro"` + DataSetMappingStatus *DataSetMappingStatus // READ-ONLY; Provisioning state of the data set mapping. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // ADLSGen2FolderProperties - Properties of the ADLS Gen2 folder data set. type ADLSGen2FolderProperties struct { // REQUIRED; File system to which the folder belongs. - FileSystem *string `json:"fileSystem,omitempty"` + FileSystem *string // REQUIRED; Folder path within the file system. - FolderPath *string `json:"folderPath,omitempty"` + FolderPath *string // REQUIRED; Resource group of storage account - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Storage account name of the source data set - StorageAccountName *string `json:"storageAccountName,omitempty"` + StorageAccountName *string // REQUIRED; Subscription id of storage account - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // READ-ONLY; Unique id for identifying a data set resource - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string } // Account - An account data transfer object. type Account struct { // REQUIRED; Identity Info on the Account - Identity *Identity `json:"identity,omitempty"` + Identity *Identity // Location of the azure resource. - Location *string `json:"location,omitempty"` + Location *string // Properties on the account - Properties *AccountProperties `json:"properties,omitempty"` + Properties *AccountProperties // Tags on the azure resource. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // AccountList - List response for get Accounts. type AccountList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []*Account `json:"value,omitempty"` + Value []*Account // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string } // AccountProperties - Account property bag. type AccountProperties struct { // READ-ONLY; Time at which the account was created. - CreatedAt *time.Time `json:"createdAt,omitempty" azure:"ro"` + CreatedAt *time.Time // READ-ONLY; Provisioning state of the Account - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState // READ-ONLY; Email of the user who created the resource - UserEmail *string `json:"userEmail,omitempty" azure:"ro"` + UserEmail *string // READ-ONLY; Name of the user who created the resource - UserName *string `json:"userName,omitempty" azure:"ro"` + UserName *string } // AccountUpdateParameters - Update parameters for accounts type AccountUpdateParameters struct { // Tags on the azure resource. - Tags map[string]*string `json:"tags,omitempty"` -} - -// AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method. -type AccountsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method. -type AccountsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method. -type AccountsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager -// method. -type AccountsClientListByResourceGroupOptions struct { - // Continuation token - SkipToken *string -} - -// AccountsClientListBySubscriptionOptions contains the optional parameters for the AccountsClient.NewListBySubscriptionPager -// method. -type AccountsClientListBySubscriptionOptions struct { - // Continuation token - SkipToken *string -} - -// AccountsClientUpdateOptions contains the optional parameters for the AccountsClient.Update method. -type AccountsClientUpdateOptions struct { - // placeholder for future optional parameters + Tags map[string]*string } // BlobContainerDataSet - An Azure storage blob container data set. type BlobContainerDataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // REQUIRED; Blob container data set properties. - Properties *BlobContainerProperties `json:"properties,omitempty"` + Properties *BlobContainerProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type BlobContainerDataSet. func (b *BlobContainerDataSet) GetDataSet() *DataSet { return &DataSet{ - Kind: b.Kind, ID: b.ID, + Kind: b.Kind, Name: b.Name, SystemData: b.SystemData, Type: b.Type, @@ -575,29 +538,29 @@ func (b *BlobContainerDataSet) GetDataSet() *DataSet { // BlobContainerDataSetMapping - A Blob container data set mapping. type BlobContainerDataSetMapping struct { // REQUIRED; Kind of data set mapping. - Kind *DataSetMappingKind `json:"kind,omitempty"` + Kind *DataSetMappingKind // REQUIRED; Blob container data set mapping properties. - Properties *BlobContainerMappingProperties `json:"properties,omitempty"` + Properties *BlobContainerMappingProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSetMapping implements the DataSetMappingClassification interface for type BlobContainerDataSetMapping. func (b *BlobContainerDataSetMapping) GetDataSetMapping() *DataSetMapping { return &DataSetMapping{ - Kind: b.Kind, ID: b.ID, + Kind: b.Kind, Name: b.Name, SystemData: b.SystemData, Type: b.Type, @@ -607,71 +570,71 @@ func (b *BlobContainerDataSetMapping) GetDataSetMapping() *DataSetMapping { // BlobContainerMappingProperties - Azure storage Blob container data set mapping property bag. type BlobContainerMappingProperties struct { // REQUIRED; BLOB Container name. - ContainerName *string `json:"containerName,omitempty"` + ContainerName *string // REQUIRED; The id of the source data set. - DataSetID *string `json:"dataSetId,omitempty"` + DataSetID *string // REQUIRED; Resource group of storage account. - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Storage account name of the source data set. - StorageAccountName *string `json:"storageAccountName,omitempty"` + StorageAccountName *string // REQUIRED; Subscription id of storage account. - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // READ-ONLY; Gets the status of the data set mapping. - DataSetMappingStatus *DataSetMappingStatus `json:"dataSetMappingStatus,omitempty" azure:"ro"` + DataSetMappingStatus *DataSetMappingStatus // READ-ONLY; Provisioning state of the data set mapping. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // BlobContainerProperties - Properties of the BLOB container data set. type BlobContainerProperties struct { // REQUIRED; BLOB Container name. - ContainerName *string `json:"containerName,omitempty"` + ContainerName *string // REQUIRED; Resource group of storage account - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Storage account name of the source data set - StorageAccountName *string `json:"storageAccountName,omitempty"` + StorageAccountName *string // REQUIRED; Subscription id of storage account - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // READ-ONLY; Unique id for identifying a data set resource - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string } // BlobDataSet - An Azure storage blob data set. type BlobDataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // REQUIRED; Blob data set properties. - Properties *BlobProperties `json:"properties,omitempty"` + Properties *BlobProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type BlobDataSet. func (b *BlobDataSet) GetDataSet() *DataSet { return &DataSet{ - Kind: b.Kind, ID: b.ID, + Kind: b.Kind, Name: b.Name, SystemData: b.SystemData, Type: b.Type, @@ -681,29 +644,29 @@ func (b *BlobDataSet) GetDataSet() *DataSet { // BlobDataSetMapping - A Blob data set mapping. type BlobDataSetMapping struct { // REQUIRED; Kind of data set mapping. - Kind *DataSetMappingKind `json:"kind,omitempty"` + Kind *DataSetMappingKind // REQUIRED; Blob data set mapping properties. - Properties *BlobMappingProperties `json:"properties,omitempty"` + Properties *BlobMappingProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSetMapping implements the DataSetMappingClassification interface for type BlobDataSetMapping. func (b *BlobDataSetMapping) GetDataSetMapping() *DataSetMapping { return &DataSetMapping{ - Kind: b.Kind, ID: b.ID, + Kind: b.Kind, Name: b.Name, SystemData: b.SystemData, Type: b.Type, @@ -713,29 +676,29 @@ func (b *BlobDataSetMapping) GetDataSetMapping() *DataSetMapping { // BlobFolderDataSet - An Azure storage blob folder data set. type BlobFolderDataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // REQUIRED; Blob folder data set properties. - Properties *BlobFolderProperties `json:"properties,omitempty"` + Properties *BlobFolderProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type BlobFolderDataSet. func (b *BlobFolderDataSet) GetDataSet() *DataSet { return &DataSet{ - Kind: b.Kind, ID: b.ID, + Kind: b.Kind, Name: b.Name, SystemData: b.SystemData, Type: b.Type, @@ -745,29 +708,29 @@ func (b *BlobFolderDataSet) GetDataSet() *DataSet { // BlobFolderDataSetMapping - A Blob folder data set mapping. type BlobFolderDataSetMapping struct { // REQUIRED; Kind of data set mapping. - Kind *DataSetMappingKind `json:"kind,omitempty"` + Kind *DataSetMappingKind // REQUIRED; Blob folder data set mapping properties. - Properties *BlobFolderMappingProperties `json:"properties,omitempty"` + Properties *BlobFolderMappingProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSetMapping implements the DataSetMappingClassification interface for type BlobFolderDataSetMapping. func (b *BlobFolderDataSetMapping) GetDataSetMapping() *DataSetMapping { return &DataSetMapping{ - Kind: b.Kind, ID: b.ID, + Kind: b.Kind, Name: b.Name, SystemData: b.SystemData, Type: b.Type, @@ -777,274 +740,238 @@ func (b *BlobFolderDataSetMapping) GetDataSetMapping() *DataSetMapping { // BlobFolderMappingProperties - Azure storage Blob folder data set mapping property bag. type BlobFolderMappingProperties struct { // REQUIRED; Container that has the file path. - ContainerName *string `json:"containerName,omitempty"` + ContainerName *string // REQUIRED; The id of the source data set. - DataSetID *string `json:"dataSetId,omitempty"` + DataSetID *string // REQUIRED; Prefix for blob folder - Prefix *string `json:"prefix,omitempty"` + Prefix *string // REQUIRED; Resource group of storage account. - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Storage account name of the source data set. - StorageAccountName *string `json:"storageAccountName,omitempty"` + StorageAccountName *string // REQUIRED; Subscription id of storage account. - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // READ-ONLY; Gets the status of the data set mapping. - DataSetMappingStatus *DataSetMappingStatus `json:"dataSetMappingStatus,omitempty" azure:"ro"` + DataSetMappingStatus *DataSetMappingStatus // READ-ONLY; Provisioning state of the data set mapping. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // BlobFolderProperties - Properties of the blob folder data set. type BlobFolderProperties struct { // REQUIRED; Container that has the file path. - ContainerName *string `json:"containerName,omitempty"` + ContainerName *string // REQUIRED; Prefix for blob folder - Prefix *string `json:"prefix,omitempty"` + Prefix *string // REQUIRED; Resource group of storage account - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Storage account name of the source data set - StorageAccountName *string `json:"storageAccountName,omitempty"` + StorageAccountName *string // REQUIRED; Subscription id of storage account - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // READ-ONLY; Unique id for identifying a data set resource - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string } // BlobMappingProperties - Azure storage Blob data set mapping property bag. type BlobMappingProperties struct { // REQUIRED; Container that has the file path. - ContainerName *string `json:"containerName,omitempty"` + ContainerName *string // REQUIRED; The id of the source data set. - DataSetID *string `json:"dataSetId,omitempty"` + DataSetID *string // REQUIRED; File path within the source data set - FilePath *string `json:"filePath,omitempty"` + FilePath *string // REQUIRED; Resource group of storage account. - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Storage account name of the source data set. - StorageAccountName *string `json:"storageAccountName,omitempty"` + StorageAccountName *string // REQUIRED; Subscription id of storage account. - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // File output type - OutputType *OutputType `json:"outputType,omitempty"` + OutputType *OutputType // READ-ONLY; Gets the status of the data set mapping. - DataSetMappingStatus *DataSetMappingStatus `json:"dataSetMappingStatus,omitempty" azure:"ro"` + DataSetMappingStatus *DataSetMappingStatus // READ-ONLY; Provisioning state of the data set mapping. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // BlobProperties - Properties of the blob data set. type BlobProperties struct { // REQUIRED; Container that has the file path. - ContainerName *string `json:"containerName,omitempty"` + ContainerName *string // REQUIRED; File path within the source data set - FilePath *string `json:"filePath,omitempty"` + FilePath *string // REQUIRED; Resource group of storage account - ResourceGroup *string `json:"resourceGroup,omitempty"` + ResourceGroup *string // REQUIRED; Storage account name of the source data set - StorageAccountName *string `json:"storageAccountName,omitempty"` + StorageAccountName *string // REQUIRED; Subscription id of storage account - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string // READ-ONLY; Unique id for identifying a data set resource - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string } // ConsumerInvitation - A consumer Invitation data transfer object. type ConsumerInvitation struct { // REQUIRED; Properties on the account - Properties *ConsumerInvitationProperties `json:"properties,omitempty"` + Properties *ConsumerInvitationProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ConsumerInvitationList - List response for get InvitationList type ConsumerInvitationList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []*ConsumerInvitation `json:"value,omitempty"` + Value []*ConsumerInvitation // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string } // ConsumerInvitationProperties - Properties of consumer invitation type ConsumerInvitationProperties struct { // REQUIRED; Unique id of the invitation. - InvitationID *string `json:"invitationId,omitempty"` + InvitationID *string // READ-ONLY; Number of data sets in a share - DataSetCount *int32 `json:"dataSetCount,omitempty" azure:"ro"` + DataSetCount *int32 // READ-ONLY; Description shared when the invitation was created - Description *string `json:"description,omitempty" azure:"ro"` + Description *string // READ-ONLY; The expiration date for the share subscription created by accepting the invitation. - ExpirationDate *time.Time `json:"expirationDate,omitempty" azure:"ro"` + ExpirationDate *time.Time // READ-ONLY; The status of the invitation. - InvitationStatus *InvitationStatus `json:"invitationStatus,omitempty" azure:"ro"` + InvitationStatus *InvitationStatus // READ-ONLY; invitation location - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Email of the provider who created the resource - ProviderEmail *string `json:"providerEmail,omitempty" azure:"ro"` + ProviderEmail *string // READ-ONLY; Name of the provider who created the resource - ProviderName *string `json:"providerName,omitempty" azure:"ro"` + ProviderName *string // READ-ONLY; Tenant name of the provider who created the resource - ProviderTenantName *string `json:"providerTenantName,omitempty" azure:"ro"` + ProviderTenantName *string // READ-ONLY; The time the recipient responded to the invitation. - RespondedAt *time.Time `json:"respondedAt,omitempty" azure:"ro"` + RespondedAt *time.Time // READ-ONLY; Gets the time at which the invitation was sent. - SentAt *time.Time `json:"sentAt,omitempty" azure:"ro"` + SentAt *time.Time // READ-ONLY; Gets the source share Name. - ShareName *string `json:"shareName,omitempty" azure:"ro"` + ShareName *string // READ-ONLY; Terms of use shared when the invitation was created - TermsOfUse *string `json:"termsOfUse,omitempty" azure:"ro"` + TermsOfUse *string // READ-ONLY; Email of the user who created the resource - UserEmail *string `json:"userEmail,omitempty" azure:"ro"` + UserEmail *string // READ-ONLY; Name of the user who created the resource - UserName *string `json:"userName,omitempty" azure:"ro"` -} - -// ConsumerInvitationsClientGetOptions contains the optional parameters for the ConsumerInvitationsClient.Get method. -type ConsumerInvitationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConsumerInvitationsClientListInvitationsOptions contains the optional parameters for the ConsumerInvitationsClient.NewListInvitationsPager -// method. -type ConsumerInvitationsClientListInvitationsOptions struct { - // The continuation token - SkipToken *string -} - -// ConsumerInvitationsClientRejectInvitationOptions contains the optional parameters for the ConsumerInvitationsClient.RejectInvitation -// method. -type ConsumerInvitationsClientRejectInvitationOptions struct { - // placeholder for future optional parameters + UserName *string } // ConsumerSourceDataSet - A consumer side dataSet data transfer object. type ConsumerSourceDataSet struct { // source dataSet properties - Properties *ConsumerSourceDataSetProperties `json:"properties,omitempty"` + Properties *ConsumerSourceDataSetProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ConsumerSourceDataSetList - A consumer side list of source dataSets type ConsumerSourceDataSetList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []*ConsumerSourceDataSet `json:"value,omitempty"` + Value []*ConsumerSourceDataSet // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string } // ConsumerSourceDataSetProperties - Properties of consumer source dataSet type ConsumerSourceDataSetProperties struct { // READ-ONLY; DataSet Id - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string // READ-ONLY; Location of the data set. - DataSetLocation *string `json:"dataSetLocation,omitempty" azure:"ro"` + DataSetLocation *string // READ-ONLY; DataSet name - DataSetName *string `json:"dataSetName,omitempty" azure:"ro"` + DataSetName *string // READ-ONLY; DataSet path - DataSetPath *string `json:"dataSetPath,omitempty" azure:"ro"` + DataSetPath *string // READ-ONLY; Type of data set - DataSetType *DataSetType `json:"dataSetType,omitempty" azure:"ro"` -} - -// ConsumerSourceDataSetsClientListByShareSubscriptionOptions contains the optional parameters for the ConsumerSourceDataSetsClient.NewListByShareSubscriptionPager -// method. -type ConsumerSourceDataSetsClientListByShareSubscriptionOptions struct { - // Continuation token - SkipToken *string -} - -// DataSetClassification provides polymorphic access to related types. -// Call the interface's GetDataSet() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ADLSGen1FileDataSet, *ADLSGen1FolderDataSet, *ADLSGen2FileDataSet, *ADLSGen2FileSystemDataSet, *ADLSGen2FolderDataSet, -// - *BlobContainerDataSet, *BlobDataSet, *BlobFolderDataSet, *DataSet, *KustoClusterDataSet, *KustoDatabaseDataSet, *SQLDBTableDataSet, -// - *SQLDWTableDataSet, *SynapseWorkspaceSQLPoolTableDataSet -type DataSetClassification interface { - // GetDataSet returns the DataSet content of the underlying type. - GetDataSet() *DataSet + DataSetType *DataSetType } // DataSet - A DataSet data transfer object. type DataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type DataSet. @@ -1053,39 +980,28 @@ func (d *DataSet) GetDataSet() *DataSet { return d } // DataSetList - List response for get DataSets type DataSetList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []DataSetClassification `json:"value,omitempty"` + Value []DataSetClassification // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` -} - -// DataSetMappingClassification provides polymorphic access to related types. -// Call the interface's GetDataSetMapping() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ADLSGen2FileDataSetMapping, *ADLSGen2FileSystemDataSetMapping, *ADLSGen2FolderDataSetMapping, *BlobContainerDataSetMapping, -// - *BlobDataSetMapping, *BlobFolderDataSetMapping, *DataSetMapping, *KustoClusterDataSetMapping, *KustoDatabaseDataSetMapping, -// - *SQLDBTableDataSetMapping, *SQLDWTableDataSetMapping, *SynapseWorkspaceSQLPoolTableDataSetMapping -type DataSetMappingClassification interface { - // GetDataSetMapping returns the DataSetMapping content of the underlying type. - GetDataSetMapping() *DataSetMapping + NextLink *string } // DataSetMapping - A data set mapping data transfer object. type DataSetMapping struct { // REQUIRED; Kind of data set mapping. - Kind *DataSetMappingKind `json:"kind,omitempty"` + Kind *DataSetMappingKind // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSetMapping implements the DataSetMappingClassification interface for type DataSetMapping. @@ -1094,269 +1010,180 @@ func (d *DataSetMapping) GetDataSetMapping() *DataSetMapping { return d } // DataSetMappingList - List response for get DataSetMappings type DataSetMappingList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []DataSetMappingClassification `json:"value,omitempty"` + Value []DataSetMappingClassification // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` -} - -// DataSetMappingsClientCreateOptions contains the optional parameters for the DataSetMappingsClient.Create method. -type DataSetMappingsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// DataSetMappingsClientDeleteOptions contains the optional parameters for the DataSetMappingsClient.Delete method. -type DataSetMappingsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DataSetMappingsClientGetOptions contains the optional parameters for the DataSetMappingsClient.Get method. -type DataSetMappingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DataSetMappingsClientListByShareSubscriptionOptions contains the optional parameters for the DataSetMappingsClient.NewListByShareSubscriptionPager -// method. -type DataSetMappingsClientListByShareSubscriptionOptions struct { - // Filters the results using OData syntax. - Filter *string - // Sorts the results using OData syntax. - Orderby *string - // Continuation token - SkipToken *string -} - -// DataSetsClientBeginDeleteOptions contains the optional parameters for the DataSetsClient.BeginDelete method. -type DataSetsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DataSetsClientCreateOptions contains the optional parameters for the DataSetsClient.Create method. -type DataSetsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// DataSetsClientGetOptions contains the optional parameters for the DataSetsClient.Get method. -type DataSetsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DataSetsClientListByShareOptions contains the optional parameters for the DataSetsClient.NewListBySharePager method. -type DataSetsClientListByShareOptions struct { - // Filters the results using OData syntax. - Filter *string - // Sorts the results using OData syntax. - Orderby *string - // continuation token - SkipToken *string + NextLink *string } // DefaultDto - Base data transfer object implementation for default resources. type DefaultDto struct { // Location of the azure resource. - Location *string `json:"location,omitempty"` + Location *string // Tags on the azure resource. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // DimensionProperties - properties for dimension type DimensionProperties struct { // localized display name of the dimension to customer - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // dimension name - Name *string `json:"name,omitempty"` + Name *string } // EmailRegistration - Dto for tenant domain registration type EmailRegistration struct { // Activation code for the registration - ActivationCode *string `json:"activationCode,omitempty"` + ActivationCode *string // READ-ONLY; Date of the activation expiration - ActivationExpirationDate *time.Time `json:"activationExpirationDate,omitempty" azure:"ro"` + ActivationExpirationDate *time.Time // READ-ONLY; The email to register - Email *string `json:"email,omitempty" azure:"ro"` + Email *string // READ-ONLY; Registration status - RegistrationStatus *RegistrationStatus `json:"registrationStatus,omitempty" azure:"ro"` + RegistrationStatus *RegistrationStatus // READ-ONLY; The tenant to register - TenantID *string `json:"tenantId,omitempty" azure:"ro"` -} - -// EmailRegistrationsClientActivateEmailOptions contains the optional parameters for the EmailRegistrationsClient.ActivateEmail -// method. -type EmailRegistrationsClientActivateEmailOptions struct { - // placeholder for future optional parameters -} - -// EmailRegistrationsClientRegisterEmailOptions contains the optional parameters for the EmailRegistrationsClient.RegisterEmail -// method. -type EmailRegistrationsClientRegisterEmailOptions struct { - // placeholder for future optional parameters + TenantID *string } // Error - The data share error model. type Error struct { // REQUIRED; The data share error body - Error *ErrorInfo `json:"error,omitempty"` + Error *ErrorInfo } // ErrorInfo - The data share error body model. type ErrorInfo struct { // REQUIRED; Code of the error - Code *string `json:"code,omitempty"` + Code *string // REQUIRED; Message of the error - Message *string `json:"message,omitempty"` + Message *string // Nested details of the error model - Details []*ErrorInfo `json:"details,omitempty"` + Details []*ErrorInfo // Target of the error - Target *string `json:"target,omitempty"` + Target *string } // Identity of resource type Identity struct { // Identity Type - Type *Type `json:"type,omitempty"` + Type *Type // READ-ONLY; service principal Id - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` + PrincipalID *string // READ-ONLY; Tenant Id - TenantID *string `json:"tenantId,omitempty" azure:"ro"` + TenantID *string } // Invitation - A Invitation data transfer object. type Invitation struct { // Properties on the Invitation - Properties *InvitationProperties `json:"properties,omitempty"` + Properties *InvitationProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // InvitationList - List response for get InvitationList type InvitationList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []*Invitation `json:"value,omitempty"` + Value []*Invitation // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string } // InvitationProperties - Invitation property bag. type InvitationProperties struct { // The expiration date for the invitation and share subscription. - ExpirationDate *time.Time `json:"expirationDate,omitempty"` + ExpirationDate *time.Time // The target Azure AD Id. Can't be combined with email. - TargetActiveDirectoryID *string `json:"targetActiveDirectoryId,omitempty"` + TargetActiveDirectoryID *string // The email the invitation is directed to. - TargetEmail *string `json:"targetEmail,omitempty"` + TargetEmail *string // The target user or application Id that invitation is being sent to. Must be specified along TargetActiveDirectoryId. This // enables sending invitations to specific users or applications in an AD tenant. - TargetObjectID *string `json:"targetObjectId,omitempty"` + TargetObjectID *string // READ-ONLY; unique invitation id - InvitationID *string `json:"invitationId,omitempty" azure:"ro"` + InvitationID *string // READ-ONLY; The status of the invitation. - InvitationStatus *InvitationStatus `json:"invitationStatus,omitempty" azure:"ro"` + InvitationStatus *InvitationStatus // READ-ONLY; The time the recipient responded to the invitation. - RespondedAt *time.Time `json:"respondedAt,omitempty" azure:"ro"` + RespondedAt *time.Time // READ-ONLY; Gets the time at which the invitation was sent. - SentAt *time.Time `json:"sentAt,omitempty" azure:"ro"` + SentAt *time.Time // READ-ONLY; Email of the user who created the resource - UserEmail *string `json:"userEmail,omitempty" azure:"ro"` + UserEmail *string // READ-ONLY; Name of the user who created the resource - UserName *string `json:"userName,omitempty" azure:"ro"` -} - -// InvitationsClientCreateOptions contains the optional parameters for the InvitationsClient.Create method. -type InvitationsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// InvitationsClientDeleteOptions contains the optional parameters for the InvitationsClient.Delete method. -type InvitationsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// InvitationsClientGetOptions contains the optional parameters for the InvitationsClient.Get method. -type InvitationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// InvitationsClientListByShareOptions contains the optional parameters for the InvitationsClient.NewListBySharePager method. -type InvitationsClientListByShareOptions struct { - // Filters the results using OData syntax. - Filter *string - // Sorts the results using OData syntax. - Orderby *string - // The continuation token - SkipToken *string + UserName *string } // KustoClusterDataSet - A kusto cluster data set. type KustoClusterDataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // REQUIRED; Kusto cluster data set properties. - Properties *KustoClusterDataSetProperties `json:"properties,omitempty"` + Properties *KustoClusterDataSetProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type KustoClusterDataSet. func (k *KustoClusterDataSet) GetDataSet() *DataSet { return &DataSet{ - Kind: k.Kind, ID: k.ID, + Kind: k.Kind, Name: k.Name, SystemData: k.SystemData, Type: k.Type, @@ -1366,29 +1193,29 @@ func (k *KustoClusterDataSet) GetDataSet() *DataSet { // KustoClusterDataSetMapping - A Kusto cluster data set mapping type KustoClusterDataSetMapping struct { // REQUIRED; Kind of data set mapping. - Kind *DataSetMappingKind `json:"kind,omitempty"` + Kind *DataSetMappingKind // REQUIRED; Kusto cluster data set mapping properties. - Properties *KustoClusterDataSetMappingProperties `json:"properties,omitempty"` + Properties *KustoClusterDataSetMappingProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSetMapping implements the DataSetMappingClassification interface for type KustoClusterDataSetMapping. func (k *KustoClusterDataSetMapping) GetDataSetMapping() *DataSetMapping { return &DataSetMapping{ - Kind: k.Kind, ID: k.ID, + Kind: k.Kind, Name: k.Name, SystemData: k.SystemData, Type: k.Type, @@ -1398,62 +1225,62 @@ func (k *KustoClusterDataSetMapping) GetDataSetMapping() *DataSetMapping { // KustoClusterDataSetMappingProperties - Properties of the Kusto cluster data set mapping type KustoClusterDataSetMappingProperties struct { // REQUIRED; The id of the source data set. - DataSetID *string `json:"dataSetId,omitempty"` + DataSetID *string // REQUIRED; Resource id of the sink kusto cluster. - KustoClusterResourceID *string `json:"kustoClusterResourceId,omitempty"` + KustoClusterResourceID *string // READ-ONLY; Gets the status of the data set mapping. - DataSetMappingStatus *DataSetMappingStatus `json:"dataSetMappingStatus,omitempty" azure:"ro"` + DataSetMappingStatus *DataSetMappingStatus // READ-ONLY; Location of the sink kusto cluster. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Provisioning state of the data set mapping. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // KustoClusterDataSetProperties - Properties of the kusto cluster data set. type KustoClusterDataSetProperties struct { // REQUIRED; Resource id of the kusto cluster. - KustoClusterResourceID *string `json:"kustoClusterResourceId,omitempty"` + KustoClusterResourceID *string // READ-ONLY; Unique id for identifying a data set resource - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string // READ-ONLY; Location of the kusto cluster. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Provisioning state of the kusto cluster data set. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // KustoDatabaseDataSet - A kusto database data set. type KustoDatabaseDataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // REQUIRED; Kusto database data set properties. - Properties *KustoDatabaseDataSetProperties `json:"properties,omitempty"` + Properties *KustoDatabaseDataSetProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type KustoDatabaseDataSet. func (k *KustoDatabaseDataSet) GetDataSet() *DataSet { return &DataSet{ - Kind: k.Kind, ID: k.ID, + Kind: k.Kind, Name: k.Name, SystemData: k.SystemData, Type: k.Type, @@ -1463,29 +1290,29 @@ func (k *KustoDatabaseDataSet) GetDataSet() *DataSet { // KustoDatabaseDataSetMapping - A Kusto database data set mapping type KustoDatabaseDataSetMapping struct { // REQUIRED; Kind of data set mapping. - Kind *DataSetMappingKind `json:"kind,omitempty"` + Kind *DataSetMappingKind // REQUIRED; Kusto database data set mapping properties. - Properties *KustoDatabaseDataSetMappingProperties `json:"properties,omitempty"` + Properties *KustoDatabaseDataSetMappingProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSetMapping implements the DataSetMappingClassification interface for type KustoDatabaseDataSetMapping. func (k *KustoDatabaseDataSetMapping) GetDataSetMapping() *DataSetMapping { return &DataSetMapping{ - Kind: k.Kind, ID: k.ID, + Kind: k.Kind, Name: k.Name, SystemData: k.SystemData, Type: k.Type, @@ -1495,294 +1322,257 @@ func (k *KustoDatabaseDataSetMapping) GetDataSetMapping() *DataSetMapping { // KustoDatabaseDataSetMappingProperties - Properties of the Kusto database data set mapping type KustoDatabaseDataSetMappingProperties struct { // REQUIRED; The id of the source data set. - DataSetID *string `json:"dataSetId,omitempty"` + DataSetID *string // REQUIRED; Resource id of the sink kusto cluster. - KustoClusterResourceID *string `json:"kustoClusterResourceId,omitempty"` + KustoClusterResourceID *string // READ-ONLY; Gets the status of the data set mapping. - DataSetMappingStatus *DataSetMappingStatus `json:"dataSetMappingStatus,omitempty" azure:"ro"` + DataSetMappingStatus *DataSetMappingStatus // READ-ONLY; Location of the sink kusto cluster. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Provisioning state of the data set mapping. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // KustoDatabaseDataSetProperties - Properties of the kusto database data set. type KustoDatabaseDataSetProperties struct { // REQUIRED; Resource id of the kusto database. - KustoDatabaseResourceID *string `json:"kustoDatabaseResourceId,omitempty"` + KustoDatabaseResourceID *string // READ-ONLY; Unique id for identifying a data set resource - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string // READ-ONLY; Location of the kusto cluster. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Provisioning state of the kusto database data set. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // OperationList - List response for get operations. type OperationList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []*OperationModel `json:"value,omitempty"` + Value []*OperationModel // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string } // OperationMetaLogSpecification - log specifications for operation api type OperationMetaLogSpecification struct { // blob duration of the log - BlobDuration *string `json:"blobDuration,omitempty"` + BlobDuration *string // localized name of the log category - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // name of the log category - Name *string `json:"name,omitempty"` + Name *string } // OperationMetaMetricSpecification - metric specifications for the operation type OperationMetaMetricSpecification struct { // aggregation type of metric - AggregationType *string `json:"aggregationType,omitempty"` + AggregationType *string // properties for dimension - Dimensions []*DimensionProperties `json:"dimensions,omitempty"` + Dimensions []*DimensionProperties // description of the metric - DisplayDescription *string `json:"displayDescription,omitempty"` + DisplayDescription *string // localized name of the metric - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // enable regional mdm account - EnableRegionalMdmAccount *string `json:"enableRegionalMdmAccount,omitempty"` + EnableRegionalMdmAccount *string // fill gap with zero - FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` + FillGapWithZero *bool // internal metric name - InternalMetricName *string `json:"internalMetricName,omitempty"` + InternalMetricName *string // name of the metric - Name *string `json:"name,omitempty"` + Name *string // dimension name use to replace resource id if specified - ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` + ResourceIDDimensionNameOverride *string // supported aggregation types - SupportedAggregationTypes []*string `json:"supportedAggregationTypes,omitempty"` + SupportedAggregationTypes []*string // supported time grain types - SupportedTimeGrainTypes []*string `json:"supportedTimeGrainTypes,omitempty"` + SupportedTimeGrainTypes []*string // units for the metric - Unit *string `json:"unit,omitempty"` + Unit *string } // OperationMetaPropertyInfo - properties on meta info type OperationMetaPropertyInfo struct { // meta service specification - ServiceSpecification *OperationMetaServiceSpecification `json:"serviceSpecification,omitempty"` + ServiceSpecification *OperationMetaServiceSpecification } // OperationMetaServiceSpecification - The operation meta service specification type OperationMetaServiceSpecification struct { // log specifications for the operation - LogSpecifications []*OperationMetaLogSpecification `json:"logSpecifications,omitempty"` + LogSpecifications []*OperationMetaLogSpecification // metric specifications for the operation - MetricSpecifications []*OperationMetaMetricSpecification `json:"metricSpecifications,omitempty"` + MetricSpecifications []*OperationMetaMetricSpecification } // OperationModel - The response model for get operations type OperationModel struct { // Properties on the operation - Display *OperationModelProperties `json:"display,omitempty"` + Display *OperationModelProperties // Operation name for display purposes - Name *string `json:"name,omitempty"` + Name *string // origin of the operation - Origin *string `json:"origin,omitempty"` + Origin *string // properties for the operation meta info - Properties *OperationMetaPropertyInfo `json:"properties,omitempty"` + Properties *OperationMetaPropertyInfo } // OperationModelProperties - Properties on operations type OperationModelProperties struct { // Description of the operation for display purposes - Description *string `json:"description,omitempty"` + Description *string // Name of the operation for display purposes - Operation *string `json:"operation,omitempty"` + Operation *string // Name of the provider for display purposes - Provider *string `json:"provider,omitempty"` + Provider *string // Name of the resource type for display purposes - Resource *string `json:"resource,omitempty"` + Resource *string } // OperationResponse - Response for long running operation type OperationResponse struct { // REQUIRED; Operation state of the long running operation. - Status *Status `json:"status,omitempty"` + Status *Status // start time - EndTime *time.Time `json:"endTime,omitempty"` + EndTime *time.Time // The error property when status is failed. - Error *ErrorInfo `json:"error,omitempty"` + Error *ErrorInfo // start time - StartTime *time.Time `json:"startTime,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters + StartTime *time.Time } // ProviderShareSubscription - A provider side share subscription data transfer object. type ProviderShareSubscription struct { // properties of providerShareSubscription - Properties *ProviderShareSubscriptionProperties `json:"properties,omitempty"` + Properties *ProviderShareSubscriptionProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ProviderShareSubscriptionList - List response for get ShareSubscription. type ProviderShareSubscriptionList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []*ProviderShareSubscription `json:"value,omitempty"` + Value []*ProviderShareSubscription // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string } // ProviderShareSubscriptionProperties - Provider share subscription properties type ProviderShareSubscriptionProperties struct { // Expiration date of the share subscription in UTC format - ExpirationDate *time.Time `json:"expirationDate,omitempty"` + ExpirationDate *time.Time // READ-ONLY; Email of the consumer who created the share subscription - ConsumerEmail *string `json:"consumerEmail,omitempty" azure:"ro"` + ConsumerEmail *string // READ-ONLY; Name of the consumer who created the share subscription - ConsumerName *string `json:"consumerName,omitempty" azure:"ro"` + ConsumerName *string // READ-ONLY; Tenant name of the consumer who created the share subscription - ConsumerTenantName *string `json:"consumerTenantName,omitempty" azure:"ro"` + ConsumerTenantName *string // READ-ONLY; created at - CreatedAt *time.Time `json:"createdAt,omitempty" azure:"ro"` + CreatedAt *time.Time // READ-ONLY; Email of the provider who created the share - ProviderEmail *string `json:"providerEmail,omitempty" azure:"ro"` + ProviderEmail *string // READ-ONLY; Name of the provider who created the share - ProviderName *string `json:"providerName,omitempty" azure:"ro"` + ProviderName *string // READ-ONLY; share Subscription Object Id - ShareSubscriptionObjectID *string `json:"shareSubscriptionObjectId,omitempty" azure:"ro"` + ShareSubscriptionObjectID *string // READ-ONLY; Gets the status of share subscription - ShareSubscriptionStatus *ShareSubscriptionStatus `json:"shareSubscriptionStatus,omitempty" azure:"ro"` + ShareSubscriptionStatus *ShareSubscriptionStatus // READ-ONLY; Shared at - SharedAt *time.Time `json:"sharedAt,omitempty" azure:"ro"` -} - -// ProviderShareSubscriptionsClientAdjustOptions contains the optional parameters for the ProviderShareSubscriptionsClient.Adjust -// method. -type ProviderShareSubscriptionsClientAdjustOptions struct { - // placeholder for future optional parameters -} - -// ProviderShareSubscriptionsClientBeginRevokeOptions contains the optional parameters for the ProviderShareSubscriptionsClient.BeginRevoke -// method. -type ProviderShareSubscriptionsClientBeginRevokeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ProviderShareSubscriptionsClientGetByShareOptions contains the optional parameters for the ProviderShareSubscriptionsClient.GetByShare -// method. -type ProviderShareSubscriptionsClientGetByShareOptions struct { - // placeholder for future optional parameters -} - -// ProviderShareSubscriptionsClientListByShareOptions contains the optional parameters for the ProviderShareSubscriptionsClient.NewListBySharePager -// method. -type ProviderShareSubscriptionsClientListByShareOptions struct { - // Continuation Token - SkipToken *string -} - -// ProviderShareSubscriptionsClientReinstateOptions contains the optional parameters for the ProviderShareSubscriptionsClient.Reinstate -// method. -type ProviderShareSubscriptionsClientReinstateOptions struct { - // placeholder for future optional parameters + SharedAt *time.Time } // ProxyDto - Base data transfer object implementation for proxy resources. type ProxyDto struct { // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // SQLDBTableDataSet - A SQL DB table data set. type SQLDBTableDataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // SQL DB table data set properties. - Properties *SQLDBTableProperties `json:"properties,omitempty"` + Properties *SQLDBTableProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type SQLDBTableDataSet. func (s *SQLDBTableDataSet) GetDataSet() *DataSet { return &DataSet{ - Kind: s.Kind, ID: s.ID, + Kind: s.Kind, Name: s.Name, SystemData: s.SystemData, Type: s.Type, @@ -1792,29 +1582,29 @@ func (s *SQLDBTableDataSet) GetDataSet() *DataSet { // SQLDBTableDataSetMapping - A SQL DB Table data set mapping. type SQLDBTableDataSetMapping struct { // REQUIRED; Kind of data set mapping. - Kind *DataSetMappingKind `json:"kind,omitempty"` + Kind *DataSetMappingKind // REQUIRED; Sql DB data set mapping properties. - Properties *SQLDBTableDataSetMappingProperties `json:"properties,omitempty"` + Properties *SQLDBTableDataSetMappingProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSetMapping implements the DataSetMappingClassification interface for type SQLDBTableDataSetMapping. func (s *SQLDBTableDataSetMapping) GetDataSetMapping() *DataSetMapping { return &DataSetMapping{ - Kind: s.Kind, ID: s.ID, + Kind: s.Kind, Name: s.Name, SystemData: s.SystemData, Type: s.Type, @@ -1824,71 +1614,71 @@ func (s *SQLDBTableDataSetMapping) GetDataSetMapping() *DataSetMapping { // SQLDBTableDataSetMappingProperties - Properties of the SQL DB table data set mapping. type SQLDBTableDataSetMappingProperties struct { // REQUIRED; The id of the source data set. - DataSetID *string `json:"dataSetId,omitempty"` + DataSetID *string // REQUIRED; DatabaseName name of the sink data set - DatabaseName *string `json:"databaseName,omitempty"` + DatabaseName *string // REQUIRED; Resource id of SQL server - SQLServerResourceID *string `json:"sqlServerResourceId,omitempty"` + SQLServerResourceID *string // REQUIRED; Schema of the table. Default value is dbo. - SchemaName *string `json:"schemaName,omitempty"` + SchemaName *string // REQUIRED; SQL DB table name. - TableName *string `json:"tableName,omitempty"` + TableName *string // READ-ONLY; Gets the status of the data set mapping. - DataSetMappingStatus *DataSetMappingStatus `json:"dataSetMappingStatus,omitempty" azure:"ro"` + DataSetMappingStatus *DataSetMappingStatus // READ-ONLY; Provisioning state of the data set mapping. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // SQLDBTableProperties - Properties of the SQL DB table data set. type SQLDBTableProperties struct { // REQUIRED; Database name of the source data set - DatabaseName *string `json:"databaseName,omitempty"` + DatabaseName *string // REQUIRED; Resource id of SQL server - SQLServerResourceID *string `json:"sqlServerResourceId,omitempty"` + SQLServerResourceID *string // REQUIRED; Schema of the table. Default value is dbo. - SchemaName *string `json:"schemaName,omitempty"` + SchemaName *string // REQUIRED; SQL DB table name. - TableName *string `json:"tableName,omitempty"` + TableName *string // READ-ONLY; Unique id for identifying a data set resource - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string } // SQLDWTableDataSet - A SQL DW table data set. type SQLDWTableDataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // SQL DW table data set properties. - Properties *SQLDWTableProperties `json:"properties,omitempty"` + Properties *SQLDWTableProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type SQLDWTableDataSet. func (s *SQLDWTableDataSet) GetDataSet() *DataSet { return &DataSet{ - Kind: s.Kind, ID: s.ID, + Kind: s.Kind, Name: s.Name, SystemData: s.SystemData, Type: s.Type, @@ -1898,29 +1688,29 @@ func (s *SQLDWTableDataSet) GetDataSet() *DataSet { // SQLDWTableDataSetMapping - A SQL DW Table data set mapping. type SQLDWTableDataSetMapping struct { // REQUIRED; Kind of data set mapping. - Kind *DataSetMappingKind `json:"kind,omitempty"` + Kind *DataSetMappingKind // REQUIRED; Sql DW data set mapping properties. - Properties *SQLDWTableDataSetMappingProperties `json:"properties,omitempty"` + Properties *SQLDWTableDataSetMappingProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSetMapping implements the DataSetMappingClassification interface for type SQLDWTableDataSetMapping. func (s *SQLDWTableDataSetMapping) GetDataSetMapping() *DataSetMapping { return &DataSetMapping{ - Kind: s.Kind, ID: s.ID, + Kind: s.Kind, Name: s.Name, SystemData: s.SystemData, Type: s.Type, @@ -1930,61 +1720,61 @@ func (s *SQLDWTableDataSetMapping) GetDataSetMapping() *DataSetMapping { // SQLDWTableDataSetMappingProperties - Properties of the SQL DW table data set mapping. type SQLDWTableDataSetMappingProperties struct { // REQUIRED; The id of the source data set. - DataSetID *string `json:"dataSetId,omitempty"` + DataSetID *string // REQUIRED; DataWarehouse name of the source data set - DataWarehouseName *string `json:"dataWarehouseName,omitempty"` + DataWarehouseName *string // REQUIRED; Resource id of SQL server - SQLServerResourceID *string `json:"sqlServerResourceId,omitempty"` + SQLServerResourceID *string // REQUIRED; Schema of the table. Default value is dbo. - SchemaName *string `json:"schemaName,omitempty"` + SchemaName *string // REQUIRED; SQL DW table name. - TableName *string `json:"tableName,omitempty"` + TableName *string // READ-ONLY; Gets the status of the data set mapping. - DataSetMappingStatus *DataSetMappingStatus `json:"dataSetMappingStatus,omitempty" azure:"ro"` + DataSetMappingStatus *DataSetMappingStatus // READ-ONLY; Provisioning state of the data set mapping. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // SQLDWTableProperties - Properties of the SQL DW table data set. type SQLDWTableProperties struct { // REQUIRED; DataWarehouse name of the source data set - DataWarehouseName *string `json:"dataWarehouseName,omitempty"` + DataWarehouseName *string // REQUIRED; Resource id of SQL server - SQLServerResourceID *string `json:"sqlServerResourceId,omitempty"` + SQLServerResourceID *string // REQUIRED; Schema of the table. Default value is dbo. - SchemaName *string `json:"schemaName,omitempty"` + SchemaName *string // REQUIRED; SQL DW table name. - TableName *string `json:"tableName,omitempty"` + TableName *string // READ-ONLY; Unique id for identifying a data set resource - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string } // ScheduledSourceShareSynchronizationSettingProperties - A Scheduled source synchronization setting data transfer object. type ScheduledSourceShareSynchronizationSettingProperties struct { // Recurrence Interval - RecurrenceInterval *RecurrenceInterval `json:"recurrenceInterval,omitempty"` + RecurrenceInterval *RecurrenceInterval // Synchronization time - SynchronizationTime *time.Time `json:"synchronizationTime,omitempty"` + SynchronizationTime *time.Time } // ScheduledSourceSynchronizationSetting - A type of synchronization setting based on schedule type ScheduledSourceSynchronizationSetting struct { // REQUIRED; Kind of synchronization setting on share. - Kind *SourceShareSynchronizationSettingKind `json:"kind,omitempty"` + Kind *SourceShareSynchronizationSettingKind // Properties of scheduled synchronization - Properties *ScheduledSourceShareSynchronizationSettingProperties `json:"properties,omitempty"` + Properties *ScheduledSourceShareSynchronizationSettingProperties } // GetSourceShareSynchronizationSetting implements the SourceShareSynchronizationSettingClassification interface for type @@ -1998,29 +1788,29 @@ func (s *ScheduledSourceSynchronizationSetting) GetSourceShareSynchronizationSet // ScheduledSynchronizationSetting - A type of synchronization setting based on schedule type ScheduledSynchronizationSetting struct { // REQUIRED; Kind of synchronization setting. - Kind *SynchronizationSettingKind `json:"kind,omitempty"` + Kind *SynchronizationSettingKind // REQUIRED; Properties of scheduled synchronization - Properties *ScheduledSynchronizationSettingProperties `json:"properties,omitempty"` + Properties *ScheduledSynchronizationSettingProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetSynchronizationSetting implements the SynchronizationSettingClassification interface for type ScheduledSynchronizationSetting. func (s *ScheduledSynchronizationSetting) GetSynchronizationSetting() *SynchronizationSetting { return &SynchronizationSetting{ - Kind: s.Kind, ID: s.ID, + Kind: s.Kind, Name: s.Name, SystemData: s.SystemData, Type: s.Type, @@ -2030,47 +1820,47 @@ func (s *ScheduledSynchronizationSetting) GetSynchronizationSetting() *Synchroni // ScheduledSynchronizationSettingProperties - A Scheduled synchronization setting data transfer object. type ScheduledSynchronizationSettingProperties struct { // REQUIRED; Recurrence Interval - RecurrenceInterval *RecurrenceInterval `json:"recurrenceInterval,omitempty"` + RecurrenceInterval *RecurrenceInterval // REQUIRED; Synchronization time - SynchronizationTime *time.Time `json:"synchronizationTime,omitempty"` + SynchronizationTime *time.Time // READ-ONLY; Time at which the synchronization setting was created. - CreatedAt *time.Time `json:"createdAt,omitempty" azure:"ro"` + CreatedAt *time.Time // READ-ONLY; Gets or sets the provisioning state - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState // READ-ONLY; Name of the user who created the synchronization setting. - UserName *string `json:"userName,omitempty" azure:"ro"` + UserName *string } // ScheduledTrigger - A type of trigger based on schedule type ScheduledTrigger struct { // REQUIRED; Kind of synchronization on trigger. - Kind *TriggerKind `json:"kind,omitempty"` + Kind *TriggerKind // REQUIRED; Properties of scheduled synchronization - Properties *ScheduledTriggerProperties `json:"properties,omitempty"` + Properties *ScheduledTriggerProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetTrigger implements the TriggerClassification interface for type ScheduledTrigger. func (s *ScheduledTrigger) GetTrigger() *Trigger { return &Trigger{ - Kind: s.Kind, ID: s.ID, + Kind: s.Kind, Name: s.Name, SystemData: s.SystemData, Type: s.Type, @@ -2080,360 +1870,232 @@ func (s *ScheduledTrigger) GetTrigger() *Trigger { // ScheduledTriggerProperties - A Scheduled trigger data transfer object. type ScheduledTriggerProperties struct { // REQUIRED; Recurrence Interval - RecurrenceInterval *RecurrenceInterval `json:"recurrenceInterval,omitempty"` + RecurrenceInterval *RecurrenceInterval // REQUIRED; Synchronization time - SynchronizationTime *time.Time `json:"synchronizationTime,omitempty"` + SynchronizationTime *time.Time // Synchronization mode - SynchronizationMode *SynchronizationMode `json:"synchronizationMode,omitempty"` + SynchronizationMode *SynchronizationMode // READ-ONLY; Time at which the trigger was created. - CreatedAt *time.Time `json:"createdAt,omitempty" azure:"ro"` + CreatedAt *time.Time // READ-ONLY; Gets the provisioning state - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState // READ-ONLY; Gets the trigger state - TriggerStatus *TriggerStatus `json:"triggerStatus,omitempty" azure:"ro"` + TriggerStatus *TriggerStatus // READ-ONLY; Name of the user who created the trigger. - UserName *string `json:"userName,omitempty" azure:"ro"` + UserName *string } // Share - A share data transfer object. type Share struct { // Properties on the share - Properties *ShareProperties `json:"properties,omitempty"` + Properties *ShareProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ShareList - List response for get Shares. type ShareList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []*Share `json:"value,omitempty"` + Value []*Share // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string } // ShareProperties - Share property bag. type ShareProperties struct { // Share description. - Description *string `json:"description,omitempty"` + Description *string // Share kind. - ShareKind *ShareKind `json:"shareKind,omitempty"` + ShareKind *ShareKind // Share terms. - Terms *string `json:"terms,omitempty"` + Terms *string // READ-ONLY; Time at which the share was created. - CreatedAt *time.Time `json:"createdAt,omitempty" azure:"ro"` + CreatedAt *time.Time // READ-ONLY; Gets or sets the provisioning state - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState // READ-ONLY; Email of the user who created the resource - UserEmail *string `json:"userEmail,omitempty" azure:"ro"` + UserEmail *string // READ-ONLY; Name of the user who created the resource - UserName *string `json:"userName,omitempty" azure:"ro"` + UserName *string } // ShareSubscription - A share subscription data transfer object. type ShareSubscription struct { // REQUIRED; Properties on the share subscription - Properties *ShareSubscriptionProperties `json:"properties,omitempty"` + Properties *ShareSubscriptionProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ShareSubscriptionList - List response for get ShareSubscription. type ShareSubscriptionList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []*ShareSubscription `json:"value,omitempty"` + Value []*ShareSubscription // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string } // ShareSubscriptionProperties - Share subscription property bag. type ShareSubscriptionProperties struct { // REQUIRED; The invitation id. - InvitationID *string `json:"invitationId,omitempty"` + InvitationID *string // REQUIRED; Source share location. - SourceShareLocation *string `json:"sourceShareLocation,omitempty"` + SourceShareLocation *string // The expiration date of the share subscription. - ExpirationDate *time.Time `json:"expirationDate,omitempty"` + ExpirationDate *time.Time // READ-ONLY; Time at which the share subscription was created. - CreatedAt *time.Time `json:"createdAt,omitempty" azure:"ro"` + CreatedAt *time.Time // READ-ONLY; Email of the provider who created the resource - ProviderEmail *string `json:"providerEmail,omitempty" azure:"ro"` + ProviderEmail *string // READ-ONLY; Name of the provider who created the resource - ProviderName *string `json:"providerName,omitempty" azure:"ro"` + ProviderName *string // READ-ONLY; Tenant name of the provider who created the resource - ProviderTenantName *string `json:"providerTenantName,omitempty" azure:"ro"` + ProviderTenantName *string // READ-ONLY; Provisioning state of the share subscription - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState // READ-ONLY; Description of share - ShareDescription *string `json:"shareDescription,omitempty" azure:"ro"` + ShareDescription *string // READ-ONLY; Kind of share - ShareKind *ShareKind `json:"shareKind,omitempty" azure:"ro"` + ShareKind *ShareKind // READ-ONLY; Name of the share - ShareName *string `json:"shareName,omitempty" azure:"ro"` + ShareName *string // READ-ONLY; Gets the current status of share subscription. - ShareSubscriptionStatus *ShareSubscriptionStatus `json:"shareSubscriptionStatus,omitempty" azure:"ro"` + ShareSubscriptionStatus *ShareSubscriptionStatus // READ-ONLY; Terms of a share - ShareTerms *string `json:"shareTerms,omitempty" azure:"ro"` + ShareTerms *string // READ-ONLY; Email of the user who created the resource - UserEmail *string `json:"userEmail,omitempty" azure:"ro"` + UserEmail *string // READ-ONLY; Name of the user who created the resource - UserName *string `json:"userName,omitempty" azure:"ro"` + UserName *string } // ShareSubscriptionSynchronization - A ShareSubscriptionSynchronization data transfer object. type ShareSubscriptionSynchronization struct { // REQUIRED; Synchronization id - SynchronizationID *string `json:"synchronizationId,omitempty"` + SynchronizationID *string // READ-ONLY; Synchronization duration - DurationMs *int32 `json:"durationMs,omitempty" azure:"ro"` + DurationMs *int32 // READ-ONLY; End time of synchronization - EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` + EndTime *time.Time // READ-ONLY; message of Synchronization - Message *string `json:"message,omitempty" azure:"ro"` + Message *string // READ-ONLY; start time of synchronization - StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` + StartTime *time.Time // READ-ONLY; Raw Status - Status *string `json:"status,omitempty" azure:"ro"` + Status *string // READ-ONLY; Synchronization Mode - SynchronizationMode *SynchronizationMode `json:"synchronizationMode,omitempty" azure:"ro"` + SynchronizationMode *SynchronizationMode } // ShareSubscriptionSynchronizationList - A consumer side list of share subscription synchronizations type ShareSubscriptionSynchronizationList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []*ShareSubscriptionSynchronization `json:"value,omitempty"` + Value []*ShareSubscriptionSynchronization // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` -} - -// ShareSubscriptionsClientBeginCancelSynchronizationOptions contains the optional parameters for the ShareSubscriptionsClient.BeginCancelSynchronization -// method. -type ShareSubscriptionsClientBeginCancelSynchronizationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ShareSubscriptionsClientBeginDeleteOptions contains the optional parameters for the ShareSubscriptionsClient.BeginDelete -// method. -type ShareSubscriptionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ShareSubscriptionsClientBeginSynchronizeOptions contains the optional parameters for the ShareSubscriptionsClient.BeginSynchronize -// method. -type ShareSubscriptionsClientBeginSynchronizeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ShareSubscriptionsClientCreateOptions contains the optional parameters for the ShareSubscriptionsClient.Create method. -type ShareSubscriptionsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// ShareSubscriptionsClientGetOptions contains the optional parameters for the ShareSubscriptionsClient.Get method. -type ShareSubscriptionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ShareSubscriptionsClientListByAccountOptions contains the optional parameters for the ShareSubscriptionsClient.NewListByAccountPager -// method. -type ShareSubscriptionsClientListByAccountOptions struct { - // Filters the results using OData syntax. - Filter *string - // Sorts the results using OData syntax. - Orderby *string - // Continuation Token - SkipToken *string -} - -// ShareSubscriptionsClientListSourceShareSynchronizationSettingsOptions contains the optional parameters for the ShareSubscriptionsClient.NewListSourceShareSynchronizationSettingsPager -// method. -type ShareSubscriptionsClientListSourceShareSynchronizationSettingsOptions struct { - // Continuation token - SkipToken *string -} - -// ShareSubscriptionsClientListSynchronizationDetailsOptions contains the optional parameters for the ShareSubscriptionsClient.NewListSynchronizationDetailsPager -// method. -type ShareSubscriptionsClientListSynchronizationDetailsOptions struct { - // Filters the results using OData syntax. - Filter *string - // Sorts the results using OData syntax. - Orderby *string - // Continuation token - SkipToken *string -} - -// ShareSubscriptionsClientListSynchronizationsOptions contains the optional parameters for the ShareSubscriptionsClient.NewListSynchronizationsPager -// method. -type ShareSubscriptionsClientListSynchronizationsOptions struct { - // Filters the results using OData syntax. - Filter *string - // Sorts the results using OData syntax. - Orderby *string - // Continuation token - SkipToken *string + NextLink *string } // ShareSynchronization - A ShareSynchronization data transfer object. type ShareSynchronization struct { // Email of the user who created the synchronization - ConsumerEmail *string `json:"consumerEmail,omitempty"` + ConsumerEmail *string // Name of the user who created the synchronization - ConsumerName *string `json:"consumerName,omitempty"` + ConsumerName *string // Tenant name of the consumer who created the synchronization - ConsumerTenantName *string `json:"consumerTenantName,omitempty"` + ConsumerTenantName *string // synchronization duration - DurationMs *int32 `json:"durationMs,omitempty"` + DurationMs *int32 // End time of synchronization - EndTime *time.Time `json:"endTime,omitempty"` + EndTime *time.Time // message of synchronization - Message *string `json:"message,omitempty"` + Message *string // start time of synchronization - StartTime *time.Time `json:"startTime,omitempty"` + StartTime *time.Time // Raw Status - Status *string `json:"status,omitempty"` + Status *string // Synchronization id - SynchronizationID *string `json:"synchronizationId,omitempty"` + SynchronizationID *string // READ-ONLY; Synchronization mode - SynchronizationMode *SynchronizationMode `json:"synchronizationMode,omitempty" azure:"ro"` + SynchronizationMode *SynchronizationMode } // ShareSynchronizationList - List response for get ShareSynchronization. type ShareSynchronizationList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []*ShareSynchronization `json:"value,omitempty"` + Value []*ShareSynchronization // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` -} - -// SharesClientBeginDeleteOptions contains the optional parameters for the SharesClient.BeginDelete method. -type SharesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SharesClientCreateOptions contains the optional parameters for the SharesClient.Create method. -type SharesClientCreateOptions struct { - // placeholder for future optional parameters -} - -// SharesClientGetOptions contains the optional parameters for the SharesClient.Get method. -type SharesClientGetOptions struct { - // placeholder for future optional parameters -} - -// SharesClientListByAccountOptions contains the optional parameters for the SharesClient.NewListByAccountPager method. -type SharesClientListByAccountOptions struct { - // Filters the results using OData syntax. - Filter *string - // Sorts the results using OData syntax. - Orderby *string - // Continuation Token - SkipToken *string -} - -// SharesClientListSynchronizationDetailsOptions contains the optional parameters for the SharesClient.NewListSynchronizationDetailsPager -// method. -type SharesClientListSynchronizationDetailsOptions struct { - // Filters the results using OData syntax. - Filter *string - // Sorts the results using OData syntax. - Orderby *string - // Continuation token - SkipToken *string -} - -// SharesClientListSynchronizationsOptions contains the optional parameters for the SharesClient.NewListSynchronizationsPager -// method. -type SharesClientListSynchronizationsOptions struct { - // Filters the results using OData syntax. - Filter *string - // Sorts the results using OData syntax. - Orderby *string - // Continuation token - SkipToken *string -} - -// SourceShareSynchronizationSettingClassification provides polymorphic access to related types. -// Call the interface's GetSourceShareSynchronizationSetting() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ScheduledSourceSynchronizationSetting, *SourceShareSynchronizationSetting -type SourceShareSynchronizationSettingClassification interface { - // GetSourceShareSynchronizationSetting returns the SourceShareSynchronizationSetting content of the underlying type. - GetSourceShareSynchronizationSetting() *SourceShareSynchronizationSetting + NextLink *string } // SourceShareSynchronizationSetting - A view of synchronization setting added by the provider type SourceShareSynchronizationSetting struct { // REQUIRED; Kind of synchronization setting on share. - Kind *SourceShareSynchronizationSettingKind `json:"kind,omitempty"` + Kind *SourceShareSynchronizationSettingKind } // GetSourceShareSynchronizationSetting implements the SourceShareSynchronizationSettingClassification interface for type @@ -2445,38 +2107,38 @@ func (s *SourceShareSynchronizationSetting) GetSourceShareSynchronizationSetting // SourceShareSynchronizationSettingList - List response for get source share Synchronization settings type SourceShareSynchronizationSettingList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []SourceShareSynchronizationSettingClassification `json:"value,omitempty"` + Value []SourceShareSynchronizationSettingClassification // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string } // SynapseWorkspaceSQLPoolTableDataSet - A Synapse Workspace Sql Pool Table data set. type SynapseWorkspaceSQLPoolTableDataSet struct { // REQUIRED; Kind of data set. - Kind *DataSetKind `json:"kind,omitempty"` + Kind *DataSetKind // REQUIRED; Synapse Workspace Sql Pool Table data set properties. - Properties *SynapseWorkspaceSQLPoolTableDataSetProperties `json:"properties,omitempty"` + Properties *SynapseWorkspaceSQLPoolTableDataSetProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSet implements the DataSetClassification interface for type SynapseWorkspaceSQLPoolTableDataSet. func (s *SynapseWorkspaceSQLPoolTableDataSet) GetDataSet() *DataSet { return &DataSet{ - Kind: s.Kind, ID: s.ID, + Kind: s.Kind, Name: s.Name, SystemData: s.SystemData, Type: s.Type, @@ -2486,29 +2148,29 @@ func (s *SynapseWorkspaceSQLPoolTableDataSet) GetDataSet() *DataSet { // SynapseWorkspaceSQLPoolTableDataSetMapping - A Synapse Workspace Sql Pool Table data set mapping type SynapseWorkspaceSQLPoolTableDataSetMapping struct { // REQUIRED; Kind of data set mapping. - Kind *DataSetMappingKind `json:"kind,omitempty"` + Kind *DataSetMappingKind // REQUIRED; A Synapse Workspace Sql Pool Table data set mapping properties. - Properties *SynapseWorkspaceSQLPoolTableDataSetMappingProperties `json:"properties,omitempty"` + Properties *SynapseWorkspaceSQLPoolTableDataSetMappingProperties // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataSetMapping implements the DataSetMappingClassification interface for type SynapseWorkspaceSQLPoolTableDataSetMapping. func (s *SynapseWorkspaceSQLPoolTableDataSetMapping) GetDataSetMapping() *DataSetMapping { return &DataSetMapping{ - Kind: s.Kind, ID: s.ID, + Kind: s.Kind, Name: s.Name, SystemData: s.SystemData, Type: s.Type, @@ -2518,109 +2180,100 @@ func (s *SynapseWorkspaceSQLPoolTableDataSetMapping) GetDataSetMapping() *DataSe // SynapseWorkspaceSQLPoolTableDataSetMappingProperties - Properties of the Synapse Workspace SQL Pool Table data set mapping type SynapseWorkspaceSQLPoolTableDataSetMappingProperties struct { // REQUIRED; The id of the source data set. - DataSetID *string `json:"dataSetId,omitempty"` + DataSetID *string // REQUIRED; Resource id of the Synapse Workspace SQL Pool Table - SynapseWorkspaceSQLPoolTableResourceID *string `json:"synapseWorkspaceSqlPoolTableResourceId,omitempty"` + SynapseWorkspaceSQLPoolTableResourceID *string // READ-ONLY; Gets the status of the data set mapping. - DataSetMappingStatus *DataSetMappingStatus `json:"dataSetMappingStatus,omitempty" azure:"ro"` + DataSetMappingStatus *DataSetMappingStatus // READ-ONLY; Provisioning state of the data set mapping. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // SynapseWorkspaceSQLPoolTableDataSetProperties - Properties of the Synapse Workspace SQL Pool Table data set. type SynapseWorkspaceSQLPoolTableDataSetProperties struct { // REQUIRED; Resource id of the Synapse Workspace SQL Pool Table - SynapseWorkspaceSQLPoolTableResourceID *string `json:"synapseWorkspaceSqlPoolTableResourceId,omitempty"` + SynapseWorkspaceSQLPoolTableResourceID *string // READ-ONLY; Unique id for identifying a data set resource - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string } // SynchronizationDetails - Synchronization details at data set level type SynchronizationDetails struct { // READ-ONLY; Id of data set - DataSetID *string `json:"dataSetId,omitempty" azure:"ro"` + DataSetID *string // READ-ONLY; Type of the data set - DataSetType *DataSetType `json:"dataSetType,omitempty" azure:"ro"` + DataSetType *DataSetType // READ-ONLY; Duration of data set level copy - DurationMs *int32 `json:"durationMs,omitempty" azure:"ro"` + DurationMs *int32 // READ-ONLY; End time of data set level copy - EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` + EndTime *time.Time // READ-ONLY; The number of files read from the source data set - FilesRead *int64 `json:"filesRead,omitempty" azure:"ro"` + FilesRead *int64 // READ-ONLY; The number of files written into the sink data set - FilesWritten *int64 `json:"filesWritten,omitempty" azure:"ro"` + FilesWritten *int64 // READ-ONLY; Error message if any - Message *string `json:"message,omitempty" azure:"ro"` + Message *string // READ-ONLY; Name of the data set - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The number of files copied into the sink data set - RowsCopied *int64 `json:"rowsCopied,omitempty" azure:"ro"` + RowsCopied *int64 // READ-ONLY; The number of rows read from the source data set. - RowsRead *int64 `json:"rowsRead,omitempty" azure:"ro"` + RowsRead *int64 // READ-ONLY; The size of the data read from the source data set in bytes - SizeRead *int64 `json:"sizeRead,omitempty" azure:"ro"` + SizeRead *int64 // READ-ONLY; The size of the data written into the sink data set in bytes - SizeWritten *int64 `json:"sizeWritten,omitempty" azure:"ro"` + SizeWritten *int64 // READ-ONLY; Start time of data set level copy - StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` + StartTime *time.Time // READ-ONLY; Raw Status - Status *string `json:"status,omitempty" azure:"ro"` + Status *string // READ-ONLY; The vCore units consumed for the data set synchronization - VCore *int64 `json:"vCore,omitempty" azure:"ro"` + VCore *int64 } // SynchronizationDetailsList - details of synchronization type SynchronizationDetailsList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []*SynchronizationDetails `json:"value,omitempty"` + Value []*SynchronizationDetails // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` -} - -// SynchronizationSettingClassification provides polymorphic access to related types. -// Call the interface's GetSynchronizationSetting() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ScheduledSynchronizationSetting, *SynchronizationSetting -type SynchronizationSettingClassification interface { - // GetSynchronizationSetting returns the SynchronizationSetting content of the underlying type. - GetSynchronizationSetting() *SynchronizationSetting + NextLink *string } // SynchronizationSetting - A Synchronization Setting data transfer object. type SynchronizationSetting struct { // REQUIRED; Kind of synchronization setting. - Kind *SynchronizationSettingKind `json:"kind,omitempty"` + Kind *SynchronizationSettingKind // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetSynchronizationSetting implements the SynchronizationSettingClassification interface for type SynchronizationSetting. @@ -2629,89 +2282,55 @@ func (s *SynchronizationSetting) GetSynchronizationSetting() *SynchronizationSet // SynchronizationSettingList - List response for get Synchronization settings type SynchronizationSettingList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []SynchronizationSettingClassification `json:"value,omitempty"` + Value []SynchronizationSettingClassification // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` -} - -// SynchronizationSettingsClientBeginDeleteOptions contains the optional parameters for the SynchronizationSettingsClient.BeginDelete -// method. -type SynchronizationSettingsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SynchronizationSettingsClientCreateOptions contains the optional parameters for the SynchronizationSettingsClient.Create -// method. -type SynchronizationSettingsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// SynchronizationSettingsClientGetOptions contains the optional parameters for the SynchronizationSettingsClient.Get method. -type SynchronizationSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SynchronizationSettingsClientListByShareOptions contains the optional parameters for the SynchronizationSettingsClient.NewListBySharePager -// method. -type SynchronizationSettingsClientListByShareOptions struct { - // continuation token - SkipToken *string + NextLink *string } // Synchronize - Payload for the synchronizing the data. type Synchronize struct { // Mode of synchronization used in triggers and snapshot sync. Incremental by default - SynchronizationMode *SynchronizationMode `json:"synchronizationMode,omitempty"` + SynchronizationMode *SynchronizationMode } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` + CreatedAt *time.Time // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` + CreatedBy *string // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` + CreatedByType *CreatedByType // The type of identity that last modified the resource. - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` + LastModifiedAt *time.Time // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedBy *string // The type of identity that last modified the resource. - LastModifiedByType *LastModifiedByType `json:"lastModifiedByType,omitempty"` -} - -// TriggerClassification provides polymorphic access to related types. -// Call the interface's GetTrigger() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ScheduledTrigger, *Trigger -type TriggerClassification interface { - // GetTrigger returns the Trigger content of the underlying type. - GetTrigger() *Trigger + LastModifiedByType *LastModifiedByType } // Trigger - A Trigger data transfer object. type Trigger struct { // REQUIRED; Kind of synchronization on trigger. - Kind *TriggerKind `json:"kind,omitempty"` + Kind *TriggerKind // READ-ONLY; The resource id of the azure resource - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the azure resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System Data of the Azure resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Type of the azure resource - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetTrigger implements the TriggerClassification interface for type Trigger. @@ -2720,32 +2339,8 @@ func (t *Trigger) GetTrigger() *Trigger { return t } // TriggerList - List response for get triggers type TriggerList struct { // REQUIRED; Collection of items of type DataTransferObjects. - Value []TriggerClassification `json:"value,omitempty"` + Value []TriggerClassification // The Url of next result page. - NextLink *string `json:"nextLink,omitempty"` -} - -// TriggersClientBeginCreateOptions contains the optional parameters for the TriggersClient.BeginCreate method. -type TriggersClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// TriggersClientBeginDeleteOptions contains the optional parameters for the TriggersClient.BeginDelete method. -type TriggersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// TriggersClientGetOptions contains the optional parameters for the TriggersClient.Get method. -type TriggersClientGetOptions struct { - // placeholder for future optional parameters -} - -// TriggersClientListByShareSubscriptionOptions contains the optional parameters for the TriggersClient.NewListByShareSubscriptionPager -// method. -type TriggersClientListByShareSubscriptionOptions struct { - // Continuation token - SkipToken *string + NextLink *string } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/models_serde.go index d80e9660..7064aa7b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -873,7 +872,7 @@ func (a *AccountList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AccountProperties. func (a AccountProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", a.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", a.CreatedAt) populate(objectMap, "provisioningState", a.ProvisioningState) populate(objectMap, "userEmail", a.UserEmail) populate(objectMap, "userName", a.UserName) @@ -890,7 +889,7 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &a.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &a.CreatedAt) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) @@ -1599,15 +1598,15 @@ func (c ConsumerInvitationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "dataSetCount", c.DataSetCount) populate(objectMap, "description", c.Description) - populateTimeRFC3339(objectMap, "expirationDate", c.ExpirationDate) + populateDateTimeRFC3339(objectMap, "expirationDate", c.ExpirationDate) populate(objectMap, "invitationId", c.InvitationID) populate(objectMap, "invitationStatus", c.InvitationStatus) populate(objectMap, "location", c.Location) populate(objectMap, "providerEmail", c.ProviderEmail) populate(objectMap, "providerName", c.ProviderName) populate(objectMap, "providerTenantName", c.ProviderTenantName) - populateTimeRFC3339(objectMap, "respondedAt", c.RespondedAt) - populateTimeRFC3339(objectMap, "sentAt", c.SentAt) + populateDateTimeRFC3339(objectMap, "respondedAt", c.RespondedAt) + populateDateTimeRFC3339(objectMap, "sentAt", c.SentAt) populate(objectMap, "shareName", c.ShareName) populate(objectMap, "termsOfUse", c.TermsOfUse) populate(objectMap, "userEmail", c.UserEmail) @@ -1631,7 +1630,7 @@ func (c *ConsumerInvitationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Description", &c.Description) delete(rawMsg, key) case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &c.ExpirationDate) + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &c.ExpirationDate) delete(rawMsg, key) case "invitationId": err = unpopulate(val, "InvitationID", &c.InvitationID) @@ -1652,10 +1651,10 @@ func (c *ConsumerInvitationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ProviderTenantName", &c.ProviderTenantName) delete(rawMsg, key) case "respondedAt": - err = unpopulateTimeRFC3339(val, "RespondedAt", &c.RespondedAt) + err = unpopulateDateTimeRFC3339(val, "RespondedAt", &c.RespondedAt) delete(rawMsg, key) case "sentAt": - err = unpopulateTimeRFC3339(val, "SentAt", &c.SentAt) + err = unpopulateDateTimeRFC3339(val, "SentAt", &c.SentAt) delete(rawMsg, key) case "shareName": err = unpopulate(val, "ShareName", &c.ShareName) @@ -2024,7 +2023,7 @@ func (d *DimensionProperties) UnmarshalJSON(data []byte) error { func (e EmailRegistration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "activationCode", e.ActivationCode) - populateTimeRFC3339(objectMap, "activationExpirationDate", e.ActivationExpirationDate) + populateDateTimeRFC3339(objectMap, "activationExpirationDate", e.ActivationExpirationDate) populate(objectMap, "email", e.Email) populate(objectMap, "registrationStatus", e.RegistrationStatus) populate(objectMap, "tenantId", e.TenantID) @@ -2044,7 +2043,7 @@ func (e *EmailRegistration) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ActivationCode", &e.ActivationCode) delete(rawMsg, key) case "activationExpirationDate": - err = unpopulateTimeRFC3339(val, "ActivationExpirationDate", &e.ActivationExpirationDate) + err = unpopulateDateTimeRFC3339(val, "ActivationExpirationDate", &e.ActivationExpirationDate) delete(rawMsg, key) case "email": err = unpopulate(val, "Email", &e.Email) @@ -2241,11 +2240,11 @@ func (i *InvitationList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InvitationProperties. func (i InvitationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "expirationDate", i.ExpirationDate) + populateDateTimeRFC3339(objectMap, "expirationDate", i.ExpirationDate) populate(objectMap, "invitationId", i.InvitationID) populate(objectMap, "invitationStatus", i.InvitationStatus) - populateTimeRFC3339(objectMap, "respondedAt", i.RespondedAt) - populateTimeRFC3339(objectMap, "sentAt", i.SentAt) + populateDateTimeRFC3339(objectMap, "respondedAt", i.RespondedAt) + populateDateTimeRFC3339(objectMap, "sentAt", i.SentAt) populate(objectMap, "targetActiveDirectoryId", i.TargetActiveDirectoryID) populate(objectMap, "targetEmail", i.TargetEmail) populate(objectMap, "targetObjectId", i.TargetObjectID) @@ -2264,7 +2263,7 @@ func (i *InvitationProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &i.ExpirationDate) + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &i.ExpirationDate) delete(rawMsg, key) case "invitationId": err = unpopulate(val, "InvitationID", &i.InvitationID) @@ -2273,10 +2272,10 @@ func (i *InvitationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "InvitationStatus", &i.InvitationStatus) delete(rawMsg, key) case "respondedAt": - err = unpopulateTimeRFC3339(val, "RespondedAt", &i.RespondedAt) + err = unpopulateDateTimeRFC3339(val, "RespondedAt", &i.RespondedAt) delete(rawMsg, key) case "sentAt": - err = unpopulateTimeRFC3339(val, "SentAt", &i.SentAt) + err = unpopulateDateTimeRFC3339(val, "SentAt", &i.SentAt) delete(rawMsg, key) case "targetActiveDirectoryId": err = unpopulate(val, "TargetActiveDirectoryID", &i.TargetActiveDirectoryID) @@ -2929,9 +2928,9 @@ func (o *OperationModelProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationResponse. func (o OperationResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", o.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", o.EndTime) populate(objectMap, "error", o.Error) - populateTimeRFC3339(objectMap, "startTime", o.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) populate(objectMap, "status", o.Status) return json.Marshal(objectMap) } @@ -2946,13 +2945,13 @@ func (o *OperationResponse) UnmarshalJSON(data []byte) error { var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &o.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &o.Error) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &o.Status) @@ -3045,13 +3044,13 @@ func (p ProviderShareSubscriptionProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "consumerEmail", p.ConsumerEmail) populate(objectMap, "consumerName", p.ConsumerName) populate(objectMap, "consumerTenantName", p.ConsumerTenantName) - populateTimeRFC3339(objectMap, "createdAt", p.CreatedAt) - populateTimeRFC3339(objectMap, "expirationDate", p.ExpirationDate) + populateDateTimeRFC3339(objectMap, "createdAt", p.CreatedAt) + populateDateTimeRFC3339(objectMap, "expirationDate", p.ExpirationDate) populate(objectMap, "providerEmail", p.ProviderEmail) populate(objectMap, "providerName", p.ProviderName) populate(objectMap, "shareSubscriptionObjectId", p.ShareSubscriptionObjectID) populate(objectMap, "shareSubscriptionStatus", p.ShareSubscriptionStatus) - populateTimeRFC3339(objectMap, "sharedAt", p.SharedAt) + populateDateTimeRFC3339(objectMap, "sharedAt", p.SharedAt) return json.Marshal(objectMap) } @@ -3074,10 +3073,10 @@ func (p *ProviderShareSubscriptionProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ConsumerTenantName", &p.ConsumerTenantName) delete(rawMsg, key) case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &p.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &p.CreatedAt) delete(rawMsg, key) case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &p.ExpirationDate) + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &p.ExpirationDate) delete(rawMsg, key) case "providerEmail": err = unpopulate(val, "ProviderEmail", &p.ProviderEmail) @@ -3092,7 +3091,7 @@ func (p *ProviderShareSubscriptionProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ShareSubscriptionStatus", &p.ShareSubscriptionStatus) delete(rawMsg, key) case "sharedAt": - err = unpopulateTimeRFC3339(val, "SharedAt", &p.SharedAt) + err = unpopulateDateTimeRFC3339(val, "SharedAt", &p.SharedAt) delete(rawMsg, key) } if err != nil { @@ -3521,7 +3520,7 @@ func (s *SQLDWTableProperties) UnmarshalJSON(data []byte) error { func (s ScheduledSourceShareSynchronizationSettingProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "recurrenceInterval", s.RecurrenceInterval) - populateTimeRFC3339(objectMap, "synchronizationTime", s.SynchronizationTime) + populateDateTimeRFC3339(objectMap, "synchronizationTime", s.SynchronizationTime) return json.Marshal(objectMap) } @@ -3538,7 +3537,7 @@ func (s *ScheduledSourceShareSynchronizationSettingProperties) UnmarshalJSON(dat err = unpopulate(val, "RecurrenceInterval", &s.RecurrenceInterval) delete(rawMsg, key) case "synchronizationTime": - err = unpopulateTimeRFC3339(val, "SynchronizationTime", &s.SynchronizationTime) + err = unpopulateDateTimeRFC3339(val, "SynchronizationTime", &s.SynchronizationTime) delete(rawMsg, key) } if err != nil { @@ -3629,10 +3628,10 @@ func (s *ScheduledSynchronizationSetting) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScheduledSynchronizationSettingProperties. func (s ScheduledSynchronizationSettingProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "recurrenceInterval", s.RecurrenceInterval) - populateTimeRFC3339(objectMap, "synchronizationTime", s.SynchronizationTime) + populateDateTimeRFC3339(objectMap, "synchronizationTime", s.SynchronizationTime) populate(objectMap, "userName", s.UserName) return json.Marshal(objectMap) } @@ -3647,7 +3646,7 @@ func (s *ScheduledSynchronizationSettingProperties) UnmarshalJSON(data []byte) e var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) @@ -3656,7 +3655,7 @@ func (s *ScheduledSynchronizationSettingProperties) UnmarshalJSON(data []byte) e err = unpopulate(val, "RecurrenceInterval", &s.RecurrenceInterval) delete(rawMsg, key) case "synchronizationTime": - err = unpopulateTimeRFC3339(val, "SynchronizationTime", &s.SynchronizationTime) + err = unpopulateDateTimeRFC3339(val, "SynchronizationTime", &s.SynchronizationTime) delete(rawMsg, key) case "userName": err = unpopulate(val, "UserName", &s.UserName) @@ -3719,11 +3718,11 @@ func (s *ScheduledTrigger) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScheduledTriggerProperties. func (s ScheduledTriggerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "recurrenceInterval", s.RecurrenceInterval) populate(objectMap, "synchronizationMode", s.SynchronizationMode) - populateTimeRFC3339(objectMap, "synchronizationTime", s.SynchronizationTime) + populateDateTimeRFC3339(objectMap, "synchronizationTime", s.SynchronizationTime) populate(objectMap, "triggerStatus", s.TriggerStatus) populate(objectMap, "userName", s.UserName) return json.Marshal(objectMap) @@ -3739,7 +3738,7 @@ func (s *ScheduledTriggerProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) @@ -3751,7 +3750,7 @@ func (s *ScheduledTriggerProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "SynchronizationMode", &s.SynchronizationMode) delete(rawMsg, key) case "synchronizationTime": - err = unpopulateTimeRFC3339(val, "SynchronizationTime", &s.SynchronizationTime) + err = unpopulateDateTimeRFC3339(val, "SynchronizationTime", &s.SynchronizationTime) delete(rawMsg, key) case "triggerStatus": err = unpopulate(val, "TriggerStatus", &s.TriggerStatus) @@ -3844,7 +3843,7 @@ func (s *ShareList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ShareProperties. func (s ShareProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "description", s.Description) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "shareKind", s.ShareKind) @@ -3864,7 +3863,7 @@ func (s *ShareProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &s.Description) @@ -3969,8 +3968,8 @@ func (s *ShareSubscriptionList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ShareSubscriptionProperties. func (s ShareSubscriptionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populateTimeRFC3339(objectMap, "expirationDate", s.ExpirationDate) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "expirationDate", s.ExpirationDate) populate(objectMap, "invitationId", s.InvitationID) populate(objectMap, "providerEmail", s.ProviderEmail) populate(objectMap, "providerName", s.ProviderName) @@ -3997,10 +3996,10 @@ func (s *ShareSubscriptionProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &s.ExpirationDate) + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &s.ExpirationDate) delete(rawMsg, key) case "invitationId": err = unpopulate(val, "InvitationID", &s.InvitationID) @@ -4053,9 +4052,9 @@ func (s *ShareSubscriptionProperties) UnmarshalJSON(data []byte) error { func (s ShareSubscriptionSynchronization) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "durationMs", s.DurationMs) - populateTimeRFC3339(objectMap, "endTime", s.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", s.EndTime) populate(objectMap, "message", s.Message) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) populate(objectMap, "status", s.Status) populate(objectMap, "synchronizationId", s.SynchronizationID) populate(objectMap, "synchronizationMode", s.SynchronizationMode) @@ -4075,13 +4074,13 @@ func (s *ShareSubscriptionSynchronization) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DurationMs", &s.DurationMs) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &s.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &s.EndTime) delete(rawMsg, key) case "message": err = unpopulate(val, "Message", &s.Message) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &s.Status) @@ -4138,9 +4137,9 @@ func (s ShareSynchronization) MarshalJSON() ([]byte, error) { populate(objectMap, "consumerName", s.ConsumerName) populate(objectMap, "consumerTenantName", s.ConsumerTenantName) populate(objectMap, "durationMs", s.DurationMs) - populateTimeRFC3339(objectMap, "endTime", s.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", s.EndTime) populate(objectMap, "message", s.Message) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) populate(objectMap, "status", s.Status) populate(objectMap, "synchronizationId", s.SynchronizationID) populate(objectMap, "synchronizationMode", s.SynchronizationMode) @@ -4169,13 +4168,13 @@ func (s *ShareSynchronization) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DurationMs", &s.DurationMs) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &s.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &s.EndTime) delete(rawMsg, key) case "message": err = unpopulate(val, "Message", &s.Message) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &s.Status) @@ -4453,7 +4452,7 @@ func (s SynchronizationDetails) MarshalJSON() ([]byte, error) { populate(objectMap, "dataSetId", s.DataSetID) populate(objectMap, "dataSetType", s.DataSetType) populate(objectMap, "durationMs", s.DurationMs) - populateTimeRFC3339(objectMap, "endTime", s.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", s.EndTime) populate(objectMap, "filesRead", s.FilesRead) populate(objectMap, "filesWritten", s.FilesWritten) populate(objectMap, "message", s.Message) @@ -4462,7 +4461,7 @@ func (s SynchronizationDetails) MarshalJSON() ([]byte, error) { populate(objectMap, "rowsRead", s.RowsRead) populate(objectMap, "sizeRead", s.SizeRead) populate(objectMap, "sizeWritten", s.SizeWritten) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) populate(objectMap, "status", s.Status) populate(objectMap, "vCore", s.VCore) return json.Marshal(objectMap) @@ -4487,7 +4486,7 @@ func (s *SynchronizationDetails) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DurationMs", &s.DurationMs) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &s.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &s.EndTime) delete(rawMsg, key) case "filesRead": err = unpopulate(val, "FilesRead", &s.FilesRead) @@ -4514,7 +4513,7 @@ func (s *SynchronizationDetails) UnmarshalJSON(data []byte) error { err = unpopulate(val, "SizeWritten", &s.SizeWritten) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &s.Status) @@ -4665,10 +4664,10 @@ func (s *Synchronize) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -4684,7 +4683,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -4693,7 +4692,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/operations_client.go index 7da6e52e..08f71f38 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,20 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/options.go new file mode 100644 index 00000000..b14e0fc0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/options.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 armdatashare + +// AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method. +type AccountsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method. +type AccountsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method. +type AccountsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager +// method. +type AccountsClientListByResourceGroupOptions struct { + // Continuation token + SkipToken *string +} + +// AccountsClientListBySubscriptionOptions contains the optional parameters for the AccountsClient.NewListBySubscriptionPager +// method. +type AccountsClientListBySubscriptionOptions struct { + // Continuation token + SkipToken *string +} + +// AccountsClientUpdateOptions contains the optional parameters for the AccountsClient.Update method. +type AccountsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConsumerInvitationsClientGetOptions contains the optional parameters for the ConsumerInvitationsClient.Get method. +type ConsumerInvitationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConsumerInvitationsClientListInvitationsOptions contains the optional parameters for the ConsumerInvitationsClient.NewListInvitationsPager +// method. +type ConsumerInvitationsClientListInvitationsOptions struct { + // The continuation token + SkipToken *string +} + +// ConsumerInvitationsClientRejectInvitationOptions contains the optional parameters for the ConsumerInvitationsClient.RejectInvitation +// method. +type ConsumerInvitationsClientRejectInvitationOptions struct { + // placeholder for future optional parameters +} + +// ConsumerSourceDataSetsClientListByShareSubscriptionOptions contains the optional parameters for the ConsumerSourceDataSetsClient.NewListByShareSubscriptionPager +// method. +type ConsumerSourceDataSetsClientListByShareSubscriptionOptions struct { + // Continuation token + SkipToken *string +} + +// DataSetMappingsClientCreateOptions contains the optional parameters for the DataSetMappingsClient.Create method. +type DataSetMappingsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// DataSetMappingsClientDeleteOptions contains the optional parameters for the DataSetMappingsClient.Delete method. +type DataSetMappingsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DataSetMappingsClientGetOptions contains the optional parameters for the DataSetMappingsClient.Get method. +type DataSetMappingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DataSetMappingsClientListByShareSubscriptionOptions contains the optional parameters for the DataSetMappingsClient.NewListByShareSubscriptionPager +// method. +type DataSetMappingsClientListByShareSubscriptionOptions struct { + // Filters the results using OData syntax. + Filter *string + + // Sorts the results using OData syntax. + Orderby *string + + // Continuation token + SkipToken *string +} + +// DataSetsClientBeginDeleteOptions contains the optional parameters for the DataSetsClient.BeginDelete method. +type DataSetsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DataSetsClientCreateOptions contains the optional parameters for the DataSetsClient.Create method. +type DataSetsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// DataSetsClientGetOptions contains the optional parameters for the DataSetsClient.Get method. +type DataSetsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DataSetsClientListByShareOptions contains the optional parameters for the DataSetsClient.NewListBySharePager method. +type DataSetsClientListByShareOptions struct { + // Filters the results using OData syntax. + Filter *string + + // Sorts the results using OData syntax. + Orderby *string + + // continuation token + SkipToken *string +} + +// EmailRegistrationsClientActivateEmailOptions contains the optional parameters for the EmailRegistrationsClient.ActivateEmail +// method. +type EmailRegistrationsClientActivateEmailOptions struct { + // placeholder for future optional parameters +} + +// EmailRegistrationsClientRegisterEmailOptions contains the optional parameters for the EmailRegistrationsClient.RegisterEmail +// method. +type EmailRegistrationsClientRegisterEmailOptions struct { + // placeholder for future optional parameters +} + +// InvitationsClientCreateOptions contains the optional parameters for the InvitationsClient.Create method. +type InvitationsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// InvitationsClientDeleteOptions contains the optional parameters for the InvitationsClient.Delete method. +type InvitationsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// InvitationsClientGetOptions contains the optional parameters for the InvitationsClient.Get method. +type InvitationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// InvitationsClientListByShareOptions contains the optional parameters for the InvitationsClient.NewListBySharePager method. +type InvitationsClientListByShareOptions struct { + // Filters the results using OData syntax. + Filter *string + + // Sorts the results using OData syntax. + Orderby *string + + // The continuation token + SkipToken *string +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ProviderShareSubscriptionsClientAdjustOptions contains the optional parameters for the ProviderShareSubscriptionsClient.Adjust +// method. +type ProviderShareSubscriptionsClientAdjustOptions struct { + // placeholder for future optional parameters +} + +// ProviderShareSubscriptionsClientBeginRevokeOptions contains the optional parameters for the ProviderShareSubscriptionsClient.BeginRevoke +// method. +type ProviderShareSubscriptionsClientBeginRevokeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ProviderShareSubscriptionsClientGetByShareOptions contains the optional parameters for the ProviderShareSubscriptionsClient.GetByShare +// method. +type ProviderShareSubscriptionsClientGetByShareOptions struct { + // placeholder for future optional parameters +} + +// ProviderShareSubscriptionsClientListByShareOptions contains the optional parameters for the ProviderShareSubscriptionsClient.NewListBySharePager +// method. +type ProviderShareSubscriptionsClientListByShareOptions struct { + // Continuation Token + SkipToken *string +} + +// ProviderShareSubscriptionsClientReinstateOptions contains the optional parameters for the ProviderShareSubscriptionsClient.Reinstate +// method. +type ProviderShareSubscriptionsClientReinstateOptions struct { + // placeholder for future optional parameters +} + +// ShareSubscriptionsClientBeginCancelSynchronizationOptions contains the optional parameters for the ShareSubscriptionsClient.BeginCancelSynchronization +// method. +type ShareSubscriptionsClientBeginCancelSynchronizationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ShareSubscriptionsClientBeginDeleteOptions contains the optional parameters for the ShareSubscriptionsClient.BeginDelete +// method. +type ShareSubscriptionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ShareSubscriptionsClientBeginSynchronizeOptions contains the optional parameters for the ShareSubscriptionsClient.BeginSynchronize +// method. +type ShareSubscriptionsClientBeginSynchronizeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ShareSubscriptionsClientCreateOptions contains the optional parameters for the ShareSubscriptionsClient.Create method. +type ShareSubscriptionsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// ShareSubscriptionsClientGetOptions contains the optional parameters for the ShareSubscriptionsClient.Get method. +type ShareSubscriptionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ShareSubscriptionsClientListByAccountOptions contains the optional parameters for the ShareSubscriptionsClient.NewListByAccountPager +// method. +type ShareSubscriptionsClientListByAccountOptions struct { + // Filters the results using OData syntax. + Filter *string + + // Sorts the results using OData syntax. + Orderby *string + + // Continuation Token + SkipToken *string +} + +// ShareSubscriptionsClientListSourceShareSynchronizationSettingsOptions contains the optional parameters for the ShareSubscriptionsClient.NewListSourceShareSynchronizationSettingsPager +// method. +type ShareSubscriptionsClientListSourceShareSynchronizationSettingsOptions struct { + // Continuation token + SkipToken *string +} + +// ShareSubscriptionsClientListSynchronizationDetailsOptions contains the optional parameters for the ShareSubscriptionsClient.NewListSynchronizationDetailsPager +// method. +type ShareSubscriptionsClientListSynchronizationDetailsOptions struct { + // Filters the results using OData syntax. + Filter *string + + // Sorts the results using OData syntax. + Orderby *string + + // Continuation token + SkipToken *string +} + +// ShareSubscriptionsClientListSynchronizationsOptions contains the optional parameters for the ShareSubscriptionsClient.NewListSynchronizationsPager +// method. +type ShareSubscriptionsClientListSynchronizationsOptions struct { + // Filters the results using OData syntax. + Filter *string + + // Sorts the results using OData syntax. + Orderby *string + + // Continuation token + SkipToken *string +} + +// SharesClientBeginDeleteOptions contains the optional parameters for the SharesClient.BeginDelete method. +type SharesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SharesClientCreateOptions contains the optional parameters for the SharesClient.Create method. +type SharesClientCreateOptions struct { + // placeholder for future optional parameters +} + +// SharesClientGetOptions contains the optional parameters for the SharesClient.Get method. +type SharesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SharesClientListByAccountOptions contains the optional parameters for the SharesClient.NewListByAccountPager method. +type SharesClientListByAccountOptions struct { + // Filters the results using OData syntax. + Filter *string + + // Sorts the results using OData syntax. + Orderby *string + + // Continuation Token + SkipToken *string +} + +// SharesClientListSynchronizationDetailsOptions contains the optional parameters for the SharesClient.NewListSynchronizationDetailsPager +// method. +type SharesClientListSynchronizationDetailsOptions struct { + // Filters the results using OData syntax. + Filter *string + + // Sorts the results using OData syntax. + Orderby *string + + // Continuation token + SkipToken *string +} + +// SharesClientListSynchronizationsOptions contains the optional parameters for the SharesClient.NewListSynchronizationsPager +// method. +type SharesClientListSynchronizationsOptions struct { + // Filters the results using OData syntax. + Filter *string + + // Sorts the results using OData syntax. + Orderby *string + + // Continuation token + SkipToken *string +} + +// SynchronizationSettingsClientBeginDeleteOptions contains the optional parameters for the SynchronizationSettingsClient.BeginDelete +// method. +type SynchronizationSettingsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SynchronizationSettingsClientCreateOptions contains the optional parameters for the SynchronizationSettingsClient.Create +// method. +type SynchronizationSettingsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// SynchronizationSettingsClientGetOptions contains the optional parameters for the SynchronizationSettingsClient.Get method. +type SynchronizationSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SynchronizationSettingsClientListByShareOptions contains the optional parameters for the SynchronizationSettingsClient.NewListBySharePager +// method. +type SynchronizationSettingsClientListByShareOptions struct { + // continuation token + SkipToken *string +} + +// TriggersClientBeginCreateOptions contains the optional parameters for the TriggersClient.BeginCreate method. +type TriggersClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// TriggersClientBeginDeleteOptions contains the optional parameters for the TriggersClient.BeginDelete method. +type TriggersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// TriggersClientGetOptions contains the optional parameters for the TriggersClient.Get method. +type TriggersClientGetOptions struct { + // placeholder for future optional parameters +} + +// TriggersClientListByShareSubscriptionOptions contains the optional parameters for the TriggersClient.NewListByShareSubscriptionPager +// method. +type TriggersClientListByShareSubscriptionOptions struct { + // Continuation token + SkipToken *string +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/polymorphic_helpers.go index 49328ad1..073a6f86 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/polymorphic_helpers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/polymorphic_helpers.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -50,7 +49,10 @@ func unmarshalDataSetClassification(rawMsg json.RawMessage) (DataSetClassificati default: b = &DataSet{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalDataSetClassificationArray(rawMsg json.RawMessage) ([]DataSetClassification, error) { @@ -107,7 +109,10 @@ func unmarshalDataSetMappingClassification(rawMsg json.RawMessage) (DataSetMappi default: b = &DataSetMapping{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalDataSetMappingClassificationArray(rawMsg json.RawMessage) ([]DataSetMappingClassification, error) { @@ -144,7 +149,10 @@ func unmarshalSourceShareSynchronizationSettingClassification(rawMsg json.RawMes default: b = &SourceShareSynchronizationSetting{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalSourceShareSynchronizationSettingClassificationArray(rawMsg json.RawMessage) ([]SourceShareSynchronizationSettingClassification, error) { @@ -181,7 +189,10 @@ func unmarshalSynchronizationSettingClassification(rawMsg json.RawMessage) (Sync default: b = &SynchronizationSetting{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalSynchronizationSettingClassificationArray(rawMsg json.RawMessage) ([]SynchronizationSettingClassification, error) { @@ -218,7 +229,10 @@ func unmarshalTriggerClassification(rawMsg json.RawMessage) (TriggerClassificati default: b = &Trigger{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalTriggerClassificationArray(rawMsg json.RawMessage) ([]TriggerClassification, error) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/providersharesubscriptions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/providersharesubscriptions_client.go index 3a5fd6eb..6f4bda3a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/providersharesubscriptions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/providersharesubscriptions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -33,7 +32,7 @@ type ProviderShareSubscriptionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProviderShareSubscriptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProviderShareSubscriptionsClient, error) { - cl, err := arm.NewClient(moduleName+".ProviderShareSubscriptionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewProviderShareSubscriptionsClient(subscriptionID string, credential azcor // - options - ProviderShareSubscriptionsClientAdjustOptions contains the optional parameters for the ProviderShareSubscriptionsClient.Adjust // method. func (client *ProviderShareSubscriptionsClient) Adjust(ctx context.Context, resourceGroupName string, accountName string, shareName string, providerShareSubscriptionID string, providerShareSubscription ProviderShareSubscription, options *ProviderShareSubscriptionsClientAdjustOptions) (ProviderShareSubscriptionsClientAdjustResponse, error) { + var err error + const operationName = "ProviderShareSubscriptionsClient.Adjust" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.adjustCreateRequest(ctx, resourceGroupName, accountName, shareName, providerShareSubscriptionID, providerShareSubscription, options) if err != nil { return ProviderShareSubscriptionsClientAdjustResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProviderShareSubscriptionsClientAdjustResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderShareSubscriptionsClientAdjustResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProviderShareSubscriptionsClientAdjustResponse{}, err } - return client.adjustHandleResponse(resp) + resp, err := client.adjustHandleResponse(httpResp) + return resp, err } // adjustCreateRequest creates the Adjust request. @@ -101,7 +107,10 @@ func (client *ProviderShareSubscriptionsClient) adjustCreateRequest(ctx context. reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, providerShareSubscription) + if err := runtime.MarshalAsJSON(req, providerShareSubscription); err != nil { + return nil, err + } + return req, nil } // adjustHandleResponse handles the Adjust response. @@ -124,18 +133,25 @@ func (client *ProviderShareSubscriptionsClient) adjustHandleResponse(resp *http. // - options - ProviderShareSubscriptionsClientGetByShareOptions contains the optional parameters for the ProviderShareSubscriptionsClient.GetByShare // method. func (client *ProviderShareSubscriptionsClient) GetByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, providerShareSubscriptionID string, options *ProviderShareSubscriptionsClientGetByShareOptions) (ProviderShareSubscriptionsClientGetByShareResponse, error) { + var err error + const operationName = "ProviderShareSubscriptionsClient.GetByShare" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByShareCreateRequest(ctx, resourceGroupName, accountName, shareName, providerShareSubscriptionID, options) if err != nil { return ProviderShareSubscriptionsClientGetByShareResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProviderShareSubscriptionsClientGetByShareResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderShareSubscriptionsClientGetByShareResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProviderShareSubscriptionsClientGetByShareResponse{}, err } - return client.getByShareHandleResponse(resp) + resp, err := client.getByShareHandleResponse(httpResp) + return resp, err } // getByShareCreateRequest creates the GetByShare request. @@ -195,25 +211,20 @@ func (client *ProviderShareSubscriptionsClient) NewListBySharePager(resourceGrou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProviderShareSubscriptionsClientListByShareResponse) (ProviderShareSubscriptionsClientListByShareResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByShareCreateRequest(ctx, resourceGroupName, accountName, shareName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProviderShareSubscriptionsClientListByShareResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderShareSubscriptionsClient.NewListBySharePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByShareCreateRequest(ctx, resourceGroupName, accountName, shareName, options) + }, nil) if err != nil { return ProviderShareSubscriptionsClientListByShareResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderShareSubscriptionsClientListByShareResponse{}, runtime.NewResponseError(resp) - } return client.listByShareHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -271,18 +282,25 @@ func (client *ProviderShareSubscriptionsClient) listByShareHandleResponse(resp * // - options - ProviderShareSubscriptionsClientReinstateOptions contains the optional parameters for the ProviderShareSubscriptionsClient.Reinstate // method. func (client *ProviderShareSubscriptionsClient) Reinstate(ctx context.Context, resourceGroupName string, accountName string, shareName string, providerShareSubscriptionID string, providerShareSubscription ProviderShareSubscription, options *ProviderShareSubscriptionsClientReinstateOptions) (ProviderShareSubscriptionsClientReinstateResponse, error) { + var err error + const operationName = "ProviderShareSubscriptionsClient.Reinstate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.reinstateCreateRequest(ctx, resourceGroupName, accountName, shareName, providerShareSubscriptionID, providerShareSubscription, options) if err != nil { return ProviderShareSubscriptionsClientReinstateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProviderShareSubscriptionsClientReinstateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderShareSubscriptionsClientReinstateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProviderShareSubscriptionsClientReinstateResponse{}, err } - return client.reinstateHandleResponse(resp) + resp, err := client.reinstateHandleResponse(httpResp) + return resp, err } // reinstateCreateRequest creates the Reinstate request. @@ -316,7 +334,10 @@ func (client *ProviderShareSubscriptionsClient) reinstateCreateRequest(ctx conte reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, providerShareSubscription) + if err := runtime.MarshalAsJSON(req, providerShareSubscription); err != nil { + return nil, err + } + return req, nil } // reinstateHandleResponse handles the Reinstate response. @@ -344,11 +365,15 @@ func (client *ProviderShareSubscriptionsClient) BeginRevoke(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProviderShareSubscriptionsClientRevokeResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProviderShareSubscriptionsClientRevokeResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ProviderShareSubscriptionsClientRevokeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ProviderShareSubscriptionsClientRevokeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -357,18 +382,24 @@ func (client *ProviderShareSubscriptionsClient) BeginRevoke(ctx context.Context, // // Generated from API version 2020-09-01 func (client *ProviderShareSubscriptionsClient) revoke(ctx context.Context, resourceGroupName string, accountName string, shareName string, providerShareSubscriptionID string, options *ProviderShareSubscriptionsClientBeginRevokeOptions) (*http.Response, error) { + var err error + const operationName = "ProviderShareSubscriptionsClient.BeginRevoke" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.revokeCreateRequest(ctx, resourceGroupName, accountName, shareName, providerShareSubscriptionID, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // revokeCreateRequest creates the Revoke request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/response_types.go index f072f33a..0e48e34c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/response_types.go @@ -3,64 +3,76 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare +import "encoding/json" + // AccountsClientCreateResponse contains the response from method AccountsClient.BeginCreate. type AccountsClientCreateResponse struct { + // An account data transfer object. Account } // AccountsClientDeleteResponse contains the response from method AccountsClient.BeginDelete. type AccountsClientDeleteResponse struct { + // Response for long running operation OperationResponse } // AccountsClientGetResponse contains the response from method AccountsClient.Get. type AccountsClientGetResponse struct { + // An account data transfer object. Account } // AccountsClientListByResourceGroupResponse contains the response from method AccountsClient.NewListByResourceGroupPager. type AccountsClientListByResourceGroupResponse struct { + // List response for get Accounts. AccountList } // AccountsClientListBySubscriptionResponse contains the response from method AccountsClient.NewListBySubscriptionPager. type AccountsClientListBySubscriptionResponse struct { + // List response for get Accounts. AccountList } // AccountsClientUpdateResponse contains the response from method AccountsClient.Update. type AccountsClientUpdateResponse struct { + // An account data transfer object. Account } // ConsumerInvitationsClientGetResponse contains the response from method ConsumerInvitationsClient.Get. type ConsumerInvitationsClientGetResponse struct { + // A consumer Invitation data transfer object. ConsumerInvitation } // ConsumerInvitationsClientListInvitationsResponse contains the response from method ConsumerInvitationsClient.NewListInvitationsPager. type ConsumerInvitationsClientListInvitationsResponse struct { + // List response for get InvitationList ConsumerInvitationList } // ConsumerInvitationsClientRejectInvitationResponse contains the response from method ConsumerInvitationsClient.RejectInvitation. type ConsumerInvitationsClientRejectInvitationResponse struct { + // A consumer Invitation data transfer object. ConsumerInvitation } // ConsumerSourceDataSetsClientListByShareSubscriptionResponse contains the response from method ConsumerSourceDataSetsClient.NewListByShareSubscriptionPager. type ConsumerSourceDataSetsClientListByShareSubscriptionResponse struct { + // A consumer side list of source dataSets ConsumerSourceDataSetList } // DataSetMappingsClientCreateResponse contains the response from method DataSetMappingsClient.Create. type DataSetMappingsClientCreateResponse struct { + // A data set mapping data transfer object. DataSetMappingClassification } @@ -81,6 +93,7 @@ type DataSetMappingsClientDeleteResponse struct { // DataSetMappingsClientGetResponse contains the response from method DataSetMappingsClient.Get. type DataSetMappingsClientGetResponse struct { + // A data set mapping data transfer object. DataSetMappingClassification } @@ -96,11 +109,13 @@ func (d *DataSetMappingsClientGetResponse) UnmarshalJSON(data []byte) error { // DataSetMappingsClientListByShareSubscriptionResponse contains the response from method DataSetMappingsClient.NewListByShareSubscriptionPager. type DataSetMappingsClientListByShareSubscriptionResponse struct { + // List response for get DataSetMappings DataSetMappingList } // DataSetsClientCreateResponse contains the response from method DataSetsClient.Create. type DataSetsClientCreateResponse struct { + // A DataSet data transfer object. DataSetClassification } @@ -121,6 +136,7 @@ type DataSetsClientDeleteResponse struct { // DataSetsClientGetResponse contains the response from method DataSetsClient.Get. type DataSetsClientGetResponse struct { + // A DataSet data transfer object. DataSetClassification } @@ -136,21 +152,25 @@ func (d *DataSetsClientGetResponse) UnmarshalJSON(data []byte) error { // DataSetsClientListByShareResponse contains the response from method DataSetsClient.NewListBySharePager. type DataSetsClientListByShareResponse struct { + // List response for get DataSets DataSetList } // EmailRegistrationsClientActivateEmailResponse contains the response from method EmailRegistrationsClient.ActivateEmail. type EmailRegistrationsClientActivateEmailResponse struct { + // Dto for tenant domain registration EmailRegistration } // EmailRegistrationsClientRegisterEmailResponse contains the response from method EmailRegistrationsClient.RegisterEmail. type EmailRegistrationsClientRegisterEmailResponse struct { + // Dto for tenant domain registration EmailRegistration } // InvitationsClientCreateResponse contains the response from method InvitationsClient.Create. type InvitationsClientCreateResponse struct { + // A Invitation data transfer object. Invitation } @@ -161,121 +181,145 @@ type InvitationsClientDeleteResponse struct { // InvitationsClientGetResponse contains the response from method InvitationsClient.Get. type InvitationsClientGetResponse struct { + // A Invitation data transfer object. Invitation } // InvitationsClientListByShareResponse contains the response from method InvitationsClient.NewListBySharePager. type InvitationsClientListByShareResponse struct { + // List response for get InvitationList InvitationList } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // List response for get operations. OperationList } // ProviderShareSubscriptionsClientAdjustResponse contains the response from method ProviderShareSubscriptionsClient.Adjust. type ProviderShareSubscriptionsClientAdjustResponse struct { + // A provider side share subscription data transfer object. ProviderShareSubscription } // ProviderShareSubscriptionsClientGetByShareResponse contains the response from method ProviderShareSubscriptionsClient.GetByShare. type ProviderShareSubscriptionsClientGetByShareResponse struct { + // A provider side share subscription data transfer object. ProviderShareSubscription } // ProviderShareSubscriptionsClientListByShareResponse contains the response from method ProviderShareSubscriptionsClient.NewListBySharePager. type ProviderShareSubscriptionsClientListByShareResponse struct { + // List response for get ShareSubscription. ProviderShareSubscriptionList } // ProviderShareSubscriptionsClientReinstateResponse contains the response from method ProviderShareSubscriptionsClient.Reinstate. type ProviderShareSubscriptionsClientReinstateResponse struct { + // A provider side share subscription data transfer object. ProviderShareSubscription } // ProviderShareSubscriptionsClientRevokeResponse contains the response from method ProviderShareSubscriptionsClient.BeginRevoke. type ProviderShareSubscriptionsClientRevokeResponse struct { + // A provider side share subscription data transfer object. ProviderShareSubscription } // ShareSubscriptionsClientCancelSynchronizationResponse contains the response from method ShareSubscriptionsClient.BeginCancelSynchronization. type ShareSubscriptionsClientCancelSynchronizationResponse struct { + // A ShareSubscriptionSynchronization data transfer object. ShareSubscriptionSynchronization } // ShareSubscriptionsClientCreateResponse contains the response from method ShareSubscriptionsClient.Create. type ShareSubscriptionsClientCreateResponse struct { + // A share subscription data transfer object. ShareSubscription } // ShareSubscriptionsClientDeleteResponse contains the response from method ShareSubscriptionsClient.BeginDelete. type ShareSubscriptionsClientDeleteResponse struct { + // Response for long running operation OperationResponse } // ShareSubscriptionsClientGetResponse contains the response from method ShareSubscriptionsClient.Get. type ShareSubscriptionsClientGetResponse struct { + // A share subscription data transfer object. ShareSubscription } // ShareSubscriptionsClientListByAccountResponse contains the response from method ShareSubscriptionsClient.NewListByAccountPager. type ShareSubscriptionsClientListByAccountResponse struct { + // List response for get ShareSubscription. ShareSubscriptionList } // ShareSubscriptionsClientListSourceShareSynchronizationSettingsResponse contains the response from method ShareSubscriptionsClient.NewListSourceShareSynchronizationSettingsPager. type ShareSubscriptionsClientListSourceShareSynchronizationSettingsResponse struct { + // List response for get source share Synchronization settings SourceShareSynchronizationSettingList } // ShareSubscriptionsClientListSynchronizationDetailsResponse contains the response from method ShareSubscriptionsClient.NewListSynchronizationDetailsPager. type ShareSubscriptionsClientListSynchronizationDetailsResponse struct { + // details of synchronization SynchronizationDetailsList } // ShareSubscriptionsClientListSynchronizationsResponse contains the response from method ShareSubscriptionsClient.NewListSynchronizationsPager. type ShareSubscriptionsClientListSynchronizationsResponse struct { + // A consumer side list of share subscription synchronizations ShareSubscriptionSynchronizationList } // ShareSubscriptionsClientSynchronizeResponse contains the response from method ShareSubscriptionsClient.BeginSynchronize. type ShareSubscriptionsClientSynchronizeResponse struct { + // A ShareSubscriptionSynchronization data transfer object. ShareSubscriptionSynchronization } // SharesClientCreateResponse contains the response from method SharesClient.Create. type SharesClientCreateResponse struct { + // A share data transfer object. Share } // SharesClientDeleteResponse contains the response from method SharesClient.BeginDelete. type SharesClientDeleteResponse struct { + // Response for long running operation OperationResponse } // SharesClientGetResponse contains the response from method SharesClient.Get. type SharesClientGetResponse struct { + // A share data transfer object. Share } // SharesClientListByAccountResponse contains the response from method SharesClient.NewListByAccountPager. type SharesClientListByAccountResponse struct { + // List response for get Shares. ShareList } // SharesClientListSynchronizationDetailsResponse contains the response from method SharesClient.NewListSynchronizationDetailsPager. type SharesClientListSynchronizationDetailsResponse struct { + // details of synchronization SynchronizationDetailsList } // SharesClientListSynchronizationsResponse contains the response from method SharesClient.NewListSynchronizationsPager. type SharesClientListSynchronizationsResponse struct { + // List response for get ShareSynchronization. ShareSynchronizationList } // SynchronizationSettingsClientCreateResponse contains the response from method SynchronizationSettingsClient.Create. type SynchronizationSettingsClientCreateResponse struct { + // A Synchronization Setting data transfer object. SynchronizationSettingClassification } @@ -291,11 +335,13 @@ func (s *SynchronizationSettingsClientCreateResponse) UnmarshalJSON(data []byte) // SynchronizationSettingsClientDeleteResponse contains the response from method SynchronizationSettingsClient.BeginDelete. type SynchronizationSettingsClientDeleteResponse struct { + // Response for long running operation OperationResponse } // SynchronizationSettingsClientGetResponse contains the response from method SynchronizationSettingsClient.Get. type SynchronizationSettingsClientGetResponse struct { + // A Synchronization Setting data transfer object. SynchronizationSettingClassification } @@ -311,14 +357,21 @@ func (s *SynchronizationSettingsClientGetResponse) UnmarshalJSON(data []byte) er // SynchronizationSettingsClientListByShareResponse contains the response from method SynchronizationSettingsClient.NewListBySharePager. type SynchronizationSettingsClientListByShareResponse struct { + // List response for get Synchronization settings SynchronizationSettingList } // TriggersClientCreateResponse contains the response from method TriggersClient.BeginCreate. type TriggersClientCreateResponse struct { + // A Trigger data transfer object. TriggerClassification } +// MarshalJSON implements the json.Marshaller interface for type TriggersClientCreateResponse. +func (t TriggersClientCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(t.TriggerClassification) +} + // UnmarshalJSON implements the json.Unmarshaller interface for type TriggersClientCreateResponse. func (t *TriggersClientCreateResponse) UnmarshalJSON(data []byte) error { res, err := unmarshalTriggerClassification(data) @@ -331,11 +384,13 @@ func (t *TriggersClientCreateResponse) UnmarshalJSON(data []byte) error { // TriggersClientDeleteResponse contains the response from method TriggersClient.BeginDelete. type TriggersClientDeleteResponse struct { + // Response for long running operation OperationResponse } // TriggersClientGetResponse contains the response from method TriggersClient.Get. type TriggersClientGetResponse struct { + // A Trigger data transfer object. TriggerClassification } @@ -351,5 +406,6 @@ func (t *TriggersClientGetResponse) UnmarshalJSON(data []byte) error { // TriggersClientListByShareSubscriptionResponse contains the response from method TriggersClient.NewListByShareSubscriptionPager. type TriggersClientListByShareSubscriptionResponse struct { + // List response for get triggers TriggerList } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/shares_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/shares_client.go index 427a7eee..aa62a349 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/shares_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/shares_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -33,7 +32,7 @@ type SharesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSharesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharesClient, error) { - cl, err := arm.NewClient(moduleName+".SharesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewSharesClient(subscriptionID string, credential azcore.TokenCredential, o // - share - The share payload // - options - SharesClientCreateOptions contains the optional parameters for the SharesClient.Create method. func (client *SharesClient) Create(ctx context.Context, resourceGroupName string, accountName string, shareName string, share Share, options *SharesClientCreateOptions) (SharesClientCreateResponse, error) { + var err error + const operationName = "SharesClient.Create" + 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, accountName, shareName, share, options) if err != nil { return SharesClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SharesClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SharesClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SharesClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -95,7 +101,10 @@ func (client *SharesClient) createCreateRequest(ctx context.Context, resourceGro reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, share) + if err := runtime.MarshalAsJSON(req, share); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -121,9 +130,14 @@ func (client *SharesClient) BeginDelete(ctx context.Context, resourceGroupName s if err != nil { return nil, err } - return runtime.NewPoller[SharesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SharesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SharesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SharesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -132,18 +146,24 @@ func (client *SharesClient) BeginDelete(ctx context.Context, resourceGroupName s // // Generated from API version 2020-09-01 func (client *SharesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, shareName string, options *SharesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SharesClient.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, shareName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -185,18 +205,25 @@ func (client *SharesClient) deleteCreateRequest(ctx context.Context, resourceGro // - shareName - The name of the share to retrieve. // - options - SharesClientGetOptions contains the optional parameters for the SharesClient.Get method. func (client *SharesClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, options *SharesClientGetOptions) (SharesClientGetResponse, error) { + var err error + const operationName = "SharesClient.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, shareName, options) if err != nil { return SharesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SharesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SharesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SharesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -251,25 +278,20 @@ func (client *SharesClient) NewListByAccountPager(resourceGroupName string, acco return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SharesClientListByAccountResponse) (SharesClientListByAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAccountCreateRequest(ctx, resourceGroupName, accountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SharesClient.NewListByAccountPager") + 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.listByAccountCreateRequest(ctx, resourceGroupName, accountName, options) + }, nil) if err != nil { return SharesClientListByAccountResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SharesClientListByAccountResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SharesClientListByAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -332,25 +354,20 @@ func (client *SharesClient) NewListSynchronizationDetailsPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SharesClientListSynchronizationDetailsResponse) (SharesClientListSynchronizationDetailsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSynchronizationDetailsCreateRequest(ctx, resourceGroupName, accountName, shareName, shareSynchronization, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SharesClient.NewListSynchronizationDetailsPager") + 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.listSynchronizationDetailsCreateRequest(ctx, resourceGroupName, accountName, shareName, shareSynchronization, options) + }, nil) if err != nil { return SharesClientListSynchronizationDetailsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SharesClientListSynchronizationDetailsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SharesClientListSynchronizationDetailsResponse{}, runtime.NewResponseError(resp) - } return client.listSynchronizationDetailsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -390,7 +407,10 @@ func (client *SharesClient) listSynchronizationDetailsCreateRequest(ctx context. } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, shareSynchronization) + if err := runtime.MarshalAsJSON(req, shareSynchronization); err != nil { + return nil, err + } + return req, nil } // listSynchronizationDetailsHandleResponse handles the ListSynchronizationDetails response. @@ -416,25 +436,20 @@ func (client *SharesClient) NewListSynchronizationsPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SharesClientListSynchronizationsResponse) (SharesClientListSynchronizationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSynchronizationsCreateRequest(ctx, resourceGroupName, accountName, shareName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SharesClient.NewListSynchronizationsPager") + 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.listSynchronizationsCreateRequest(ctx, resourceGroupName, accountName, shareName, options) + }, nil) if err != nil { return SharesClientListSynchronizationsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SharesClientListSynchronizationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SharesClientListSynchronizationsResponse{}, runtime.NewResponseError(resp) - } return client.listSynchronizationsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/sharesubscriptions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/sharesubscriptions_client.go index 2677ba14..72575b9c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/sharesubscriptions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/sharesubscriptions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -33,7 +32,7 @@ type ShareSubscriptionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewShareSubscriptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ShareSubscriptionsClient, error) { - cl, err := arm.NewClient(moduleName+".ShareSubscriptionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,11 +59,15 @@ func (client *ShareSubscriptionsClient) BeginCancelSynchronization(ctx context.C if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ShareSubscriptionsClientCancelSynchronizationResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ShareSubscriptionsClientCancelSynchronizationResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ShareSubscriptionsClientCancelSynchronizationResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ShareSubscriptionsClientCancelSynchronizationResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +76,24 @@ func (client *ShareSubscriptionsClient) BeginCancelSynchronization(ctx context.C // // Generated from API version 2020-09-01 func (client *ShareSubscriptionsClient) cancelSynchronization(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization ShareSubscriptionSynchronization, options *ShareSubscriptionsClientBeginCancelSynchronizationOptions) (*http.Response, error) { + var err error + const operationName = "ShareSubscriptionsClient.BeginCancelSynchronization" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.cancelSynchronizationCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // cancelSynchronizationCreateRequest creates the CancelSynchronization request. @@ -114,7 +123,10 @@ func (client *ShareSubscriptionsClient) cancelSynchronizationCreateRequest(ctx c reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, shareSubscriptionSynchronization) + if err := runtime.MarshalAsJSON(req, shareSubscriptionSynchronization); err != nil { + return nil, err + } + return req, nil } // Create - Create a shareSubscription in an account @@ -128,18 +140,25 @@ func (client *ShareSubscriptionsClient) cancelSynchronizationCreateRequest(ctx c // - options - ShareSubscriptionsClientCreateOptions contains the optional parameters for the ShareSubscriptionsClient.Create // method. func (client *ShareSubscriptionsClient) Create(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscription ShareSubscription, options *ShareSubscriptionsClientCreateOptions) (ShareSubscriptionsClientCreateResponse, error) { + var err error + const operationName = "ShareSubscriptionsClient.Create" + 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, accountName, shareSubscriptionName, shareSubscription, options) if err != nil { return ShareSubscriptionsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ShareSubscriptionsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ShareSubscriptionsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ShareSubscriptionsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -169,7 +188,10 @@ func (client *ShareSubscriptionsClient) createCreateRequest(ctx context.Context, reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, shareSubscription) + if err := runtime.MarshalAsJSON(req, shareSubscription); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -196,9 +218,14 @@ func (client *ShareSubscriptionsClient) BeginDelete(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller[ShareSubscriptionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ShareSubscriptionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ShareSubscriptionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ShareSubscriptionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -207,18 +234,24 @@ func (client *ShareSubscriptionsClient) BeginDelete(ctx context.Context, resourc // // Generated from API version 2020-09-01 func (client *ShareSubscriptionsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, options *ShareSubscriptionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ShareSubscriptionsClient.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, shareSubscriptionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -260,18 +293,25 @@ func (client *ShareSubscriptionsClient) deleteCreateRequest(ctx context.Context, // - shareSubscriptionName - The name of the shareSubscription. // - options - ShareSubscriptionsClientGetOptions contains the optional parameters for the ShareSubscriptionsClient.Get method. func (client *ShareSubscriptionsClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, options *ShareSubscriptionsClientGetOptions) (ShareSubscriptionsClientGetResponse, error) { + var err error + const operationName = "ShareSubscriptionsClient.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, shareSubscriptionName, options) if err != nil { return ShareSubscriptionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ShareSubscriptionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ShareSubscriptionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ShareSubscriptionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -326,25 +366,20 @@ func (client *ShareSubscriptionsClient) NewListByAccountPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ShareSubscriptionsClientListByAccountResponse) (ShareSubscriptionsClientListByAccountResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAccountCreateRequest(ctx, resourceGroupName, accountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ShareSubscriptionsClient.NewListByAccountPager") + 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.listByAccountCreateRequest(ctx, resourceGroupName, accountName, options) + }, nil) if err != nil { return ShareSubscriptionsClientListByAccountResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ShareSubscriptionsClientListByAccountResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ShareSubscriptionsClientListByAccountResponse{}, runtime.NewResponseError(resp) - } return client.listByAccountHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -406,25 +441,20 @@ func (client *ShareSubscriptionsClient) NewListSourceShareSynchronizationSetting return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ShareSubscriptionsClientListSourceShareSynchronizationSettingsResponse) (ShareSubscriptionsClientListSourceShareSynchronizationSettingsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSourceShareSynchronizationSettingsCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ShareSubscriptionsClient.NewListSourceShareSynchronizationSettingsPager") + 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.listSourceShareSynchronizationSettingsCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, options) + }, nil) if err != nil { return ShareSubscriptionsClientListSourceShareSynchronizationSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ShareSubscriptionsClientListSourceShareSynchronizationSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ShareSubscriptionsClientListSourceShareSynchronizationSettingsResponse{}, runtime.NewResponseError(resp) - } return client.listSourceShareSynchronizationSettingsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -485,25 +515,20 @@ func (client *ShareSubscriptionsClient) NewListSynchronizationDetailsPager(resou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ShareSubscriptionsClientListSynchronizationDetailsResponse) (ShareSubscriptionsClientListSynchronizationDetailsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSynchronizationDetailsCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ShareSubscriptionsClientListSynchronizationDetailsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ShareSubscriptionsClient.NewListSynchronizationDetailsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSynchronizationDetailsCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, options) + }, nil) if err != nil { return ShareSubscriptionsClientListSynchronizationDetailsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ShareSubscriptionsClientListSynchronizationDetailsResponse{}, runtime.NewResponseError(resp) - } return client.listSynchronizationDetailsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -543,7 +568,10 @@ func (client *ShareSubscriptionsClient) listSynchronizationDetailsCreateRequest( } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, shareSubscriptionSynchronization) + if err := runtime.MarshalAsJSON(req, shareSubscriptionSynchronization); err != nil { + return nil, err + } + return req, nil } // listSynchronizationDetailsHandleResponse handles the ListSynchronizationDetails response. @@ -569,25 +597,20 @@ func (client *ShareSubscriptionsClient) NewListSynchronizationsPager(resourceGro return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ShareSubscriptionsClientListSynchronizationsResponse) (ShareSubscriptionsClientListSynchronizationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSynchronizationsCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ShareSubscriptionsClient.NewListSynchronizationsPager") + 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.listSynchronizationsCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, options) + }, nil) if err != nil { return ShareSubscriptionsClientListSynchronizationsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ShareSubscriptionsClientListSynchronizationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ShareSubscriptionsClientListSynchronizationsResponse{}, runtime.NewResponseError(resp) - } return client.listSynchronizationsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -655,11 +678,15 @@ func (client *ShareSubscriptionsClient) BeginSynchronize(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ShareSubscriptionsClientSynchronizeResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ShareSubscriptionsClientSynchronizeResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ShareSubscriptionsClientSynchronizeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ShareSubscriptionsClientSynchronizeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -668,18 +695,24 @@ func (client *ShareSubscriptionsClient) BeginSynchronize(ctx context.Context, re // // Generated from API version 2020-09-01 func (client *ShareSubscriptionsClient) synchronize(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, synchronize Synchronize, options *ShareSubscriptionsClientBeginSynchronizeOptions) (*http.Response, error) { + var err error + const operationName = "ShareSubscriptionsClient.BeginSynchronize" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.synchronizeCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, synchronize, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // synchronizeCreateRequest creates the Synchronize request. @@ -709,5 +742,8 @@ func (client *ShareSubscriptionsClient) synchronizeCreateRequest(ctx context.Con reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, synchronize) + if err := runtime.MarshalAsJSON(req, synchronize); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/synchronizationsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/synchronizationsettings_client.go index 4b02702a..dcce6a6c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/synchronizationsettings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/synchronizationsettings_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -33,7 +32,7 @@ type SynchronizationSettingsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSynchronizationSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SynchronizationSettingsClient, error) { - cl, err := arm.NewClient(moduleName+".SynchronizationSettingsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewSynchronizationSettingsClient(subscriptionID string, credential azcore.T // - options - SynchronizationSettingsClientCreateOptions contains the optional parameters for the SynchronizationSettingsClient.Create // method. func (client *SynchronizationSettingsClient) Create(ctx context.Context, resourceGroupName string, accountName string, shareName string, synchronizationSettingName string, synchronizationSetting SynchronizationSettingClassification, options *SynchronizationSettingsClientCreateOptions) (SynchronizationSettingsClientCreateResponse, error) { + var err error + const operationName = "SynchronizationSettingsClient.Create" + 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, accountName, shareName, synchronizationSettingName, synchronizationSetting, options) if err != nil { return SynchronizationSettingsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SynchronizationSettingsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SynchronizationSettingsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SynchronizationSettingsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -101,7 +107,10 @@ func (client *SynchronizationSettingsClient) createCreateRequest(ctx context.Con reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, synchronizationSetting) + if err := runtime.MarshalAsJSON(req, synchronizationSetting); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -129,9 +138,14 @@ func (client *SynchronizationSettingsClient) BeginDelete(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[SynchronizationSettingsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SynchronizationSettingsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SynchronizationSettingsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SynchronizationSettingsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -140,18 +154,24 @@ func (client *SynchronizationSettingsClient) BeginDelete(ctx context.Context, re // // Generated from API version 2020-09-01 func (client *SynchronizationSettingsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, shareName string, synchronizationSettingName string, options *SynchronizationSettingsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SynchronizationSettingsClient.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, shareName, synchronizationSettingName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -199,18 +219,25 @@ func (client *SynchronizationSettingsClient) deleteCreateRequest(ctx context.Con // - options - SynchronizationSettingsClientGetOptions contains the optional parameters for the SynchronizationSettingsClient.Get // method. func (client *SynchronizationSettingsClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, synchronizationSettingName string, options *SynchronizationSettingsClientGetOptions) (SynchronizationSettingsClientGetResponse, error) { + var err error + const operationName = "SynchronizationSettingsClient.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, shareName, synchronizationSettingName, options) if err != nil { return SynchronizationSettingsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SynchronizationSettingsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SynchronizationSettingsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SynchronizationSettingsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -270,25 +297,20 @@ func (client *SynchronizationSettingsClient) NewListBySharePager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SynchronizationSettingsClientListByShareResponse) (SynchronizationSettingsClientListByShareResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByShareCreateRequest(ctx, resourceGroupName, accountName, shareName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SynchronizationSettingsClient.NewListBySharePager") + 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.listByShareCreateRequest(ctx, resourceGroupName, accountName, shareName, options) + }, nil) if err != nil { return SynchronizationSettingsClientListByShareResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SynchronizationSettingsClientListByShareResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SynchronizationSettingsClientListByShareResponse{}, runtime.NewResponseError(resp) - } return client.listByShareHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/time_rfc3339.go index 13c9607b..c80394ab 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/triggers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/triggers_client.go index 10f2d2e7..4610498e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/triggers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare/triggers_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdatashare @@ -33,7 +32,7 @@ type TriggersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTriggersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TriggersClient, error) { - cl, err := arm.NewClient(moduleName+".TriggersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *TriggersClient) BeginCreate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[TriggersClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TriggersClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[TriggersClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[TriggersClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *TriggersClient) BeginCreate(ctx context.Context, resourceGroupName // // Generated from API version 2020-09-01 func (client *TriggersClient) create(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, triggerName string, trigger TriggerClassification, options *TriggersClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "TriggersClient.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, accountName, shareSubscriptionName, triggerName, trigger, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -116,7 +126,10 @@ func (client *TriggersClient) createCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2020-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, trigger) + if err := runtime.MarshalAsJSON(req, trigger); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a Trigger in a shareSubscription @@ -134,9 +147,14 @@ func (client *TriggersClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[TriggersClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TriggersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[TriggersClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[TriggersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -145,18 +163,24 @@ func (client *TriggersClient) BeginDelete(ctx context.Context, resourceGroupName // // Generated from API version 2020-09-01 func (client *TriggersClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, triggerName string, options *TriggersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "TriggersClient.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, shareSubscriptionName, triggerName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -203,18 +227,25 @@ func (client *TriggersClient) deleteCreateRequest(ctx context.Context, resourceG // - triggerName - The name of the trigger. // - options - TriggersClientGetOptions contains the optional parameters for the TriggersClient.Get method. func (client *TriggersClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, triggerName string, options *TriggersClientGetOptions) (TriggersClientGetResponse, error) { + var err error + const operationName = "TriggersClient.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, shareSubscriptionName, triggerName, options) if err != nil { return TriggersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TriggersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TriggersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TriggersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -274,25 +305,20 @@ func (client *TriggersClient) NewListByShareSubscriptionPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *TriggersClientListByShareSubscriptionResponse) (TriggersClientListByShareSubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByShareSubscriptionCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TriggersClient.NewListByShareSubscriptionPager") + 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.listByShareSubscriptionCreateRequest(ctx, resourceGroupName, accountName, shareSubscriptionName, options) + }, nil) if err != nil { return TriggersClientListByShareSubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return TriggersClientListByShareSubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TriggersClientListByShareSubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listByShareSubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/CHANGELOG.md index 63aec28a..adc0110d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/CHANGELOG.md @@ -1,5 +1,11 @@ # 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/README.md index 28985ebf..d748471a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewPolicySetsClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/armtemplates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/armtemplates_client.go index 01662e4f..d811d003 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/armtemplates_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/armtemplates_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type ArmTemplatesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewArmTemplatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ArmTemplatesClient, error) { - cl, err := arm.NewClient(moduleName+".ArmTemplatesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewArmTemplatesClient(subscriptionID string, credential azcore.TokenCredent // - name - The name of the azure resource manager template. // - options - ArmTemplatesClientGetOptions contains the optional parameters for the ArmTemplatesClient.Get method. func (client *ArmTemplatesClient) Get(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string, options *ArmTemplatesClientGetOptions) (ArmTemplatesClientGetResponse, error) { + var err error + const operationName = "ArmTemplatesClient.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, labName, artifactSourceName, name, options) if err != nil { return ArmTemplatesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ArmTemplatesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ArmTemplatesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ArmTemplatesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -128,25 +134,20 @@ func (client *ArmTemplatesClient) NewListPager(resourceGroupName string, labName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ArmTemplatesClientListResponse) (ArmTemplatesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, artifactSourceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ArmTemplatesClient.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, labName, artifactSourceName, options) + }, nil) if err != nil { return ArmTemplatesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ArmTemplatesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ArmTemplatesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/artifacts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/artifacts_client.go index 52a4e3fd..a2e853c4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/artifacts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/artifacts_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type ArtifactsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewArtifactsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ArtifactsClient, error) { - cl, err := arm.NewClient(moduleName+".ArtifactsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,18 +57,25 @@ func NewArtifactsClient(subscriptionID string, credential azcore.TokenCredential // - options - ArtifactsClientGenerateArmTemplateOptions contains the optional parameters for the ArtifactsClient.GenerateArmTemplate // method. func (client *ArtifactsClient) GenerateArmTemplate(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string, generateArmTemplateRequest GenerateArmTemplateRequest, options *ArtifactsClientGenerateArmTemplateOptions) (ArtifactsClientGenerateArmTemplateResponse, error) { + var err error + const operationName = "ArtifactsClient.GenerateArmTemplate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.generateArmTemplateCreateRequest(ctx, resourceGroupName, labName, artifactSourceName, name, generateArmTemplateRequest, options) if err != nil { return ArtifactsClientGenerateArmTemplateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ArtifactsClientGenerateArmTemplateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ArtifactsClientGenerateArmTemplateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ArtifactsClientGenerateArmTemplateResponse{}, err } - return client.generateArmTemplateHandleResponse(resp) + resp, err := client.generateArmTemplateHandleResponse(httpResp) + return resp, err } // generateArmTemplateCreateRequest creates the GenerateArmTemplate request. @@ -103,7 +109,10 @@ func (client *ArtifactsClient) generateArmTemplateCreateRequest(ctx context.Cont reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, generateArmTemplateRequest) + if err := runtime.MarshalAsJSON(req, generateArmTemplateRequest); err != nil { + return nil, err + } + return req, nil } // generateArmTemplateHandleResponse handles the GenerateArmTemplate response. @@ -125,18 +134,25 @@ func (client *ArtifactsClient) generateArmTemplateHandleResponse(resp *http.Resp // - name - The name of the artifact. // - options - ArtifactsClientGetOptions contains the optional parameters for the ArtifactsClient.Get method. func (client *ArtifactsClient) Get(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string, options *ArtifactsClientGetOptions) (ArtifactsClientGetResponse, error) { + var err error + const operationName = "ArtifactsClient.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, labName, artifactSourceName, name, options) if err != nil { return ArtifactsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ArtifactsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ArtifactsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ArtifactsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -198,25 +214,20 @@ func (client *ArtifactsClient) NewListPager(resourceGroupName string, labName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ArtifactsClientListResponse) (ArtifactsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, artifactSourceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ArtifactsClient.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, labName, artifactSourceName, options) + }, nil) if err != nil { return ArtifactsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ArtifactsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ArtifactsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/artifactsources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/artifactsources_client.go index 21cf027f..319941f7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/artifactsources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/artifactsources_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type ArtifactSourcesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewArtifactSourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ArtifactSourcesClient, error) { - cl, err := arm.NewClient(moduleName+".ArtifactSourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewArtifactSourcesClient(subscriptionID string, credential azcore.TokenCred // - options - ArtifactSourcesClientCreateOrUpdateOptions contains the optional parameters for the ArtifactSourcesClient.CreateOrUpdate // method. func (client *ArtifactSourcesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, artifactSource ArtifactSource, options *ArtifactSourcesClientCreateOrUpdateOptions) (ArtifactSourcesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ArtifactSourcesClient.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, labName, name, artifactSource, options) if err != nil { return ArtifactSourcesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ArtifactSourcesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ArtifactSourcesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ArtifactSourcesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *ArtifactSourcesClient) createOrUpdateCreateRequest(ctx context.Con reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, artifactSource) + if err := runtime.MarshalAsJSON(req, artifactSource); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *ArtifactSourcesClient) createOrUpdateHandleResponse(resp *http.Res // - name - The name of the artifact source. // - options - ArtifactSourcesClientDeleteOptions contains the optional parameters for the ArtifactSourcesClient.Delete method. func (client *ArtifactSourcesClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string, options *ArtifactSourcesClientDeleteOptions) (ArtifactSourcesClientDeleteResponse, error) { + var err error + const operationName = "ArtifactSourcesClient.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, labName, name, options) if err != nil { return ArtifactSourcesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ArtifactSourcesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ArtifactSourcesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ArtifactSourcesClientDeleteResponse{}, err } return ArtifactSourcesClientDeleteResponse{}, nil } @@ -171,18 +186,25 @@ func (client *ArtifactSourcesClient) deleteCreateRequest(ctx context.Context, re // - name - The name of the artifact source. // - options - ArtifactSourcesClientGetOptions contains the optional parameters for the ArtifactSourcesClient.Get method. func (client *ArtifactSourcesClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, options *ArtifactSourcesClientGetOptions) (ArtifactSourcesClientGetResponse, error) { + var err error + const operationName = "ArtifactSourcesClient.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, labName, name, options) if err != nil { return ArtifactSourcesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ArtifactSourcesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ArtifactSourcesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ArtifactSourcesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -240,25 +262,20 @@ func (client *ArtifactSourcesClient) NewListPager(resourceGroupName string, labN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ArtifactSourcesClientListResponse) (ArtifactSourcesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ArtifactSourcesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ArtifactSourcesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, labName, options) + }, nil) if err != nil { return ArtifactSourcesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ArtifactSourcesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -319,18 +336,25 @@ func (client *ArtifactSourcesClient) listHandleResponse(resp *http.Response) (Ar // - artifactSource - Properties of an artifact source. // - options - ArtifactSourcesClientUpdateOptions contains the optional parameters for the ArtifactSourcesClient.Update method. func (client *ArtifactSourcesClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, artifactSource ArtifactSourceFragment, options *ArtifactSourcesClientUpdateOptions) (ArtifactSourcesClientUpdateResponse, error) { + var err error + const operationName = "ArtifactSourcesClient.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, labName, name, artifactSource, options) if err != nil { return ArtifactSourcesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ArtifactSourcesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ArtifactSourcesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ArtifactSourcesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -360,7 +384,10 @@ func (client *ArtifactSourcesClient) updateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, artifactSource) + if err := runtime.MarshalAsJSON(req, artifactSource); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/autorest.md index 7e616da5..85f3acf6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/autorest.md @@ -8,5 +8,5 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/devtestlabs/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/devtestlabs/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 +module-version: 1.2.0 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/client_factory.go index c33e1219..571b2e56 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -28,7 +27,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,126 +37,151 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewProviderOperationsClient() *ProviderOperationsClient { - subClient, _ := NewProviderOperationsClient(c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewLabsClient() *LabsClient { - subClient, _ := NewLabsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewGlobalSchedulesClient() *GlobalSchedulesClient { - subClient, _ := NewGlobalSchedulesClient(c.subscriptionID, c.credential, c.options) +// NewArmTemplatesClient creates a new instance of ArmTemplatesClient. +func (c *ClientFactory) NewArmTemplatesClient() *ArmTemplatesClient { + subClient, _ := NewArmTemplatesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewArtifactSourcesClient creates a new instance of ArtifactSourcesClient. func (c *ClientFactory) NewArtifactSourcesClient() *ArtifactSourcesClient { subClient, _ := NewArtifactSourcesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewArmTemplatesClient() *ArmTemplatesClient { - subClient, _ := NewArmTemplatesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - +// NewArtifactsClient creates a new instance of ArtifactsClient. func (c *ClientFactory) NewArtifactsClient() *ArtifactsClient { subClient, _ := NewArtifactsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCostsClient creates a new instance of CostsClient. func (c *ClientFactory) NewCostsClient() *CostsClient { subClient, _ := NewCostsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCustomImagesClient creates a new instance of CustomImagesClient. func (c *ClientFactory) NewCustomImagesClient() *CustomImagesClient { subClient, _ := NewCustomImagesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDisksClient creates a new instance of DisksClient. +func (c *ClientFactory) NewDisksClient() *DisksClient { + subClient, _ := NewDisksClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewEnvironmentsClient creates a new instance of EnvironmentsClient. +func (c *ClientFactory) NewEnvironmentsClient() *EnvironmentsClient { + subClient, _ := NewEnvironmentsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewFormulasClient creates a new instance of FormulasClient. func (c *ClientFactory) NewFormulasClient() *FormulasClient { subClient, _ := NewFormulasClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewGalleryImagesClient creates a new instance of GalleryImagesClient. func (c *ClientFactory) NewGalleryImagesClient() *GalleryImagesClient { subClient, _ := NewGalleryImagesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewNotificationChannelsClient() *NotificationChannelsClient { - subClient, _ := NewNotificationChannelsClient(c.subscriptionID, c.credential, c.options) +// NewGlobalSchedulesClient creates a new instance of GlobalSchedulesClient. +func (c *ClientFactory) NewGlobalSchedulesClient() *GlobalSchedulesClient { + subClient, _ := NewGlobalSchedulesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPolicySetsClient() *PolicySetsClient { - subClient, _ := NewPolicySetsClient(c.subscriptionID, c.credential, c.options) +// NewLabsClient creates a new instance of LabsClient. +func (c *ClientFactory) NewLabsClient() *LabsClient { + subClient, _ := NewLabsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPoliciesClient() *PoliciesClient { - subClient, _ := NewPoliciesClient(c.subscriptionID, c.credential, c.options) +// NewNotificationChannelsClient creates a new instance of NotificationChannelsClient. +func (c *ClientFactory) NewNotificationChannelsClient() *NotificationChannelsClient { + subClient, _ := NewNotificationChannelsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSchedulesClient() *SchedulesClient { - subClient, _ := NewSchedulesClient(c.subscriptionID, c.credential, c.options) +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewServiceRunnersClient() *ServiceRunnersClient { - subClient, _ := NewServiceRunnersClient(c.subscriptionID, c.credential, c.options) +// NewPoliciesClient creates a new instance of PoliciesClient. +func (c *ClientFactory) NewPoliciesClient() *PoliciesClient { + subClient, _ := NewPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewUsersClient() *UsersClient { - subClient, _ := NewUsersClient(c.subscriptionID, c.credential, c.options) +// NewPolicySetsClient creates a new instance of PolicySetsClient. +func (c *ClientFactory) NewPolicySetsClient() *PolicySetsClient { + subClient, _ := NewPolicySetsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDisksClient() *DisksClient { - subClient, _ := NewDisksClient(c.subscriptionID, c.credential, c.options) +// NewProviderOperationsClient creates a new instance of ProviderOperationsClient. +func (c *ClientFactory) NewProviderOperationsClient() *ProviderOperationsClient { + subClient, _ := NewProviderOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewEnvironmentsClient() *EnvironmentsClient { - subClient, _ := NewEnvironmentsClient(c.subscriptionID, c.credential, c.options) +// NewSchedulesClient creates a new instance of SchedulesClient. +func (c *ClientFactory) NewSchedulesClient() *SchedulesClient { + subClient, _ := NewSchedulesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSecretsClient creates a new instance of SecretsClient. func (c *ClientFactory) NewSecretsClient() *SecretsClient { subClient, _ := NewSecretsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewServiceFabricSchedulesClient creates a new instance of ServiceFabricSchedulesClient. +func (c *ClientFactory) NewServiceFabricSchedulesClient() *ServiceFabricSchedulesClient { + subClient, _ := NewServiceFabricSchedulesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServiceFabricsClient creates a new instance of ServiceFabricsClient. func (c *ClientFactory) NewServiceFabricsClient() *ServiceFabricsClient { subClient, _ := NewServiceFabricsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewServiceFabricSchedulesClient() *ServiceFabricSchedulesClient { - subClient, _ := NewServiceFabricSchedulesClient(c.subscriptionID, c.credential, c.options) +// NewServiceRunnersClient creates a new instance of ServiceRunnersClient. +func (c *ClientFactory) NewServiceRunnersClient() *ServiceRunnersClient { + subClient, _ := NewServiceRunnersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient { - subClient, _ := NewVirtualMachinesClient(c.subscriptionID, c.credential, c.options) +// NewUsersClient creates a new instance of UsersClient. +func (c *ClientFactory) NewUsersClient() *UsersClient { + subClient, _ := NewUsersClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachineSchedulesClient creates a new instance of VirtualMachineSchedulesClient. func (c *ClientFactory) NewVirtualMachineSchedulesClient() *VirtualMachineSchedulesClient { subClient, _ := NewVirtualMachineSchedulesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachinesClient creates a new instance of VirtualMachinesClient. +func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient { + subClient, _ := NewVirtualMachinesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewVirtualNetworksClient creates a new instance of VirtualNetworksClient. func (c *ClientFactory) NewVirtualNetworksClient() *VirtualNetworksClient { subClient, _ := NewVirtualNetworksClient(c.subscriptionID, c.credential, c.options) return subClient diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/constants.go index 59adaaf5..1efc6dd8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs const ( - moduleName = "armdevtestlabs" - moduleVersion = "v1.1.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs" + moduleVersion = "v1.2.0" ) // CostThresholdStatus - Indicates whether this threshold will be displayed on cost charts. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/costs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/costs_client.go index 54c14298..8191a3d9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/costs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/costs_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -33,7 +32,7 @@ type CostsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CostsClient, error) { - cl, err := arm.NewClient(moduleName+".CostsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewCostsClient(subscriptionID string, credential azcore.TokenCredential, op // - labCost - A cost item. // - options - CostsClientCreateOrUpdateOptions contains the optional parameters for the CostsClient.CreateOrUpdate method. func (client *CostsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, labCost LabCost, options *CostsClientCreateOrUpdateOptions) (CostsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "CostsClient.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, labName, name, labCost, options) if err != nil { return CostsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CostsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return CostsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return CostsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -95,7 +101,10 @@ func (client *CostsClient) createOrUpdateCreateRequest(ctx context.Context, reso reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, labCost) + if err := runtime.MarshalAsJSON(req, labCost); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -116,18 +125,25 @@ func (client *CostsClient) createOrUpdateHandleResponse(resp *http.Response) (Co // - name - The name of the cost. // - options - CostsClientGetOptions contains the optional parameters for the CostsClient.Get method. func (client *CostsClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, options *CostsClientGetOptions) (CostsClientGetResponse, error) { + var err error + const operationName = "CostsClient.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, labName, name, options) if err != nil { return CostsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CostsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CostsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CostsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/customimages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/customimages_client.go index fb75a004..737cd38c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/customimages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/customimages_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type CustomImagesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCustomImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomImagesClient, error) { - cl, err := arm.NewClient(moduleName+".CustomImagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,9 +60,14 @@ func (client *CustomImagesClient) BeginCreateOrUpdate(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller[CustomImagesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomImagesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[CustomImagesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomImagesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +76,24 @@ func (client *CustomImagesClient) BeginCreateOrUpdate(ctx context.Context, resou // // Generated from API version 2018-09-15 func (client *CustomImagesClient) createOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, customImage CustomImage, options *CustomImagesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CustomImagesClient.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, labName, name, customImage, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -113,7 +123,10 @@ func (client *CustomImagesClient) createOrUpdateCreateRequest(ctx context.Contex reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, customImage) + if err := runtime.MarshalAsJSON(req, customImage); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete custom image. This operation can take a while to complete. @@ -131,9 +144,14 @@ func (client *CustomImagesClient) BeginDelete(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[CustomImagesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomImagesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[CustomImagesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomImagesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -142,18 +160,24 @@ func (client *CustomImagesClient) BeginDelete(ctx context.Context, resourceGroup // // Generated from API version 2018-09-15 func (client *CustomImagesClient) deleteOperation(ctx context.Context, resourceGroupName string, labName string, name string, options *CustomImagesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "CustomImagesClient.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, labName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -195,18 +219,25 @@ func (client *CustomImagesClient) deleteCreateRequest(ctx context.Context, resou // - name - The name of the custom image. // - options - CustomImagesClientGetOptions contains the optional parameters for the CustomImagesClient.Get method. func (client *CustomImagesClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, options *CustomImagesClientGetOptions) (CustomImagesClientGetResponse, error) { + var err error + const operationName = "CustomImagesClient.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, labName, name, options) if err != nil { return CustomImagesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CustomImagesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomImagesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CustomImagesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -263,25 +294,20 @@ func (client *CustomImagesClient) NewListPager(resourceGroupName string, labName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CustomImagesClientListResponse) (CustomImagesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CustomImagesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CustomImagesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, labName, options) + }, nil) if err != nil { return CustomImagesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomImagesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -342,18 +368,25 @@ func (client *CustomImagesClient) listHandleResponse(resp *http.Response) (Custo // - customImage - A custom image. // - options - CustomImagesClientUpdateOptions contains the optional parameters for the CustomImagesClient.Update method. func (client *CustomImagesClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, customImage CustomImageFragment, options *CustomImagesClientUpdateOptions) (CustomImagesClientUpdateResponse, error) { + var err error + const operationName = "CustomImagesClient.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, labName, name, customImage, options) if err != nil { return CustomImagesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CustomImagesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomImagesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CustomImagesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -383,7 +416,10 @@ func (client *CustomImagesClient) updateCreateRequest(ctx context.Context, resou reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, customImage) + if err := runtime.MarshalAsJSON(req, customImage); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/disks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/disks_client.go index b35e72dd..28a6c787 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/disks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/disks_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type DisksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDisksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DisksClient, error) { - cl, err := arm.NewClient(moduleName+".DisksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,9 +60,14 @@ func (client *DisksClient) BeginAttach(ctx context.Context, resourceGroupName st if err != nil { return nil, err } - return runtime.NewPoller[DisksClientAttachResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientAttachResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DisksClientAttachResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientAttachResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +76,24 @@ func (client *DisksClient) BeginAttach(ctx context.Context, resourceGroupName st // // Generated from API version 2018-09-15 func (client *DisksClient) attach(ctx context.Context, resourceGroupName string, labName string, userName string, name string, attachDiskProperties AttachDiskProperties, options *DisksClientBeginAttachOptions) (*http.Response, error) { + var err error + const operationName = "DisksClient.BeginAttach" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.attachCreateRequest(ctx, resourceGroupName, labName, userName, name, attachDiskProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // attachCreateRequest creates the Attach request. @@ -117,7 +127,10 @@ func (client *DisksClient) attachCreateRequest(ctx context.Context, resourceGrou reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, attachDiskProperties) + if err := runtime.MarshalAsJSON(req, attachDiskProperties); err != nil { + return nil, err + } + return req, nil } // BeginCreateOrUpdate - Create or replace an existing disk. This operation can take a while to complete. @@ -137,9 +150,14 @@ func (client *DisksClient) BeginCreateOrUpdate(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[DisksClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DisksClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -148,18 +166,24 @@ func (client *DisksClient) BeginCreateOrUpdate(ctx context.Context, resourceGrou // // Generated from API version 2018-09-15 func (client *DisksClient) createOrUpdate(ctx context.Context, resourceGroupName string, labName string, userName string, name string, disk Disk, options *DisksClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DisksClient.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, labName, userName, name, disk, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -193,7 +217,10 @@ func (client *DisksClient) createOrUpdateCreateRequest(ctx context.Context, reso reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, disk) + if err := runtime.MarshalAsJSON(req, disk); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete disk. This operation can take a while to complete. @@ -211,9 +238,14 @@ func (client *DisksClient) BeginDelete(ctx context.Context, resourceGroupName st if err != nil { return nil, err } - return runtime.NewPoller[DisksClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DisksClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -222,18 +254,24 @@ func (client *DisksClient) BeginDelete(ctx context.Context, resourceGroupName st // // Generated from API version 2018-09-15 func (client *DisksClient) deleteOperation(ctx context.Context, resourceGroupName string, labName string, userName string, name string, options *DisksClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DisksClient.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, labName, userName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -287,9 +325,14 @@ func (client *DisksClient) BeginDetach(ctx context.Context, resourceGroupName st if err != nil { return nil, err } - return runtime.NewPoller[DisksClientDetachResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientDetachResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DisksClientDetachResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientDetachResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -298,18 +341,24 @@ func (client *DisksClient) BeginDetach(ctx context.Context, resourceGroupName st // // Generated from API version 2018-09-15 func (client *DisksClient) detach(ctx context.Context, resourceGroupName string, labName string, userName string, name string, detachDiskProperties DetachDiskProperties, options *DisksClientBeginDetachOptions) (*http.Response, error) { + var err error + const operationName = "DisksClient.BeginDetach" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.detachCreateRequest(ctx, resourceGroupName, labName, userName, name, detachDiskProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // detachCreateRequest creates the Detach request. @@ -343,7 +392,10 @@ func (client *DisksClient) detachCreateRequest(ctx context.Context, resourceGrou reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, detachDiskProperties) + if err := runtime.MarshalAsJSON(req, detachDiskProperties); err != nil { + return nil, err + } + return req, nil } // Get - Get disk. @@ -356,18 +408,25 @@ func (client *DisksClient) detachCreateRequest(ctx context.Context, resourceGrou // - name - The name of the disk. // - options - DisksClientGetOptions contains the optional parameters for the DisksClient.Get method. func (client *DisksClient) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, options *DisksClientGetOptions) (DisksClientGetResponse, error) { + var err error + const operationName = "DisksClient.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, labName, userName, name, options) if err != nil { return DisksClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DisksClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DisksClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DisksClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -429,25 +488,20 @@ func (client *DisksClient) NewListPager(resourceGroupName string, labName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DisksClientListResponse) (DisksClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, userName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DisksClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DisksClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, labName, userName, options) + }, nil) if err != nil { return DisksClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DisksClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -513,18 +567,25 @@ func (client *DisksClient) listHandleResponse(resp *http.Response) (DisksClientL // - disk - A Disk. // - options - DisksClientUpdateOptions contains the optional parameters for the DisksClient.Update method. func (client *DisksClient) Update(ctx context.Context, resourceGroupName string, labName string, userName string, name string, disk DiskFragment, options *DisksClientUpdateOptions) (DisksClientUpdateResponse, error) { + var err error + const operationName = "DisksClient.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, labName, userName, name, disk, options) if err != nil { return DisksClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DisksClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DisksClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DisksClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -558,7 +619,10 @@ func (client *DisksClient) updateCreateRequest(ctx context.Context, resourceGrou reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, disk) + if err := runtime.MarshalAsJSON(req, disk); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/environments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/environments_client.go index 4622722a..02daec67 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/environments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/environments_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type EnvironmentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEnvironmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EnvironmentsClient, error) { - cl, err := arm.NewClient(moduleName+".EnvironmentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,9 +61,14 @@ func (client *EnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller[EnvironmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +77,24 @@ func (client *EnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, resou // // Generated from API version 2018-09-15 func (client *EnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, labName string, userName string, name string, dtlEnvironment DtlEnvironment, options *EnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.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, labName, userName, name, dtlEnvironment, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -118,7 +128,10 @@ func (client *EnvironmentsClient) createOrUpdateCreateRequest(ctx context.Contex reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, dtlEnvironment) + if err := runtime.MarshalAsJSON(req, dtlEnvironment); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete environment. This operation can take a while to complete. @@ -137,9 +150,14 @@ func (client *EnvironmentsClient) BeginDelete(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[EnvironmentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -148,18 +166,24 @@ func (client *EnvironmentsClient) BeginDelete(ctx context.Context, resourceGroup // // Generated from API version 2018-09-15 func (client *EnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, labName string, userName string, name string, options *EnvironmentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.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, labName, userName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -206,18 +230,25 @@ func (client *EnvironmentsClient) deleteCreateRequest(ctx context.Context, resou // - name - The name of the environment. // - options - EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. func (client *EnvironmentsClient) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, options *EnvironmentsClientGetOptions) (EnvironmentsClientGetResponse, error) { + var err error + const operationName = "EnvironmentsClient.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, labName, userName, name, options) if err != nil { return EnvironmentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -279,25 +310,20 @@ func (client *EnvironmentsClient) NewListPager(resourceGroupName string, labName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListResponse) (EnvironmentsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, userName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, labName, userName, options) + }, nil) if err != nil { return EnvironmentsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -363,18 +389,25 @@ func (client *EnvironmentsClient) listHandleResponse(resp *http.Response) (Envir // - dtlEnvironment - An environment, which is essentially an ARM template deployment. // - options - EnvironmentsClientUpdateOptions contains the optional parameters for the EnvironmentsClient.Update method. func (client *EnvironmentsClient) Update(ctx context.Context, resourceGroupName string, labName string, userName string, name string, dtlEnvironment DtlEnvironmentFragment, options *EnvironmentsClientUpdateOptions) (EnvironmentsClientUpdateResponse, error) { + var err error + const operationName = "EnvironmentsClient.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, labName, userName, name, dtlEnvironment, options) if err != nil { return EnvironmentsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -408,7 +441,10 @@ func (client *EnvironmentsClient) updateCreateRequest(ctx context.Context, resou reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, dtlEnvironment) + if err := runtime.MarshalAsJSON(req, dtlEnvironment); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/formulas_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/formulas_client.go index 70991feb..8c706a42 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/formulas_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/formulas_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type FormulasClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFormulasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FormulasClient, error) { - cl, err := arm.NewClient(moduleName+".FormulasClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,9 +60,14 @@ func (client *FormulasClient) BeginCreateOrUpdate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[FormulasClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FormulasClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[FormulasClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FormulasClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +76,24 @@ func (client *FormulasClient) BeginCreateOrUpdate(ctx context.Context, resourceG // // Generated from API version 2018-09-15 func (client *FormulasClient) createOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, formula Formula, options *FormulasClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FormulasClient.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, labName, name, formula, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -113,7 +123,10 @@ func (client *FormulasClient) createOrUpdateCreateRequest(ctx context.Context, r reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, formula) + if err := runtime.MarshalAsJSON(req, formula); err != nil { + return nil, err + } + return req, nil } // Delete - Delete formula. @@ -125,16 +138,22 @@ func (client *FormulasClient) createOrUpdateCreateRequest(ctx context.Context, r // - name - The name of the formula. // - options - FormulasClientDeleteOptions contains the optional parameters for the FormulasClient.Delete method. func (client *FormulasClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string, options *FormulasClientDeleteOptions) (FormulasClientDeleteResponse, error) { + var err error + const operationName = "FormulasClient.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, labName, name, options) if err != nil { return FormulasClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FormulasClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return FormulasClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return FormulasClientDeleteResponse{}, err } return FormulasClientDeleteResponse{}, nil } @@ -178,18 +197,25 @@ func (client *FormulasClient) deleteCreateRequest(ctx context.Context, resourceG // - name - The name of the formula. // - options - FormulasClientGetOptions contains the optional parameters for the FormulasClient.Get method. func (client *FormulasClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, options *FormulasClientGetOptions) (FormulasClientGetResponse, error) { + var err error + const operationName = "FormulasClient.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, labName, name, options) if err != nil { return FormulasClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FormulasClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FormulasClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FormulasClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -246,25 +272,20 @@ func (client *FormulasClient) NewListPager(resourceGroupName string, labName str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *FormulasClientListResponse) (FormulasClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FormulasClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FormulasClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, labName, options) + }, nil) if err != nil { return FormulasClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FormulasClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -325,18 +346,25 @@ func (client *FormulasClient) listHandleResponse(resp *http.Response) (FormulasC // - formula - A formula for creating a VM, specifying an image base and other parameters // - options - FormulasClientUpdateOptions contains the optional parameters for the FormulasClient.Update method. func (client *FormulasClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, formula FormulaFragment, options *FormulasClientUpdateOptions) (FormulasClientUpdateResponse, error) { + var err error + const operationName = "FormulasClient.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, labName, name, formula, options) if err != nil { return FormulasClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FormulasClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FormulasClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FormulasClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -366,7 +394,10 @@ func (client *FormulasClient) updateCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, formula) + if err := runtime.MarshalAsJSON(req, formula); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/galleryimages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/galleryimages_client.go index 41912040..d6b8be96 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/galleryimages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/galleryimages_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type GalleryImagesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGalleryImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryImagesClient, error) { - cl, err := arm.NewClient(moduleName+".GalleryImagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,25 +56,20 @@ func (client *GalleryImagesClient) NewListPager(resourceGroupName string, labNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *GalleryImagesClientListResponse) (GalleryImagesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GalleryImagesClient.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, labName, options) + }, nil) if err != nil { return GalleryImagesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GalleryImagesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GalleryImagesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/globalschedules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/globalschedules_client.go index 04f7d8f7..f6a5d697 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/globalschedules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/globalschedules_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type GlobalSchedulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGlobalSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GlobalSchedulesClient, error) { - cl, err := arm.NewClient(moduleName+".GlobalSchedulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewGlobalSchedulesClient(subscriptionID string, credential azcore.TokenCred // - options - GlobalSchedulesClientCreateOrUpdateOptions contains the optional parameters for the GlobalSchedulesClient.CreateOrUpdate // method. func (client *GlobalSchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, schedule Schedule, options *GlobalSchedulesClientCreateOrUpdateOptions) (GlobalSchedulesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "GlobalSchedulesClient.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, name, schedule, options) if err != nil { return GlobalSchedulesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalSchedulesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return GlobalSchedulesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return GlobalSchedulesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -92,7 +98,10 @@ func (client *GlobalSchedulesClient) createOrUpdateCreateRequest(ctx context.Con reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, schedule) + if err := runtime.MarshalAsJSON(req, schedule); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,16 +121,22 @@ func (client *GlobalSchedulesClient) createOrUpdateHandleResponse(resp *http.Res // - name - The name of the schedule. // - options - GlobalSchedulesClientDeleteOptions contains the optional parameters for the GlobalSchedulesClient.Delete method. func (client *GlobalSchedulesClient) Delete(ctx context.Context, resourceGroupName string, name string, options *GlobalSchedulesClientDeleteOptions) (GlobalSchedulesClientDeleteResponse, error) { + var err error + const operationName = "GlobalSchedulesClient.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, name, options) if err != nil { return GlobalSchedulesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalSchedulesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return GlobalSchedulesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GlobalSchedulesClientDeleteResponse{}, err } return GlobalSchedulesClientDeleteResponse{}, nil } @@ -166,9 +181,14 @@ func (client *GlobalSchedulesClient) BeginExecute(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[GlobalSchedulesClientExecuteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GlobalSchedulesClientExecuteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GlobalSchedulesClientExecuteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GlobalSchedulesClientExecuteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -177,18 +197,24 @@ func (client *GlobalSchedulesClient) BeginExecute(ctx context.Context, resourceG // // Generated from API version 2018-09-15 func (client *GlobalSchedulesClient) execute(ctx context.Context, resourceGroupName string, name string, options *GlobalSchedulesClientBeginExecuteOptions) (*http.Response, error) { + var err error + const operationName = "GlobalSchedulesClient.BeginExecute" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.executeCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // executeCreateRequest creates the Execute request. @@ -225,18 +251,25 @@ func (client *GlobalSchedulesClient) executeCreateRequest(ctx context.Context, r // - name - The name of the schedule. // - options - GlobalSchedulesClientGetOptions contains the optional parameters for the GlobalSchedulesClient.Get method. func (client *GlobalSchedulesClient) Get(ctx context.Context, resourceGroupName string, name string, options *GlobalSchedulesClientGetOptions) (GlobalSchedulesClientGetResponse, error) { + var err error + const operationName = "GlobalSchedulesClient.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, name, options) if err != nil { return GlobalSchedulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalSchedulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalSchedulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalSchedulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -289,25 +322,20 @@ func (client *GlobalSchedulesClient) NewListByResourceGroupPager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *GlobalSchedulesClientListByResourceGroupResponse) (GlobalSchedulesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GlobalSchedulesClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GlobalSchedulesClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 GlobalSchedulesClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalSchedulesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -365,25 +393,20 @@ func (client *GlobalSchedulesClient) NewListBySubscriptionPager(options *GlobalS return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *GlobalSchedulesClientListBySubscriptionResponse) (GlobalSchedulesClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GlobalSchedulesClient.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 GlobalSchedulesClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GlobalSchedulesClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalSchedulesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -441,9 +464,14 @@ func (client *GlobalSchedulesClient) BeginRetarget(ctx context.Context, resource if err != nil { return nil, err } - return runtime.NewPoller[GlobalSchedulesClientRetargetResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GlobalSchedulesClientRetargetResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GlobalSchedulesClientRetargetResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GlobalSchedulesClientRetargetResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -452,18 +480,24 @@ func (client *GlobalSchedulesClient) BeginRetarget(ctx context.Context, resource // // Generated from API version 2018-09-15 func (client *GlobalSchedulesClient) retarget(ctx context.Context, resourceGroupName string, name string, retargetScheduleProperties RetargetScheduleProperties, options *GlobalSchedulesClientBeginRetargetOptions) (*http.Response, error) { + var err error + const operationName = "GlobalSchedulesClient.BeginRetarget" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.retargetCreateRequest(ctx, resourceGroupName, name, retargetScheduleProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // retargetCreateRequest creates the Retarget request. @@ -489,7 +523,10 @@ func (client *GlobalSchedulesClient) retargetCreateRequest(ctx context.Context, reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, retargetScheduleProperties) + if err := runtime.MarshalAsJSON(req, retargetScheduleProperties); err != nil { + return nil, err + } + return req, nil } // Update - Allows modifying tags of schedules. All other properties will be ignored. @@ -501,18 +538,25 @@ func (client *GlobalSchedulesClient) retargetCreateRequest(ctx context.Context, // - schedule - A schedule. // - options - GlobalSchedulesClientUpdateOptions contains the optional parameters for the GlobalSchedulesClient.Update method. func (client *GlobalSchedulesClient) Update(ctx context.Context, resourceGroupName string, name string, schedule ScheduleFragment, options *GlobalSchedulesClientUpdateOptions) (GlobalSchedulesClientUpdateResponse, error) { + var err error + const operationName = "GlobalSchedulesClient.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, name, schedule, options) if err != nil { return GlobalSchedulesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalSchedulesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalSchedulesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalSchedulesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -538,7 +582,10 @@ func (client *GlobalSchedulesClient) updateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, schedule) + if err := runtime.MarshalAsJSON(req, schedule); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/labs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/labs_client.go index 64da07b2..f6289639 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/labs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/labs_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type LabsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLabsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LabsClient, error) { - cl, err := arm.NewClient(moduleName+".LabsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,9 +57,14 @@ func (client *LabsClient) BeginClaimAnyVM(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[LabsClientClaimAnyVMResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LabsClientClaimAnyVMResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[LabsClientClaimAnyVMResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LabsClientClaimAnyVMResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -69,18 +73,24 @@ func (client *LabsClient) BeginClaimAnyVM(ctx context.Context, resourceGroupName // // Generated from API version 2018-09-15 func (client *LabsClient) claimAnyVM(ctx context.Context, resourceGroupName string, name string, options *LabsClientBeginClaimAnyVMOptions) (*http.Response, error) { + var err error + const operationName = "LabsClient.BeginClaimAnyVM" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.claimAnyVMCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // claimAnyVMCreateRequest creates the ClaimAnyVM request. @@ -124,9 +134,14 @@ func (client *LabsClient) BeginCreateEnvironment(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[LabsClientCreateEnvironmentResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LabsClientCreateEnvironmentResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[LabsClientCreateEnvironmentResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LabsClientCreateEnvironmentResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -135,18 +150,24 @@ func (client *LabsClient) BeginCreateEnvironment(ctx context.Context, resourceGr // // Generated from API version 2018-09-15 func (client *LabsClient) createEnvironment(ctx context.Context, resourceGroupName string, name string, labVirtualMachineCreationParameter LabVirtualMachineCreationParameter, options *LabsClientBeginCreateEnvironmentOptions) (*http.Response, error) { + var err error + const operationName = "LabsClient.BeginCreateEnvironment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createEnvironmentCreateRequest(ctx, resourceGroupName, name, labVirtualMachineCreationParameter, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createEnvironmentCreateRequest creates the CreateEnvironment request. @@ -172,7 +193,10 @@ func (client *LabsClient) createEnvironmentCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, labVirtualMachineCreationParameter) + if err := runtime.MarshalAsJSON(req, labVirtualMachineCreationParameter); err != nil { + return nil, err + } + return req, nil } // BeginCreateOrUpdate - Create or replace an existing lab. This operation can take a while to complete. @@ -190,9 +214,14 @@ func (client *LabsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[LabsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LabsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[LabsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LabsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -201,18 +230,24 @@ func (client *LabsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroup // // Generated from API version 2018-09-15 func (client *LabsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, lab Lab, options *LabsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "LabsClient.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, name, lab, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -238,7 +273,10 @@ func (client *LabsClient) createOrUpdateCreateRequest(ctx context.Context, resou reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, lab) + if err := runtime.MarshalAsJSON(req, lab); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete lab. This operation can take a while to complete. @@ -254,9 +292,14 @@ func (client *LabsClient) BeginDelete(ctx context.Context, resourceGroupName str if err != nil { return nil, err } - return runtime.NewPoller[LabsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LabsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[LabsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LabsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -265,18 +308,24 @@ func (client *LabsClient) BeginDelete(ctx context.Context, resourceGroupName str // // Generated from API version 2018-09-15 func (client *LabsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *LabsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "LabsClient.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, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -320,9 +369,14 @@ func (client *LabsClient) BeginExportResourceUsage(ctx context.Context, resource if err != nil { return nil, err } - return runtime.NewPoller[LabsClientExportResourceUsageResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LabsClientExportResourceUsageResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[LabsClientExportResourceUsageResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LabsClientExportResourceUsageResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -331,18 +385,24 @@ func (client *LabsClient) BeginExportResourceUsage(ctx context.Context, resource // // Generated from API version 2018-09-15 func (client *LabsClient) exportResourceUsage(ctx context.Context, resourceGroupName string, name string, exportResourceUsageParameters ExportResourceUsageParameters, options *LabsClientBeginExportResourceUsageOptions) (*http.Response, error) { + var err error + const operationName = "LabsClient.BeginExportResourceUsage" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.exportResourceUsageCreateRequest(ctx, resourceGroupName, name, exportResourceUsageParameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // exportResourceUsageCreateRequest creates the ExportResourceUsage request. @@ -368,7 +428,10 @@ func (client *LabsClient) exportResourceUsageCreateRequest(ctx context.Context, reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, exportResourceUsageParameters) + if err := runtime.MarshalAsJSON(req, exportResourceUsageParameters); err != nil { + return nil, err + } + return req, nil } // GenerateUploadURI - Generate a URI for uploading custom disk images to a Lab. @@ -380,18 +443,25 @@ func (client *LabsClient) exportResourceUsageCreateRequest(ctx context.Context, // - generateUploadURIParameter - Properties for generating an upload URI. // - options - LabsClientGenerateUploadURIOptions contains the optional parameters for the LabsClient.GenerateUploadURI method. func (client *LabsClient) GenerateUploadURI(ctx context.Context, resourceGroupName string, name string, generateUploadURIParameter GenerateUploadURIParameter, options *LabsClientGenerateUploadURIOptions) (LabsClientGenerateUploadURIResponse, error) { + var err error + const operationName = "LabsClient.GenerateUploadURI" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.generateUploadURICreateRequest(ctx, resourceGroupName, name, generateUploadURIParameter, options) if err != nil { return LabsClientGenerateUploadURIResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LabsClientGenerateUploadURIResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LabsClientGenerateUploadURIResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LabsClientGenerateUploadURIResponse{}, err } - return client.generateUploadURIHandleResponse(resp) + resp, err := client.generateUploadURIHandleResponse(httpResp) + return resp, err } // generateUploadURICreateRequest creates the GenerateUploadURI request. @@ -417,7 +487,10 @@ func (client *LabsClient) generateUploadURICreateRequest(ctx context.Context, re reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, generateUploadURIParameter) + if err := runtime.MarshalAsJSON(req, generateUploadURIParameter); err != nil { + return nil, err + } + return req, nil } // generateUploadURIHandleResponse handles the GenerateUploadURI response. @@ -437,18 +510,25 @@ func (client *LabsClient) generateUploadURIHandleResponse(resp *http.Response) ( // - name - The name of the lab. // - options - LabsClientGetOptions contains the optional parameters for the LabsClient.Get method. func (client *LabsClient) Get(ctx context.Context, resourceGroupName string, name string, options *LabsClientGetOptions) (LabsClientGetResponse, error) { + var err error + const operationName = "LabsClient.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, name, options) if err != nil { return LabsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LabsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LabsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LabsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -505,9 +585,14 @@ func (client *LabsClient) BeginImportVirtualMachine(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller[LabsClientImportVirtualMachineResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LabsClientImportVirtualMachineResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[LabsClientImportVirtualMachineResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LabsClientImportVirtualMachineResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -516,18 +601,24 @@ func (client *LabsClient) BeginImportVirtualMachine(ctx context.Context, resourc // // Generated from API version 2018-09-15 func (client *LabsClient) importVirtualMachine(ctx context.Context, resourceGroupName string, name string, importLabVirtualMachineRequest ImportLabVirtualMachineRequest, options *LabsClientBeginImportVirtualMachineOptions) (*http.Response, error) { + var err error + const operationName = "LabsClient.BeginImportVirtualMachine" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.importVirtualMachineCreateRequest(ctx, resourceGroupName, name, importLabVirtualMachineRequest, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // importVirtualMachineCreateRequest creates the ImportVirtualMachine request. @@ -553,7 +644,10 @@ func (client *LabsClient) importVirtualMachineCreateRequest(ctx context.Context, reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, importLabVirtualMachineRequest) + if err := runtime.MarshalAsJSON(req, importLabVirtualMachineRequest); err != nil { + return nil, err + } + return req, nil } // NewListByResourceGroupPager - List labs in a resource group. @@ -568,25 +662,20 @@ func (client *LabsClient) NewListByResourceGroupPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *LabsClientListByResourceGroupResponse) (LabsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LabsClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LabsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 LabsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LabsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -644,25 +733,20 @@ func (client *LabsClient) NewListBySubscriptionPager(options *LabsClientListBySu return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *LabsClientListBySubscriptionResponse) (LabsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LabsClientListBySubscriptionResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LabsClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 LabsClientListBySubscriptionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LabsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -717,25 +801,20 @@ func (client *LabsClient) NewListVhdsPager(resourceGroupName string, name string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *LabsClientListVhdsResponse) (LabsClientListVhdsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listVhdsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LabsClient.NewListVhdsPager") + 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.listVhdsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return LabsClientListVhdsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return LabsClientListVhdsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LabsClientListVhdsResponse{}, runtime.NewResponseError(resp) - } return client.listVhdsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -783,18 +862,25 @@ func (client *LabsClient) listVhdsHandleResponse(resp *http.Response) (LabsClien // - lab - A lab. // - options - LabsClientUpdateOptions contains the optional parameters for the LabsClient.Update method. func (client *LabsClient) Update(ctx context.Context, resourceGroupName string, name string, lab LabFragment, options *LabsClientUpdateOptions) (LabsClientUpdateResponse, error) { + var err error + const operationName = "LabsClient.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, name, lab, options) if err != nil { return LabsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LabsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LabsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LabsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -820,7 +906,10 @@ func (client *LabsClient) updateCreateRequest(ctx context.Context, resourceGroup reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, lab) + if err := runtime.MarshalAsJSON(req, lab); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/models.go index 70e69227..0a16a6b5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -129,24 +128,6 @@ type ArmTemplateProperties struct { Publisher *string } -// ArmTemplatesClientGetOptions contains the optional parameters for the ArmTemplatesClient.Get method. -type ArmTemplatesClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=displayName)' - Expand *string -} - -// ArmTemplatesClientListOptions contains the optional parameters for the ArmTemplatesClient.NewListPager method. -type ArmTemplatesClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=displayName)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - // Artifact - An artifact. type Artifact struct { // REQUIRED; The properties of the resource. @@ -321,64 +302,6 @@ type ArtifactSourceProperties struct { UniqueIdentifier *string } -// ArtifactSourcesClientCreateOrUpdateOptions contains the optional parameters for the ArtifactSourcesClient.CreateOrUpdate -// method. -type ArtifactSourcesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ArtifactSourcesClientDeleteOptions contains the optional parameters for the ArtifactSourcesClient.Delete method. -type ArtifactSourcesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ArtifactSourcesClientGetOptions contains the optional parameters for the ArtifactSourcesClient.Get method. -type ArtifactSourcesClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=displayName)' - Expand *string -} - -// ArtifactSourcesClientListOptions contains the optional parameters for the ArtifactSourcesClient.NewListPager method. -type ArtifactSourcesClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=displayName)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// ArtifactSourcesClientUpdateOptions contains the optional parameters for the ArtifactSourcesClient.Update method. -type ArtifactSourcesClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// ArtifactsClientGenerateArmTemplateOptions contains the optional parameters for the ArtifactsClient.GenerateArmTemplate -// method. -type ArtifactsClientGenerateArmTemplateOptions struct { - // placeholder for future optional parameters -} - -// ArtifactsClientGetOptions contains the optional parameters for the ArtifactsClient.Get method. -type ArtifactsClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=title)' - Expand *string -} - -// ArtifactsClientListOptions contains the optional parameters for the ArtifactsClient.NewListPager method. -type ArtifactsClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=title)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - // AttachDiskProperties - Properties of the disk to attach. type AttachDiskProperties struct { // The resource ID of the Lab virtual machine to which the disk is attached. @@ -472,17 +395,6 @@ type CostThresholdProperties struct { ThresholdID *string } -// CostsClientCreateOrUpdateOptions contains the optional parameters for the CostsClient.CreateOrUpdate method. -type CostsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// CostsClientGetOptions contains the optional parameters for the CostsClient.Get method. -type CostsClientGetOptions struct { - // Specify the $expand query. Example: 'properties($expand=labCostDetails)' - Expand *string -} - // CustomImage - A custom image. type CustomImage struct { // REQUIRED; The properties of the resource. @@ -594,42 +506,6 @@ type CustomImagePropertiesFromVM struct { WindowsOsInfo *WindowsOsInfo } -// CustomImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomImagesClient.BeginCreateOrUpdate -// method. -type CustomImagesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomImagesClientBeginDeleteOptions contains the optional parameters for the CustomImagesClient.BeginDelete method. -type CustomImagesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomImagesClientGetOptions contains the optional parameters for the CustomImagesClient.Get method. -type CustomImagesClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=vm)' - Expand *string -} - -// CustomImagesClientListOptions contains the optional parameters for the CustomImagesClient.NewListPager method. -type CustomImagesClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=vm)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// CustomImagesClientUpdateOptions contains the optional parameters for the CustomImagesClient.Update method. -type CustomImagesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // DataDiskProperties - Request body for adding a new or existing data disk to a virtual machine. type DataDiskProperties struct { // Specifies options to attach a new disk to the virtual machine. @@ -741,53 +617,6 @@ type DiskProperties struct { UniqueIdentifier *string } -// DisksClientBeginAttachOptions contains the optional parameters for the DisksClient.BeginAttach method. -type DisksClientBeginAttachOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DisksClientBeginCreateOrUpdateOptions contains the optional parameters for the DisksClient.BeginCreateOrUpdate method. -type DisksClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DisksClientBeginDeleteOptions contains the optional parameters for the DisksClient.BeginDelete method. -type DisksClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DisksClientBeginDetachOptions contains the optional parameters for the DisksClient.BeginDetach method. -type DisksClientBeginDetachOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DisksClientGetOptions contains the optional parameters for the DisksClient.Get method. -type DisksClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=diskType)' - Expand *string -} - -// DisksClientListOptions contains the optional parameters for the DisksClient.NewListPager method. -type DisksClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=diskType)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// DisksClientUpdateOptions contains the optional parameters for the DisksClient.Update method. -type DisksClientUpdateOptions struct { - // placeholder for future optional parameters -} - // DtlEnvironment - An environment, which is essentially an ARM template deployment. type DtlEnvironment struct { // REQUIRED; The properties of the resource. @@ -854,42 +683,6 @@ type EnvironmentProperties struct { UniqueIdentifier *string } -// EnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdate -// method. -type EnvironmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientBeginDeleteOptions contains the optional parameters for the EnvironmentsClient.BeginDelete method. -type EnvironmentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. -type EnvironmentsClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=deploymentProperties)' - Expand *string -} - -// EnvironmentsClientListOptions contains the optional parameters for the EnvironmentsClient.NewListPager method. -type EnvironmentsClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=deploymentProperties)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// EnvironmentsClientUpdateOptions contains the optional parameters for the EnvironmentsClient.Update method. -type EnvironmentsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // EvaluatePoliciesProperties - Properties for evaluating a policy set. type EvaluatePoliciesProperties struct { // The fact data. @@ -1010,40 +803,6 @@ type FormulaPropertiesFromVM struct { LabVMID *string } -// FormulasClientBeginCreateOrUpdateOptions contains the optional parameters for the FormulasClient.BeginCreateOrUpdate method. -type FormulasClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FormulasClientDeleteOptions contains the optional parameters for the FormulasClient.Delete method. -type FormulasClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// FormulasClientGetOptions contains the optional parameters for the FormulasClient.Get method. -type FormulasClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=description)' - Expand *string -} - -// FormulasClientListOptions contains the optional parameters for the FormulasClient.NewListPager method. -type FormulasClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=description)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// FormulasClientUpdateOptions contains the optional parameters for the FormulasClient.Update method. -type FormulasClientUpdateOptions struct { - // placeholder for future optional parameters -} - // GalleryImage - A gallery image. type GalleryImage struct { // REQUIRED; The properties of the resource. @@ -1119,18 +878,6 @@ type GalleryImageReference struct { Version *string } -// GalleryImagesClientListOptions contains the optional parameters for the GalleryImagesClient.NewListPager method. -type GalleryImagesClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=author)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - // GenerateArmTemplateRequest - Parameters for generating an ARM template for deploying artifacts. type GenerateArmTemplateRequest struct { // Options for uploading the files for the artifact. UploadFilesAndGenerateSasTokens is the default value. @@ -1158,67 +905,6 @@ type GenerateUploadURIResponse struct { UploadURI *string } -// GlobalSchedulesClientBeginExecuteOptions contains the optional parameters for the GlobalSchedulesClient.BeginExecute method. -type GlobalSchedulesClientBeginExecuteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GlobalSchedulesClientBeginRetargetOptions contains the optional parameters for the GlobalSchedulesClient.BeginRetarget -// method. -type GlobalSchedulesClientBeginRetargetOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GlobalSchedulesClientCreateOrUpdateOptions contains the optional parameters for the GlobalSchedulesClient.CreateOrUpdate -// method. -type GlobalSchedulesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// GlobalSchedulesClientDeleteOptions contains the optional parameters for the GlobalSchedulesClient.Delete method. -type GlobalSchedulesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// GlobalSchedulesClientGetOptions contains the optional parameters for the GlobalSchedulesClient.Get method. -type GlobalSchedulesClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=status)' - Expand *string -} - -// GlobalSchedulesClientListByResourceGroupOptions contains the optional parameters for the GlobalSchedulesClient.NewListByResourceGroupPager -// method. -type GlobalSchedulesClientListByResourceGroupOptions struct { - // Specify the $expand query. Example: 'properties($select=status)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// GlobalSchedulesClientListBySubscriptionOptions contains the optional parameters for the GlobalSchedulesClient.NewListBySubscriptionPager -// method. -type GlobalSchedulesClientListBySubscriptionOptions struct { - // Specify the $expand query. Example: 'properties($select=status)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// GlobalSchedulesClientUpdateOptions contains the optional parameters for the GlobalSchedulesClient.Update method. -type GlobalSchedulesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // HourDetails - Properties of an hourly schedule. type HourDetails struct { // Minutes of the hour the schedule will run. @@ -1751,89 +1437,6 @@ type LabVirtualMachineProperties struct { VirtualMachineCreationSource *VirtualMachineCreationSource } -// LabsClientBeginClaimAnyVMOptions contains the optional parameters for the LabsClient.BeginClaimAnyVM method. -type LabsClientBeginClaimAnyVMOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LabsClientBeginCreateEnvironmentOptions contains the optional parameters for the LabsClient.BeginCreateEnvironment method. -type LabsClientBeginCreateEnvironmentOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LabsClientBeginCreateOrUpdateOptions contains the optional parameters for the LabsClient.BeginCreateOrUpdate method. -type LabsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LabsClientBeginDeleteOptions contains the optional parameters for the LabsClient.BeginDelete method. -type LabsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LabsClientBeginExportResourceUsageOptions contains the optional parameters for the LabsClient.BeginExportResourceUsage -// method. -type LabsClientBeginExportResourceUsageOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LabsClientBeginImportVirtualMachineOptions contains the optional parameters for the LabsClient.BeginImportVirtualMachine -// method. -type LabsClientBeginImportVirtualMachineOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LabsClientGenerateUploadURIOptions contains the optional parameters for the LabsClient.GenerateUploadURI method. -type LabsClientGenerateUploadURIOptions struct { - // placeholder for future optional parameters -} - -// LabsClientGetOptions contains the optional parameters for the LabsClient.Get method. -type LabsClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - Expand *string -} - -// LabsClientListByResourceGroupOptions contains the optional parameters for the LabsClient.NewListByResourceGroupPager method. -type LabsClientListByResourceGroupOptions struct { - // Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// LabsClientListBySubscriptionOptions contains the optional parameters for the LabsClient.NewListBySubscriptionPager method. -type LabsClientListBySubscriptionOptions struct { - // Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// LabsClientListVhdsOptions contains the optional parameters for the LabsClient.NewListVhdsPager method. -type LabsClientListVhdsOptions struct { - // placeholder for future optional parameters -} - -// LabsClientUpdateOptions contains the optional parameters for the LabsClient.Update method. -type LabsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // LinuxOsInfo - Information about a Linux OS. type LinuxOsInfo struct { // The state of the Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). @@ -1934,46 +1537,6 @@ type NotificationChannelProperties struct { UniqueIdentifier *string } -// NotificationChannelsClientCreateOrUpdateOptions contains the optional parameters for the NotificationChannelsClient.CreateOrUpdate -// method. -type NotificationChannelsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// NotificationChannelsClientDeleteOptions contains the optional parameters for the NotificationChannelsClient.Delete method. -type NotificationChannelsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// NotificationChannelsClientGetOptions contains the optional parameters for the NotificationChannelsClient.Get method. -type NotificationChannelsClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=webHookUrl)' - Expand *string -} - -// NotificationChannelsClientListOptions contains the optional parameters for the NotificationChannelsClient.NewListPager -// method. -type NotificationChannelsClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=webHookUrl)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// NotificationChannelsClientNotifyOptions contains the optional parameters for the NotificationChannelsClient.Notify method. -type NotificationChannelsClientNotifyOptions struct { - // placeholder for future optional parameters -} - -// NotificationChannelsClientUpdateOptions contains the optional parameters for the NotificationChannelsClient.Update method. -type NotificationChannelsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // NotificationSettings - Notification settings for a schedule. type NotificationSettings struct { // The email recipient to send notifications to (can be a list of semi-colon separated email addresses). @@ -2046,11 +1609,6 @@ type OperationResult struct { StatusCode *HTTPStatusCode } -// OperationsClientGetOptions contains the optional parameters for the OperationsClient.Get method. -type OperationsClientGetOptions struct { - // placeholder for future optional parameters -} - // ParameterInfo - Information about an artifact's parameter. type ParameterInfo struct { // The name of the artifact parameter. @@ -2075,39 +1633,6 @@ type PercentageCostThresholdProperties struct { ThresholdValue *float64 } -// PoliciesClientCreateOrUpdateOptions contains the optional parameters for the PoliciesClient.CreateOrUpdate method. -type PoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// PoliciesClientDeleteOptions contains the optional parameters for the PoliciesClient.Delete method. -type PoliciesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method. -type PoliciesClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=description)' - Expand *string -} - -// PoliciesClientListOptions contains the optional parameters for the PoliciesClient.NewListPager method. -type PoliciesClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=description)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// PoliciesClientUpdateOptions contains the optional parameters for the PoliciesClient.Update method. -type PoliciesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // Policy - A Policy. type Policy struct { // REQUIRED; The properties of the resource. @@ -2183,11 +1708,6 @@ type PolicySetResult struct { PolicyViolations []*PolicyViolation } -// PolicySetsClientEvaluatePoliciesOptions contains the optional parameters for the PolicySetsClient.EvaluatePolicies method. -type PolicySetsClientEvaluatePoliciesOptions struct { - // placeholder for future optional parameters -} - // PolicyViolation - Policy violation. type PolicyViolation struct { // The code of the policy violation. @@ -2215,11 +1735,6 @@ type ProviderOperationResult struct { NextLink *string } -// ProviderOperationsClientListOptions contains the optional parameters for the ProviderOperationsClient.NewListPager method. -type ProviderOperationsClientListOptions struct { - // placeholder for future optional parameters -} - // RdpConnection - Represents a .rdp file type RdpConnection struct { // The contents of the .rdp file @@ -2373,50 +1888,6 @@ type ScheduleProperties struct { UniqueIdentifier *string } -// SchedulesClientBeginExecuteOptions contains the optional parameters for the SchedulesClient.BeginExecute method. -type SchedulesClientBeginExecuteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SchedulesClientCreateOrUpdateOptions contains the optional parameters for the SchedulesClient.CreateOrUpdate method. -type SchedulesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SchedulesClientDeleteOptions contains the optional parameters for the SchedulesClient.Delete method. -type SchedulesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SchedulesClientGetOptions contains the optional parameters for the SchedulesClient.Get method. -type SchedulesClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=status)' - Expand *string -} - -// SchedulesClientListApplicableOptions contains the optional parameters for the SchedulesClient.NewListApplicablePager method. -type SchedulesClientListApplicableOptions struct { - // placeholder for future optional parameters -} - -// SchedulesClientListOptions contains the optional parameters for the SchedulesClient.NewListPager method. -type SchedulesClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=status)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// SchedulesClientUpdateOptions contains the optional parameters for the SchedulesClient.Update method. -type SchedulesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // Secret - A secret. type Secret struct { // REQUIRED; The properties of the resource. @@ -2465,40 +1936,6 @@ type SecretProperties struct { UniqueIdentifier *string } -// SecretsClientBeginCreateOrUpdateOptions contains the optional parameters for the SecretsClient.BeginCreateOrUpdate method. -type SecretsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecretsClientDeleteOptions contains the optional parameters for the SecretsClient.Delete method. -type SecretsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. -type SecretsClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=value)' - Expand *string -} - -// SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method. -type SecretsClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=value)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method. -type SecretsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ServiceFabric - A Service Fabric. type ServiceFabric struct { // REQUIRED; The properties of the resource. @@ -2553,104 +1990,6 @@ type ServiceFabricProperties struct { UniqueIdentifier *string } -// ServiceFabricSchedulesClientBeginExecuteOptions contains the optional parameters for the ServiceFabricSchedulesClient.BeginExecute -// method. -type ServiceFabricSchedulesClientBeginExecuteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceFabricSchedulesClientCreateOrUpdateOptions contains the optional parameters for the ServiceFabricSchedulesClient.CreateOrUpdate -// method. -type ServiceFabricSchedulesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ServiceFabricSchedulesClientDeleteOptions contains the optional parameters for the ServiceFabricSchedulesClient.Delete -// method. -type ServiceFabricSchedulesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ServiceFabricSchedulesClientGetOptions contains the optional parameters for the ServiceFabricSchedulesClient.Get method. -type ServiceFabricSchedulesClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=status)' - Expand *string -} - -// ServiceFabricSchedulesClientListOptions contains the optional parameters for the ServiceFabricSchedulesClient.NewListPager -// method. -type ServiceFabricSchedulesClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=status)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// ServiceFabricSchedulesClientUpdateOptions contains the optional parameters for the ServiceFabricSchedulesClient.Update -// method. -type ServiceFabricSchedulesClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// ServiceFabricsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceFabricsClient.BeginCreateOrUpdate -// method. -type ServiceFabricsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceFabricsClientBeginDeleteOptions contains the optional parameters for the ServiceFabricsClient.BeginDelete method. -type ServiceFabricsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceFabricsClientBeginStartOptions contains the optional parameters for the ServiceFabricsClient.BeginStart method. -type ServiceFabricsClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceFabricsClientBeginStopOptions contains the optional parameters for the ServiceFabricsClient.BeginStop method. -type ServiceFabricsClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceFabricsClientGetOptions contains the optional parameters for the ServiceFabricsClient.Get method. -type ServiceFabricsClientGetOptions struct { - // Specify the $expand query. Example: 'properties($expand=applicableSchedule)' - Expand *string -} - -// ServiceFabricsClientListApplicableSchedulesOptions contains the optional parameters for the ServiceFabricsClient.ListApplicableSchedules -// method. -type ServiceFabricsClientListApplicableSchedulesOptions struct { - // placeholder for future optional parameters -} - -// ServiceFabricsClientListOptions contains the optional parameters for the ServiceFabricsClient.NewListPager method. -type ServiceFabricsClientListOptions struct { - // Specify the $expand query. Example: 'properties($expand=applicableSchedule)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// ServiceFabricsClientUpdateOptions contains the optional parameters for the ServiceFabricsClient.Update method. -type ServiceFabricsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ServiceRunner - A container for a managed identity to execute DevTest lab services. type ServiceRunner struct { // The identity of the resource. @@ -2681,22 +2020,6 @@ type ServiceRunnerList struct { Value []*ServiceRunner } -// ServiceRunnersClientCreateOrUpdateOptions contains the optional parameters for the ServiceRunnersClient.CreateOrUpdate -// method. -type ServiceRunnersClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ServiceRunnersClientDeleteOptions contains the optional parameters for the ServiceRunnersClient.Delete method. -type ServiceRunnersClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ServiceRunnersClientGetOptions contains the optional parameters for the ServiceRunnersClient.Get method. -type ServiceRunnersClientGetOptions struct { - // placeholder for future optional parameters -} - // SharedPublicIPAddressConfiguration - Properties of a virtual machine that determine how it is connected to a load balancer. type SharedPublicIPAddressConfiguration struct { // The incoming NAT rules @@ -2894,204 +2217,6 @@ type UserSecretStore struct { KeyVaultURI *string } -// UsersClientBeginCreateOrUpdateOptions contains the optional parameters for the UsersClient.BeginCreateOrUpdate method. -type UsersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// UsersClientBeginDeleteOptions contains the optional parameters for the UsersClient.BeginDelete method. -type UsersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// UsersClientGetOptions contains the optional parameters for the UsersClient.Get method. -type UsersClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=identity)' - Expand *string -} - -// UsersClientListOptions contains the optional parameters for the UsersClient.NewListPager method. -type UsersClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=identity)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// UsersClientUpdateOptions contains the optional parameters for the UsersClient.Update method. -type UsersClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// VirtualMachineSchedulesClientBeginExecuteOptions contains the optional parameters for the VirtualMachineSchedulesClient.BeginExecute -// method. -type VirtualMachineSchedulesClientBeginExecuteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachineSchedulesClientCreateOrUpdateOptions contains the optional parameters for the VirtualMachineSchedulesClient.CreateOrUpdate -// method. -type VirtualMachineSchedulesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// VirtualMachineSchedulesClientDeleteOptions contains the optional parameters for the VirtualMachineSchedulesClient.Delete -// method. -type VirtualMachineSchedulesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// VirtualMachineSchedulesClientGetOptions contains the optional parameters for the VirtualMachineSchedulesClient.Get method. -type VirtualMachineSchedulesClientGetOptions struct { - // Specify the $expand query. Example: 'properties($select=status)' - Expand *string -} - -// VirtualMachineSchedulesClientListOptions contains the optional parameters for the VirtualMachineSchedulesClient.NewListPager -// method. -type VirtualMachineSchedulesClientListOptions struct { - // Specify the $expand query. Example: 'properties($select=status)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// VirtualMachineSchedulesClientUpdateOptions contains the optional parameters for the VirtualMachineSchedulesClient.Update -// method. -type VirtualMachineSchedulesClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// VirtualMachinesClientBeginAddDataDiskOptions contains the optional parameters for the VirtualMachinesClient.BeginAddDataDisk -// method. -type VirtualMachinesClientBeginAddDataDiskOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientBeginApplyArtifactsOptions contains the optional parameters for the VirtualMachinesClient.BeginApplyArtifacts -// method. -type VirtualMachinesClientBeginApplyArtifactsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientBeginClaimOptions contains the optional parameters for the VirtualMachinesClient.BeginClaim method. -type VirtualMachinesClientBeginClaimOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateOrUpdate -// method. -type VirtualMachinesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete method. -type VirtualMachinesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientBeginDetachDataDiskOptions contains the optional parameters for the VirtualMachinesClient.BeginDetachDataDisk -// method. -type VirtualMachinesClientBeginDetachDataDiskOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientBeginRedeployOptions contains the optional parameters for the VirtualMachinesClient.BeginRedeploy -// method. -type VirtualMachinesClientBeginRedeployOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientBeginResizeOptions contains the optional parameters for the VirtualMachinesClient.BeginResize method. -type VirtualMachinesClientBeginResizeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart method. -type VirtualMachinesClientBeginRestartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method. -type VirtualMachinesClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientBeginStopOptions contains the optional parameters for the VirtualMachinesClient.BeginStop method. -type VirtualMachinesClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientBeginTransferDisksOptions contains the optional parameters for the VirtualMachinesClient.BeginTransferDisks -// method. -type VirtualMachinesClientBeginTransferDisksOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientBeginUnClaimOptions contains the optional parameters for the VirtualMachinesClient.BeginUnClaim method. -type VirtualMachinesClientBeginUnClaimOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method. -type VirtualMachinesClientGetOptions struct { - // Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - Expand *string -} - -// VirtualMachinesClientGetRdpFileContentsOptions contains the optional parameters for the VirtualMachinesClient.GetRdpFileContents -// method. -type VirtualMachinesClientGetRdpFileContentsOptions struct { - // placeholder for future optional parameters -} - -// VirtualMachinesClientListApplicableSchedulesOptions contains the optional parameters for the VirtualMachinesClient.ListApplicableSchedules -// method. -type VirtualMachinesClientListApplicableSchedulesOptions struct { - // placeholder for future optional parameters -} - -// VirtualMachinesClientListOptions contains the optional parameters for the VirtualMachinesClient.NewListPager method. -type VirtualMachinesClientListOptions struct { - // Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// VirtualMachinesClientUpdateOptions contains the optional parameters for the VirtualMachinesClient.Update method. -type VirtualMachinesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // VirtualNetwork - A virtual network. type VirtualNetwork struct { // The location of the resource. @@ -3155,42 +2280,6 @@ type VirtualNetworkProperties struct { UniqueIdentifier *string } -// VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate -// method. -type VirtualNetworksClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method. -type VirtualNetworksClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method. -type VirtualNetworksClientGetOptions struct { - // Specify the $expand query. Example: 'properties($expand=externalSubnets)' - Expand *string -} - -// VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.NewListPager method. -type VirtualNetworksClientListOptions struct { - // Specify the $expand query. Example: 'properties($expand=externalSubnets)' - Expand *string - // The filter to apply to the operation. Example: '$filter=contains(name,'myName') - Filter *string - // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' - Orderby *string - // The maximum number of resources to return from the operation. Example: '$top=10' - Top *int32 -} - -// VirtualNetworksClientUpdateOptions contains the optional parameters for the VirtualNetworksClient.Update method. -type VirtualNetworksClientUpdateOptions struct { - // placeholder for future optional parameters -} - // WeekDetails - Properties of a weekly schedule. type WeekDetails struct { // The time of the day the schedule will occur. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/models_serde.go index 3a6d8b3f..811498cc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -292,7 +291,7 @@ func (a *ArmTemplateParameterProperties) UnmarshalJSON(data []byte) error { func (a ArmTemplateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populateAny(objectMap, "contents", a.Contents) - populateTimeRFC3339(objectMap, "createdDate", a.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", a.CreatedDate) populate(objectMap, "description", a.Description) populate(objectMap, "displayName", a.DisplayName) populate(objectMap, "enabled", a.Enabled) @@ -315,7 +314,7 @@ func (a *ArmTemplateProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Contents", &a.Contents) delete(rawMsg, key) case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &a.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &a.CreatedDate) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &a.Description) @@ -431,7 +430,7 @@ func (a ArtifactInstallProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "artifactId", a.ArtifactID) populate(objectMap, "artifactTitle", a.ArtifactTitle) populate(objectMap, "deploymentStatusMessage", a.DeploymentStatusMessage) - populateTimeRFC3339(objectMap, "installTime", a.InstallTime) + populateDateTimeRFC3339(objectMap, "installTime", a.InstallTime) populate(objectMap, "parameters", a.Parameters) populate(objectMap, "status", a.Status) populate(objectMap, "vmExtensionStatusMessage", a.VMExtensionStatusMessage) @@ -457,7 +456,7 @@ func (a *ArtifactInstallProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DeploymentStatusMessage", &a.DeploymentStatusMessage) delete(rawMsg, key) case "installTime": - err = unpopulateTimeRFC3339(val, "InstallTime", &a.InstallTime) + err = unpopulateDateTimeRFC3339(val, "InstallTime", &a.InstallTime) delete(rawMsg, key) case "parameters": err = unpopulate(val, "Parameters", &a.Parameters) @@ -541,7 +540,7 @@ func (a *ArtifactParameterProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ArtifactProperties. func (a ArtifactProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdDate", a.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", a.CreatedDate) populate(objectMap, "description", a.Description) populate(objectMap, "filePath", a.FilePath) populate(objectMap, "icon", a.Icon) @@ -562,7 +561,7 @@ func (a *ArtifactProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &a.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &a.CreatedDate) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &a.Description) @@ -703,7 +702,7 @@ func (a ArtifactSourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "armTemplateFolderPath", a.ArmTemplateFolderPath) populate(objectMap, "branchRef", a.BranchRef) - populateTimeRFC3339(objectMap, "createdDate", a.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", a.CreatedDate) populate(objectMap, "displayName", a.DisplayName) populate(objectMap, "folderPath", a.FolderPath) populate(objectMap, "provisioningState", a.ProvisioningState) @@ -731,7 +730,7 @@ func (a *ArtifactSourceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "BranchRef", &a.BranchRef) delete(rawMsg, key) case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &a.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &a.CreatedDate) delete(rawMsg, key) case "displayName": err = unpopulate(val, "DisplayName", &a.DisplayName) @@ -1131,7 +1130,7 @@ func (c *CustomImageList) UnmarshalJSON(data []byte) error { func (c CustomImageProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "author", c.Author) - populateTimeRFC3339(objectMap, "creationDate", c.CreationDate) + populateDateTimeRFC3339(objectMap, "creationDate", c.CreationDate) populate(objectMap, "customImagePlan", c.CustomImagePlan) populate(objectMap, "dataDiskStorageInfo", c.DataDiskStorageInfo) populate(objectMap, "description", c.Description) @@ -1158,7 +1157,7 @@ func (c *CustomImageProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Author", &c.Author) delete(rawMsg, key) case "creationDate": - err = unpopulateTimeRFC3339(val, "CreationDate", &c.CreationDate) + err = unpopulateDateTimeRFC3339(val, "CreationDate", &c.CreationDate) delete(rawMsg, key) case "customImagePlan": err = unpopulate(val, "CustomImagePlan", &c.CustomImagePlan) @@ -1558,7 +1557,7 @@ func (d *DiskList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DiskProperties. func (d DiskProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdDate", d.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", d.CreatedDate) populate(objectMap, "diskBlobName", d.DiskBlobName) populate(objectMap, "diskSizeGiB", d.DiskSizeGiB) populate(objectMap, "diskType", d.DiskType) @@ -1582,7 +1581,7 @@ func (d *DiskProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &d.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &d.CreatedDate) delete(rawMsg, key) case "diskBlobName": err = unpopulate(val, "DiskBlobName", &d.DiskBlobName) @@ -1929,7 +1928,7 @@ func (e *Event) UnmarshalJSON(data []byte) error { func (e ExportResourceUsageParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "blobStorageAbsoluteSasUri", e.BlobStorageAbsoluteSasURI) - populateTimeRFC3339(objectMap, "usageStartDate", e.UsageStartDate) + populateDateTimeRFC3339(objectMap, "usageStartDate", e.UsageStartDate) return json.Marshal(objectMap) } @@ -1946,7 +1945,7 @@ func (e *ExportResourceUsageParameters) UnmarshalJSON(data []byte) error { err = unpopulate(val, "BlobStorageAbsoluteSasURI", &e.BlobStorageAbsoluteSasURI) delete(rawMsg, key) case "usageStartDate": - err = unpopulateTimeRFC3339(val, "UsageStartDate", &e.UsageStartDate) + err = unpopulateDateTimeRFC3339(val, "UsageStartDate", &e.UsageStartDate) delete(rawMsg, key) } if err != nil { @@ -2096,7 +2095,7 @@ func (f *FormulaList) UnmarshalJSON(data []byte) error { func (f FormulaProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "author", f.Author) - populateTimeRFC3339(objectMap, "creationDate", f.CreationDate) + populateDateTimeRFC3339(objectMap, "creationDate", f.CreationDate) populate(objectMap, "description", f.Description) populate(objectMap, "formulaContent", f.FormulaContent) populate(objectMap, "osType", f.OSType) @@ -2119,7 +2118,7 @@ func (f *FormulaProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Author", &f.Author) delete(rawMsg, key) case "creationDate": - err = unpopulateTimeRFC3339(val, "CreationDate", &f.CreationDate) + err = unpopulateDateTimeRFC3339(val, "CreationDate", &f.CreationDate) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &f.Description) @@ -2256,7 +2255,7 @@ func (g *GalleryImageList) UnmarshalJSON(data []byte) error { func (g GalleryImageProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "author", g.Author) - populateTimeRFC3339(objectMap, "createdDate", g.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", g.CreatedDate) populate(objectMap, "description", g.Description) populate(objectMap, "enabled", g.Enabled) populate(objectMap, "icon", g.Icon) @@ -2279,7 +2278,7 @@ func (g *GalleryImageProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Author", &g.Author) delete(rawMsg, key) case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &g.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &g.CreatedDate) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &g.Description) @@ -2626,7 +2625,7 @@ func (l *Lab) UnmarshalJSON(data []byte) error { func (l LabAnnouncementProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "enabled", l.Enabled) - populateTimeRFC3339(objectMap, "expirationDate", l.ExpirationDate) + populateDateTimeRFC3339(objectMap, "expirationDate", l.ExpirationDate) populate(objectMap, "expired", l.Expired) populate(objectMap, "markdown", l.Markdown) populate(objectMap, "provisioningState", l.ProvisioningState) @@ -2648,7 +2647,7 @@ func (l *LabAnnouncementProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Enabled", &l.Enabled) delete(rawMsg, key) case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &l.ExpirationDate) + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &l.ExpirationDate) delete(rawMsg, key) case "expired": err = unpopulate(val, "Expired", &l.Expired) @@ -2725,7 +2724,7 @@ func (l LabCostDetailsProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "cost", l.Cost) populate(objectMap, "costType", l.CostType) - populateTimeRFC3339(objectMap, "date", l.Date) + populateDateTimeRFC3339(objectMap, "date", l.Date) return json.Marshal(objectMap) } @@ -2745,7 +2744,7 @@ func (l *LabCostDetailsProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CostType", &l.CostType) delete(rawMsg, key) case "date": - err = unpopulateTimeRFC3339(val, "Date", &l.Date) + err = unpopulateDateTimeRFC3339(val, "Date", &l.Date) delete(rawMsg, key) } if err != nil { @@ -2758,14 +2757,14 @@ func (l *LabCostDetailsProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LabCostProperties. func (l LabCostProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdDate", l.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", l.CreatedDate) populate(objectMap, "currencyCode", l.CurrencyCode) - populateTimeRFC3339(objectMap, "endDateTime", l.EndDateTime) + populateDateTimeRFC3339(objectMap, "endDateTime", l.EndDateTime) populate(objectMap, "labCostDetails", l.LabCostDetails) populate(objectMap, "labCostSummary", l.LabCostSummary) populate(objectMap, "provisioningState", l.ProvisioningState) populate(objectMap, "resourceCosts", l.ResourceCosts) - populateTimeRFC3339(objectMap, "startDateTime", l.StartDateTime) + populateDateTimeRFC3339(objectMap, "startDateTime", l.StartDateTime) populate(objectMap, "targetCost", l.TargetCost) populate(objectMap, "uniqueIdentifier", l.UniqueIdentifier) return json.Marshal(objectMap) @@ -2781,13 +2780,13 @@ func (l *LabCostProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &l.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &l.CreatedDate) delete(rawMsg, key) case "currencyCode": err = unpopulate(val, "CurrencyCode", &l.CurrencyCode) delete(rawMsg, key) case "endDateTime": - err = unpopulateTimeRFC3339(val, "EndDateTime", &l.EndDateTime) + err = unpopulateDateTimeRFC3339(val, "EndDateTime", &l.EndDateTime) delete(rawMsg, key) case "labCostDetails": err = unpopulate(val, "LabCostDetails", &l.LabCostDetails) @@ -2802,7 +2801,7 @@ func (l *LabCostProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ResourceCosts", &l.ResourceCosts) delete(rawMsg, key) case "startDateTime": - err = unpopulateTimeRFC3339(val, "StartDateTime", &l.StartDateTime) + err = unpopulateDateTimeRFC3339(val, "StartDateTime", &l.StartDateTime) delete(rawMsg, key) case "targetCost": err = unpopulate(val, "TargetCost", &l.TargetCost) @@ -2908,7 +2907,7 @@ func (l LabProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "announcement", l.Announcement) populate(objectMap, "artifactsStorageAccount", l.ArtifactsStorageAccount) - populateTimeRFC3339(objectMap, "createdDate", l.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", l.CreatedDate) populate(objectMap, "defaultPremiumStorageAccount", l.DefaultPremiumStorageAccount) populate(objectMap, "defaultStorageAccount", l.DefaultStorageAccount) populate(objectMap, "environmentPermission", l.EnvironmentPermission) @@ -2945,7 +2944,7 @@ func (l *LabProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ArtifactsStorageAccount", &l.ArtifactsStorageAccount) delete(rawMsg, key) case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &l.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &l.CreatedDate) delete(rawMsg, key) case "defaultPremiumStorageAccount": err = unpopulate(val, "DefaultPremiumStorageAccount", &l.DefaultPremiumStorageAccount) @@ -3246,12 +3245,12 @@ func (l LabVirtualMachineCreationParameterProperties) MarshalJSON() ([]byte, err populate(objectMap, "allowClaim", l.AllowClaim) populate(objectMap, "artifacts", l.Artifacts) populate(objectMap, "bulkCreationParameters", l.BulkCreationParameters) - populateTimeRFC3339(objectMap, "createdDate", l.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", l.CreatedDate) populate(objectMap, "customImageId", l.CustomImageID) populate(objectMap, "dataDiskParameters", l.DataDiskParameters) populate(objectMap, "disallowPublicIpAddress", l.DisallowPublicIPAddress) populate(objectMap, "environmentId", l.EnvironmentID) - populateTimeRFC3339(objectMap, "expirationDate", l.ExpirationDate) + populateDateTimeRFC3339(objectMap, "expirationDate", l.ExpirationDate) populate(objectMap, "galleryImageReference", l.GalleryImageReference) populate(objectMap, "isAuthenticationWithSshKey", l.IsAuthenticationWithSSHKey) populate(objectMap, "labSubnetName", l.LabSubnetName) @@ -3289,7 +3288,7 @@ func (l *LabVirtualMachineCreationParameterProperties) UnmarshalJSON(data []byte err = unpopulate(val, "BulkCreationParameters", &l.BulkCreationParameters) delete(rawMsg, key) case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &l.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &l.CreatedDate) delete(rawMsg, key) case "customImageId": err = unpopulate(val, "CustomImageID", &l.CustomImageID) @@ -3304,7 +3303,7 @@ func (l *LabVirtualMachineCreationParameterProperties) UnmarshalJSON(data []byte err = unpopulate(val, "EnvironmentID", &l.EnvironmentID) delete(rawMsg, key) case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &l.ExpirationDate) + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &l.ExpirationDate) delete(rawMsg, key) case "galleryImageReference": err = unpopulate(val, "GalleryImageReference", &l.GalleryImageReference) @@ -3428,12 +3427,12 @@ func (l LabVirtualMachineProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "computeVm", l.ComputeVM) populate(objectMap, "createdByUser", l.CreatedByUser) populate(objectMap, "createdByUserId", l.CreatedByUserID) - populateTimeRFC3339(objectMap, "createdDate", l.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", l.CreatedDate) populate(objectMap, "customImageId", l.CustomImageID) populate(objectMap, "dataDiskParameters", l.DataDiskParameters) populate(objectMap, "disallowPublicIpAddress", l.DisallowPublicIPAddress) populate(objectMap, "environmentId", l.EnvironmentID) - populateTimeRFC3339(objectMap, "expirationDate", l.ExpirationDate) + populateDateTimeRFC3339(objectMap, "expirationDate", l.ExpirationDate) populate(objectMap, "fqdn", l.Fqdn) populate(objectMap, "galleryImageReference", l.GalleryImageReference) populate(objectMap, "isAuthenticationWithSshKey", l.IsAuthenticationWithSSHKey) @@ -3492,7 +3491,7 @@ func (l *LabVirtualMachineProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByUserID", &l.CreatedByUserID) delete(rawMsg, key) case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &l.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &l.CreatedDate) delete(rawMsg, key) case "customImageId": err = unpopulate(val, "CustomImageID", &l.CustomImageID) @@ -3507,7 +3506,7 @@ func (l *LabVirtualMachineProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "EnvironmentID", &l.EnvironmentID) delete(rawMsg, key) case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &l.ExpirationDate) + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &l.ExpirationDate) delete(rawMsg, key) case "fqdn": err = unpopulate(val, "Fqdn", &l.Fqdn) @@ -3774,7 +3773,7 @@ func (n *NotificationChannelList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NotificationChannelProperties. func (n NotificationChannelProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdDate", n.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", n.CreatedDate) populate(objectMap, "description", n.Description) populate(objectMap, "emailRecipient", n.EmailRecipient) populate(objectMap, "events", n.Events) @@ -3795,7 +3794,7 @@ func (n *NotificationChannelProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &n.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &n.CreatedDate) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &n.Description) @@ -4233,7 +4232,7 @@ func (p *PolicyList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PolicyProperties. func (p PolicyProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdDate", p.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", p.CreatedDate) populate(objectMap, "description", p.Description) populate(objectMap, "evaluatorType", p.EvaluatorType) populate(objectMap, "factData", p.FactData) @@ -4255,7 +4254,7 @@ func (p *PolicyProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &p.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &p.CreatedDate) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &p.Description) @@ -4743,7 +4742,7 @@ func (s *ScheduleList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScheduleProperties. func (s ScheduleProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdDate", s.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", s.CreatedDate) populate(objectMap, "dailyRecurrence", s.DailyRecurrence) populate(objectMap, "hourlyRecurrence", s.HourlyRecurrence) populate(objectMap, "notificationSettings", s.NotificationSettings) @@ -4767,7 +4766,7 @@ func (s *ScheduleProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &s.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &s.CreatedDate) delete(rawMsg, key) case "dailyRecurrence": err = unpopulate(val, "DailyRecurrence", &s.DailyRecurrence) @@ -5388,8 +5387,8 @@ func (s *SubnetSharedPublicIPAddressConfiguration) UnmarshalJSON(data []byte) er func (t TargetCostProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "costThresholds", t.CostThresholds) - populateTimeRFC3339(objectMap, "cycleEndDateTime", t.CycleEndDateTime) - populateTimeRFC3339(objectMap, "cycleStartDateTime", t.CycleStartDateTime) + populateDateTimeRFC3339(objectMap, "cycleEndDateTime", t.CycleEndDateTime) + populateDateTimeRFC3339(objectMap, "cycleStartDateTime", t.CycleStartDateTime) populate(objectMap, "cycleType", t.CycleType) populate(objectMap, "status", t.Status) populate(objectMap, "target", t.Target) @@ -5409,10 +5408,10 @@ func (t *TargetCostProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CostThresholds", &t.CostThresholds) delete(rawMsg, key) case "cycleEndDateTime": - err = unpopulateTimeRFC3339(val, "CycleEndDateTime", &t.CycleEndDateTime) + err = unpopulateDateTimeRFC3339(val, "CycleEndDateTime", &t.CycleEndDateTime) delete(rawMsg, key) case "cycleStartDateTime": - err = unpopulateTimeRFC3339(val, "CycleStartDateTime", &t.CycleStartDateTime) + err = unpopulateDateTimeRFC3339(val, "CycleStartDateTime", &t.CycleStartDateTime) delete(rawMsg, key) case "cycleType": err = unpopulate(val, "CycleType", &t.CycleType) @@ -5609,7 +5608,7 @@ func (u *UserList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UserProperties. func (u UserProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdDate", u.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", u.CreatedDate) populate(objectMap, "identity", u.Identity) populate(objectMap, "provisioningState", u.ProvisioningState) populate(objectMap, "secretStore", u.SecretStore) @@ -5627,7 +5626,7 @@ func (u *UserProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &u.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &u.CreatedDate) delete(rawMsg, key) case "identity": err = unpopulate(val, "Identity", &u.Identity) @@ -5789,7 +5788,7 @@ func (v *VirtualNetworkList) UnmarshalJSON(data []byte) error { func (v VirtualNetworkProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "allowedSubnets", v.AllowedSubnets) - populateTimeRFC3339(objectMap, "createdDate", v.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", v.CreatedDate) populate(objectMap, "description", v.Description) populate(objectMap, "externalProviderResourceId", v.ExternalProviderResourceID) populate(objectMap, "externalSubnets", v.ExternalSubnets) @@ -5812,7 +5811,7 @@ func (v *VirtualNetworkProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AllowedSubnets", &v.AllowedSubnets) delete(rawMsg, key) case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &v.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &v.CreatedDate) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &v.Description) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/notificationchannels_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/notificationchannels_client.go index 81bdb973..144660f5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/notificationchannels_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/notificationchannels_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type NotificationChannelsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewNotificationChannelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NotificationChannelsClient, error) { - cl, err := arm.NewClient(moduleName+".NotificationChannelsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewNotificationChannelsClient(subscriptionID string, credential azcore.Toke // - options - NotificationChannelsClientCreateOrUpdateOptions contains the optional parameters for the NotificationChannelsClient.CreateOrUpdate // method. func (client *NotificationChannelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, notificationChannel NotificationChannel, options *NotificationChannelsClientCreateOrUpdateOptions) (NotificationChannelsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "NotificationChannelsClient.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, labName, name, notificationChannel, options) if err != nil { return NotificationChannelsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationChannelsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return NotificationChannelsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return NotificationChannelsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *NotificationChannelsClient) createOrUpdateCreateRequest(ctx contex reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, notificationChannel) + if err := runtime.MarshalAsJSON(req, notificationChannel); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,16 +128,22 @@ func (client *NotificationChannelsClient) createOrUpdateHandleResponse(resp *htt // - options - NotificationChannelsClientDeleteOptions contains the optional parameters for the NotificationChannelsClient.Delete // method. func (client *NotificationChannelsClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string, options *NotificationChannelsClientDeleteOptions) (NotificationChannelsClientDeleteResponse, error) { + var err error + const operationName = "NotificationChannelsClient.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, labName, name, options) if err != nil { return NotificationChannelsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationChannelsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return NotificationChannelsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return NotificationChannelsClientDeleteResponse{}, err } return NotificationChannelsClientDeleteResponse{}, nil } @@ -173,18 +188,25 @@ func (client *NotificationChannelsClient) deleteCreateRequest(ctx context.Contex // - options - NotificationChannelsClientGetOptions contains the optional parameters for the NotificationChannelsClient.Get // method. func (client *NotificationChannelsClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, options *NotificationChannelsClientGetOptions) (NotificationChannelsClientGetResponse, error) { + var err error + const operationName = "NotificationChannelsClient.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, labName, name, options) if err != nil { return NotificationChannelsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationChannelsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NotificationChannelsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NotificationChannelsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -242,25 +264,20 @@ func (client *NotificationChannelsClient) NewListPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *NotificationChannelsClientListResponse) (NotificationChannelsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return NotificationChannelsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NotificationChannelsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, labName, options) + }, nil) if err != nil { return NotificationChannelsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NotificationChannelsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -322,16 +339,22 @@ func (client *NotificationChannelsClient) listHandleResponse(resp *http.Response // - options - NotificationChannelsClientNotifyOptions contains the optional parameters for the NotificationChannelsClient.Notify // method. func (client *NotificationChannelsClient) Notify(ctx context.Context, resourceGroupName string, labName string, name string, notifyParameters NotifyParameters, options *NotificationChannelsClientNotifyOptions) (NotificationChannelsClientNotifyResponse, error) { + var err error + const operationName = "NotificationChannelsClient.Notify" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.notifyCreateRequest(ctx, resourceGroupName, labName, name, notifyParameters, options) if err != nil { return NotificationChannelsClientNotifyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationChannelsClientNotifyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NotificationChannelsClientNotifyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NotificationChannelsClientNotifyResponse{}, err } return NotificationChannelsClientNotifyResponse{}, nil } @@ -363,7 +386,10 @@ func (client *NotificationChannelsClient) notifyCreateRequest(ctx context.Contex reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, notifyParameters) + if err := runtime.MarshalAsJSON(req, notifyParameters); err != nil { + return nil, err + } + return req, nil } // Update - Allows modifying tags of notification channels. All other properties will be ignored. @@ -377,18 +403,25 @@ func (client *NotificationChannelsClient) notifyCreateRequest(ctx context.Contex // - options - NotificationChannelsClientUpdateOptions contains the optional parameters for the NotificationChannelsClient.Update // method. func (client *NotificationChannelsClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, notificationChannel NotificationChannelFragment, options *NotificationChannelsClientUpdateOptions) (NotificationChannelsClientUpdateResponse, error) { + var err error + const operationName = "NotificationChannelsClient.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, labName, name, notificationChannel, options) if err != nil { return NotificationChannelsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationChannelsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NotificationChannelsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NotificationChannelsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -418,7 +451,10 @@ func (client *NotificationChannelsClient) updateCreateRequest(ctx context.Contex reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, notificationChannel) + if err := runtime.MarshalAsJSON(req, notificationChannel); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/operations_client.go index f1cb6b3e..9670bd9f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -33,7 +32,7 @@ type OperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - cl, err := arm.NewClient(moduleName+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -52,18 +51,25 @@ func NewOperationsClient(subscriptionID string, credential azcore.TokenCredentia // - name - The name of the operation. // - options - OperationsClientGetOptions contains the optional parameters for the OperationsClient.Get method. func (client *OperationsClient) Get(ctx context.Context, locationName string, name string, options *OperationsClientGetOptions) (OperationsClientGetResponse, error) { + var err error + const operationName = "OperationsClient.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, name, options) if err != nil { return OperationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OperationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return OperationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return OperationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/options.go new file mode 100644 index 00000000..20f708dd --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/options.go @@ -0,0 +1,985 @@ +//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 armdevtestlabs + +// ArmTemplatesClientGetOptions contains the optional parameters for the ArmTemplatesClient.Get method. +type ArmTemplatesClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=displayName)' + Expand *string +} + +// ArmTemplatesClientListOptions contains the optional parameters for the ArmTemplatesClient.NewListPager method. +type ArmTemplatesClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=displayName)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// ArtifactSourcesClientCreateOrUpdateOptions contains the optional parameters for the ArtifactSourcesClient.CreateOrUpdate +// method. +type ArtifactSourcesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ArtifactSourcesClientDeleteOptions contains the optional parameters for the ArtifactSourcesClient.Delete method. +type ArtifactSourcesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ArtifactSourcesClientGetOptions contains the optional parameters for the ArtifactSourcesClient.Get method. +type ArtifactSourcesClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=displayName)' + Expand *string +} + +// ArtifactSourcesClientListOptions contains the optional parameters for the ArtifactSourcesClient.NewListPager method. +type ArtifactSourcesClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=displayName)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// ArtifactSourcesClientUpdateOptions contains the optional parameters for the ArtifactSourcesClient.Update method. +type ArtifactSourcesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ArtifactsClientGenerateArmTemplateOptions contains the optional parameters for the ArtifactsClient.GenerateArmTemplate +// method. +type ArtifactsClientGenerateArmTemplateOptions struct { + // placeholder for future optional parameters +} + +// ArtifactsClientGetOptions contains the optional parameters for the ArtifactsClient.Get method. +type ArtifactsClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=title)' + Expand *string +} + +// ArtifactsClientListOptions contains the optional parameters for the ArtifactsClient.NewListPager method. +type ArtifactsClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=title)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// CostsClientCreateOrUpdateOptions contains the optional parameters for the CostsClient.CreateOrUpdate method. +type CostsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// CostsClientGetOptions contains the optional parameters for the CostsClient.Get method. +type CostsClientGetOptions struct { + // Specify the $expand query. Example: 'properties($expand=labCostDetails)' + Expand *string +} + +// CustomImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomImagesClient.BeginCreateOrUpdate +// method. +type CustomImagesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomImagesClientBeginDeleteOptions contains the optional parameters for the CustomImagesClient.BeginDelete method. +type CustomImagesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomImagesClientGetOptions contains the optional parameters for the CustomImagesClient.Get method. +type CustomImagesClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=vm)' + Expand *string +} + +// CustomImagesClientListOptions contains the optional parameters for the CustomImagesClient.NewListPager method. +type CustomImagesClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=vm)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// CustomImagesClientUpdateOptions contains the optional parameters for the CustomImagesClient.Update method. +type CustomImagesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// DisksClientBeginAttachOptions contains the optional parameters for the DisksClient.BeginAttach method. +type DisksClientBeginAttachOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DisksClientBeginCreateOrUpdateOptions contains the optional parameters for the DisksClient.BeginCreateOrUpdate method. +type DisksClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DisksClientBeginDeleteOptions contains the optional parameters for the DisksClient.BeginDelete method. +type DisksClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DisksClientBeginDetachOptions contains the optional parameters for the DisksClient.BeginDetach method. +type DisksClientBeginDetachOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DisksClientGetOptions contains the optional parameters for the DisksClient.Get method. +type DisksClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=diskType)' + Expand *string +} + +// DisksClientListOptions contains the optional parameters for the DisksClient.NewListPager method. +type DisksClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=diskType)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// DisksClientUpdateOptions contains the optional parameters for the DisksClient.Update method. +type DisksClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdate +// method. +type EnvironmentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginDeleteOptions contains the optional parameters for the EnvironmentsClient.BeginDelete method. +type EnvironmentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. +type EnvironmentsClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=deploymentProperties)' + Expand *string +} + +// EnvironmentsClientListOptions contains the optional parameters for the EnvironmentsClient.NewListPager method. +type EnvironmentsClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=deploymentProperties)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// EnvironmentsClientUpdateOptions contains the optional parameters for the EnvironmentsClient.Update method. +type EnvironmentsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// FormulasClientBeginCreateOrUpdateOptions contains the optional parameters for the FormulasClient.BeginCreateOrUpdate method. +type FormulasClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FormulasClientDeleteOptions contains the optional parameters for the FormulasClient.Delete method. +type FormulasClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// FormulasClientGetOptions contains the optional parameters for the FormulasClient.Get method. +type FormulasClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=description)' + Expand *string +} + +// FormulasClientListOptions contains the optional parameters for the FormulasClient.NewListPager method. +type FormulasClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=description)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// FormulasClientUpdateOptions contains the optional parameters for the FormulasClient.Update method. +type FormulasClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// GalleryImagesClientListOptions contains the optional parameters for the GalleryImagesClient.NewListPager method. +type GalleryImagesClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=author)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// GlobalSchedulesClientBeginExecuteOptions contains the optional parameters for the GlobalSchedulesClient.BeginExecute method. +type GlobalSchedulesClientBeginExecuteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GlobalSchedulesClientBeginRetargetOptions contains the optional parameters for the GlobalSchedulesClient.BeginRetarget +// method. +type GlobalSchedulesClientBeginRetargetOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GlobalSchedulesClientCreateOrUpdateOptions contains the optional parameters for the GlobalSchedulesClient.CreateOrUpdate +// method. +type GlobalSchedulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// GlobalSchedulesClientDeleteOptions contains the optional parameters for the GlobalSchedulesClient.Delete method. +type GlobalSchedulesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// GlobalSchedulesClientGetOptions contains the optional parameters for the GlobalSchedulesClient.Get method. +type GlobalSchedulesClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=status)' + Expand *string +} + +// GlobalSchedulesClientListByResourceGroupOptions contains the optional parameters for the GlobalSchedulesClient.NewListByResourceGroupPager +// method. +type GlobalSchedulesClientListByResourceGroupOptions struct { + // Specify the $expand query. Example: 'properties($select=status)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// GlobalSchedulesClientListBySubscriptionOptions contains the optional parameters for the GlobalSchedulesClient.NewListBySubscriptionPager +// method. +type GlobalSchedulesClientListBySubscriptionOptions struct { + // Specify the $expand query. Example: 'properties($select=status)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// GlobalSchedulesClientUpdateOptions contains the optional parameters for the GlobalSchedulesClient.Update method. +type GlobalSchedulesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// LabsClientBeginClaimAnyVMOptions contains the optional parameters for the LabsClient.BeginClaimAnyVM method. +type LabsClientBeginClaimAnyVMOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LabsClientBeginCreateEnvironmentOptions contains the optional parameters for the LabsClient.BeginCreateEnvironment method. +type LabsClientBeginCreateEnvironmentOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LabsClientBeginCreateOrUpdateOptions contains the optional parameters for the LabsClient.BeginCreateOrUpdate method. +type LabsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LabsClientBeginDeleteOptions contains the optional parameters for the LabsClient.BeginDelete method. +type LabsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LabsClientBeginExportResourceUsageOptions contains the optional parameters for the LabsClient.BeginExportResourceUsage +// method. +type LabsClientBeginExportResourceUsageOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LabsClientBeginImportVirtualMachineOptions contains the optional parameters for the LabsClient.BeginImportVirtualMachine +// method. +type LabsClientBeginImportVirtualMachineOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LabsClientGenerateUploadURIOptions contains the optional parameters for the LabsClient.GenerateUploadURI method. +type LabsClientGenerateUploadURIOptions struct { + // placeholder for future optional parameters +} + +// LabsClientGetOptions contains the optional parameters for the LabsClient.Get method. +type LabsClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' + Expand *string +} + +// LabsClientListByResourceGroupOptions contains the optional parameters for the LabsClient.NewListByResourceGroupPager method. +type LabsClientListByResourceGroupOptions struct { + // Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// LabsClientListBySubscriptionOptions contains the optional parameters for the LabsClient.NewListBySubscriptionPager method. +type LabsClientListBySubscriptionOptions struct { + // Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// LabsClientListVhdsOptions contains the optional parameters for the LabsClient.NewListVhdsPager method. +type LabsClientListVhdsOptions struct { + // placeholder for future optional parameters +} + +// LabsClientUpdateOptions contains the optional parameters for the LabsClient.Update method. +type LabsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// NotificationChannelsClientCreateOrUpdateOptions contains the optional parameters for the NotificationChannelsClient.CreateOrUpdate +// method. +type NotificationChannelsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// NotificationChannelsClientDeleteOptions contains the optional parameters for the NotificationChannelsClient.Delete method. +type NotificationChannelsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// NotificationChannelsClientGetOptions contains the optional parameters for the NotificationChannelsClient.Get method. +type NotificationChannelsClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=webHookUrl)' + Expand *string +} + +// NotificationChannelsClientListOptions contains the optional parameters for the NotificationChannelsClient.NewListPager +// method. +type NotificationChannelsClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=webHookUrl)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// NotificationChannelsClientNotifyOptions contains the optional parameters for the NotificationChannelsClient.Notify method. +type NotificationChannelsClientNotifyOptions struct { + // placeholder for future optional parameters +} + +// NotificationChannelsClientUpdateOptions contains the optional parameters for the NotificationChannelsClient.Update method. +type NotificationChannelsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientGetOptions contains the optional parameters for the OperationsClient.Get method. +type OperationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PoliciesClientCreateOrUpdateOptions contains the optional parameters for the PoliciesClient.CreateOrUpdate method. +type PoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// PoliciesClientDeleteOptions contains the optional parameters for the PoliciesClient.Delete method. +type PoliciesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method. +type PoliciesClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=description)' + Expand *string +} + +// PoliciesClientListOptions contains the optional parameters for the PoliciesClient.NewListPager method. +type PoliciesClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=description)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// PoliciesClientUpdateOptions contains the optional parameters for the PoliciesClient.Update method. +type PoliciesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// PolicySetsClientEvaluatePoliciesOptions contains the optional parameters for the PolicySetsClient.EvaluatePolicies method. +type PolicySetsClientEvaluatePoliciesOptions struct { + // placeholder for future optional parameters +} + +// ProviderOperationsClientListOptions contains the optional parameters for the ProviderOperationsClient.NewListPager method. +type ProviderOperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// SchedulesClientBeginExecuteOptions contains the optional parameters for the SchedulesClient.BeginExecute method. +type SchedulesClientBeginExecuteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SchedulesClientCreateOrUpdateOptions contains the optional parameters for the SchedulesClient.CreateOrUpdate method. +type SchedulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SchedulesClientDeleteOptions contains the optional parameters for the SchedulesClient.Delete method. +type SchedulesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SchedulesClientGetOptions contains the optional parameters for the SchedulesClient.Get method. +type SchedulesClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=status)' + Expand *string +} + +// SchedulesClientListApplicableOptions contains the optional parameters for the SchedulesClient.NewListApplicablePager method. +type SchedulesClientListApplicableOptions struct { + // placeholder for future optional parameters +} + +// SchedulesClientListOptions contains the optional parameters for the SchedulesClient.NewListPager method. +type SchedulesClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=status)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// SchedulesClientUpdateOptions contains the optional parameters for the SchedulesClient.Update method. +type SchedulesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// SecretsClientBeginCreateOrUpdateOptions contains the optional parameters for the SecretsClient.BeginCreateOrUpdate method. +type SecretsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecretsClientDeleteOptions contains the optional parameters for the SecretsClient.Delete method. +type SecretsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. +type SecretsClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=value)' + Expand *string +} + +// SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method. +type SecretsClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=value)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method. +type SecretsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ServiceFabricSchedulesClientBeginExecuteOptions contains the optional parameters for the ServiceFabricSchedulesClient.BeginExecute +// method. +type ServiceFabricSchedulesClientBeginExecuteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceFabricSchedulesClientCreateOrUpdateOptions contains the optional parameters for the ServiceFabricSchedulesClient.CreateOrUpdate +// method. +type ServiceFabricSchedulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ServiceFabricSchedulesClientDeleteOptions contains the optional parameters for the ServiceFabricSchedulesClient.Delete +// method. +type ServiceFabricSchedulesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ServiceFabricSchedulesClientGetOptions contains the optional parameters for the ServiceFabricSchedulesClient.Get method. +type ServiceFabricSchedulesClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=status)' + Expand *string +} + +// ServiceFabricSchedulesClientListOptions contains the optional parameters for the ServiceFabricSchedulesClient.NewListPager +// method. +type ServiceFabricSchedulesClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=status)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// ServiceFabricSchedulesClientUpdateOptions contains the optional parameters for the ServiceFabricSchedulesClient.Update +// method. +type ServiceFabricSchedulesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ServiceFabricsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceFabricsClient.BeginCreateOrUpdate +// method. +type ServiceFabricsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceFabricsClientBeginDeleteOptions contains the optional parameters for the ServiceFabricsClient.BeginDelete method. +type ServiceFabricsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceFabricsClientBeginStartOptions contains the optional parameters for the ServiceFabricsClient.BeginStart method. +type ServiceFabricsClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceFabricsClientBeginStopOptions contains the optional parameters for the ServiceFabricsClient.BeginStop method. +type ServiceFabricsClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceFabricsClientGetOptions contains the optional parameters for the ServiceFabricsClient.Get method. +type ServiceFabricsClientGetOptions struct { + // Specify the $expand query. Example: 'properties($expand=applicableSchedule)' + Expand *string +} + +// ServiceFabricsClientListApplicableSchedulesOptions contains the optional parameters for the ServiceFabricsClient.ListApplicableSchedules +// method. +type ServiceFabricsClientListApplicableSchedulesOptions struct { + // placeholder for future optional parameters +} + +// ServiceFabricsClientListOptions contains the optional parameters for the ServiceFabricsClient.NewListPager method. +type ServiceFabricsClientListOptions struct { + // Specify the $expand query. Example: 'properties($expand=applicableSchedule)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// ServiceFabricsClientUpdateOptions contains the optional parameters for the ServiceFabricsClient.Update method. +type ServiceFabricsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ServiceRunnersClientCreateOrUpdateOptions contains the optional parameters for the ServiceRunnersClient.CreateOrUpdate +// method. +type ServiceRunnersClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ServiceRunnersClientDeleteOptions contains the optional parameters for the ServiceRunnersClient.Delete method. +type ServiceRunnersClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ServiceRunnersClientGetOptions contains the optional parameters for the ServiceRunnersClient.Get method. +type ServiceRunnersClientGetOptions struct { + // placeholder for future optional parameters +} + +// UsersClientBeginCreateOrUpdateOptions contains the optional parameters for the UsersClient.BeginCreateOrUpdate method. +type UsersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// UsersClientBeginDeleteOptions contains the optional parameters for the UsersClient.BeginDelete method. +type UsersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// UsersClientGetOptions contains the optional parameters for the UsersClient.Get method. +type UsersClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=identity)' + Expand *string +} + +// UsersClientListOptions contains the optional parameters for the UsersClient.NewListPager method. +type UsersClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=identity)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// UsersClientUpdateOptions contains the optional parameters for the UsersClient.Update method. +type UsersClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// VirtualMachineSchedulesClientBeginExecuteOptions contains the optional parameters for the VirtualMachineSchedulesClient.BeginExecute +// method. +type VirtualMachineSchedulesClientBeginExecuteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachineSchedulesClientCreateOrUpdateOptions contains the optional parameters for the VirtualMachineSchedulesClient.CreateOrUpdate +// method. +type VirtualMachineSchedulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// VirtualMachineSchedulesClientDeleteOptions contains the optional parameters for the VirtualMachineSchedulesClient.Delete +// method. +type VirtualMachineSchedulesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// VirtualMachineSchedulesClientGetOptions contains the optional parameters for the VirtualMachineSchedulesClient.Get method. +type VirtualMachineSchedulesClientGetOptions struct { + // Specify the $expand query. Example: 'properties($select=status)' + Expand *string +} + +// VirtualMachineSchedulesClientListOptions contains the optional parameters for the VirtualMachineSchedulesClient.NewListPager +// method. +type VirtualMachineSchedulesClientListOptions struct { + // Specify the $expand query. Example: 'properties($select=status)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// VirtualMachineSchedulesClientUpdateOptions contains the optional parameters for the VirtualMachineSchedulesClient.Update +// method. +type VirtualMachineSchedulesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// VirtualMachinesClientBeginAddDataDiskOptions contains the optional parameters for the VirtualMachinesClient.BeginAddDataDisk +// method. +type VirtualMachinesClientBeginAddDataDiskOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientBeginApplyArtifactsOptions contains the optional parameters for the VirtualMachinesClient.BeginApplyArtifacts +// method. +type VirtualMachinesClientBeginApplyArtifactsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientBeginClaimOptions contains the optional parameters for the VirtualMachinesClient.BeginClaim method. +type VirtualMachinesClientBeginClaimOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateOrUpdate +// method. +type VirtualMachinesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete method. +type VirtualMachinesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientBeginDetachDataDiskOptions contains the optional parameters for the VirtualMachinesClient.BeginDetachDataDisk +// method. +type VirtualMachinesClientBeginDetachDataDiskOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientBeginRedeployOptions contains the optional parameters for the VirtualMachinesClient.BeginRedeploy +// method. +type VirtualMachinesClientBeginRedeployOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientBeginResizeOptions contains the optional parameters for the VirtualMachinesClient.BeginResize method. +type VirtualMachinesClientBeginResizeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart method. +type VirtualMachinesClientBeginRestartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method. +type VirtualMachinesClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientBeginStopOptions contains the optional parameters for the VirtualMachinesClient.BeginStop method. +type VirtualMachinesClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientBeginTransferDisksOptions contains the optional parameters for the VirtualMachinesClient.BeginTransferDisks +// method. +type VirtualMachinesClientBeginTransferDisksOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientBeginUnClaimOptions contains the optional parameters for the VirtualMachinesClient.BeginUnClaim method. +type VirtualMachinesClientBeginUnClaimOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method. +type VirtualMachinesClientGetOptions struct { + // Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' + Expand *string +} + +// VirtualMachinesClientGetRdpFileContentsOptions contains the optional parameters for the VirtualMachinesClient.GetRdpFileContents +// method. +type VirtualMachinesClientGetRdpFileContentsOptions struct { + // placeholder for future optional parameters +} + +// VirtualMachinesClientListApplicableSchedulesOptions contains the optional parameters for the VirtualMachinesClient.ListApplicableSchedules +// method. +type VirtualMachinesClientListApplicableSchedulesOptions struct { + // placeholder for future optional parameters +} + +// VirtualMachinesClientListOptions contains the optional parameters for the VirtualMachinesClient.NewListPager method. +type VirtualMachinesClientListOptions struct { + // Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// VirtualMachinesClientUpdateOptions contains the optional parameters for the VirtualMachinesClient.Update method. +type VirtualMachinesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate +// method. +type VirtualNetworksClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method. +type VirtualNetworksClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method. +type VirtualNetworksClientGetOptions struct { + // Specify the $expand query. Example: 'properties($expand=externalSubnets)' + Expand *string +} + +// VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.NewListPager method. +type VirtualNetworksClientListOptions struct { + // Specify the $expand query. Example: 'properties($expand=externalSubnets)' + Expand *string + + // The filter to apply to the operation. Example: '$filter=contains(name,'myName') + Filter *string + + // The ordering expression for the results, using OData notation. Example: '$orderby=name desc' + Orderby *string + + // The maximum number of resources to return from the operation. Example: '$top=10' + Top *int32 +} + +// VirtualNetworksClientUpdateOptions contains the optional parameters for the VirtualNetworksClient.Update method. +type VirtualNetworksClientUpdateOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/policies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/policies_client.go index 7474f84e..cd94bd70 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/policies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/policies_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type PoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".PoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewPoliciesClient(subscriptionID string, credential azcore.TokenCredential, // - policy - A Policy. // - options - PoliciesClientCreateOrUpdateOptions contains the optional parameters for the PoliciesClient.CreateOrUpdate method. func (client *PoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string, policy Policy, options *PoliciesClientCreateOrUpdateOptions) (PoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "PoliciesClient.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, labName, policySetName, name, policy, options) if err != nil { return PoliciesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PoliciesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return PoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return PoliciesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -101,7 +107,10 @@ func (client *PoliciesClient) createOrUpdateCreateRequest(ctx context.Context, r reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, policy) + if err := runtime.MarshalAsJSON(req, policy); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -123,16 +132,22 @@ func (client *PoliciesClient) createOrUpdateHandleResponse(resp *http.Response) // - name - The name of the policy. // - options - PoliciesClientDeleteOptions contains the optional parameters for the PoliciesClient.Delete method. func (client *PoliciesClient) Delete(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string, options *PoliciesClientDeleteOptions) (PoliciesClientDeleteResponse, error) { + var err error + const operationName = "PoliciesClient.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, labName, policySetName, name, options) if err != nil { return PoliciesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PoliciesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return PoliciesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PoliciesClientDeleteResponse{}, err } return PoliciesClientDeleteResponse{}, nil } @@ -181,18 +196,25 @@ func (client *PoliciesClient) deleteCreateRequest(ctx context.Context, resourceG // - name - The name of the policy. // - options - PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method. func (client *PoliciesClient) Get(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string, options *PoliciesClientGetOptions) (PoliciesClientGetResponse, error) { + var err error + const operationName = "PoliciesClient.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, labName, policySetName, name, options) if err != nil { return PoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -254,25 +276,20 @@ func (client *PoliciesClient) NewListPager(resourceGroupName string, labName str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PoliciesClientListResponse) (PoliciesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, policySetName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PoliciesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PoliciesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, labName, policySetName, options) + }, nil) if err != nil { return PoliciesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PoliciesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -338,18 +355,25 @@ func (client *PoliciesClient) listHandleResponse(resp *http.Response) (PoliciesC // - policy - A Policy. // - options - PoliciesClientUpdateOptions contains the optional parameters for the PoliciesClient.Update method. func (client *PoliciesClient) Update(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string, policy PolicyFragment, options *PoliciesClientUpdateOptions) (PoliciesClientUpdateResponse, error) { + var err error + const operationName = "PoliciesClient.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, labName, policySetName, name, policy, options) if err != nil { return PoliciesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PoliciesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PoliciesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PoliciesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -383,7 +407,10 @@ func (client *PoliciesClient) updateCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, policy) + if err := runtime.MarshalAsJSON(req, policy); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/policysets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/policysets_client.go index 5c4686c4..b5092bac 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/policysets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/policysets_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -33,7 +32,7 @@ type PolicySetsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPolicySetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PolicySetsClient, error) { - cl, err := arm.NewClient(moduleName+".PolicySetsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewPolicySetsClient(subscriptionID string, credential azcore.TokenCredentia // - options - PolicySetsClientEvaluatePoliciesOptions contains the optional parameters for the PolicySetsClient.EvaluatePolicies // method. func (client *PolicySetsClient) EvaluatePolicies(ctx context.Context, resourceGroupName string, labName string, name string, evaluatePoliciesRequest EvaluatePoliciesRequest, options *PolicySetsClientEvaluatePoliciesOptions) (PolicySetsClientEvaluatePoliciesResponse, error) { + var err error + const operationName = "PolicySetsClient.EvaluatePolicies" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.evaluatePoliciesCreateRequest(ctx, resourceGroupName, labName, name, evaluatePoliciesRequest, options) if err != nil { return PolicySetsClientEvaluatePoliciesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PolicySetsClientEvaluatePoliciesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PolicySetsClientEvaluatePoliciesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PolicySetsClientEvaluatePoliciesResponse{}, err } - return client.evaluatePoliciesHandleResponse(resp) + resp, err := client.evaluatePoliciesHandleResponse(httpResp) + return resp, err } // evaluatePoliciesCreateRequest creates the EvaluatePolicies request. @@ -96,7 +102,10 @@ func (client *PolicySetsClient) evaluatePoliciesCreateRequest(ctx context.Contex reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, evaluatePoliciesRequest) + if err := runtime.MarshalAsJSON(req, evaluatePoliciesRequest); err != nil { + return nil, err + } + return req, nil } // evaluatePoliciesHandleResponse handles the EvaluatePolicies response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/provideroperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/provideroperations_client.go index 082545dc..fcc6049b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/provideroperations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/provideroperations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -28,7 +27,7 @@ type ProviderOperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProviderOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ProviderOperationsClient, error) { - cl, err := arm.NewClient(moduleName+".ProviderOperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,25 +48,20 @@ func (client *ProviderOperationsClient) NewListPager(options *ProviderOperations return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProviderOperationsClientListResponse) (ProviderOperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderOperationsClient.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 ProviderOperationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProviderOperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderOperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/response_types.go index 03ea54b2..dc3849a9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/response_types.go @@ -3,24 +3,26 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs // ArmTemplatesClientGetResponse contains the response from method ArmTemplatesClient.Get. type ArmTemplatesClientGetResponse struct { + // An Azure Resource Manager template. ArmTemplate } // ArmTemplatesClientListResponse contains the response from method ArmTemplatesClient.NewListPager. type ArmTemplatesClientListResponse struct { + // The response of a list operation. ArmTemplateList } // ArtifactSourcesClientCreateOrUpdateResponse contains the response from method ArtifactSourcesClient.CreateOrUpdate. type ArtifactSourcesClientCreateOrUpdateResponse struct { + // Properties of an artifact source. ArtifactSource } @@ -31,46 +33,55 @@ type ArtifactSourcesClientDeleteResponse struct { // ArtifactSourcesClientGetResponse contains the response from method ArtifactSourcesClient.Get. type ArtifactSourcesClientGetResponse struct { + // Properties of an artifact source. ArtifactSource } // ArtifactSourcesClientListResponse contains the response from method ArtifactSourcesClient.NewListPager. type ArtifactSourcesClientListResponse struct { + // The response of a list operation. ArtifactSourceList } // ArtifactSourcesClientUpdateResponse contains the response from method ArtifactSourcesClient.Update. type ArtifactSourcesClientUpdateResponse struct { + // Properties of an artifact source. ArtifactSource } // ArtifactsClientGenerateArmTemplateResponse contains the response from method ArtifactsClient.GenerateArmTemplate. type ArtifactsClientGenerateArmTemplateResponse struct { + // Information about a generated ARM template. ArmTemplateInfo } // ArtifactsClientGetResponse contains the response from method ArtifactsClient.Get. type ArtifactsClientGetResponse struct { + // An artifact. Artifact } // ArtifactsClientListResponse contains the response from method ArtifactsClient.NewListPager. type ArtifactsClientListResponse struct { + // The response of a list operation. ArtifactList } // CostsClientCreateOrUpdateResponse contains the response from method CostsClient.CreateOrUpdate. type CostsClientCreateOrUpdateResponse struct { + // A cost item. LabCost } // CostsClientGetResponse contains the response from method CostsClient.Get. type CostsClientGetResponse struct { + // A cost item. LabCost } // CustomImagesClientCreateOrUpdateResponse contains the response from method CustomImagesClient.BeginCreateOrUpdate. type CustomImagesClientCreateOrUpdateResponse struct { + // A custom image. CustomImage } @@ -81,16 +92,19 @@ type CustomImagesClientDeleteResponse struct { // CustomImagesClientGetResponse contains the response from method CustomImagesClient.Get. type CustomImagesClientGetResponse struct { + // A custom image. CustomImage } // CustomImagesClientListResponse contains the response from method CustomImagesClient.NewListPager. type CustomImagesClientListResponse struct { + // The response of a list operation. CustomImageList } // CustomImagesClientUpdateResponse contains the response from method CustomImagesClient.Update. type CustomImagesClientUpdateResponse struct { + // A custom image. CustomImage } @@ -101,6 +115,7 @@ type DisksClientAttachResponse struct { // DisksClientCreateOrUpdateResponse contains the response from method DisksClient.BeginCreateOrUpdate. type DisksClientCreateOrUpdateResponse struct { + // A Disk. Disk } @@ -116,21 +131,25 @@ type DisksClientDetachResponse struct { // DisksClientGetResponse contains the response from method DisksClient.Get. type DisksClientGetResponse struct { + // A Disk. Disk } // DisksClientListResponse contains the response from method DisksClient.NewListPager. type DisksClientListResponse struct { + // The response of a list operation. DiskList } // DisksClientUpdateResponse contains the response from method DisksClient.Update. type DisksClientUpdateResponse struct { + // A Disk. Disk } // EnvironmentsClientCreateOrUpdateResponse contains the response from method EnvironmentsClient.BeginCreateOrUpdate. type EnvironmentsClientCreateOrUpdateResponse struct { + // An environment, which is essentially an ARM template deployment. DtlEnvironment } @@ -141,21 +160,25 @@ type EnvironmentsClientDeleteResponse struct { // EnvironmentsClientGetResponse contains the response from method EnvironmentsClient.Get. type EnvironmentsClientGetResponse struct { + // An environment, which is essentially an ARM template deployment. DtlEnvironment } // EnvironmentsClientListResponse contains the response from method EnvironmentsClient.NewListPager. type EnvironmentsClientListResponse struct { + // The response of a list operation. DtlEnvironmentList } // EnvironmentsClientUpdateResponse contains the response from method EnvironmentsClient.Update. type EnvironmentsClientUpdateResponse struct { + // An environment, which is essentially an ARM template deployment. DtlEnvironment } // FormulasClientCreateOrUpdateResponse contains the response from method FormulasClient.BeginCreateOrUpdate. type FormulasClientCreateOrUpdateResponse struct { + // A formula for creating a VM, specifying an image base and other parameters Formula } @@ -166,26 +189,31 @@ type FormulasClientDeleteResponse struct { // FormulasClientGetResponse contains the response from method FormulasClient.Get. type FormulasClientGetResponse struct { + // A formula for creating a VM, specifying an image base and other parameters Formula } // FormulasClientListResponse contains the response from method FormulasClient.NewListPager. type FormulasClientListResponse struct { + // The response of a list operation. FormulaList } // FormulasClientUpdateResponse contains the response from method FormulasClient.Update. type FormulasClientUpdateResponse struct { + // A formula for creating a VM, specifying an image base and other parameters Formula } // GalleryImagesClientListResponse contains the response from method GalleryImagesClient.NewListPager. type GalleryImagesClientListResponse struct { + // The response of a list operation. GalleryImageList } // GlobalSchedulesClientCreateOrUpdateResponse contains the response from method GlobalSchedulesClient.CreateOrUpdate. type GlobalSchedulesClientCreateOrUpdateResponse struct { + // A schedule. Schedule } @@ -201,16 +229,19 @@ type GlobalSchedulesClientExecuteResponse struct { // GlobalSchedulesClientGetResponse contains the response from method GlobalSchedulesClient.Get. type GlobalSchedulesClientGetResponse struct { + // A schedule. Schedule } // GlobalSchedulesClientListByResourceGroupResponse contains the response from method GlobalSchedulesClient.NewListByResourceGroupPager. type GlobalSchedulesClientListByResourceGroupResponse struct { + // The response of a list operation. ScheduleList } // GlobalSchedulesClientListBySubscriptionResponse contains the response from method GlobalSchedulesClient.NewListBySubscriptionPager. type GlobalSchedulesClientListBySubscriptionResponse struct { + // The response of a list operation. ScheduleList } @@ -221,6 +252,7 @@ type GlobalSchedulesClientRetargetResponse struct { // GlobalSchedulesClientUpdateResponse contains the response from method GlobalSchedulesClient.Update. type GlobalSchedulesClientUpdateResponse struct { + // A schedule. Schedule } @@ -236,6 +268,7 @@ type LabsClientCreateEnvironmentResponse struct { // LabsClientCreateOrUpdateResponse contains the response from method LabsClient.BeginCreateOrUpdate. type LabsClientCreateOrUpdateResponse struct { + // A lab. Lab } @@ -251,11 +284,13 @@ type LabsClientExportResourceUsageResponse struct { // LabsClientGenerateUploadURIResponse contains the response from method LabsClient.GenerateUploadURI. type LabsClientGenerateUploadURIResponse struct { + // Response body for generating an upload URI. GenerateUploadURIResponse } // LabsClientGetResponse contains the response from method LabsClient.Get. type LabsClientGetResponse struct { + // A lab. Lab } @@ -266,26 +301,31 @@ type LabsClientImportVirtualMachineResponse struct { // LabsClientListByResourceGroupResponse contains the response from method LabsClient.NewListByResourceGroupPager. type LabsClientListByResourceGroupResponse struct { + // The response of a list operation. LabList } // LabsClientListBySubscriptionResponse contains the response from method LabsClient.NewListBySubscriptionPager. type LabsClientListBySubscriptionResponse struct { + // The response of a list operation. LabList } // LabsClientListVhdsResponse contains the response from method LabsClient.NewListVhdsPager. type LabsClientListVhdsResponse struct { + // The response of a list operation. LabVhdList } // LabsClientUpdateResponse contains the response from method LabsClient.Update. type LabsClientUpdateResponse struct { + // A lab. Lab } // NotificationChannelsClientCreateOrUpdateResponse contains the response from method NotificationChannelsClient.CreateOrUpdate. type NotificationChannelsClientCreateOrUpdateResponse struct { + // A notification. NotificationChannel } @@ -296,11 +336,13 @@ type NotificationChannelsClientDeleteResponse struct { // NotificationChannelsClientGetResponse contains the response from method NotificationChannelsClient.Get. type NotificationChannelsClientGetResponse struct { + // A notification. NotificationChannel } // NotificationChannelsClientListResponse contains the response from method NotificationChannelsClient.NewListPager. type NotificationChannelsClientListResponse struct { + // The response of a list operation. NotificationChannelList } @@ -311,16 +353,19 @@ type NotificationChannelsClientNotifyResponse struct { // NotificationChannelsClientUpdateResponse contains the response from method NotificationChannelsClient.Update. type NotificationChannelsClientUpdateResponse struct { + // A notification. NotificationChannel } // OperationsClientGetResponse contains the response from method OperationsClient.Get. type OperationsClientGetResponse struct { + // An Operation Result OperationResult } // PoliciesClientCreateOrUpdateResponse contains the response from method PoliciesClient.CreateOrUpdate. type PoliciesClientCreateOrUpdateResponse struct { + // A Policy. Policy } @@ -331,31 +376,37 @@ type PoliciesClientDeleteResponse struct { // PoliciesClientGetResponse contains the response from method PoliciesClient.Get. type PoliciesClientGetResponse struct { + // A Policy. Policy } // PoliciesClientListResponse contains the response from method PoliciesClient.NewListPager. type PoliciesClientListResponse struct { + // The response of a list operation. PolicyList } // PoliciesClientUpdateResponse contains the response from method PoliciesClient.Update. type PoliciesClientUpdateResponse struct { + // A Policy. Policy } // PolicySetsClientEvaluatePoliciesResponse contains the response from method PolicySetsClient.EvaluatePolicies. type PolicySetsClientEvaluatePoliciesResponse struct { + // Response body for evaluating a policy set. EvaluatePoliciesResponse } // ProviderOperationsClientListResponse contains the response from method ProviderOperationsClient.NewListPager. type ProviderOperationsClientListResponse struct { + // Result of the request to list REST API operations ProviderOperationResult } // SchedulesClientCreateOrUpdateResponse contains the response from method SchedulesClient.CreateOrUpdate. type SchedulesClientCreateOrUpdateResponse struct { + // A schedule. Schedule } @@ -371,26 +422,31 @@ type SchedulesClientExecuteResponse struct { // SchedulesClientGetResponse contains the response from method SchedulesClient.Get. type SchedulesClientGetResponse struct { + // A schedule. Schedule } // SchedulesClientListApplicableResponse contains the response from method SchedulesClient.NewListApplicablePager. type SchedulesClientListApplicableResponse struct { + // The response of a list operation. ScheduleList } // SchedulesClientListResponse contains the response from method SchedulesClient.NewListPager. type SchedulesClientListResponse struct { + // The response of a list operation. ScheduleList } // SchedulesClientUpdateResponse contains the response from method SchedulesClient.Update. type SchedulesClientUpdateResponse struct { + // A schedule. Schedule } // SecretsClientCreateOrUpdateResponse contains the response from method SecretsClient.BeginCreateOrUpdate. type SecretsClientCreateOrUpdateResponse struct { + // A secret. Secret } @@ -401,21 +457,25 @@ type SecretsClientDeleteResponse struct { // SecretsClientGetResponse contains the response from method SecretsClient.Get. type SecretsClientGetResponse struct { + // A secret. Secret } // SecretsClientListResponse contains the response from method SecretsClient.NewListPager. type SecretsClientListResponse struct { + // The response of a list operation. SecretList } // SecretsClientUpdateResponse contains the response from method SecretsClient.Update. type SecretsClientUpdateResponse struct { + // A secret. Secret } // ServiceFabricSchedulesClientCreateOrUpdateResponse contains the response from method ServiceFabricSchedulesClient.CreateOrUpdate. type ServiceFabricSchedulesClientCreateOrUpdateResponse struct { + // A schedule. Schedule } @@ -431,21 +491,25 @@ type ServiceFabricSchedulesClientExecuteResponse struct { // ServiceFabricSchedulesClientGetResponse contains the response from method ServiceFabricSchedulesClient.Get. type ServiceFabricSchedulesClientGetResponse struct { + // A schedule. Schedule } // ServiceFabricSchedulesClientListResponse contains the response from method ServiceFabricSchedulesClient.NewListPager. type ServiceFabricSchedulesClientListResponse struct { + // The response of a list operation. ScheduleList } // ServiceFabricSchedulesClientUpdateResponse contains the response from method ServiceFabricSchedulesClient.Update. type ServiceFabricSchedulesClientUpdateResponse struct { + // A schedule. Schedule } // ServiceFabricsClientCreateOrUpdateResponse contains the response from method ServiceFabricsClient.BeginCreateOrUpdate. type ServiceFabricsClientCreateOrUpdateResponse struct { + // A Service Fabric. ServiceFabric } @@ -456,16 +520,19 @@ type ServiceFabricsClientDeleteResponse struct { // ServiceFabricsClientGetResponse contains the response from method ServiceFabricsClient.Get. type ServiceFabricsClientGetResponse struct { + // A Service Fabric. ServiceFabric } // ServiceFabricsClientListApplicableSchedulesResponse contains the response from method ServiceFabricsClient.ListApplicableSchedules. type ServiceFabricsClientListApplicableSchedulesResponse struct { + // Schedules applicable to a virtual machine. The schedules may have been defined on a VM or on lab level. ApplicableSchedule } // ServiceFabricsClientListResponse contains the response from method ServiceFabricsClient.NewListPager. type ServiceFabricsClientListResponse struct { + // The response of a list operation. ServiceFabricList } @@ -481,11 +548,13 @@ type ServiceFabricsClientStopResponse struct { // ServiceFabricsClientUpdateResponse contains the response from method ServiceFabricsClient.Update. type ServiceFabricsClientUpdateResponse struct { + // A Service Fabric. ServiceFabric } // ServiceRunnersClientCreateOrUpdateResponse contains the response from method ServiceRunnersClient.CreateOrUpdate. type ServiceRunnersClientCreateOrUpdateResponse struct { + // A container for a managed identity to execute DevTest lab services. ServiceRunner } @@ -496,11 +565,13 @@ type ServiceRunnersClientDeleteResponse struct { // ServiceRunnersClientGetResponse contains the response from method ServiceRunnersClient.Get. type ServiceRunnersClientGetResponse struct { + // A container for a managed identity to execute DevTest lab services. ServiceRunner } // UsersClientCreateOrUpdateResponse contains the response from method UsersClient.BeginCreateOrUpdate. type UsersClientCreateOrUpdateResponse struct { + // Profile of a lab user. User } @@ -511,21 +582,25 @@ type UsersClientDeleteResponse struct { // UsersClientGetResponse contains the response from method UsersClient.Get. type UsersClientGetResponse struct { + // Profile of a lab user. User } // UsersClientListResponse contains the response from method UsersClient.NewListPager. type UsersClientListResponse struct { + // The response of a list operation. UserList } // UsersClientUpdateResponse contains the response from method UsersClient.Update. type UsersClientUpdateResponse struct { + // Profile of a lab user. User } // VirtualMachineSchedulesClientCreateOrUpdateResponse contains the response from method VirtualMachineSchedulesClient.CreateOrUpdate. type VirtualMachineSchedulesClientCreateOrUpdateResponse struct { + // A schedule. Schedule } @@ -541,16 +616,19 @@ type VirtualMachineSchedulesClientExecuteResponse struct { // VirtualMachineSchedulesClientGetResponse contains the response from method VirtualMachineSchedulesClient.Get. type VirtualMachineSchedulesClientGetResponse struct { + // A schedule. Schedule } // VirtualMachineSchedulesClientListResponse contains the response from method VirtualMachineSchedulesClient.NewListPager. type VirtualMachineSchedulesClientListResponse struct { + // The response of a list operation. ScheduleList } // VirtualMachineSchedulesClientUpdateResponse contains the response from method VirtualMachineSchedulesClient.Update. type VirtualMachineSchedulesClientUpdateResponse struct { + // A schedule. Schedule } @@ -571,6 +649,7 @@ type VirtualMachinesClientClaimResponse struct { // VirtualMachinesClientCreateOrUpdateResponse contains the response from method VirtualMachinesClient.BeginCreateOrUpdate. type VirtualMachinesClientCreateOrUpdateResponse struct { + // A virtual machine. LabVirtualMachine } @@ -586,21 +665,25 @@ type VirtualMachinesClientDetachDataDiskResponse struct { // VirtualMachinesClientGetRdpFileContentsResponse contains the response from method VirtualMachinesClient.GetRdpFileContents. type VirtualMachinesClientGetRdpFileContentsResponse struct { + // Represents a .rdp file RdpConnection } // VirtualMachinesClientGetResponse contains the response from method VirtualMachinesClient.Get. type VirtualMachinesClientGetResponse struct { + // A virtual machine. LabVirtualMachine } // VirtualMachinesClientListApplicableSchedulesResponse contains the response from method VirtualMachinesClient.ListApplicableSchedules. type VirtualMachinesClientListApplicableSchedulesResponse struct { + // Schedules applicable to a virtual machine. The schedules may have been defined on a VM or on lab level. ApplicableSchedule } // VirtualMachinesClientListResponse contains the response from method VirtualMachinesClient.NewListPager. type VirtualMachinesClientListResponse struct { + // The response of a list operation. LabVirtualMachineList } @@ -641,11 +724,13 @@ type VirtualMachinesClientUnClaimResponse struct { // VirtualMachinesClientUpdateResponse contains the response from method VirtualMachinesClient.Update. type VirtualMachinesClientUpdateResponse struct { + // A virtual machine. LabVirtualMachine } // VirtualNetworksClientCreateOrUpdateResponse contains the response from method VirtualNetworksClient.BeginCreateOrUpdate. type VirtualNetworksClientCreateOrUpdateResponse struct { + // A virtual network. VirtualNetwork } @@ -656,15 +741,18 @@ type VirtualNetworksClientDeleteResponse struct { // VirtualNetworksClientGetResponse contains the response from method VirtualNetworksClient.Get. type VirtualNetworksClientGetResponse struct { + // A virtual network. VirtualNetwork } // VirtualNetworksClientListResponse contains the response from method VirtualNetworksClient.NewListPager. type VirtualNetworksClientListResponse struct { + // The response of a list operation. VirtualNetworkList } // VirtualNetworksClientUpdateResponse contains the response from method VirtualNetworksClient.Update. type VirtualNetworksClientUpdateResponse struct { + // A virtual network. VirtualNetwork } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/schedules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/schedules_client.go index 02e2b4b6..1d9c8039 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/schedules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/schedules_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type SchedulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SchedulesClient, error) { - cl, err := arm.NewClient(moduleName+".SchedulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewSchedulesClient(subscriptionID string, credential azcore.TokenCredential // - options - SchedulesClientCreateOrUpdateOptions contains the optional parameters for the SchedulesClient.CreateOrUpdate // method. func (client *SchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, schedule Schedule, options *SchedulesClientCreateOrUpdateOptions) (SchedulesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SchedulesClient.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, labName, name, schedule, options) if err != nil { return SchedulesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SchedulesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SchedulesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SchedulesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *SchedulesClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, schedule) + if err := runtime.MarshalAsJSON(req, schedule); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *SchedulesClient) createOrUpdateHandleResponse(resp *http.Response) // - name - The name of the schedule. // - options - SchedulesClientDeleteOptions contains the optional parameters for the SchedulesClient.Delete method. func (client *SchedulesClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string, options *SchedulesClientDeleteOptions) (SchedulesClientDeleteResponse, error) { + var err error + const operationName = "SchedulesClient.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, labName, name, options) if err != nil { return SchedulesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SchedulesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SchedulesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SchedulesClientDeleteResponse{}, err } return SchedulesClientDeleteResponse{}, nil } @@ -176,9 +191,14 @@ func (client *SchedulesClient) BeginExecute(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller[SchedulesClientExecuteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SchedulesClientExecuteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SchedulesClientExecuteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SchedulesClientExecuteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -187,18 +207,24 @@ func (client *SchedulesClient) BeginExecute(ctx context.Context, resourceGroupNa // // Generated from API version 2018-09-15 func (client *SchedulesClient) execute(ctx context.Context, resourceGroupName string, labName string, name string, options *SchedulesClientBeginExecuteOptions) (*http.Response, error) { + var err error + const operationName = "SchedulesClient.BeginExecute" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.executeCreateRequest(ctx, resourceGroupName, labName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // executeCreateRequest creates the Execute request. @@ -240,18 +266,25 @@ func (client *SchedulesClient) executeCreateRequest(ctx context.Context, resourc // - name - The name of the schedule. // - options - SchedulesClientGetOptions contains the optional parameters for the SchedulesClient.Get method. func (client *SchedulesClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, options *SchedulesClientGetOptions) (SchedulesClientGetResponse, error) { + var err error + const operationName = "SchedulesClient.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, labName, name, options) if err != nil { return SchedulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SchedulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SchedulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SchedulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -308,25 +341,20 @@ func (client *SchedulesClient) NewListPager(resourceGroupName string, labName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SchedulesClientListResponse) (SchedulesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SchedulesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SchedulesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, labName, options) + }, nil) if err != nil { return SchedulesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SchedulesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -391,25 +419,20 @@ func (client *SchedulesClient) NewListApplicablePager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SchedulesClientListApplicableResponse) (SchedulesClientListApplicableResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listApplicableCreateRequest(ctx, resourceGroupName, labName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SchedulesClient.NewListApplicablePager") + 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.listApplicableCreateRequest(ctx, resourceGroupName, labName, name, options) + }, nil) if err != nil { return SchedulesClientListApplicableResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SchedulesClientListApplicableResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SchedulesClientListApplicableResponse{}, runtime.NewResponseError(resp) - } return client.listApplicableHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -462,18 +485,25 @@ func (client *SchedulesClient) listApplicableHandleResponse(resp *http.Response) // - schedule - A schedule. // - options - SchedulesClientUpdateOptions contains the optional parameters for the SchedulesClient.Update method. func (client *SchedulesClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, schedule ScheduleFragment, options *SchedulesClientUpdateOptions) (SchedulesClientUpdateResponse, error) { + var err error + const operationName = "SchedulesClient.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, labName, name, schedule, options) if err != nil { return SchedulesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SchedulesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SchedulesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SchedulesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -503,7 +533,10 @@ func (client *SchedulesClient) updateCreateRequest(ctx context.Context, resource reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, schedule) + if err := runtime.MarshalAsJSON(req, schedule); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/secrets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/secrets_client.go index 67586e3c..44baf63a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/secrets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/secrets_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type SecretsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecretsClient, error) { - cl, err := arm.NewClient(moduleName+".SecretsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,9 +61,14 @@ func (client *SecretsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[SecretsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecretsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SecretsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecretsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +77,24 @@ func (client *SecretsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr // // Generated from API version 2018-09-15 func (client *SecretsClient) createOrUpdate(ctx context.Context, resourceGroupName string, labName string, userName string, name string, secret Secret, options *SecretsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SecretsClient.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, labName, userName, name, secret, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -118,7 +128,10 @@ func (client *SecretsClient) createOrUpdateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, secret) + if err := runtime.MarshalAsJSON(req, secret); err != nil { + return nil, err + } + return req, nil } // Delete - Delete secret. @@ -131,16 +144,22 @@ func (client *SecretsClient) createOrUpdateCreateRequest(ctx context.Context, re // - name - The name of the secret. // - options - SecretsClientDeleteOptions contains the optional parameters for the SecretsClient.Delete method. func (client *SecretsClient) Delete(ctx context.Context, resourceGroupName string, labName string, userName string, name string, options *SecretsClientDeleteOptions) (SecretsClientDeleteResponse, error) { + var err error + const operationName = "SecretsClient.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, labName, userName, name, options) if err != nil { return SecretsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SecretsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SecretsClientDeleteResponse{}, err } return SecretsClientDeleteResponse{}, nil } @@ -189,18 +208,25 @@ func (client *SecretsClient) deleteCreateRequest(ctx context.Context, resourceGr // - name - The name of the secret. // - options - SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. func (client *SecretsClient) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, options *SecretsClientGetOptions) (SecretsClientGetResponse, error) { + var err error + const operationName = "SecretsClient.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, labName, userName, name, options) if err != nil { return SecretsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecretsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecretsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -262,25 +288,20 @@ func (client *SecretsClient) NewListPager(resourceGroupName string, labName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SecretsClientListResponse) (SecretsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, userName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SecretsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecretsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, labName, userName, options) + }, nil) if err != nil { return SecretsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecretsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -346,18 +367,25 @@ func (client *SecretsClient) listHandleResponse(resp *http.Response) (SecretsCli // - secret - A secret. // - options - SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method. func (client *SecretsClient) Update(ctx context.Context, resourceGroupName string, labName string, userName string, name string, secret SecretFragment, options *SecretsClientUpdateOptions) (SecretsClientUpdateResponse, error) { + var err error + const operationName = "SecretsClient.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, labName, userName, name, secret, options) if err != nil { return SecretsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecretsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecretsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -391,7 +419,10 @@ func (client *SecretsClient) updateCreateRequest(ctx context.Context, resourceGr reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, secret) + if err := runtime.MarshalAsJSON(req, secret); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/servicefabrics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/servicefabrics_client.go index 5ecae77f..52bc69ff 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/servicefabrics_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/servicefabrics_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type ServiceFabricsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewServiceFabricsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceFabricsClient, error) { - cl, err := arm.NewClient(moduleName+".ServiceFabricsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,9 +61,14 @@ func (client *ServiceFabricsClient) BeginCreateOrUpdate(ctx context.Context, res if err != nil { return nil, err } - return runtime.NewPoller[ServiceFabricsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceFabricsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ServiceFabricsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceFabricsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +77,24 @@ func (client *ServiceFabricsClient) BeginCreateOrUpdate(ctx context.Context, res // // Generated from API version 2018-09-15 func (client *ServiceFabricsClient) createOrUpdate(ctx context.Context, resourceGroupName string, labName string, userName string, name string, serviceFabric ServiceFabric, options *ServiceFabricsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServiceFabricsClient.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, labName, userName, name, serviceFabric, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -118,7 +128,10 @@ func (client *ServiceFabricsClient) createOrUpdateCreateRequest(ctx context.Cont reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, serviceFabric) + if err := runtime.MarshalAsJSON(req, serviceFabric); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete service fabric. This operation can take a while to complete. @@ -137,9 +150,14 @@ func (client *ServiceFabricsClient) BeginDelete(ctx context.Context, resourceGro if err != nil { return nil, err } - return runtime.NewPoller[ServiceFabricsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceFabricsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ServiceFabricsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceFabricsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -148,18 +166,24 @@ func (client *ServiceFabricsClient) BeginDelete(ctx context.Context, resourceGro // // Generated from API version 2018-09-15 func (client *ServiceFabricsClient) deleteOperation(ctx context.Context, resourceGroupName string, labName string, userName string, name string, options *ServiceFabricsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServiceFabricsClient.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, labName, userName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -206,18 +230,25 @@ func (client *ServiceFabricsClient) deleteCreateRequest(ctx context.Context, res // - name - The name of the service fabric. // - options - ServiceFabricsClientGetOptions contains the optional parameters for the ServiceFabricsClient.Get method. func (client *ServiceFabricsClient) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, options *ServiceFabricsClientGetOptions) (ServiceFabricsClientGetResponse, error) { + var err error + const operationName = "ServiceFabricsClient.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, labName, userName, name, options) if err != nil { return ServiceFabricsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ServiceFabricsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceFabricsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceFabricsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -279,25 +310,20 @@ func (client *ServiceFabricsClient) NewListPager(resourceGroupName string, labNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ServiceFabricsClientListResponse) (ServiceFabricsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, userName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ServiceFabricsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceFabricsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, labName, userName, options) + }, nil) if err != nil { return ServiceFabricsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceFabricsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -363,18 +389,25 @@ func (client *ServiceFabricsClient) listHandleResponse(resp *http.Response) (Ser // - options - ServiceFabricsClientListApplicableSchedulesOptions contains the optional parameters for the ServiceFabricsClient.ListApplicableSchedules // method. func (client *ServiceFabricsClient) ListApplicableSchedules(ctx context.Context, resourceGroupName string, labName string, userName string, name string, options *ServiceFabricsClientListApplicableSchedulesOptions) (ServiceFabricsClientListApplicableSchedulesResponse, error) { + var err error + const operationName = "ServiceFabricsClient.ListApplicableSchedules" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listApplicableSchedulesCreateRequest(ctx, resourceGroupName, labName, userName, name, options) if err != nil { return ServiceFabricsClientListApplicableSchedulesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ServiceFabricsClientListApplicableSchedulesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceFabricsClientListApplicableSchedulesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceFabricsClientListApplicableSchedulesResponse{}, err } - return client.listApplicableSchedulesHandleResponse(resp) + resp, err := client.listApplicableSchedulesHandleResponse(httpResp) + return resp, err } // listApplicableSchedulesCreateRequest creates the ListApplicableSchedules request. @@ -436,9 +469,14 @@ func (client *ServiceFabricsClient) BeginStart(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[ServiceFabricsClientStartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceFabricsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ServiceFabricsClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceFabricsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -447,18 +485,24 @@ func (client *ServiceFabricsClient) BeginStart(ctx context.Context, resourceGrou // // Generated from API version 2018-09-15 func (client *ServiceFabricsClient) start(ctx context.Context, resourceGroupName string, labName string, userName string, name string, options *ServiceFabricsClientBeginStartOptions) (*http.Response, error) { + var err error + const operationName = "ServiceFabricsClient.BeginStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startCreateRequest(ctx, resourceGroupName, labName, userName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // startCreateRequest creates the Start request. @@ -511,9 +555,14 @@ func (client *ServiceFabricsClient) BeginStop(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[ServiceFabricsClientStopResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceFabricsClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ServiceFabricsClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceFabricsClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -522,18 +571,24 @@ func (client *ServiceFabricsClient) BeginStop(ctx context.Context, resourceGroup // // Generated from API version 2018-09-15 func (client *ServiceFabricsClient) stop(ctx context.Context, resourceGroupName string, labName string, userName string, name string, options *ServiceFabricsClientBeginStopOptions) (*http.Response, error) { + var err error + const operationName = "ServiceFabricsClient.BeginStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopCreateRequest(ctx, resourceGroupName, labName, userName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // stopCreateRequest creates the Stop request. @@ -581,18 +636,25 @@ func (client *ServiceFabricsClient) stopCreateRequest(ctx context.Context, resou // - serviceFabric - A Service Fabric. // - options - ServiceFabricsClientUpdateOptions contains the optional parameters for the ServiceFabricsClient.Update method. func (client *ServiceFabricsClient) Update(ctx context.Context, resourceGroupName string, labName string, userName string, name string, serviceFabric ServiceFabricFragment, options *ServiceFabricsClientUpdateOptions) (ServiceFabricsClientUpdateResponse, error) { + var err error + const operationName = "ServiceFabricsClient.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, labName, userName, name, serviceFabric, options) if err != nil { return ServiceFabricsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ServiceFabricsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceFabricsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceFabricsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -626,7 +688,10 @@ func (client *ServiceFabricsClient) updateCreateRequest(ctx context.Context, res reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, serviceFabric) + if err := runtime.MarshalAsJSON(req, serviceFabric); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/servicefabricschedules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/servicefabricschedules_client.go index 5f75dde3..39650450 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/servicefabricschedules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/servicefabricschedules_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type ServiceFabricSchedulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewServiceFabricSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceFabricSchedulesClient, error) { - cl, err := arm.NewClient(moduleName+".ServiceFabricSchedulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,18 +57,25 @@ func NewServiceFabricSchedulesClient(subscriptionID string, credential azcore.To // - options - ServiceFabricSchedulesClientCreateOrUpdateOptions contains the optional parameters for the ServiceFabricSchedulesClient.CreateOrUpdate // method. func (client *ServiceFabricSchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, userName string, serviceFabricName string, name string, schedule Schedule, options *ServiceFabricSchedulesClientCreateOrUpdateOptions) (ServiceFabricSchedulesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ServiceFabricSchedulesClient.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, labName, userName, serviceFabricName, name, schedule, options) if err != nil { return ServiceFabricSchedulesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ServiceFabricSchedulesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ServiceFabricSchedulesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ServiceFabricSchedulesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -107,7 +113,10 @@ func (client *ServiceFabricSchedulesClient) createOrUpdateCreateRequest(ctx cont reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, schedule) + if err := runtime.MarshalAsJSON(req, schedule); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -131,16 +140,22 @@ func (client *ServiceFabricSchedulesClient) createOrUpdateHandleResponse(resp *h // - options - ServiceFabricSchedulesClientDeleteOptions contains the optional parameters for the ServiceFabricSchedulesClient.Delete // method. func (client *ServiceFabricSchedulesClient) Delete(ctx context.Context, resourceGroupName string, labName string, userName string, serviceFabricName string, name string, options *ServiceFabricSchedulesClientDeleteOptions) (ServiceFabricSchedulesClientDeleteResponse, error) { + var err error + const operationName = "ServiceFabricSchedulesClient.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, labName, userName, serviceFabricName, name, options) if err != nil { return ServiceFabricSchedulesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ServiceFabricSchedulesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ServiceFabricSchedulesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ServiceFabricSchedulesClientDeleteResponse{}, err } return ServiceFabricSchedulesClientDeleteResponse{}, nil } @@ -200,9 +215,14 @@ func (client *ServiceFabricSchedulesClient) BeginExecute(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[ServiceFabricSchedulesClientExecuteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceFabricSchedulesClientExecuteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ServiceFabricSchedulesClientExecuteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceFabricSchedulesClientExecuteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -211,18 +231,24 @@ func (client *ServiceFabricSchedulesClient) BeginExecute(ctx context.Context, re // // Generated from API version 2018-09-15 func (client *ServiceFabricSchedulesClient) execute(ctx context.Context, resourceGroupName string, labName string, userName string, serviceFabricName string, name string, options *ServiceFabricSchedulesClientBeginExecuteOptions) (*http.Response, error) { + var err error + const operationName = "ServiceFabricSchedulesClient.BeginExecute" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.executeCreateRequest(ctx, resourceGroupName, labName, userName, serviceFabricName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // executeCreateRequest creates the Execute request. @@ -275,18 +301,25 @@ func (client *ServiceFabricSchedulesClient) executeCreateRequest(ctx context.Con // - options - ServiceFabricSchedulesClientGetOptions contains the optional parameters for the ServiceFabricSchedulesClient.Get // method. func (client *ServiceFabricSchedulesClient) Get(ctx context.Context, resourceGroupName string, labName string, userName string, serviceFabricName string, name string, options *ServiceFabricSchedulesClientGetOptions) (ServiceFabricSchedulesClientGetResponse, error) { + var err error + const operationName = "ServiceFabricSchedulesClient.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, labName, userName, serviceFabricName, name, options) if err != nil { return ServiceFabricSchedulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ServiceFabricSchedulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceFabricSchedulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceFabricSchedulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -354,25 +387,20 @@ func (client *ServiceFabricSchedulesClient) NewListPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ServiceFabricSchedulesClientListResponse) (ServiceFabricSchedulesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, userName, serviceFabricName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceFabricSchedulesClient.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, labName, userName, serviceFabricName, options) + }, nil) if err != nil { return ServiceFabricSchedulesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ServiceFabricSchedulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceFabricSchedulesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -444,18 +472,25 @@ func (client *ServiceFabricSchedulesClient) listHandleResponse(resp *http.Respon // - options - ServiceFabricSchedulesClientUpdateOptions contains the optional parameters for the ServiceFabricSchedulesClient.Update // method. func (client *ServiceFabricSchedulesClient) Update(ctx context.Context, resourceGroupName string, labName string, userName string, serviceFabricName string, name string, schedule ScheduleFragment, options *ServiceFabricSchedulesClientUpdateOptions) (ServiceFabricSchedulesClientUpdateResponse, error) { + var err error + const operationName = "ServiceFabricSchedulesClient.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, labName, userName, serviceFabricName, name, schedule, options) if err != nil { return ServiceFabricSchedulesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ServiceFabricSchedulesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceFabricSchedulesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceFabricSchedulesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -493,7 +528,10 @@ func (client *ServiceFabricSchedulesClient) updateCreateRequest(ctx context.Cont reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, schedule) + if err := runtime.MarshalAsJSON(req, schedule); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/servicerunners_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/servicerunners_client.go index 5f49332f..e63642a0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/servicerunners_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/servicerunners_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -33,7 +32,7 @@ type ServiceRunnersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewServiceRunnersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceRunnersClient, error) { - cl, err := arm.NewClient(moduleName+".ServiceRunnersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewServiceRunnersClient(subscriptionID string, credential azcore.TokenCrede // - options - ServiceRunnersClientCreateOrUpdateOptions contains the optional parameters for the ServiceRunnersClient.CreateOrUpdate // method. func (client *ServiceRunnersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, serviceRunner ServiceRunner, options *ServiceRunnersClientCreateOrUpdateOptions) (ServiceRunnersClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ServiceRunnersClient.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, labName, name, serviceRunner, options) if err != nil { return ServiceRunnersClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ServiceRunnersClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ServiceRunnersClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ServiceRunnersClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *ServiceRunnersClient) createOrUpdateCreateRequest(ctx context.Cont reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, serviceRunner) + if err := runtime.MarshalAsJSON(req, serviceRunner); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *ServiceRunnersClient) createOrUpdateHandleResponse(resp *http.Resp // - name - The name of the service runner. // - options - ServiceRunnersClientDeleteOptions contains the optional parameters for the ServiceRunnersClient.Delete method. func (client *ServiceRunnersClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string, options *ServiceRunnersClientDeleteOptions) (ServiceRunnersClientDeleteResponse, error) { + var err error + const operationName = "ServiceRunnersClient.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, labName, name, options) if err != nil { return ServiceRunnersClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ServiceRunnersClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ServiceRunnersClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ServiceRunnersClientDeleteResponse{}, err } return ServiceRunnersClientDeleteResponse{}, nil } @@ -170,18 +185,25 @@ func (client *ServiceRunnersClient) deleteCreateRequest(ctx context.Context, res // - name - The name of the service runner. // - options - ServiceRunnersClientGetOptions contains the optional parameters for the ServiceRunnersClient.Get method. func (client *ServiceRunnersClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, options *ServiceRunnersClientGetOptions) (ServiceRunnersClientGetResponse, error) { + var err error + const operationName = "ServiceRunnersClient.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, labName, name, options) if err != nil { return ServiceRunnersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ServiceRunnersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceRunnersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceRunnersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/time_rfc3339.go index 9d45f8ef..a3368760 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/users_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/users_client.go index 5760b824..7f0b6d54 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/users_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/users_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type UsersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewUsersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsersClient, error) { - cl, err := arm.NewClient(moduleName+".UsersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,9 +60,14 @@ func (client *UsersClient) BeginCreateOrUpdate(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[UsersClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[UsersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[UsersClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[UsersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +76,24 @@ func (client *UsersClient) BeginCreateOrUpdate(ctx context.Context, resourceGrou // // Generated from API version 2018-09-15 func (client *UsersClient) createOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, userParam User, options *UsersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "UsersClient.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, labName, name, userParam, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -113,7 +123,10 @@ func (client *UsersClient) createOrUpdateCreateRequest(ctx context.Context, reso reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, userParam) + if err := runtime.MarshalAsJSON(req, userParam); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete user profile. This operation can take a while to complete. @@ -130,9 +143,14 @@ func (client *UsersClient) BeginDelete(ctx context.Context, resourceGroupName st if err != nil { return nil, err } - return runtime.NewPoller[UsersClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[UsersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[UsersClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[UsersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -141,18 +159,24 @@ func (client *UsersClient) BeginDelete(ctx context.Context, resourceGroupName st // // Generated from API version 2018-09-15 func (client *UsersClient) deleteOperation(ctx context.Context, resourceGroupName string, labName string, name string, options *UsersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "UsersClient.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, labName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -194,18 +218,25 @@ func (client *UsersClient) deleteCreateRequest(ctx context.Context, resourceGrou // - name - The name of the user profile. // - options - UsersClientGetOptions contains the optional parameters for the UsersClient.Get method. func (client *UsersClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, options *UsersClientGetOptions) (UsersClientGetResponse, error) { + var err error + const operationName = "UsersClient.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, labName, name, options) if err != nil { return UsersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return UsersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UsersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return UsersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -262,25 +293,20 @@ func (client *UsersClient) NewListPager(resourceGroupName string, labName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *UsersClientListResponse) (UsersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return UsersClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UsersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, labName, options) + }, nil) if err != nil { return UsersClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UsersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -341,18 +367,25 @@ func (client *UsersClient) listHandleResponse(resp *http.Response) (UsersClientL // - userParam - Profile of a lab user. // - options - UsersClientUpdateOptions contains the optional parameters for the UsersClient.Update method. func (client *UsersClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, userParam UserFragment, options *UsersClientUpdateOptions) (UsersClientUpdateResponse, error) { + var err error + const operationName = "UsersClient.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, labName, name, userParam, options) if err != nil { return UsersClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return UsersClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UsersClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return UsersClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -382,7 +415,10 @@ func (client *UsersClient) updateCreateRequest(ctx context.Context, resourceGrou reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, userParam) + if err := runtime.MarshalAsJSON(req, userParam); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/virtualmachines_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/virtualmachines_client.go index 770443f3..d8cc0f09 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/virtualmachines_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/virtualmachines_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type VirtualMachinesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachinesClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachinesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,9 +60,14 @@ func (client *VirtualMachinesClient) BeginAddDataDisk(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachinesClientAddDataDiskResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientAddDataDiskResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientAddDataDiskResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientAddDataDiskResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +76,24 @@ func (client *VirtualMachinesClient) BeginAddDataDisk(ctx context.Context, resou // // Generated from API version 2018-09-15 func (client *VirtualMachinesClient) addDataDisk(ctx context.Context, resourceGroupName string, labName string, name string, dataDiskProperties DataDiskProperties, options *VirtualMachinesClientBeginAddDataDiskOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.BeginAddDataDisk" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.addDataDiskCreateRequest(ctx, resourceGroupName, labName, name, dataDiskProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // addDataDiskCreateRequest creates the AddDataDisk request. @@ -113,7 +123,10 @@ func (client *VirtualMachinesClient) addDataDiskCreateRequest(ctx context.Contex reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, dataDiskProperties) + if err := runtime.MarshalAsJSON(req, dataDiskProperties); err != nil { + return nil, err + } + return req, nil } // BeginApplyArtifacts - Apply artifacts to virtual machine. This operation can take a while to complete. @@ -132,9 +145,14 @@ func (client *VirtualMachinesClient) BeginApplyArtifacts(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachinesClientApplyArtifactsResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientApplyArtifactsResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientApplyArtifactsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientApplyArtifactsResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -143,18 +161,24 @@ func (client *VirtualMachinesClient) BeginApplyArtifacts(ctx context.Context, re // // Generated from API version 2018-09-15 func (client *VirtualMachinesClient) applyArtifacts(ctx context.Context, resourceGroupName string, labName string, name string, applyArtifactsRequest ApplyArtifactsRequest, options *VirtualMachinesClientBeginApplyArtifactsOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.BeginApplyArtifacts" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.applyArtifactsCreateRequest(ctx, resourceGroupName, labName, name, applyArtifactsRequest, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // applyArtifactsCreateRequest creates the ApplyArtifacts request. @@ -184,7 +208,10 @@ func (client *VirtualMachinesClient) applyArtifactsCreateRequest(ctx context.Con reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, applyArtifactsRequest) + if err := runtime.MarshalAsJSON(req, applyArtifactsRequest); err != nil { + return nil, err + } + return req, nil } // BeginClaim - Take ownership of an existing virtual machine This operation can take a while to complete. @@ -202,9 +229,14 @@ func (client *VirtualMachinesClient) BeginClaim(ctx context.Context, resourceGro if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachinesClientClaimResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientClaimResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientClaimResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientClaimResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -213,18 +245,24 @@ func (client *VirtualMachinesClient) BeginClaim(ctx context.Context, resourceGro // // Generated from API version 2018-09-15 func (client *VirtualMachinesClient) claim(ctx context.Context, resourceGroupName string, labName string, name string, options *VirtualMachinesClientBeginClaimOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.BeginClaim" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.claimCreateRequest(ctx, resourceGroupName, labName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // claimCreateRequest creates the Claim request. @@ -273,9 +311,14 @@ func (client *VirtualMachinesClient) BeginCreateOrUpdate(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachinesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -284,18 +327,24 @@ func (client *VirtualMachinesClient) BeginCreateOrUpdate(ctx context.Context, re // // Generated from API version 2018-09-15 func (client *VirtualMachinesClient) createOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, labVirtualMachine LabVirtualMachine, options *VirtualMachinesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.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, labName, name, labVirtualMachine, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -325,7 +374,10 @@ func (client *VirtualMachinesClient) createOrUpdateCreateRequest(ctx context.Con reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, labVirtualMachine) + if err := runtime.MarshalAsJSON(req, labVirtualMachine); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete virtual machine. This operation can take a while to complete. @@ -343,9 +395,14 @@ func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachinesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -354,18 +411,24 @@ func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGr // // Generated from API version 2018-09-15 func (client *VirtualMachinesClient) deleteOperation(ctx context.Context, resourceGroupName string, labName string, name string, options *VirtualMachinesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.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, labName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -414,9 +477,14 @@ func (client *VirtualMachinesClient) BeginDetachDataDisk(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachinesClientDetachDataDiskResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientDetachDataDiskResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientDetachDataDiskResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientDetachDataDiskResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -425,18 +493,24 @@ func (client *VirtualMachinesClient) BeginDetachDataDisk(ctx context.Context, re // // Generated from API version 2018-09-15 func (client *VirtualMachinesClient) detachDataDisk(ctx context.Context, resourceGroupName string, labName string, name string, detachDataDiskProperties DetachDataDiskProperties, options *VirtualMachinesClientBeginDetachDataDiskOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.BeginDetachDataDisk" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.detachDataDiskCreateRequest(ctx, resourceGroupName, labName, name, detachDataDiskProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // detachDataDiskCreateRequest creates the DetachDataDisk request. @@ -466,7 +540,10 @@ func (client *VirtualMachinesClient) detachDataDiskCreateRequest(ctx context.Con reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, detachDataDiskProperties) + if err := runtime.MarshalAsJSON(req, detachDataDiskProperties); err != nil { + return nil, err + } + return req, nil } // Get - Get virtual machine. @@ -478,18 +555,25 @@ func (client *VirtualMachinesClient) detachDataDiskCreateRequest(ctx context.Con // - name - The name of the virtual machine. // - options - VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method. func (client *VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, options *VirtualMachinesClientGetOptions) (VirtualMachinesClientGetResponse, error) { + var err error + const operationName = "VirtualMachinesClient.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, labName, name, options) if err != nil { return VirtualMachinesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VirtualMachinesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualMachinesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualMachinesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -544,18 +628,25 @@ func (client *VirtualMachinesClient) getHandleResponse(resp *http.Response) (Vir // - options - VirtualMachinesClientGetRdpFileContentsOptions contains the optional parameters for the VirtualMachinesClient.GetRdpFileContents // method. func (client *VirtualMachinesClient) GetRdpFileContents(ctx context.Context, resourceGroupName string, labName string, name string, options *VirtualMachinesClientGetRdpFileContentsOptions) (VirtualMachinesClientGetRdpFileContentsResponse, error) { + var err error + const operationName = "VirtualMachinesClient.GetRdpFileContents" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getRdpFileContentsCreateRequest(ctx, resourceGroupName, labName, name, options) if err != nil { return VirtualMachinesClientGetRdpFileContentsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VirtualMachinesClientGetRdpFileContentsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualMachinesClientGetRdpFileContentsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualMachinesClientGetRdpFileContentsResponse{}, err } - return client.getRdpFileContentsHandleResponse(resp) + resp, err := client.getRdpFileContentsHandleResponse(httpResp) + return resp, err } // getRdpFileContentsCreateRequest creates the GetRdpFileContents request. @@ -610,25 +701,20 @@ func (client *VirtualMachinesClient) NewListPager(resourceGroupName string, labN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *VirtualMachinesClientListResponse) (VirtualMachinesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachinesClient.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, labName, options) + }, nil) if err != nil { return VirtualMachinesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VirtualMachinesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualMachinesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -689,18 +775,25 @@ func (client *VirtualMachinesClient) listHandleResponse(resp *http.Response) (Vi // - options - VirtualMachinesClientListApplicableSchedulesOptions contains the optional parameters for the VirtualMachinesClient.ListApplicableSchedules // method. func (client *VirtualMachinesClient) ListApplicableSchedules(ctx context.Context, resourceGroupName string, labName string, name string, options *VirtualMachinesClientListApplicableSchedulesOptions) (VirtualMachinesClientListApplicableSchedulesResponse, error) { + var err error + const operationName = "VirtualMachinesClient.ListApplicableSchedules" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listApplicableSchedulesCreateRequest(ctx, resourceGroupName, labName, name, options) if err != nil { return VirtualMachinesClientListApplicableSchedulesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VirtualMachinesClientListApplicableSchedulesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualMachinesClientListApplicableSchedulesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualMachinesClientListApplicableSchedulesResponse{}, err } - return client.listApplicableSchedulesHandleResponse(resp) + resp, err := client.listApplicableSchedulesHandleResponse(httpResp) + return resp, err } // listApplicableSchedulesCreateRequest creates the ListApplicableSchedules request. @@ -757,9 +850,14 @@ func (client *VirtualMachinesClient) BeginRedeploy(ctx context.Context, resource if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachinesClientRedeployResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientRedeployResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientRedeployResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientRedeployResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -768,18 +866,24 @@ func (client *VirtualMachinesClient) BeginRedeploy(ctx context.Context, resource // // Generated from API version 2018-09-15 func (client *VirtualMachinesClient) redeploy(ctx context.Context, resourceGroupName string, labName string, name string, options *VirtualMachinesClientBeginRedeployOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.BeginRedeploy" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.redeployCreateRequest(ctx, resourceGroupName, labName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // redeployCreateRequest creates the Redeploy request. @@ -828,9 +932,14 @@ func (client *VirtualMachinesClient) BeginResize(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachinesClientResizeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientResizeResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientResizeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientResizeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -839,18 +948,24 @@ func (client *VirtualMachinesClient) BeginResize(ctx context.Context, resourceGr // // Generated from API version 2018-09-15 func (client *VirtualMachinesClient) resize(ctx context.Context, resourceGroupName string, labName string, name string, resizeLabVirtualMachineProperties ResizeLabVirtualMachineProperties, options *VirtualMachinesClientBeginResizeOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.BeginResize" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resizeCreateRequest(ctx, resourceGroupName, labName, name, resizeLabVirtualMachineProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // resizeCreateRequest creates the Resize request. @@ -880,7 +995,10 @@ func (client *VirtualMachinesClient) resizeCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resizeLabVirtualMachineProperties) + if err := runtime.MarshalAsJSON(req, resizeLabVirtualMachineProperties); err != nil { + return nil, err + } + return req, nil } // BeginRestart - Restart a virtual machine. This operation can take a while to complete. @@ -898,9 +1016,14 @@ func (client *VirtualMachinesClient) BeginRestart(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachinesClientRestartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientRestartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -909,18 +1032,24 @@ func (client *VirtualMachinesClient) BeginRestart(ctx context.Context, resourceG // // Generated from API version 2018-09-15 func (client *VirtualMachinesClient) restart(ctx context.Context, resourceGroupName string, labName string, name string, options *VirtualMachinesClientBeginRestartOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.BeginRestart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restartCreateRequest(ctx, resourceGroupName, labName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // restartCreateRequest creates the Restart request. @@ -968,9 +1097,14 @@ func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGro if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachinesClientStartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -979,18 +1113,24 @@ func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGro // // Generated from API version 2018-09-15 func (client *VirtualMachinesClient) start(ctx context.Context, resourceGroupName string, labName string, name string, options *VirtualMachinesClientBeginStartOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.BeginStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startCreateRequest(ctx, resourceGroupName, labName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // startCreateRequest creates the Start request. @@ -1038,9 +1178,14 @@ func (client *VirtualMachinesClient) BeginStop(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachinesClientStopResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1049,18 +1194,24 @@ func (client *VirtualMachinesClient) BeginStop(ctx context.Context, resourceGrou // // Generated from API version 2018-09-15 func (client *VirtualMachinesClient) stop(ctx context.Context, resourceGroupName string, labName string, name string, options *VirtualMachinesClientBeginStopOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.BeginStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopCreateRequest(ctx, resourceGroupName, labName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // stopCreateRequest creates the Stop request. @@ -1109,9 +1260,14 @@ func (client *VirtualMachinesClient) BeginTransferDisks(ctx context.Context, res if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachinesClientTransferDisksResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientTransferDisksResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientTransferDisksResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientTransferDisksResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1121,18 +1277,24 @@ func (client *VirtualMachinesClient) BeginTransferDisks(ctx context.Context, res // // Generated from API version 2018-09-15 func (client *VirtualMachinesClient) transferDisks(ctx context.Context, resourceGroupName string, labName string, name string, options *VirtualMachinesClientBeginTransferDisksOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.BeginTransferDisks" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.transferDisksCreateRequest(ctx, resourceGroupName, labName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // transferDisksCreateRequest creates the TransferDisks request. @@ -1180,9 +1342,14 @@ func (client *VirtualMachinesClient) BeginUnClaim(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachinesClientUnClaimResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientUnClaimResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientUnClaimResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientUnClaimResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1191,18 +1358,24 @@ func (client *VirtualMachinesClient) BeginUnClaim(ctx context.Context, resourceG // // Generated from API version 2018-09-15 func (client *VirtualMachinesClient) unClaim(ctx context.Context, resourceGroupName string, labName string, name string, options *VirtualMachinesClientBeginUnClaimOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.BeginUnClaim" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.unClaimCreateRequest(ctx, resourceGroupName, labName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // unClaimCreateRequest creates the UnClaim request. @@ -1245,18 +1418,25 @@ func (client *VirtualMachinesClient) unClaimCreateRequest(ctx context.Context, r // - labVirtualMachine - A virtual machine. // - options - VirtualMachinesClientUpdateOptions contains the optional parameters for the VirtualMachinesClient.Update method. func (client *VirtualMachinesClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, labVirtualMachine LabVirtualMachineFragment, options *VirtualMachinesClientUpdateOptions) (VirtualMachinesClientUpdateResponse, error) { + var err error + const operationName = "VirtualMachinesClient.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, labName, name, labVirtualMachine, options) if err != nil { return VirtualMachinesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VirtualMachinesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualMachinesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualMachinesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -1286,7 +1466,10 @@ func (client *VirtualMachinesClient) updateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, labVirtualMachine) + if err := runtime.MarshalAsJSON(req, labVirtualMachine); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/virtualmachineschedules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/virtualmachineschedules_client.go index f345eaa4..2edff286 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/virtualmachineschedules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/virtualmachineschedules_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type VirtualMachineSchedulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachineSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineSchedulesClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachineSchedulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,18 +56,25 @@ func NewVirtualMachineSchedulesClient(subscriptionID string, credential azcore.T // - options - VirtualMachineSchedulesClientCreateOrUpdateOptions contains the optional parameters for the VirtualMachineSchedulesClient.CreateOrUpdate // method. func (client *VirtualMachineSchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string, schedule Schedule, options *VirtualMachineSchedulesClientCreateOrUpdateOptions) (VirtualMachineSchedulesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "VirtualMachineSchedulesClient.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, labName, virtualMachineName, name, schedule, options) if err != nil { return VirtualMachineSchedulesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VirtualMachineSchedulesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return VirtualMachineSchedulesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return VirtualMachineSchedulesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -102,7 +108,10 @@ func (client *VirtualMachineSchedulesClient) createOrUpdateCreateRequest(ctx con reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, schedule) + if err := runtime.MarshalAsJSON(req, schedule); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -125,16 +134,22 @@ func (client *VirtualMachineSchedulesClient) createOrUpdateHandleResponse(resp * // - options - VirtualMachineSchedulesClientDeleteOptions contains the optional parameters for the VirtualMachineSchedulesClient.Delete // method. func (client *VirtualMachineSchedulesClient) Delete(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string, options *VirtualMachineSchedulesClientDeleteOptions) (VirtualMachineSchedulesClientDeleteResponse, error) { + var err error + const operationName = "VirtualMachineSchedulesClient.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, labName, virtualMachineName, name, options) if err != nil { return VirtualMachineSchedulesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VirtualMachineSchedulesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return VirtualMachineSchedulesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return VirtualMachineSchedulesClientDeleteResponse{}, err } return VirtualMachineSchedulesClientDeleteResponse{}, nil } @@ -189,9 +204,14 @@ func (client *VirtualMachineSchedulesClient) BeginExecute(ctx context.Context, r if err != nil { return nil, err } - return runtime.NewPoller[VirtualMachineSchedulesClientExecuteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineSchedulesClientExecuteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineSchedulesClientExecuteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineSchedulesClientExecuteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -200,18 +220,24 @@ func (client *VirtualMachineSchedulesClient) BeginExecute(ctx context.Context, r // // Generated from API version 2018-09-15 func (client *VirtualMachineSchedulesClient) execute(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string, options *VirtualMachineSchedulesClientBeginExecuteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachineSchedulesClient.BeginExecute" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.executeCreateRequest(ctx, resourceGroupName, labName, virtualMachineName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // executeCreateRequest creates the Execute request. @@ -259,18 +285,25 @@ func (client *VirtualMachineSchedulesClient) executeCreateRequest(ctx context.Co // - options - VirtualMachineSchedulesClientGetOptions contains the optional parameters for the VirtualMachineSchedulesClient.Get // method. func (client *VirtualMachineSchedulesClient) Get(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string, options *VirtualMachineSchedulesClientGetOptions) (VirtualMachineSchedulesClientGetResponse, error) { + var err error + const operationName = "VirtualMachineSchedulesClient.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, labName, virtualMachineName, name, options) if err != nil { return VirtualMachineSchedulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VirtualMachineSchedulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualMachineSchedulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualMachineSchedulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -333,25 +366,20 @@ func (client *VirtualMachineSchedulesClient) NewListPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *VirtualMachineSchedulesClientListResponse) (VirtualMachineSchedulesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, virtualMachineName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachineSchedulesClient.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, labName, virtualMachineName, options) + }, nil) if err != nil { return VirtualMachineSchedulesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VirtualMachineSchedulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualMachineSchedulesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -418,18 +446,25 @@ func (client *VirtualMachineSchedulesClient) listHandleResponse(resp *http.Respo // - options - VirtualMachineSchedulesClientUpdateOptions contains the optional parameters for the VirtualMachineSchedulesClient.Update // method. func (client *VirtualMachineSchedulesClient) Update(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string, schedule ScheduleFragment, options *VirtualMachineSchedulesClientUpdateOptions) (VirtualMachineSchedulesClientUpdateResponse, error) { + var err error + const operationName = "VirtualMachineSchedulesClient.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, labName, virtualMachineName, name, schedule, options) if err != nil { return VirtualMachineSchedulesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VirtualMachineSchedulesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualMachineSchedulesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualMachineSchedulesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -463,7 +498,10 @@ func (client *VirtualMachineSchedulesClient) updateCreateRequest(ctx context.Con reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, schedule) + if err := runtime.MarshalAsJSON(req, schedule); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/virtualnetworks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/virtualnetworks_client.go index 1dc6ec09..8c21ec85 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/virtualnetworks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs/virtualnetworks_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdevtestlabs @@ -34,7 +33,7 @@ type VirtualNetworksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworksClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualNetworksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,9 +60,14 @@ func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[VirtualNetworksClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworksClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworksClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworksClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +76,24 @@ func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, re // // Generated from API version 2018-09-15 func (client *VirtualNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, virtualNetwork VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworksClient.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, labName, name, virtualNetwork, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -113,7 +123,10 @@ func (client *VirtualNetworksClient) createOrUpdateCreateRequest(ctx context.Con reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, virtualNetwork) + if err := runtime.MarshalAsJSON(req, virtualNetwork); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete virtual network. This operation can take a while to complete. @@ -131,9 +144,14 @@ func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[VirtualNetworksClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworksClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworksClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworksClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -142,18 +160,24 @@ func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGr // // Generated from API version 2018-09-15 func (client *VirtualNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, labName string, name string, options *VirtualNetworksClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworksClient.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, labName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -195,18 +219,25 @@ func (client *VirtualNetworksClient) deleteCreateRequest(ctx context.Context, re // - name - The name of the virtual network. // - options - VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method. func (client *VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, options *VirtualNetworksClientGetOptions) (VirtualNetworksClientGetResponse, error) { + var err error + const operationName = "VirtualNetworksClient.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, labName, name, options) if err != nil { return VirtualNetworksClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VirtualNetworksClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworksClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworksClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -264,25 +295,20 @@ func (client *VirtualNetworksClient) NewListPager(resourceGroupName string, labN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *VirtualNetworksClientListResponse) (VirtualNetworksClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, labName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworksClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworksClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, labName, options) + }, nil) if err != nil { return VirtualNetworksClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworksClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -343,18 +369,25 @@ func (client *VirtualNetworksClient) listHandleResponse(resp *http.Response) (Vi // - virtualNetwork - A virtual network. // - options - VirtualNetworksClientUpdateOptions contains the optional parameters for the VirtualNetworksClient.Update method. func (client *VirtualNetworksClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, virtualNetwork VirtualNetworkFragment, options *VirtualNetworksClientUpdateOptions) (VirtualNetworksClientUpdateResponse, error) { + var err error + const operationName = "VirtualNetworksClient.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, labName, name, virtualNetwork, options) if err != nil { return VirtualNetworksClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VirtualNetworksClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworksClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworksClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -384,7 +417,10 @@ func (client *VirtualNetworksClient) updateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2018-09-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, virtualNetwork) + if err := runtime.MarshalAsJSON(req, virtualNetwork); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/CHANGELOG.md index 5f54afea..918be5f2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.2.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + ## 1.1.0 (2023-03-24) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/README.md index 11f6989a..e8e23bc2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/autorest.md index 40aa2453..0028fd15 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/autorest.md @@ -8,6 +8,6 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0 +module-version: 1.2.0 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/client.go index 8ad41087..d07e762c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdigitaltwins @@ -33,7 +32,7 @@ type Client struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { - cl, err := arm.NewClient(moduleName+".Client", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewClient(subscriptionID string, credential azcore.TokenCredential, options // DigitalTwinsInstance to check. // - options - ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method. func (client *Client) CheckNameAvailability(ctx context.Context, location string, digitalTwinsInstanceCheckName CheckNameRequest, options *ClientCheckNameAvailabilityOptions) (ClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "Client.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, location, digitalTwinsInstanceCheckName, options) if err != nil { return ClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -86,7 +92,10 @@ func (client *Client) checkNameAvailabilityCreateRequest(ctx context.Context, lo reqQP.Set("api-version", "2023-01-31") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, digitalTwinsInstanceCheckName) + if err := runtime.MarshalAsJSON(req, digitalTwinsInstanceCheckName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -114,9 +123,14 @@ func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -127,18 +141,24 @@ func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceGroupName // // Generated from API version 2023-01-31 func (client *Client) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, digitalTwinsCreate Description, options *ClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "Client.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, resourceName, digitalTwinsCreate, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -164,7 +184,10 @@ func (client *Client) createOrUpdateCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2023-01-31") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, digitalTwinsCreate) + if err := runtime.MarshalAsJSON(req, digitalTwinsCreate); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a DigitalTwinsInstance. @@ -180,9 +203,14 @@ func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, if err != nil { return nil, err } - return runtime.NewPoller[ClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -191,18 +219,24 @@ func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, // // Generated from API version 2023-01-31 func (client *Client) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "Client.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, resourceName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -239,18 +273,25 @@ func (client *Client) deleteCreateRequest(ctx context.Context, resourceGroupName // - resourceName - The name of the DigitalTwinsInstance. // - options - ClientGetOptions contains the optional parameters for the Client.Get method. func (client *Client) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ClientGetOptions) (ClientGetResponse, error) { + var err error + const operationName = "Client.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, resourceName, options) if err != nil { return ClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -298,25 +339,20 @@ func (client *Client) NewListPager(options *ClientListOptions) *runtime.Pager[Cl return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ClientListResponse) (ClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 ClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -359,25 +395,20 @@ func (client *Client) NewListByResourceGroupPager(resourceGroupName string, opti return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ClientListByResourceGroupResponse) (ClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 ClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -426,9 +457,14 @@ func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, if err != nil { return nil, err } - return runtime.NewPoller[ClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -437,18 +473,24 @@ func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, // // Generated from API version 2023-01-31 func (client *Client) update(ctx context.Context, resourceGroupName string, resourceName string, digitalTwinsPatchDescription PatchDescription, options *ClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "Client.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, resourceName, digitalTwinsPatchDescription, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -474,5 +516,8 @@ func (client *Client) updateCreateRequest(ctx context.Context, resourceGroupName reqQP.Set("api-version", "2023-01-31") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, digitalTwinsPatchDescription) + if err := runtime.MarshalAsJSON(req, digitalTwinsPatchDescription); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/client_factory.go index 7a7d77ba..9a1e265f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdigitaltwins @@ -28,7 +27,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,31 +37,37 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } +// NewClient creates a new instance of Client. func (c *ClientFactory) NewClient() *Client { subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewEndpointClient creates a new instance of EndpointClient. func (c *ClientFactory) NewEndpointClient() *EndpointClient { subClient, _ := NewEndpointClient(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 } -func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) +// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient. +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient. +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewTimeSeriesDatabaseConnectionsClient creates a new instance of TimeSeriesDatabaseConnectionsClient. func (c *ClientFactory) NewTimeSeriesDatabaseConnectionsClient() *TimeSeriesDatabaseConnectionsClient { subClient, _ := NewTimeSeriesDatabaseConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/constants.go index b60125a7..986f3935 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armdigitaltwins const ( - moduleName = "armdigitaltwins" - moduleVersion = "v1.1.0" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins" + moduleVersion = "v1.2.0" ) // AuthenticationType - Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/endpoint_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/endpoint_client.go index 6e1ee71f..6f76cf70 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/endpoint_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/endpoint_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdigitaltwins @@ -33,7 +32,7 @@ type EndpointClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEndpointClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointClient, error) { - cl, err := arm.NewClient(moduleName+".EndpointClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *EndpointClient) BeginCreateOrUpdate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[EndpointClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EndpointClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EndpointClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EndpointClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *EndpointClient) BeginCreateOrUpdate(ctx context.Context, resourceG // // Generated from API version 2023-01-31 func (client *EndpointClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, endpointName string, endpointDescription EndpointResource, options *EndpointClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "EndpointClient.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, resourceName, endpointName, endpointDescription, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -112,7 +122,10 @@ func (client *EndpointClient) createOrUpdateCreateRequest(ctx context.Context, r reqQP.Set("api-version", "2023-01-31") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, endpointDescription) + if err := runtime.MarshalAsJSON(req, endpointDescription); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a DigitalTwinsInstance endpoint. @@ -129,9 +142,14 @@ func (client *EndpointClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[EndpointClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EndpointClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EndpointClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EndpointClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -140,18 +158,24 @@ func (client *EndpointClient) BeginDelete(ctx context.Context, resourceGroupName // // Generated from API version 2023-01-31 func (client *EndpointClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, endpointName string, options *EndpointClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "EndpointClient.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, resourceName, endpointName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -193,18 +217,25 @@ func (client *EndpointClient) deleteCreateRequest(ctx context.Context, resourceG // - endpointName - Name of Endpoint Resource. // - options - EndpointClientGetOptions contains the optional parameters for the EndpointClient.Get method. func (client *EndpointClient) Get(ctx context.Context, resourceGroupName string, resourceName string, endpointName string, options *EndpointClientGetOptions) (EndpointClientGetResponse, error) { + var err error + const operationName = "EndpointClient.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, resourceName, endpointName, options) if err != nil { return EndpointClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EndpointClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EndpointClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EndpointClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -258,25 +289,20 @@ func (client *EndpointClient) NewListPager(resourceGroupName string, resourceNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EndpointClientListResponse) (EndpointClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, resourceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EndpointClient.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, resourceName, options) + }, nil) if err != nil { return EndpointClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EndpointClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EndpointClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/interfaces.go new file mode 100644 index 00000000..85cfdc37 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/interfaces.go @@ -0,0 +1,27 @@ +//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 armdigitaltwins + +// EndpointResourcePropertiesClassification provides polymorphic access to related types. +// Call the interface's GetEndpointResourceProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EndpointResourceProperties, *EventGrid, *EventHub, *ServiceBus +type EndpointResourcePropertiesClassification interface { + // GetEndpointResourceProperties returns the EndpointResourceProperties content of the underlying type. + GetEndpointResourceProperties() *EndpointResourceProperties +} + +// TimeSeriesDatabaseConnectionPropertiesClassification provides polymorphic access to related types. +// Call the interface's GetTimeSeriesDatabaseConnectionProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureDataExplorerConnectionProperties, *TimeSeriesDatabaseConnectionProperties +type TimeSeriesDatabaseConnectionPropertiesClassification interface { + // GetTimeSeriesDatabaseConnectionProperties returns the TimeSeriesDatabaseConnectionProperties content of the underlying type. + GetTimeSeriesDatabaseConnectionProperties() *TimeSeriesDatabaseConnectionProperties +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/models.go index 4c42fff5..92a673c8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdigitaltwins @@ -15,52 +14,52 @@ import "time" // being sent via an EventHub. type AzureDataExplorerConnectionProperties struct { // REQUIRED; The name of the Azure Data Explorer database. - AdxDatabaseName *string `json:"adxDatabaseName,omitempty"` + AdxDatabaseName *string // REQUIRED; The URI of the Azure Data Explorer endpoint. - AdxEndpointURI *string `json:"adxEndpointUri,omitempty"` + AdxEndpointURI *string // REQUIRED; The resource ID of the Azure Data Explorer cluster. - AdxResourceID *string `json:"adxResourceId,omitempty"` + AdxResourceID *string // REQUIRED; The type of time series connection resource. - ConnectionType *ConnectionType `json:"connectionType,omitempty"` + ConnectionType *ConnectionType // REQUIRED; The URL of the EventHub namespace for identity-based authentication. It must include the protocol sb:// - EventHubEndpointURI *string `json:"eventHubEndpointUri,omitempty"` + EventHubEndpointURI *string // REQUIRED; The EventHub name in the EventHub namespace for identity-based authentication. - EventHubEntityPath *string `json:"eventHubEntityPath,omitempty"` + EventHubEntityPath *string // REQUIRED; The resource ID of the EventHub namespace. - EventHubNamespaceResourceID *string `json:"eventHubNamespaceResourceId,omitempty"` + EventHubNamespaceResourceID *string // The name of the Azure Data Explorer table used for recording relationship lifecycle events. The table will not be created // if this property is left unspecified. - AdxRelationshipLifecycleEventsTableName *string `json:"adxRelationshipLifecycleEventsTableName,omitempty"` + AdxRelationshipLifecycleEventsTableName *string // The name of the Azure Data Explorer table used for storing updates to properties of twins and relationships. Defaults to // AdtPropertyEvents. - AdxTableName *string `json:"adxTableName,omitempty"` + AdxTableName *string // The name of the Azure Data Explorer table used for recording twin lifecycle events. The table will not be created if this // property is left unspecified. - AdxTwinLifecycleEventsTableName *string `json:"adxTwinLifecycleEventsTableName,omitempty"` + AdxTwinLifecycleEventsTableName *string // The EventHub consumer group to use when ADX reads from EventHub. Defaults to $Default. - EventHubConsumerGroup *string `json:"eventHubConsumerGroup,omitempty"` + EventHubConsumerGroup *string // Managed identity properties for the time series database connection resource. - Identity *ManagedIdentityReference `json:"identity,omitempty"` + Identity *ManagedIdentityReference // Specifies whether or not to record twin / relationship property and item removals, including removals of indexed or keyed // values (such as map entries, array elements, etc.). This feature is // de-activated unless explicitly set to 'true'. Setting this property to 'true' will generate an additional column in the // property events table in ADX. - RecordPropertyAndItemRemovals *RecordPropertyAndItemRemovals `json:"recordPropertyAndItemRemovals,omitempty"` + RecordPropertyAndItemRemovals *RecordPropertyAndItemRemovals // READ-ONLY; The provisioning state. - ProvisioningState *TimeSeriesDatabaseConnectionState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *TimeSeriesDatabaseConnectionState } // GetTimeSeriesDatabaseConnectionProperties implements the TimeSeriesDatabaseConnectionPropertiesClassification interface @@ -68,228 +67,159 @@ type AzureDataExplorerConnectionProperties struct { func (a *AzureDataExplorerConnectionProperties) GetTimeSeriesDatabaseConnectionProperties() *TimeSeriesDatabaseConnectionProperties { return &TimeSeriesDatabaseConnectionProperties{ ConnectionType: a.ConnectionType, - ProvisioningState: a.ProvisioningState, Identity: a.Identity, + ProvisioningState: a.ProvisioningState, } } // CheckNameRequest - The result returned from a database check name availability request. type CheckNameRequest struct { // REQUIRED; Resource name. - Name *string `json:"name,omitempty"` + Name *string // CONSTANT; The type of resource, for instance Microsoft.DigitalTwins/digitalTwinsInstances. // Field has constant value "Microsoft.DigitalTwins/digitalTwinsInstances", any specified value is ignored. - Type *string `json:"type,omitempty"` + Type *string } // CheckNameResult - The result returned from a check name availability request. type CheckNameResult struct { // Message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated. - Message *string `json:"message,omitempty"` + Message *string // Specifies a Boolean value that indicates if the name is available. - NameAvailable *bool `json:"nameAvailable,omitempty"` + NameAvailable *bool // Message providing the reason why the given name is invalid. - Reason *Reason `json:"reason,omitempty"` -} - -// ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method. -type ClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method. -type ClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method. -type ClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method. -type ClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ClientGetOptions contains the optional parameters for the Client.Get method. -type ClientGetOptions struct { - // placeholder for future optional parameters -} - -// ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method. -type ClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ClientListOptions contains the optional parameters for the Client.NewListPager method. -type ClientListOptions struct { - // placeholder for future optional parameters + Reason *Reason } // ConnectionProperties - The properties of a private endpoint connection. type ConnectionProperties struct { // The list of group ids for the private endpoint connection. - GroupIDs []*string `json:"groupIds,omitempty"` + GroupIDs []*string // The private endpoint. - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateEndpoint *PrivateEndpoint // The connection state. - PrivateLinkServiceConnectionState *ConnectionPropertiesPrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + PrivateLinkServiceConnectionState *ConnectionPropertiesPrivateLinkServiceConnectionState // READ-ONLY; The provisioning state. - ProvisioningState *ConnectionPropertiesProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ConnectionPropertiesProvisioningState } // ConnectionPropertiesPrivateLinkServiceConnectionState - The connection state. type ConnectionPropertiesPrivateLinkServiceConnectionState struct { // REQUIRED; The description for the current state of a private endpoint connection. - Description *string `json:"description,omitempty"` + Description *string // REQUIRED; The status of a private endpoint connection. - Status *PrivateLinkServiceConnectionStatus `json:"status,omitempty"` + Status *PrivateLinkServiceConnectionStatus // Actions required for a private endpoint connection. - ActionsRequired *string `json:"actionsRequired,omitempty"` + ActionsRequired *string } // ConnectionState - The current state of a private endpoint connection. type ConnectionState struct { // REQUIRED; The description for the current state of a private endpoint connection. - Description *string `json:"description,omitempty"` + Description *string // REQUIRED; The status of a private endpoint connection. - Status *PrivateLinkServiceConnectionStatus `json:"status,omitempty"` + Status *PrivateLinkServiceConnectionStatus // Actions required for a private endpoint connection. - ActionsRequired *string `json:"actionsRequired,omitempty"` + ActionsRequired *string } // Description - The description of the DigitalTwins service. type Description struct { // REQUIRED; The resource location. - Location *string `json:"location,omitempty"` + Location *string // The managed identity for the DigitalTwinsInstance. - Identity *Identity `json:"identity,omitempty"` + Identity *Identity // DigitalTwins instance properties. - Properties *Properties `json:"properties,omitempty"` + Properties *Properties // The resource tags. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; The resource identifier. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The resource name. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the DigitalTwinsInstance. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The resource type. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // DescriptionListResult - A list of DigitalTwins description objects with a next link. type DescriptionListResult struct { // The link used to get the next page of DigitalTwins description objects. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // A list of DigitalTwins description objects. - Value []*Description `json:"value,omitempty"` -} - -// EndpointClientBeginCreateOrUpdateOptions contains the optional parameters for the EndpointClient.BeginCreateOrUpdate method. -type EndpointClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EndpointClientBeginDeleteOptions contains the optional parameters for the EndpointClient.BeginDelete method. -type EndpointClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EndpointClientGetOptions contains the optional parameters for the EndpointClient.Get method. -type EndpointClientGetOptions struct { - // placeholder for future optional parameters -} - -// EndpointClientListOptions contains the optional parameters for the EndpointClient.NewListPager method. -type EndpointClientListOptions struct { - // placeholder for future optional parameters + Value []*Description } // EndpointResource - DigitalTwinsInstance endpoint resource. type EndpointResource struct { // REQUIRED; DigitalTwinsInstance endpoint resource properties. - Properties EndpointResourcePropertiesClassification `json:"properties,omitempty"` + Properties EndpointResourcePropertiesClassification // READ-ONLY; The resource identifier. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Extension resource name. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The resource type. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // EndpointResourceListResult - A list of DigitalTwinsInstance Endpoints with a next link. type EndpointResourceListResult struct { // The link used to get the next page of DigitalTwinsInstance Endpoints. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // A list of DigitalTwinsInstance Endpoints. - Value []*EndpointResource `json:"value,omitempty"` -} - -// EndpointResourcePropertiesClassification provides polymorphic access to related types. -// Call the interface's GetEndpointResourceProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *EndpointResourceProperties, *EventGrid, *EventHub, *ServiceBus -type EndpointResourcePropertiesClassification interface { - // GetEndpointResourceProperties returns the EndpointResourceProperties content of the underlying type. - GetEndpointResourceProperties() *EndpointResourceProperties + Value []*EndpointResource } // EndpointResourceProperties - Properties related to Digital Twins Endpoint type EndpointResourceProperties struct { // REQUIRED; The type of Digital Twins endpoint - EndpointType *EndpointType `json:"endpointType,omitempty"` + EndpointType *EndpointType // Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected, // a connection string must be specified (at least the primary connection // string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified. - AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"` + AuthenticationType *AuthenticationType // Dead letter storage secret for key-based authentication. Will be obfuscated during read. - DeadLetterSecret *string `json:"deadLetterSecret,omitempty"` + DeadLetterSecret *string // Dead letter storage URL for identity-based authentication. - DeadLetterURI *string `json:"deadLetterUri,omitempty"` + DeadLetterURI *string // Managed identity properties for the endpoint. - Identity *ManagedIdentityReference `json:"identity,omitempty"` + Identity *ManagedIdentityReference // READ-ONLY; Time when the Endpoint was added to DigitalTwinsInstance. - CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` + CreatedTime *time.Time // READ-ONLY; The provisioning state. - ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *EndpointProvisioningState } // GetEndpointResourceProperties implements the EndpointResourcePropertiesClassification interface for type EndpointResourceProperties. @@ -300,493 +230,443 @@ func (e *EndpointResourceProperties) GetEndpointResourceProperties() *EndpointRe // ErrorDefinition - Error definition. type ErrorDefinition struct { // READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code. - Code *string `json:"code,omitempty" azure:"ro"` + Code *string // READ-ONLY; Internal error details. - Details []*ErrorDefinition `json:"details,omitempty" azure:"ro"` + Details []*ErrorDefinition // READ-ONLY; Description of the error. - Message *string `json:"message,omitempty" azure:"ro"` + Message *string } // ErrorResponse - Error response. type ErrorResponse struct { // Error description - Error *ErrorDefinition `json:"error,omitempty"` + Error *ErrorDefinition } // EventGrid - Properties related to EventGrid. type EventGrid struct { // REQUIRED; EventGrid secondary accesskey. Will be obfuscated during read. - AccessKey1 *string `json:"accessKey1,omitempty"` + AccessKey1 *string // REQUIRED; The type of Digital Twins endpoint - EndpointType *EndpointType `json:"endpointType,omitempty"` + EndpointType *EndpointType // REQUIRED; EventGrid Topic Endpoint. - TopicEndpoint *string `json:"TopicEndpoint,omitempty"` + TopicEndpoint *string // EventGrid secondary accesskey. Will be obfuscated during read. - AccessKey2 *string `json:"accessKey2,omitempty"` + AccessKey2 *string // Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected, // a connection string must be specified (at least the primary connection // string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified. - AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"` + AuthenticationType *AuthenticationType // Dead letter storage secret for key-based authentication. Will be obfuscated during read. - DeadLetterSecret *string `json:"deadLetterSecret,omitempty"` + DeadLetterSecret *string // Dead letter storage URL for identity-based authentication. - DeadLetterURI *string `json:"deadLetterUri,omitempty"` + DeadLetterURI *string // Managed identity properties for the endpoint. - Identity *ManagedIdentityReference `json:"identity,omitempty"` + Identity *ManagedIdentityReference // READ-ONLY; Time when the Endpoint was added to DigitalTwinsInstance. - CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` + CreatedTime *time.Time // READ-ONLY; The provisioning state. - ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *EndpointProvisioningState } // GetEndpointResourceProperties implements the EndpointResourcePropertiesClassification interface for type EventGrid. func (e *EventGrid) GetEndpointResourceProperties() *EndpointResourceProperties { return &EndpointResourceProperties{ - EndpointType: e.EndpointType, - ProvisioningState: e.ProvisioningState, - CreatedTime: e.CreatedTime, AuthenticationType: e.AuthenticationType, + CreatedTime: e.CreatedTime, DeadLetterSecret: e.DeadLetterSecret, DeadLetterURI: e.DeadLetterURI, + EndpointType: e.EndpointType, Identity: e.Identity, + ProvisioningState: e.ProvisioningState, } } // EventHub - Properties related to EventHub. type EventHub struct { // REQUIRED; The type of Digital Twins endpoint - EndpointType *EndpointType `json:"endpointType,omitempty"` + EndpointType *EndpointType // Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected, // a connection string must be specified (at least the primary connection // string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified. - AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"` + AuthenticationType *AuthenticationType // PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. - ConnectionStringPrimaryKey *string `json:"connectionStringPrimaryKey,omitempty"` + ConnectionStringPrimaryKey *string // SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. - ConnectionStringSecondaryKey *string `json:"connectionStringSecondaryKey,omitempty"` + ConnectionStringSecondaryKey *string // Dead letter storage secret for key-based authentication. Will be obfuscated during read. - DeadLetterSecret *string `json:"deadLetterSecret,omitempty"` + DeadLetterSecret *string // Dead letter storage URL for identity-based authentication. - DeadLetterURI *string `json:"deadLetterUri,omitempty"` + DeadLetterURI *string // The URL of the EventHub namespace for identity-based authentication. It must include the protocol 'sb://'. - EndpointURI *string `json:"endpointUri,omitempty"` + EndpointURI *string // The EventHub name in the EventHub namespace for identity-based authentication. - EntityPath *string `json:"entityPath,omitempty"` + EntityPath *string // Managed identity properties for the endpoint. - Identity *ManagedIdentityReference `json:"identity,omitempty"` + Identity *ManagedIdentityReference // READ-ONLY; Time when the Endpoint was added to DigitalTwinsInstance. - CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` + CreatedTime *time.Time // READ-ONLY; The provisioning state. - ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *EndpointProvisioningState } // GetEndpointResourceProperties implements the EndpointResourcePropertiesClassification interface for type EventHub. func (e *EventHub) GetEndpointResourceProperties() *EndpointResourceProperties { return &EndpointResourceProperties{ - EndpointType: e.EndpointType, - ProvisioningState: e.ProvisioningState, - CreatedTime: e.CreatedTime, AuthenticationType: e.AuthenticationType, + CreatedTime: e.CreatedTime, DeadLetterSecret: e.DeadLetterSecret, DeadLetterURI: e.DeadLetterURI, + EndpointType: e.EndpointType, Identity: e.Identity, + ProvisioningState: e.ProvisioningState, } } // ExternalResource - Definition of a resource. type ExternalResource struct { // READ-ONLY; The resource identifier. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Extension resource name. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The resource type. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GroupIDInformation - The group information for creating a private endpoint on Digital Twin. type GroupIDInformation struct { // REQUIRED; The group information properties. - Properties *GroupIDInformationProperties `json:"properties,omitempty"` + Properties *GroupIDInformationProperties // The resource identifier. - ID *string `json:"id,omitempty"` + ID *string // READ-ONLY; The resource name. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The resource type. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GroupIDInformationProperties - The properties for a group information object. type GroupIDInformationProperties struct { // The group id. - GroupID *string `json:"groupId,omitempty"` + GroupID *string // The required members for a specific group id. - RequiredMembers []*string `json:"requiredMembers,omitempty"` + RequiredMembers []*string // The required DNS zones for a specific group id. - RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` + RequiredZoneNames []*string } // GroupIDInformationResponse - The available private link resources for a Digital Twin. type GroupIDInformationResponse struct { // The list of available private link resources for a Digital Twin. - Value []*GroupIDInformation `json:"value,omitempty"` + Value []*GroupIDInformation } // Identity - The managed identity for the DigitalTwinsInstance. type Identity struct { // The type of Managed Identity used by the DigitalTwinsInstance. - Type *DigitalTwinsIdentityType `json:"type,omitempty"` + Type *DigitalTwinsIdentityType // The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource // ids in the form: // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. // . - UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` + UserAssignedIdentities map[string]*UserAssignedIdentity // READ-ONLY; The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id // header in the PUT request if the resource has a systemAssigned(implicit) // identity - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` + PrincipalID *string // READ-ONLY; The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id // header in the PUT request if the resource has a systemAssigned(implicit) identity - TenantID *string `json:"tenantId,omitempty" azure:"ro"` + TenantID *string } // ManagedIdentityReference - The properties of the Managed Identity. type ManagedIdentityReference struct { // The type of managed identity used. - Type *IdentityType `json:"type,omitempty"` + Type *IdentityType // The user identity ARM resource id if the managed identity type is 'UserAssigned'. - UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` + UserAssignedIdentity *string } // Operation - DigitalTwins service REST API operation type Operation struct { // Operation properties display - Display *OperationDisplay `json:"display,omitempty"` + Display *OperationDisplay // READ-ONLY; If the operation is a data action (for data plane rbac). - IsDataAction *bool `json:"isDataAction,omitempty" azure:"ro"` + IsDataAction *bool // READ-ONLY; Operation name: {provider}/{resource}/{read | write | action | delete} - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The intended executor of the operation. - Origin *string `json:"origin,omitempty" azure:"ro"` + Origin *string // READ-ONLY; Operation properties. - Properties map[string]any `json:"properties,omitempty" azure:"ro"` + Properties map[string]any } // OperationDisplay - The object that represents the operation. type OperationDisplay struct { // READ-ONLY; Friendly description for the operation. - Description *string `json:"description,omitempty" azure:"ro"` + Description *string // READ-ONLY; Name of the operation. - Operation *string `json:"operation,omitempty" azure:"ro"` + Operation *string // READ-ONLY; Service provider: Microsoft DigitalTwins. - Provider *string `json:"provider,omitempty" azure:"ro"` + Provider *string // READ-ONLY; Resource Type: DigitalTwinsInstances. - Resource *string `json:"resource,omitempty" azure:"ro"` + Resource *string } // OperationListResult - A list of DigitalTwins service operations. It contains a list of operations and a URL link to get // the next set of results. type OperationListResult struct { // The link used to get the next page of DigitalTwins description objects. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // READ-ONLY; A list of DigitalTwins operations supported by the Microsoft.DigitalTwins resource provider. - Value []*Operation `json:"value,omitempty" azure:"ro"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters + Value []*Operation } // PatchDescription - The description of the DigitalTwins service. type PatchDescription struct { // The managed identity for the DigitalTwinsInstance. - Identity *Identity `json:"identity,omitempty"` + Identity *Identity // Properties for the DigitalTwinsInstance. - Properties *PatchProperties `json:"properties,omitempty"` + Properties *PatchProperties // Instance patch properties - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // PatchProperties - The properties of a DigitalTwinsInstance. type PatchProperties struct { // Public network access for the DigitalTwinsInstance. - PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + PublicNetworkAccess *PublicNetworkAccess } // PrivateEndpoint - The private endpoint property of a private endpoint connection. type PrivateEndpoint struct { // READ-ONLY; The resource identifier. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string } // PrivateEndpointConnection - The private endpoint connection of a Digital Twin. type PrivateEndpointConnection struct { // REQUIRED; The connection properties. - Properties *ConnectionProperties `json:"properties,omitempty"` + Properties *ConnectionProperties // READ-ONLY; The resource identifier. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The resource name. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the private endpoint connection. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// 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 -} - -// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List -// method. -type PrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters + Type *string } // PrivateEndpointConnectionsResponse - The available private link connections for a Digital Twin. type PrivateEndpointConnectionsResponse struct { // The list of available private link connections for a Digital Twin. - Value []*PrivateEndpointConnection `json:"value,omitempty"` -} - -// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. -type PrivateLinkResourcesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method. -type PrivateLinkResourcesClientListOptions struct { - // placeholder for future optional parameters + Value []*PrivateEndpointConnection } // Properties - The properties of a DigitalTwinsInstance. type Properties struct { // The private endpoint connections. - PrivateEndpointConnections []*PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + PrivateEndpointConnections []*PrivateEndpointConnection // Public network access for the DigitalTwinsInstance. - PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + PublicNetworkAccess *PublicNetworkAccess // READ-ONLY; Time when DigitalTwinsInstance was created. - CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` + CreatedTime *time.Time // READ-ONLY; Api endpoint to work with DigitalTwinsInstance. - HostName *string `json:"hostName,omitempty" azure:"ro"` + HostName *string // READ-ONLY; Time when DigitalTwinsInstance was updated. - LastUpdatedTime *time.Time `json:"lastUpdatedTime,omitempty" azure:"ro"` + LastUpdatedTime *time.Time // READ-ONLY; The provisioning state. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // Resource - The common properties of a DigitalTwinsInstance. type Resource struct { // REQUIRED; The resource location. - Location *string `json:"location,omitempty"` + Location *string // The managed identity for the DigitalTwinsInstance. - Identity *Identity `json:"identity,omitempty"` + Identity *Identity // The resource tags. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; The resource identifier. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The resource name. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the DigitalTwinsInstance. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The resource type. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ServiceBus - Properties related to ServiceBus. type ServiceBus struct { // REQUIRED; The type of Digital Twins endpoint - EndpointType *EndpointType `json:"endpointType,omitempty"` + EndpointType *EndpointType // Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected, // a connection string must be specified (at least the primary connection // string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified. - AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"` + AuthenticationType *AuthenticationType // Dead letter storage secret for key-based authentication. Will be obfuscated during read. - DeadLetterSecret *string `json:"deadLetterSecret,omitempty"` + DeadLetterSecret *string // Dead letter storage URL for identity-based authentication. - DeadLetterURI *string `json:"deadLetterUri,omitempty"` + DeadLetterURI *string // The URL of the ServiceBus namespace for identity-based authentication. It must include the protocol 'sb://'. - EndpointURI *string `json:"endpointUri,omitempty"` + EndpointURI *string // The ServiceBus Topic name for identity-based authentication. - EntityPath *string `json:"entityPath,omitempty"` + EntityPath *string // Managed identity properties for the endpoint. - Identity *ManagedIdentityReference `json:"identity,omitempty"` + Identity *ManagedIdentityReference // PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. - PrimaryConnectionString *string `json:"primaryConnectionString,omitempty"` + PrimaryConnectionString *string // SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. - SecondaryConnectionString *string `json:"secondaryConnectionString,omitempty"` + SecondaryConnectionString *string // READ-ONLY; Time when the Endpoint was added to DigitalTwinsInstance. - CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` + CreatedTime *time.Time // READ-ONLY; The provisioning state. - ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *EndpointProvisioningState } // GetEndpointResourceProperties implements the EndpointResourcePropertiesClassification interface for type ServiceBus. func (s *ServiceBus) GetEndpointResourceProperties() *EndpointResourceProperties { return &EndpointResourceProperties{ - EndpointType: s.EndpointType, - ProvisioningState: s.ProvisioningState, - CreatedTime: s.CreatedTime, AuthenticationType: s.AuthenticationType, + CreatedTime: s.CreatedTime, DeadLetterSecret: s.DeadLetterSecret, DeadLetterURI: s.DeadLetterURI, + EndpointType: s.EndpointType, Identity: s.Identity, + ProvisioningState: s.ProvisioningState, } } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` + CreatedAt *time.Time // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` + CreatedBy *string // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` + CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` + LastModifiedAt *time.Time // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedBy *string // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` + LastModifiedByType *CreatedByType } // TimeSeriesDatabaseConnection - Describes a time series database connection resource. type TimeSeriesDatabaseConnection struct { // Properties of a specific time series database connection. - Properties TimeSeriesDatabaseConnectionPropertiesClassification `json:"properties,omitempty"` + Properties TimeSeriesDatabaseConnectionPropertiesClassification // READ-ONLY; The resource identifier. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Extension resource name. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The resource type. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // TimeSeriesDatabaseConnectionListResult - A pageable list of time series database connection resources. type TimeSeriesDatabaseConnectionListResult struct { // The link used to get the next page of results. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // A list of time series database connection resources. - Value []*TimeSeriesDatabaseConnection `json:"value,omitempty"` -} - -// TimeSeriesDatabaseConnectionPropertiesClassification provides polymorphic access to related types. -// Call the interface's GetTimeSeriesDatabaseConnectionProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureDataExplorerConnectionProperties, *TimeSeriesDatabaseConnectionProperties -type TimeSeriesDatabaseConnectionPropertiesClassification interface { - // GetTimeSeriesDatabaseConnectionProperties returns the TimeSeriesDatabaseConnectionProperties content of the underlying type. - GetTimeSeriesDatabaseConnectionProperties() *TimeSeriesDatabaseConnectionProperties + Value []*TimeSeriesDatabaseConnection } // TimeSeriesDatabaseConnectionProperties - Properties of a time series database connection resource. type TimeSeriesDatabaseConnectionProperties struct { // REQUIRED; The type of time series connection resource. - ConnectionType *ConnectionType `json:"connectionType,omitempty"` + ConnectionType *ConnectionType // Managed identity properties for the time series database connection resource. - Identity *ManagedIdentityReference `json:"identity,omitempty"` + Identity *ManagedIdentityReference // READ-ONLY; The provisioning state. - ProvisioningState *TimeSeriesDatabaseConnectionState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *TimeSeriesDatabaseConnectionState } // GetTimeSeriesDatabaseConnectionProperties implements the TimeSeriesDatabaseConnectionPropertiesClassification interface @@ -795,41 +675,11 @@ func (t *TimeSeriesDatabaseConnectionProperties) GetTimeSeriesDatabaseConnection return t } -// TimeSeriesDatabaseConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.BeginCreateOrUpdate -// method. -type TimeSeriesDatabaseConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// TimeSeriesDatabaseConnectionsClientBeginDeleteOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.BeginDelete -// method. -type TimeSeriesDatabaseConnectionsClientBeginDeleteOptions struct { - // Specifies whether or not to attempt to clean up artifacts that were created in order to establish a connection to the time - // series database. This is a best-effort attempt that will fail if appropriate - // permissions are not in place. Setting this to 'true' does not delete any recorded data. - CleanupConnectionArtifacts *CleanupConnectionArtifacts - // Resumes the LRO from the provided token. - ResumeToken string -} - -// TimeSeriesDatabaseConnectionsClientGetOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.Get -// method. -type TimeSeriesDatabaseConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// TimeSeriesDatabaseConnectionsClientListOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.NewListPager -// method. -type TimeSeriesDatabaseConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - // UserAssignedIdentity - The information about the user assigned identity. type UserAssignedIdentity struct { // READ-ONLY; The client id of the User Assigned Identity Resource. - ClientID *string `json:"clientId,omitempty" azure:"ro"` + ClientID *string // READ-ONLY; The object id of the User Assigned Identity Resource. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` + PrincipalID *string } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/models_serde.go index 9824a6cb..87fc9d84 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdigitaltwins @@ -434,7 +433,7 @@ func (e *EndpointResourceListResult) UnmarshalJSON(data []byte) error { func (e EndpointResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "authenticationType", e.AuthenticationType) - populateTimeRFC3339(objectMap, "createdTime", e.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", e.CreatedTime) populate(objectMap, "deadLetterSecret", e.DeadLetterSecret) populate(objectMap, "deadLetterUri", e.DeadLetterURI) objectMap["endpointType"] = e.EndpointType @@ -456,7 +455,7 @@ func (e *EndpointResourceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AuthenticationType", &e.AuthenticationType) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &e.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &e.CreatedTime) delete(rawMsg, key) case "deadLetterSecret": err = unpopulate(val, "DeadLetterSecret", &e.DeadLetterSecret) @@ -549,7 +548,7 @@ func (e EventGrid) MarshalJSON() ([]byte, error) { populate(objectMap, "accessKey1", e.AccessKey1) populate(objectMap, "accessKey2", e.AccessKey2) populate(objectMap, "authenticationType", e.AuthenticationType) - populateTimeRFC3339(objectMap, "createdTime", e.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", e.CreatedTime) populate(objectMap, "deadLetterSecret", e.DeadLetterSecret) populate(objectMap, "deadLetterUri", e.DeadLetterURI) objectMap["endpointType"] = EndpointTypeEventGrid @@ -578,7 +577,7 @@ func (e *EventGrid) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AuthenticationType", &e.AuthenticationType) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &e.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &e.CreatedTime) delete(rawMsg, key) case "deadLetterSecret": err = unpopulate(val, "DeadLetterSecret", &e.DeadLetterSecret) @@ -612,7 +611,7 @@ func (e EventHub) MarshalJSON() ([]byte, error) { populate(objectMap, "authenticationType", e.AuthenticationType) populate(objectMap, "connectionStringPrimaryKey", e.ConnectionStringPrimaryKey) populate(objectMap, "connectionStringSecondaryKey", e.ConnectionStringSecondaryKey) - populateTimeRFC3339(objectMap, "createdTime", e.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", e.CreatedTime) populate(objectMap, "deadLetterSecret", e.DeadLetterSecret) populate(objectMap, "deadLetterUri", e.DeadLetterURI) objectMap["endpointType"] = EndpointTypeEventHub @@ -642,7 +641,7 @@ func (e *EventHub) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ConnectionStringSecondaryKey", &e.ConnectionStringSecondaryKey) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &e.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &e.CreatedTime) delete(rawMsg, key) case "deadLetterSecret": err = unpopulate(val, "DeadLetterSecret", &e.DeadLetterSecret) @@ -1158,9 +1157,9 @@ func (p *PrivateEndpointConnectionsResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Properties. func (p Properties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdTime", p.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", p.CreatedTime) populate(objectMap, "hostName", p.HostName) - populateTimeRFC3339(objectMap, "lastUpdatedTime", p.LastUpdatedTime) + populateDateTimeRFC3339(objectMap, "lastUpdatedTime", p.LastUpdatedTime) populate(objectMap, "privateEndpointConnections", p.PrivateEndpointConnections) populate(objectMap, "provisioningState", p.ProvisioningState) populate(objectMap, "publicNetworkAccess", p.PublicNetworkAccess) @@ -1177,13 +1176,13 @@ func (p *Properties) UnmarshalJSON(data []byte) error { var err error switch key { case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &p.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &p.CreatedTime) delete(rawMsg, key) case "hostName": err = unpopulate(val, "HostName", &p.HostName) delete(rawMsg, key) case "lastUpdatedTime": - err = unpopulateTimeRFC3339(val, "LastUpdatedTime", &p.LastUpdatedTime) + err = unpopulateDateTimeRFC3339(val, "LastUpdatedTime", &p.LastUpdatedTime) delete(rawMsg, key) case "privateEndpointConnections": err = unpopulate(val, "PrivateEndpointConnections", &p.PrivateEndpointConnections) @@ -1257,7 +1256,7 @@ func (r *Resource) UnmarshalJSON(data []byte) error { func (s ServiceBus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "authenticationType", s.AuthenticationType) - populateTimeRFC3339(objectMap, "createdTime", s.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", s.CreatedTime) populate(objectMap, "deadLetterSecret", s.DeadLetterSecret) populate(objectMap, "deadLetterUri", s.DeadLetterURI) objectMap["endpointType"] = EndpointTypeServiceBus @@ -1283,7 +1282,7 @@ func (s *ServiceBus) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AuthenticationType", &s.AuthenticationType) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &s.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &s.CreatedTime) delete(rawMsg, key) case "deadLetterSecret": err = unpopulate(val, "DeadLetterSecret", &s.DeadLetterSecret) @@ -1323,10 +1322,10 @@ func (s *ServiceBus) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -1342,7 +1341,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -1351,7 +1350,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/operations_client.go index 775862e3..6738ae7d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdigitaltwins @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,20 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/options.go new file mode 100644 index 00000000..8deac861 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/options.go @@ -0,0 +1,141 @@ +//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 armdigitaltwins + +// ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method. +type ClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method. +type ClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method. +type ClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method. +type ClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ClientGetOptions contains the optional parameters for the Client.Get method. +type ClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method. +type ClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ClientListOptions contains the optional parameters for the Client.NewListPager method. +type ClientListOptions struct { + // placeholder for future optional parameters +} + +// EndpointClientBeginCreateOrUpdateOptions contains the optional parameters for the EndpointClient.BeginCreateOrUpdate method. +type EndpointClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EndpointClientBeginDeleteOptions contains the optional parameters for the EndpointClient.BeginDelete method. +type EndpointClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EndpointClientGetOptions contains the optional parameters for the EndpointClient.Get method. +type EndpointClientGetOptions struct { + // placeholder for future optional parameters +} + +// EndpointClientListOptions contains the optional parameters for the EndpointClient.NewListPager method. +type EndpointClientListOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions 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 +} + +// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List +// method. +type PrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. +type PrivateLinkResourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method. +type PrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + +// TimeSeriesDatabaseConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.BeginCreateOrUpdate +// method. +type TimeSeriesDatabaseConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// TimeSeriesDatabaseConnectionsClientBeginDeleteOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.BeginDelete +// method. +type TimeSeriesDatabaseConnectionsClientBeginDeleteOptions struct { + // Specifies whether or not to attempt to clean up artifacts that were created in order to establish a connection to the time + // series database. This is a best-effort attempt that will fail if appropriate + // permissions are not in place. Setting this to 'true' does not delete any recorded data. + CleanupConnectionArtifacts *CleanupConnectionArtifacts + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// TimeSeriesDatabaseConnectionsClientGetOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.Get +// method. +type TimeSeriesDatabaseConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// TimeSeriesDatabaseConnectionsClientListOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.NewListPager +// method. +type TimeSeriesDatabaseConnectionsClientListOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/polymorphic_helpers.go index 4017e877..5bd68286 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/polymorphic_helpers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/polymorphic_helpers.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdigitaltwins @@ -30,7 +29,10 @@ func unmarshalEndpointResourcePropertiesClassification(rawMsg json.RawMessage) ( default: b = &EndpointResourceProperties{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalTimeSeriesDatabaseConnectionPropertiesClassification(rawMsg json.RawMessage) (TimeSeriesDatabaseConnectionPropertiesClassification, error) { @@ -48,5 +50,8 @@ func unmarshalTimeSeriesDatabaseConnectionPropertiesClassification(rawMsg json.R default: b = &TimeSeriesDatabaseConnectionProperties{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/privateendpointconnections_client.go index cb7133de..8f060e50 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/privateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/privateendpointconnections_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdigitaltwins @@ -33,7 +32,7 @@ type PrivateEndpointConnectionsClient struct { // - 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+".PrivateEndpointConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. // // Generated from API version 2023-01-31 func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, privateEndpointConnection 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, resourceName, privateEndpointConnectionName, privateEndpointConnection, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -112,7 +122,10 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx reqQP.Set("api-version", "2023-01-31") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateEndpointConnection) + if err := runtime.MarshalAsJSON(req, privateEndpointConnection); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete private endpoint connection with the specified name. @@ -130,9 +143,14 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -141,18 +159,24 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // // Generated from API version 2023-01-31 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName 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, resourceName, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -195,18 +219,25 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get // method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, resourceName 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, resourceName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -257,18 +288,25 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // - options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List // method. func (client *PrivateEndpointConnectionsClient) List(ctx context.Context, resourceGroupName string, resourceName string, options *PrivateEndpointConnectionsClientListOptions) (PrivateEndpointConnectionsClientListResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return PrivateEndpointConnectionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/privatelinkresources_client.go index 65a6d855..3e76f420 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/privatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/privatelinkresources_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdigitaltwins @@ -33,7 +32,7 @@ type PrivateLinkResourcesClient struct { // - 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+".PrivateLinkResourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // - options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get // method. func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, resourceID 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, resourceName, resourceID, options) if err != nil { return PrivateLinkResourcesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -116,18 +122,25 @@ func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) // - options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List // method. func (client *PrivateLinkResourcesClient) List(ctx context.Context, resourceGroupName string, resourceName string, options *PrivateLinkResourcesClientListOptions) (PrivateLinkResourcesClientListResponse, error) { + var err error + const operationName = "PrivateLinkResourcesClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return PrivateLinkResourcesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/response_types.go index 818fd500..4137905c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/response_types.go @@ -3,74 +3,86 @@ // 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. +// 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. -// DO NOT EDIT. package armdigitaltwins // ClientCheckNameAvailabilityResponse contains the response from method Client.CheckNameAvailability. type ClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. CheckNameResult } // ClientCreateOrUpdateResponse contains the response from method Client.BeginCreateOrUpdate. type ClientCreateOrUpdateResponse struct { + // The description of the DigitalTwins service. Description } // ClientDeleteResponse contains the response from method Client.BeginDelete. type ClientDeleteResponse struct { + // The description of the DigitalTwins service. Description } // ClientGetResponse contains the response from method Client.Get. type ClientGetResponse struct { + // The description of the DigitalTwins service. Description } // ClientListByResourceGroupResponse contains the response from method Client.NewListByResourceGroupPager. type ClientListByResourceGroupResponse struct { + // A list of DigitalTwins description objects with a next link. DescriptionListResult } // ClientListResponse contains the response from method Client.NewListPager. type ClientListResponse struct { + // A list of DigitalTwins description objects with a next link. DescriptionListResult } // ClientUpdateResponse contains the response from method Client.BeginUpdate. type ClientUpdateResponse struct { + // The description of the DigitalTwins service. Description } // EndpointClientCreateOrUpdateResponse contains the response from method EndpointClient.BeginCreateOrUpdate. type EndpointClientCreateOrUpdateResponse struct { + // DigitalTwinsInstance endpoint resource. EndpointResource } // EndpointClientDeleteResponse contains the response from method EndpointClient.BeginDelete. type EndpointClientDeleteResponse struct { + // DigitalTwinsInstance endpoint resource. EndpointResource } // EndpointClientGetResponse contains the response from method EndpointClient.Get. type EndpointClientGetResponse struct { + // DigitalTwinsInstance endpoint resource. EndpointResource } // EndpointClientListResponse contains the response from method EndpointClient.NewListPager. type EndpointClientListResponse struct { + // A list of DigitalTwinsInstance Endpoints with a next link. EndpointResourceListResult } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // A list of DigitalTwins service operations. It contains a list of operations and a URL link to get the next set of results. OperationListResult } // PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate. type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct { + // The private endpoint connection of a Digital Twin. PrivateEndpointConnection } @@ -81,40 +93,48 @@ type PrivateEndpointConnectionsClientDeleteResponse struct { // PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. type PrivateEndpointConnectionsClientGetResponse struct { + // The private endpoint connection of a Digital Twin. PrivateEndpointConnection } // PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.List. type PrivateEndpointConnectionsClientListResponse struct { + // The available private link connections for a Digital Twin. PrivateEndpointConnectionsResponse } // PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get. type PrivateLinkResourcesClientGetResponse struct { + // The group information for creating a private endpoint on Digital Twin. GroupIDInformation } // PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.List. type PrivateLinkResourcesClientListResponse struct { + // The available private link resources for a Digital Twin. GroupIDInformationResponse } // TimeSeriesDatabaseConnectionsClientCreateOrUpdateResponse contains the response from method TimeSeriesDatabaseConnectionsClient.BeginCreateOrUpdate. type TimeSeriesDatabaseConnectionsClientCreateOrUpdateResponse struct { + // Describes a time series database connection resource. TimeSeriesDatabaseConnection } // TimeSeriesDatabaseConnectionsClientDeleteResponse contains the response from method TimeSeriesDatabaseConnectionsClient.BeginDelete. type TimeSeriesDatabaseConnectionsClientDeleteResponse struct { + // Describes a time series database connection resource. TimeSeriesDatabaseConnection } // TimeSeriesDatabaseConnectionsClientGetResponse contains the response from method TimeSeriesDatabaseConnectionsClient.Get. type TimeSeriesDatabaseConnectionsClientGetResponse struct { + // Describes a time series database connection resource. TimeSeriesDatabaseConnection } // TimeSeriesDatabaseConnectionsClientListResponse contains the response from method TimeSeriesDatabaseConnectionsClient.NewListPager. type TimeSeriesDatabaseConnectionsClientListResponse struct { + // A pageable list of time series database connection resources. TimeSeriesDatabaseConnectionListResult } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/time_rfc3339.go index 6792d2dc..3ccb90b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdigitaltwins @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/timeseriesdatabaseconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/timeseriesdatabaseconnections_client.go index ccd9a32a..c8e70684 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/timeseriesdatabaseconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins/timeseriesdatabaseconnections_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdigitaltwins @@ -33,7 +32,7 @@ type TimeSeriesDatabaseConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTimeSeriesDatabaseConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TimeSeriesDatabaseConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".TimeSeriesDatabaseConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *TimeSeriesDatabaseConnectionsClient) BeginCreateOrUpdate(ctx conte if err != nil { return nil, err } - return runtime.NewPoller[TimeSeriesDatabaseConnectionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TimeSeriesDatabaseConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[TimeSeriesDatabaseConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[TimeSeriesDatabaseConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *TimeSeriesDatabaseConnectionsClient) BeginCreateOrUpdate(ctx conte // // Generated from API version 2023-01-31 func (client *TimeSeriesDatabaseConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, timeSeriesDatabaseConnectionName string, timeSeriesDatabaseConnectionDescription TimeSeriesDatabaseConnection, options *TimeSeriesDatabaseConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "TimeSeriesDatabaseConnectionsClient.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, resourceName, timeSeriesDatabaseConnectionName, timeSeriesDatabaseConnectionDescription, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -112,7 +122,10 @@ func (client *TimeSeriesDatabaseConnectionsClient) createOrUpdateCreateRequest(c reqQP.Set("api-version", "2023-01-31") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, timeSeriesDatabaseConnectionDescription) + if err := runtime.MarshalAsJSON(req, timeSeriesDatabaseConnectionDescription); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a time series database connection. @@ -130,9 +143,14 @@ func (client *TimeSeriesDatabaseConnectionsClient) BeginDelete(ctx context.Conte if err != nil { return nil, err } - return runtime.NewPoller[TimeSeriesDatabaseConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TimeSeriesDatabaseConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[TimeSeriesDatabaseConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[TimeSeriesDatabaseConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -141,18 +159,24 @@ func (client *TimeSeriesDatabaseConnectionsClient) BeginDelete(ctx context.Conte // // Generated from API version 2023-01-31 func (client *TimeSeriesDatabaseConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, timeSeriesDatabaseConnectionName string, options *TimeSeriesDatabaseConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "TimeSeriesDatabaseConnectionsClient.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, resourceName, timeSeriesDatabaseConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -198,18 +222,25 @@ func (client *TimeSeriesDatabaseConnectionsClient) deleteCreateRequest(ctx conte // - options - TimeSeriesDatabaseConnectionsClientGetOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.Get // method. func (client *TimeSeriesDatabaseConnectionsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, timeSeriesDatabaseConnectionName string, options *TimeSeriesDatabaseConnectionsClientGetOptions) (TimeSeriesDatabaseConnectionsClientGetResponse, error) { + var err error + const operationName = "TimeSeriesDatabaseConnectionsClient.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, resourceName, timeSeriesDatabaseConnectionName, options) if err != nil { return TimeSeriesDatabaseConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TimeSeriesDatabaseConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TimeSeriesDatabaseConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TimeSeriesDatabaseConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -264,25 +295,20 @@ func (client *TimeSeriesDatabaseConnectionsClient) NewListPager(resourceGroupNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *TimeSeriesDatabaseConnectionsClientListResponse) (TimeSeriesDatabaseConnectionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, resourceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TimeSeriesDatabaseConnectionsClient.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, resourceName, options) + }, nil) if err != nil { return TimeSeriesDatabaseConnectionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return TimeSeriesDatabaseConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TimeSeriesDatabaseConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/CHANGELOG.md index 49fc56c1..2e4a6b64 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.2.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + ## 1.1.0 (2023-03-28) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/README.md index 4f4ab5fa..29b21e8c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewDomainServiceOperationsClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/autorest.md index 7914251e..ebe74841 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/autorest.md @@ -8,5 +8,5 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0 +module-version: 1.2.0 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/client.go index c82b1941..b95d674e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdomainservices @@ -34,7 +33,7 @@ type Client struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { - cl, err := arm.NewClient(moduleName+".Client", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,9 +60,14 @@ func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -74,18 +78,24 @@ func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceGroupName // // Generated from API version 2021-05-01 func (client *Client) createOrUpdate(ctx context.Context, resourceGroupName string, domainServiceName string, domainService DomainService, options *ClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "Client.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, domainServiceName, domainService, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -111,7 +121,10 @@ func (client *Client) createOrUpdateCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2021-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainService) + if err := runtime.MarshalAsJSON(req, domainService); err != nil { + return nil, err + } + return req, nil } // BeginDelete - The Delete Domain Service operation deletes an existing Domain Service. @@ -127,9 +140,14 @@ func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, if err != nil { return nil, err } - return runtime.NewPoller[ClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,18 +156,24 @@ func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, // // Generated from API version 2021-05-01 func (client *Client) deleteOperation(ctx context.Context, resourceGroupName string, domainServiceName string, options *ClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "Client.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, domainServiceName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -186,18 +210,25 @@ func (client *Client) deleteCreateRequest(ctx context.Context, resourceGroupName // - domainServiceName - The name of the domain service. // - options - ClientGetOptions contains the optional parameters for the Client.Get method. func (client *Client) Get(ctx context.Context, resourceGroupName string, domainServiceName string, options *ClientGetOptions) (ClientGetResponse, error) { + var err error + const operationName = "Client.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, domainServiceName, options) if err != nil { return ClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -246,25 +277,20 @@ func (client *Client) NewListPager(options *ClientListOptions) *runtime.Pager[Cl return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ClientListResponse) (ClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 ClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -308,25 +334,20 @@ func (client *Client) NewListByResourceGroupPager(resourceGroupName string, opti return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ClientListByResourceGroupResponse) (ClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.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 ClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -376,9 +397,14 @@ func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, if err != nil { return nil, err } - return runtime.NewPoller[ClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -388,18 +414,24 @@ func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, // // Generated from API version 2021-05-01 func (client *Client) update(ctx context.Context, resourceGroupName string, domainServiceName string, domainService DomainService, options *ClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "Client.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, domainServiceName, domainService, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -425,5 +457,8 @@ func (client *Client) updateCreateRequest(ctx context.Context, resourceGroupName reqQP.Set("api-version", "2021-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainService) + if err := runtime.MarshalAsJSON(req, domainService); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/client_factory.go index ed68faa1..3ab01ec6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdomainservices @@ -29,7 +28,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -39,22 +38,26 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewDomainServiceOperationsClient() *DomainServiceOperationsClient { - subClient, _ := NewDomainServiceOperationsClient(c.credential, c.options) - return subClient -} - +// NewClient creates a new instance of Client. func (c *ClientFactory) NewClient() *Client { subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOuContainerOperationsClient() *OuContainerOperationsClient { - subClient, _ := NewOuContainerOperationsClient(c.credential, c.options) +// NewDomainServiceOperationsClient creates a new instance of DomainServiceOperationsClient. +func (c *ClientFactory) NewDomainServiceOperationsClient() *DomainServiceOperationsClient { + subClient, _ := NewDomainServiceOperationsClient(c.credential, c.options) return subClient } +// NewOuContainerClient creates a new instance of OuContainerClient. func (c *ClientFactory) NewOuContainerClient() *OuContainerClient { subClient, _ := NewOuContainerClient(c.subscriptionID, c.credential, c.options) return subClient } + +// NewOuContainerOperationsClient creates a new instance of OuContainerOperationsClient. +func (c *ClientFactory) NewOuContainerOperationsClient() *OuContainerOperationsClient { + subClient, _ := NewOuContainerOperationsClient(c.credential, c.options) + return subClient +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/constants.go index 60126e7d..9e36aa5a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armdomainservices const ( - moduleName = "armdomainservices" - moduleVersion = "v1.1.0" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices" + moduleVersion = "v1.2.0" ) // CreatedByType - The type of identity that created the resource. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/domainserviceoperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/domainserviceoperations_client.go index bd8228e1..67fb33f3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/domainserviceoperations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/domainserviceoperations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdomainservices @@ -28,7 +27,7 @@ type DomainServiceOperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDomainServiceOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*DomainServiceOperationsClient, error) { - cl, err := arm.NewClient(moduleName+".DomainServiceOperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,25 +48,20 @@ func (client *DomainServiceOperationsClient) NewListPager(options *DomainService return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DomainServiceOperationsClientListResponse) (DomainServiceOperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DomainServiceOperationsClient.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 DomainServiceOperationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DomainServiceOperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainServiceOperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/models.go index 50663d6f..9b82d450 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/models.go @@ -3,538 +3,464 @@ // 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. +// 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. -// DO NOT EDIT. package armdomainservices import "time" -// ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method. -type ClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method. -type ClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method. -type ClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientGetOptions contains the optional parameters for the Client.Get method. -type ClientGetOptions struct { - // placeholder for future optional parameters -} - -// ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method. -type ClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ClientListOptions contains the optional parameters for the Client.NewListPager method. -type ClientListOptions struct { - // placeholder for future optional parameters -} - // ConfigDiagnostics - Configuration Diagnostics type ConfigDiagnostics struct { // Last domain configuration diagnostics DateTime - LastExecuted *time.Time `json:"lastExecuted,omitempty"` + LastExecuted *time.Time // List of Configuration Diagnostics validator results. - ValidatorResults []*ConfigDiagnosticsValidatorResult `json:"validatorResults,omitempty"` + ValidatorResults []*ConfigDiagnosticsValidatorResult } // ConfigDiagnosticsValidatorResult - Config Diagnostics validator result data type ConfigDiagnosticsValidatorResult struct { // List of resource config validation issues. - Issues []*ConfigDiagnosticsValidatorResultIssue `json:"issues,omitempty"` + Issues []*ConfigDiagnosticsValidatorResultIssue // Replica set location and subnet name - ReplicaSetSubnetDisplayName *string `json:"replicaSetSubnetDisplayName,omitempty"` + ReplicaSetSubnetDisplayName *string // Status for individual validator after running diagnostics. - Status *Status `json:"status,omitempty"` + Status *Status // Validator identifier - ValidatorID *string `json:"validatorId,omitempty"` + ValidatorID *string } // ConfigDiagnosticsValidatorResultIssue - Specific issue for a particular config diagnostics validator type ConfigDiagnosticsValidatorResultIssue struct { // List of domain resource property name or values used to compose a rich description. - DescriptionParams []*string `json:"descriptionParams,omitempty"` + DescriptionParams []*string // Validation issue identifier. - ID *string `json:"id,omitempty"` + ID *string } // ContainerAccount - Container Account Description type ContainerAccount struct { // The account name - AccountName *string `json:"accountName,omitempty"` + AccountName *string // The account password - Password *string `json:"password,omitempty"` + Password *string // The account spn - Spn *string `json:"spn,omitempty"` + Spn *string } // DomainSecuritySettings - Domain Security Settings type DomainSecuritySettings struct { // A flag to determine whether or not KerberosArmoring is enabled or disabled. - KerberosArmoring *KerberosArmoring `json:"kerberosArmoring,omitempty"` + KerberosArmoring *KerberosArmoring // A flag to determine whether or not KerberosRc4Encryption is enabled or disabled. - KerberosRc4Encryption *KerberosRc4Encryption `json:"kerberosRc4Encryption,omitempty"` + KerberosRc4Encryption *KerberosRc4Encryption // A flag to determine whether or not NtlmV1 is enabled or disabled. - NtlmV1 *NtlmV1 `json:"ntlmV1,omitempty"` + NtlmV1 *NtlmV1 // A flag to determine whether or not SyncKerberosPasswords is enabled or disabled. - SyncKerberosPasswords *SyncKerberosPasswords `json:"syncKerberosPasswords,omitempty"` + SyncKerberosPasswords *SyncKerberosPasswords // A flag to determine whether or not SyncNtlmPasswords is enabled or disabled. - SyncNtlmPasswords *SyncNtlmPasswords `json:"syncNtlmPasswords,omitempty"` + SyncNtlmPasswords *SyncNtlmPasswords // A flag to determine whether or not SyncOnPremPasswords is enabled or disabled. - SyncOnPremPasswords *SyncOnPremPasswords `json:"syncOnPremPasswords,omitempty"` + SyncOnPremPasswords *SyncOnPremPasswords // A flag to determine whether or not TlsV1 is enabled or disabled. - TLSV1 *TLSV1 `json:"tlsV1,omitempty"` + TLSV1 *TLSV1 } // DomainService - Domain service. type DomainService struct { // Resource etag - Etag *string `json:"etag,omitempty"` + Etag *string // Resource location - Location *string `json:"location,omitempty"` + Location *string // Domain service properties - Properties *DomainServiceProperties `json:"properties,omitempty"` + Properties *DomainServiceProperties // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // DomainServiceListResult - The response from the List Domain Services operation. type DomainServiceListResult struct { // the list of domain services. - Value []*DomainService `json:"value,omitempty"` + Value []*DomainService // READ-ONLY; The continuation token for the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DomainServiceOperationsClientListOptions contains the optional parameters for the DomainServiceOperationsClient.NewListPager -// method. -type DomainServiceOperationsClientListOptions struct { - // placeholder for future optional parameters + NextLink *string } // DomainServiceProperties - Properties of the Domain Service. type DomainServiceProperties struct { // Configuration diagnostics data containing latest execution from client. - ConfigDiagnostics *ConfigDiagnostics `json:"configDiagnostics,omitempty"` + ConfigDiagnostics *ConfigDiagnostics // Domain Configuration Type - DomainConfigurationType *string `json:"domainConfigurationType,omitempty"` + DomainConfigurationType *string // The name of the Azure domain that the user would like to deploy Domain Services to. - DomainName *string `json:"domainName,omitempty"` + DomainName *string // DomainSecurity Settings - DomainSecuritySettings *DomainSecuritySettings `json:"domainSecuritySettings,omitempty"` + DomainSecuritySettings *DomainSecuritySettings // Enabled or Disabled flag to turn on Group-based filtered sync - FilteredSync *FilteredSync `json:"filteredSync,omitempty"` + FilteredSync *FilteredSync // Secure LDAP Settings - LdapsSettings *LdapsSettings `json:"ldapsSettings,omitempty"` + LdapsSettings *LdapsSettings // Notification Settings - NotificationSettings *NotificationSettings `json:"notificationSettings,omitempty"` + NotificationSettings *NotificationSettings // List of ReplicaSets - ReplicaSets []*ReplicaSet `json:"replicaSets,omitempty"` + ReplicaSets []*ReplicaSet // Resource Forest Settings - ResourceForestSettings *ResourceForestSettings `json:"resourceForestSettings,omitempty"` + ResourceForestSettings *ResourceForestSettings // Sku Type - SKU *string `json:"sku,omitempty"` + SKU *string // READ-ONLY; Deployment Id - DeploymentID *string `json:"deploymentId,omitempty" azure:"ro"` + DeploymentID *string // READ-ONLY; Migration Properties - MigrationProperties *MigrationProperties `json:"migrationProperties,omitempty" azure:"ro"` + MigrationProperties *MigrationProperties // READ-ONLY; the current deployment or provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *string // READ-ONLY; SyncOwner ReplicaSet Id - SyncOwner *string `json:"syncOwner,omitempty" azure:"ro"` + SyncOwner *string // READ-ONLY; Azure Active Directory Tenant Id - TenantID *string `json:"tenantId,omitempty" azure:"ro"` + TenantID *string // READ-ONLY; Data Model Version - Version *int32 `json:"version,omitempty" azure:"ro"` + Version *int32 } // ForestTrust - Forest Trust Setting type ForestTrust struct { // Friendly Name - FriendlyName *string `json:"friendlyName,omitempty"` + FriendlyName *string // Remote Dns ips - RemoteDNSIPs *string `json:"remoteDnsIps,omitempty"` + RemoteDNSIPs *string // Trust Direction - TrustDirection *string `json:"trustDirection,omitempty"` + TrustDirection *string // Trust Password - TrustPassword *string `json:"trustPassword,omitempty"` + TrustPassword *string // Trusted Domain FQDN - TrustedDomainFqdn *string `json:"trustedDomainFqdn,omitempty"` + TrustedDomainFqdn *string } // HealthAlert - Health Alert Description type HealthAlert struct { // READ-ONLY; Health Alert Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Health Alert Issue - Issue *string `json:"issue,omitempty" azure:"ro"` + Issue *string // READ-ONLY; Health Alert Last Detected DateTime - LastDetected *time.Time `json:"lastDetected,omitempty" azure:"ro"` + LastDetected *time.Time // READ-ONLY; Health Alert Name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Health Alert Raised DateTime - Raised *time.Time `json:"raised,omitempty" azure:"ro"` + Raised *time.Time // READ-ONLY; Health Alert TSG Link - ResolutionURI *string `json:"resolutionUri,omitempty" azure:"ro"` + ResolutionURI *string // READ-ONLY; Health Alert Severity - Severity *string `json:"severity,omitempty" azure:"ro"` + Severity *string } // HealthMonitor - Health Monitor Description type HealthMonitor struct { // READ-ONLY; Health Monitor Details - Details *string `json:"details,omitempty" azure:"ro"` + Details *string // READ-ONLY; Health Monitor Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Health Monitor Name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string } // LdapsSettings - Secure LDAP Settings type LdapsSettings struct { // A flag to determine whether or not Secure LDAP access over the internet is enabled or disabled. - ExternalAccess *ExternalAccess `json:"externalAccess,omitempty"` + ExternalAccess *ExternalAccess // A flag to determine whether or not Secure LDAP is enabled or disabled. - Ldaps *Ldaps `json:"ldaps,omitempty"` + Ldaps *Ldaps // The certificate required to configure Secure LDAP. The parameter passed here should be a base64encoded representation of // the certificate pfx file. - PfxCertificate *string `json:"pfxCertificate,omitempty"` + PfxCertificate *string // The password to decrypt the provided Secure LDAP certificate pfx file. - PfxCertificatePassword *string `json:"pfxCertificatePassword,omitempty"` + PfxCertificatePassword *string // READ-ONLY; NotAfter DateTime of configure ldaps certificate. - CertificateNotAfter *time.Time `json:"certificateNotAfter,omitempty" azure:"ro"` + CertificateNotAfter *time.Time // READ-ONLY; Thumbprint of configure ldaps certificate. - CertificateThumbprint *string `json:"certificateThumbprint,omitempty" azure:"ro"` + CertificateThumbprint *string // READ-ONLY; Public certificate used to configure secure ldap. - PublicCertificate *string `json:"publicCertificate,omitempty" azure:"ro"` + PublicCertificate *string } // MigrationProgress - Migration Progress type MigrationProgress struct { // Completion Percentage - CompletionPercentage *float64 `json:"completionPercentage,omitempty"` + CompletionPercentage *float64 // Progress Message - ProgressMessage *string `json:"progressMessage,omitempty"` + ProgressMessage *string } // MigrationProperties - Migration Properties type MigrationProperties struct { // READ-ONLY; Migration Progress - MigrationProgress *MigrationProgress `json:"migrationProgress,omitempty" azure:"ro"` + MigrationProgress *MigrationProgress // READ-ONLY; Old Subnet Id - OldSubnetID *string `json:"oldSubnetId,omitempty" azure:"ro"` + OldSubnetID *string // READ-ONLY; Old Vnet Site Id - OldVnetSiteID *string `json:"oldVnetSiteId,omitempty" azure:"ro"` + OldVnetSiteID *string } // NotificationSettings - Settings for notification type NotificationSettings struct { // The list of additional recipients - AdditionalRecipients []*string `json:"additionalRecipients,omitempty"` + AdditionalRecipients []*string // Should domain controller admins be notified - NotifyDcAdmins *NotifyDcAdmins `json:"notifyDcAdmins,omitempty"` + NotifyDcAdmins *NotifyDcAdmins // Should global admins be notified - NotifyGlobalAdmins *NotifyGlobalAdmins `json:"notifyGlobalAdmins,omitempty"` + NotifyGlobalAdmins *NotifyGlobalAdmins } // OperationDisplayInfo - The operation supported by Domain Services. type OperationDisplayInfo struct { // The description of the operation. - Description *string `json:"description,omitempty"` + Description *string // The action that users can perform, based on their permission level. - Operation *string `json:"operation,omitempty"` + Operation *string // Service provider: Domain Services. - Provider *string `json:"provider,omitempty"` + Provider *string // Resource on which the operation is performed. - Resource *string `json:"resource,omitempty"` + Resource *string } // OperationEntity - The operation supported by Domain Services. type OperationEntity struct { // The operation supported by Domain Services. - Display *OperationDisplayInfo `json:"display,omitempty"` + Display *OperationDisplayInfo // Operation name: {provider}/{resource}/{operation}. - Name *string `json:"name,omitempty"` + Name *string // The origin of the operation. - Origin *string `json:"origin,omitempty"` + Origin *string } // OperationEntityListResult - The list of domain service operation response. type OperationEntityListResult struct { // The list of operations. - Value []*OperationEntity `json:"value,omitempty"` + Value []*OperationEntity // READ-ONLY; The continuation token for the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // OuContainer - Resource for OuContainer. type OuContainer struct { // Resource etag - Etag *string `json:"etag,omitempty"` + Etag *string // Resource location - Location *string `json:"location,omitempty"` + Location *string // OuContainer properties - Properties *OuContainerProperties `json:"properties,omitempty"` + Properties *OuContainerProperties // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// OuContainerClientBeginCreateOptions contains the optional parameters for the OuContainerClient.BeginCreate method. -type OuContainerClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OuContainerClientBeginDeleteOptions contains the optional parameters for the OuContainerClient.BeginDelete method. -type OuContainerClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OuContainerClientBeginUpdateOptions contains the optional parameters for the OuContainerClient.BeginUpdate method. -type OuContainerClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OuContainerClientGetOptions contains the optional parameters for the OuContainerClient.Get method. -type OuContainerClientGetOptions struct { - // placeholder for future optional parameters -} - -// OuContainerClientListOptions contains the optional parameters for the OuContainerClient.NewListPager method. -type OuContainerClientListOptions struct { - // placeholder for future optional parameters + Type *string } // OuContainerListResult - The response from the List OuContainer operation. type OuContainerListResult struct { // The list of OuContainer. - Value []*OuContainer `json:"value,omitempty"` + Value []*OuContainer // READ-ONLY; The continuation token for the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// OuContainerOperationsClientListOptions contains the optional parameters for the OuContainerOperationsClient.NewListPager -// method. -type OuContainerOperationsClientListOptions struct { - // placeholder for future optional parameters + NextLink *string } // OuContainerProperties - Properties of the OuContainer. type OuContainerProperties struct { // The list of container accounts - Accounts []*ContainerAccount `json:"accounts,omitempty"` + Accounts []*ContainerAccount // READ-ONLY; The OuContainer name - ContainerID *string `json:"containerId,omitempty" azure:"ro"` + ContainerID *string // READ-ONLY; The Deployment id - DeploymentID *string `json:"deploymentId,omitempty" azure:"ro"` + DeploymentID *string // READ-ONLY; Distinguished Name of OuContainer instance - DistinguishedName *string `json:"distinguishedName,omitempty" azure:"ro"` + DistinguishedName *string // READ-ONLY; The domain name of Domain Services. - DomainName *string `json:"domainName,omitempty" azure:"ro"` + DomainName *string // READ-ONLY; The current deployment or provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *string // READ-ONLY; Status of OuContainer instance - ServiceStatus *string `json:"serviceStatus,omitempty" azure:"ro"` + ServiceStatus *string // READ-ONLY; Azure Active Directory tenant id - TenantID *string `json:"tenantId,omitempty" azure:"ro"` + TenantID *string } // ReplicaSet - Replica Set Definition type ReplicaSet struct { // Virtual network location - Location *string `json:"location,omitempty"` + Location *string // The name of the virtual network that Domain Services will be deployed on. The id of the subnet that Domain Services will // be deployed on. /virtualNetwork/vnetName/subnets/subnetName. - SubnetID *string `json:"subnetId,omitempty"` + SubnetID *string // READ-ONLY; List of Domain Controller IP Address - DomainControllerIPAddress []*string `json:"domainControllerIpAddress,omitempty" azure:"ro"` + DomainControllerIPAddress []*string // READ-ONLY; External access ip address. - ExternalAccessIPAddress *string `json:"externalAccessIpAddress,omitempty" azure:"ro"` + ExternalAccessIPAddress *string // READ-ONLY; List of Domain Health Alerts - HealthAlerts []*HealthAlert `json:"healthAlerts,omitempty" azure:"ro"` + HealthAlerts []*HealthAlert // READ-ONLY; Last domain evaluation run DateTime - HealthLastEvaluated *time.Time `json:"healthLastEvaluated,omitempty" azure:"ro"` + HealthLastEvaluated *time.Time // READ-ONLY; List of Domain Health Monitors - HealthMonitors []*HealthMonitor `json:"healthMonitors,omitempty" azure:"ro"` + HealthMonitors []*HealthMonitor // READ-ONLY; ReplicaSet Id - ReplicaSetID *string `json:"replicaSetId,omitempty" azure:"ro"` + ReplicaSetID *string // READ-ONLY; Status of Domain Service instance - ServiceStatus *string `json:"serviceStatus,omitempty" azure:"ro"` + ServiceStatus *string // READ-ONLY; Virtual network site id - VnetSiteID *string `json:"vnetSiteId,omitempty" azure:"ro"` + VnetSiteID *string } // Resource - The Resource model definition. type Resource struct { // Resource etag - Etag *string `json:"etag,omitempty"` + Etag *string // Resource location - Location *string `json:"location,omitempty"` + Location *string // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ResourceForestSettings - Settings for Resource Forest type ResourceForestSettings struct { // Resource Forest - ResourceForest *string `json:"resourceForest,omitempty"` + ResourceForest *string // List of settings for Resource Forest - Settings []*ForestTrust `json:"settings,omitempty"` + Settings []*ForestTrust } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` + CreatedAt *time.Time // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` + CreatedBy *string // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` + CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` + LastModifiedAt *time.Time // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedBy *string // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` + LastModifiedByType *CreatedByType } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/models_serde.go index 5b9e790f..003cb9d4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdomainservices @@ -19,7 +18,7 @@ import ( // MarshalJSON implements the json.Marshaller interface for type ConfigDiagnostics. func (c ConfigDiagnostics) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC1123(objectMap, "lastExecuted", c.LastExecuted) + populateDateTimeRFC1123(objectMap, "lastExecuted", c.LastExecuted) populate(objectMap, "validatorResults", c.ValidatorResults) return json.Marshal(objectMap) } @@ -34,7 +33,7 @@ func (c *ConfigDiagnostics) UnmarshalJSON(data []byte) error { var err error switch key { case "lastExecuted": - err = unpopulateTimeRFC1123(val, "LastExecuted", &c.LastExecuted) + err = unpopulateDateTimeRFC1123(val, "LastExecuted", &c.LastExecuted) delete(rawMsg, key) case "validatorResults": err = unpopulate(val, "ValidatorResults", &c.ValidatorResults) @@ -424,9 +423,9 @@ func (h HealthAlert) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", h.ID) populate(objectMap, "issue", h.Issue) - populateTimeRFC3339(objectMap, "lastDetected", h.LastDetected) + populateDateTimeRFC3339(objectMap, "lastDetected", h.LastDetected) populate(objectMap, "name", h.Name) - populateTimeRFC3339(objectMap, "raised", h.Raised) + populateDateTimeRFC3339(objectMap, "raised", h.Raised) populate(objectMap, "resolutionUri", h.ResolutionURI) populate(objectMap, "severity", h.Severity) return json.Marshal(objectMap) @@ -448,13 +447,13 @@ func (h *HealthAlert) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Issue", &h.Issue) delete(rawMsg, key) case "lastDetected": - err = unpopulateTimeRFC3339(val, "LastDetected", &h.LastDetected) + err = unpopulateDateTimeRFC3339(val, "LastDetected", &h.LastDetected) delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &h.Name) delete(rawMsg, key) case "raised": - err = unpopulateTimeRFC3339(val, "Raised", &h.Raised) + err = unpopulateDateTimeRFC3339(val, "Raised", &h.Raised) delete(rawMsg, key) case "resolutionUri": err = unpopulate(val, "ResolutionURI", &h.ResolutionURI) @@ -508,7 +507,7 @@ func (h *HealthMonitor) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LdapsSettings. func (l LdapsSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "certificateNotAfter", l.CertificateNotAfter) + populateDateTimeRFC3339(objectMap, "certificateNotAfter", l.CertificateNotAfter) populate(objectMap, "certificateThumbprint", l.CertificateThumbprint) populate(objectMap, "externalAccess", l.ExternalAccess) populate(objectMap, "ldaps", l.Ldaps) @@ -528,7 +527,7 @@ func (l *LdapsSettings) UnmarshalJSON(data []byte) error { var err error switch key { case "certificateNotAfter": - err = unpopulateTimeRFC3339(val, "CertificateNotAfter", &l.CertificateNotAfter) + err = unpopulateDateTimeRFC3339(val, "CertificateNotAfter", &l.CertificateNotAfter) delete(rawMsg, key) case "certificateThumbprint": err = unpopulate(val, "CertificateThumbprint", &l.CertificateThumbprint) @@ -909,7 +908,7 @@ func (r ReplicaSet) MarshalJSON() ([]byte, error) { populate(objectMap, "domainControllerIpAddress", r.DomainControllerIPAddress) populate(objectMap, "externalAccessIpAddress", r.ExternalAccessIPAddress) populate(objectMap, "healthAlerts", r.HealthAlerts) - populateTimeRFC1123(objectMap, "healthLastEvaluated", r.HealthLastEvaluated) + populateDateTimeRFC1123(objectMap, "healthLastEvaluated", r.HealthLastEvaluated) populate(objectMap, "healthMonitors", r.HealthMonitors) populate(objectMap, "location", r.Location) populate(objectMap, "replicaSetId", r.ReplicaSetID) @@ -938,7 +937,7 @@ func (r *ReplicaSet) UnmarshalJSON(data []byte) error { err = unpopulate(val, "HealthAlerts", &r.HealthAlerts) delete(rawMsg, key) case "healthLastEvaluated": - err = unpopulateTimeRFC1123(val, "HealthLastEvaluated", &r.HealthLastEvaluated) + err = unpopulateDateTimeRFC1123(val, "HealthLastEvaluated", &r.HealthLastEvaluated) delete(rawMsg, key) case "healthMonitors": err = unpopulate(val, "HealthMonitors", &r.HealthMonitors) @@ -1051,10 +1050,10 @@ func (r *ResourceForestSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -1070,7 +1069,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -1079,7 +1078,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/options.go new file mode 100644 index 00000000..35978c79 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/options.go @@ -0,0 +1,82 @@ +//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 armdomainservices + +// ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method. +type ClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method. +type ClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method. +type ClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientGetOptions contains the optional parameters for the Client.Get method. +type ClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method. +type ClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ClientListOptions contains the optional parameters for the Client.NewListPager method. +type ClientListOptions struct { + // placeholder for future optional parameters +} + +// DomainServiceOperationsClientListOptions contains the optional parameters for the DomainServiceOperationsClient.NewListPager +// method. +type DomainServiceOperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// OuContainerClientBeginCreateOptions contains the optional parameters for the OuContainerClient.BeginCreate method. +type OuContainerClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OuContainerClientBeginDeleteOptions contains the optional parameters for the OuContainerClient.BeginDelete method. +type OuContainerClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OuContainerClientBeginUpdateOptions contains the optional parameters for the OuContainerClient.BeginUpdate method. +type OuContainerClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OuContainerClientGetOptions contains the optional parameters for the OuContainerClient.Get method. +type OuContainerClientGetOptions struct { + // placeholder for future optional parameters +} + +// OuContainerClientListOptions contains the optional parameters for the OuContainerClient.NewListPager method. +type OuContainerClientListOptions struct { + // placeholder for future optional parameters +} + +// OuContainerOperationsClientListOptions contains the optional parameters for the OuContainerOperationsClient.NewListPager +// method. +type OuContainerOperationsClientListOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/oucontainer_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/oucontainer_client.go index 8a617ebe..12eecd16 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/oucontainer_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/oucontainer_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdomainservices @@ -34,7 +33,7 @@ type OuContainerClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOuContainerClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OuContainerClient, error) { - cl, err := arm.NewClient(moduleName+".OuContainerClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *OuContainerClient) BeginCreate(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[OuContainerClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OuContainerClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[OuContainerClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[OuContainerClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *OuContainerClient) BeginCreate(ctx context.Context, resourceGroupN // // Generated from API version 2021-05-01 func (client *OuContainerClient) create(ctx context.Context, resourceGroupName string, domainServiceName string, ouContainerName string, containerAccount ContainerAccount, options *OuContainerClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "OuContainerClient.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, domainServiceName, ouContainerName, containerAccount, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -112,7 +122,10 @@ func (client *OuContainerClient) createCreateRequest(ctx context.Context, resour reqQP.Set("api-version", "2021-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, containerAccount) + if err := runtime.MarshalAsJSON(req, containerAccount); err != nil { + return nil, err + } + return req, nil } // BeginDelete - The Delete OuContainer operation deletes specified OuContainer. @@ -129,9 +142,14 @@ func (client *OuContainerClient) BeginDelete(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[OuContainerClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OuContainerClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[OuContainerClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[OuContainerClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -140,18 +158,24 @@ func (client *OuContainerClient) BeginDelete(ctx context.Context, resourceGroupN // // Generated from API version 2021-05-01 func (client *OuContainerClient) deleteOperation(ctx context.Context, resourceGroupName string, domainServiceName string, ouContainerName string, options *OuContainerClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "OuContainerClient.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, domainServiceName, ouContainerName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -193,18 +217,25 @@ func (client *OuContainerClient) deleteCreateRequest(ctx context.Context, resour // - ouContainerName - The name of the OuContainer. // - options - OuContainerClientGetOptions contains the optional parameters for the OuContainerClient.Get method. func (client *OuContainerClient) Get(ctx context.Context, resourceGroupName string, domainServiceName string, ouContainerName string, options *OuContainerClientGetOptions) (OuContainerClientGetResponse, error) { + var err error + const operationName = "OuContainerClient.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, domainServiceName, ouContainerName, options) if err != nil { return OuContainerClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OuContainerClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OuContainerClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OuContainerClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -258,25 +289,20 @@ func (client *OuContainerClient) NewListPager(resourceGroupName string, domainSe return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OuContainerClientListResponse) (OuContainerClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, domainServiceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OuContainerClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OuContainerClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, domainServiceName, options) + }, nil) if err != nil { return OuContainerClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OuContainerClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -330,9 +356,14 @@ func (client *OuContainerClient) BeginUpdate(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[OuContainerClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OuContainerClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[OuContainerClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[OuContainerClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -341,18 +372,24 @@ func (client *OuContainerClient) BeginUpdate(ctx context.Context, resourceGroupN // // Generated from API version 2021-05-01 func (client *OuContainerClient) update(ctx context.Context, resourceGroupName string, domainServiceName string, ouContainerName string, containerAccount ContainerAccount, options *OuContainerClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "OuContainerClient.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, domainServiceName, ouContainerName, containerAccount, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -382,5 +419,8 @@ func (client *OuContainerClient) updateCreateRequest(ctx context.Context, resour reqQP.Set("api-version", "2021-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, containerAccount) + if err := runtime.MarshalAsJSON(req, containerAccount); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/oucontaineroperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/oucontaineroperations_client.go index 5b1095e2..92d2cf04 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/oucontaineroperations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/oucontaineroperations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdomainservices @@ -28,7 +27,7 @@ type OuContainerOperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOuContainerOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OuContainerOperationsClient, error) { - cl, err := arm.NewClient(moduleName+".OuContainerOperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,25 +48,20 @@ func (client *OuContainerOperationsClient) NewListPager(options *OuContainerOper return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OuContainerOperationsClientListResponse) (OuContainerOperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OuContainerOperationsClient.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 OuContainerOperationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OuContainerOperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OuContainerOperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/response_types.go index 0ed4b071..2c477ae0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/response_types.go @@ -3,14 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armdomainservices // ClientCreateOrUpdateResponse contains the response from method Client.BeginCreateOrUpdate. type ClientCreateOrUpdateResponse struct { + // Domain service. DomainService } @@ -21,31 +21,37 @@ type ClientDeleteResponse struct { // ClientGetResponse contains the response from method Client.Get. type ClientGetResponse struct { + // Domain service. DomainService } // ClientListByResourceGroupResponse contains the response from method Client.NewListByResourceGroupPager. type ClientListByResourceGroupResponse struct { + // The response from the List Domain Services operation. DomainServiceListResult } // ClientListResponse contains the response from method Client.NewListPager. type ClientListResponse struct { + // The response from the List Domain Services operation. DomainServiceListResult } // ClientUpdateResponse contains the response from method Client.BeginUpdate. type ClientUpdateResponse struct { + // Domain service. DomainService } // DomainServiceOperationsClientListResponse contains the response from method DomainServiceOperationsClient.NewListPager. type DomainServiceOperationsClientListResponse struct { + // The list of domain service operation response. OperationEntityListResult } // OuContainerClientCreateResponse contains the response from method OuContainerClient.BeginCreate. type OuContainerClientCreateResponse struct { + // Resource for OuContainer. OuContainer } @@ -56,20 +62,24 @@ type OuContainerClientDeleteResponse struct { // OuContainerClientGetResponse contains the response from method OuContainerClient.Get. type OuContainerClientGetResponse struct { + // Resource for OuContainer. OuContainer } // OuContainerClientListResponse contains the response from method OuContainerClient.NewListPager. type OuContainerClientListResponse struct { + // The response from the List OuContainer operation. OuContainerListResult } // OuContainerClientUpdateResponse contains the response from method OuContainerClient.BeginUpdate. type OuContainerClientUpdateResponse struct { + // Resource for OuContainer. OuContainer } // OuContainerOperationsClientListResponse contains the response from method OuContainerOperationsClient.NewListPager. type OuContainerOperationsClientListResponse struct { + // The list of domain service operation response. OperationEntityListResult } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/time_rfc1123.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/time_rfc1123.go index 110f9512..ad427028 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/time_rfc1123.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/time_rfc1123.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdomainservices @@ -19,34 +18,34 @@ import ( ) const ( - rfc1123JSON = `"` + time.RFC1123 + `"` + dateTimeRFC1123JSON = `"` + time.RFC1123 + `"` ) -type timeRFC1123 time.Time +type dateTimeRFC1123 time.Time -func (t timeRFC1123) MarshalJSON() ([]byte, error) { - b := []byte(time.Time(t).Format(rfc1123JSON)) +func (t dateTimeRFC1123) MarshalJSON() ([]byte, error) { + b := []byte(time.Time(t).Format(dateTimeRFC1123JSON)) return b, nil } -func (t timeRFC1123) MarshalText() ([]byte, error) { +func (t dateTimeRFC1123) MarshalText() ([]byte, error) { b := []byte(time.Time(t).Format(time.RFC1123)) return b, nil } -func (t *timeRFC1123) UnmarshalJSON(data []byte) error { - p, err := time.Parse(rfc1123JSON, strings.ToUpper(string(data))) - *t = timeRFC1123(p) +func (t *dateTimeRFC1123) UnmarshalJSON(data []byte) error { + p, err := time.Parse(dateTimeRFC1123JSON, strings.ToUpper(string(data))) + *t = dateTimeRFC1123(p) return err } -func (t *timeRFC1123) UnmarshalText(data []byte) error { +func (t *dateTimeRFC1123) UnmarshalText(data []byte) error { p, err := time.Parse(time.RFC1123, string(data)) - *t = timeRFC1123(p) + *t = dateTimeRFC1123(p) return err } -func populateTimeRFC1123(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC1123(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -55,14 +54,14 @@ func populateTimeRFC1123(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC1123)(t) + m[k] = (*dateTimeRFC1123)(t) } -func unpopulateTimeRFC1123(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC1123(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC1123 + var aux dateTimeRFC1123 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/time_rfc3339.go index 4f3a6dda..b17c346d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armdomainservices @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/CHANGELOG.md index 2993282b..d33acf37 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/CHANGELOG.md @@ -1,5 +1,27 @@ # Release History +## 1.4.0 (2024-04-26) +### Features Added + +- New value `ActionTypeJSChallenge` added to enum type `ActionType` +- New enum type `ScrubbingRuleEntryMatchOperator` with values `ScrubbingRuleEntryMatchOperatorEquals`, `ScrubbingRuleEntryMatchOperatorEqualsAny` +- New enum type `ScrubbingRuleEntryMatchVariable` with values `ScrubbingRuleEntryMatchVariableQueryStringArgNames`, `ScrubbingRuleEntryMatchVariableRequestBodyJSONArgNames`, `ScrubbingRuleEntryMatchVariableRequestBodyPostArgNames`, `ScrubbingRuleEntryMatchVariableRequestCookieNames`, `ScrubbingRuleEntryMatchVariableRequestHeaderNames`, `ScrubbingRuleEntryMatchVariableRequestIPAddress`, `ScrubbingRuleEntryMatchVariableRequestURI` +- New enum type `ScrubbingRuleEntryState` with values `ScrubbingRuleEntryStateDisabled`, `ScrubbingRuleEntryStateEnabled` +- New enum type `VariableName` with values `VariableNameGeoLocation`, `VariableNameNone`, `VariableNameSocketAddr` +- New enum type `WebApplicationFirewallScrubbingState` with values `WebApplicationFirewallScrubbingStateDisabled`, `WebApplicationFirewallScrubbingStateEnabled` +- New struct `GroupByVariable` +- New struct `PolicySettingsLogScrubbing` +- New struct `WebApplicationFirewallScrubbingRules` +- New field `GroupBy` in struct `CustomRule` +- New field `JavascriptChallengeExpirationInMinutes`, `LogScrubbing` in struct `PolicySettings` + + +## 1.3.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + ## 1.2.0 (2023-05-26) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/README.md index 92ca8230..9bb3af32 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/README.md @@ -57,9 +57,16 @@ clientFactory, err := armfrontdoor.NewClientFactory(, cred, &op 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.NewFrontDoorsClient() +client := clientFactory.NewEndpointsClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/autorest.md index bd7621cd..9feb369e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/frontdoor/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/frontdoor/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.2.0 -tag: package-2022-05 +module-version: 1.4.0 +tag: package-2024-02 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/ci.yml index 4d377c01..da7171b1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/ci.yml +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/ci.yml @@ -21,8 +21,8 @@ pr: include: - sdk/resourcemanager/frontdoor/armfrontdoor/ -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/frontdoor/armfrontdoor' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/client_factory.go index 7caae2c7..1ac77548 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -18,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. @@ -29,72 +27,107 @@ 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+".ClientFactory", 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 } -func (c *ClientFactory) NewPoliciesClient() *PoliciesClient { - subClient, _ := NewPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewEndpointsClient creates a new instance of EndpointsClient. +func (c *ClientFactory) NewEndpointsClient() *EndpointsClient { + return &EndpointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewManagedRuleSetsClient() *ManagedRuleSetsClient { - subClient, _ := NewManagedRuleSetsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewExperimentsClient creates a new instance of ExperimentsClient. +func (c *ClientFactory) NewExperimentsClient() *ExperimentsClient { + return &ExperimentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewNameAvailabilityClient() *NameAvailabilityClient { - subClient, _ := NewNameAvailabilityClient(c.credential, c.options) - return subClient +// NewFrontDoorsClient creates a new instance of FrontDoorsClient. +func (c *ClientFactory) NewFrontDoorsClient() *FrontDoorsClient { + return &FrontDoorsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewNameAvailabilityWithSubscriptionClient() *NameAvailabilityWithSubscriptionClient { - subClient, _ := NewNameAvailabilityWithSubscriptionClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewFrontendEndpointsClient creates a new instance of FrontendEndpointsClient. +func (c *ClientFactory) NewFrontendEndpointsClient() *FrontendEndpointsClient { + return &FrontendEndpointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewFrontDoorsClient() *FrontDoorsClient { - subClient, _ := NewFrontDoorsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewManagedRuleSetsClient creates a new instance of ManagedRuleSetsClient. +func (c *ClientFactory) NewManagedRuleSetsClient() *ManagedRuleSetsClient { + return &ManagedRuleSetsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewFrontendEndpointsClient() *FrontendEndpointsClient { - subClient, _ := NewFrontendEndpointsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewNameAvailabilityClient creates a new instance of NameAvailabilityClient. +func (c *ClientFactory) NewNameAvailabilityClient() *NameAvailabilityClient { + return &NameAvailabilityClient{ + internal: c.internal, + } } -func (c *ClientFactory) NewEndpointsClient() *EndpointsClient { - subClient, _ := NewEndpointsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewNameAvailabilityWithSubscriptionClient creates a new instance of NameAvailabilityWithSubscriptionClient. +func (c *ClientFactory) NewNameAvailabilityWithSubscriptionClient() *NameAvailabilityWithSubscriptionClient { + return &NameAvailabilityWithSubscriptionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewRulesEnginesClient() *RulesEnginesClient { - subClient, _ := NewRulesEnginesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewNetworkExperimentProfilesClient creates a new instance of NetworkExperimentProfilesClient. +func (c *ClientFactory) NewNetworkExperimentProfilesClient() *NetworkExperimentProfilesClient { + return &NetworkExperimentProfilesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewNetworkExperimentProfilesClient() *NetworkExperimentProfilesClient { - subClient, _ := NewNetworkExperimentProfilesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewPoliciesClient creates a new instance of PoliciesClient. +func (c *ClientFactory) NewPoliciesClient() *PoliciesClient { + return &PoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewPreconfiguredEndpointsClient creates a new instance of PreconfiguredEndpointsClient. func (c *ClientFactory) NewPreconfiguredEndpointsClient() *PreconfiguredEndpointsClient { - subClient, _ := NewPreconfiguredEndpointsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &PreconfiguredEndpointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewExperimentsClient() *ExperimentsClient { - subClient, _ := NewExperimentsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewReportsClient creates a new instance of ReportsClient. +func (c *ClientFactory) NewReportsClient() *ReportsClient { + return &ReportsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewReportsClient() *ReportsClient { - subClient, _ := NewReportsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewRulesEnginesClient creates a new instance of RulesEnginesClient. +func (c *ClientFactory) NewRulesEnginesClient() *RulesEnginesClient { + return &RulesEnginesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/constants.go index 6dd4031b..64020abd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor const ( - moduleName = "armfrontdoor" - moduleVersion = "v1.2.0" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor" + moduleVersion = "v1.4.0" ) // ActionType - Defines the action to take on rule match. @@ -21,6 +20,7 @@ const ( ActionTypeAllow ActionType = "Allow" ActionTypeAnomalyScoring ActionType = "AnomalyScoring" ActionTypeBlock ActionType = "Block" + ActionTypeJSChallenge ActionType = "JSChallenge" ActionTypeLog ActionType = "Log" ActionTypeRedirect ActionType = "Redirect" ) @@ -31,6 +31,7 @@ func PossibleActionTypeValues() []ActionType { ActionTypeAllow, ActionTypeAnomalyScoring, ActionTypeBlock, + ActionTypeJSChallenge, ActionTypeLog, ActionTypeRedirect, } @@ -906,6 +907,65 @@ func PossibleSKUNameValues() []SKUName { } } +// ScrubbingRuleEntryMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements +// in the collection this rule applies to. +type ScrubbingRuleEntryMatchOperator string + +const ( + ScrubbingRuleEntryMatchOperatorEquals ScrubbingRuleEntryMatchOperator = "Equals" + ScrubbingRuleEntryMatchOperatorEqualsAny ScrubbingRuleEntryMatchOperator = "EqualsAny" +) + +// PossibleScrubbingRuleEntryMatchOperatorValues returns the possible values for the ScrubbingRuleEntryMatchOperator const type. +func PossibleScrubbingRuleEntryMatchOperatorValues() []ScrubbingRuleEntryMatchOperator { + return []ScrubbingRuleEntryMatchOperator{ + ScrubbingRuleEntryMatchOperatorEquals, + ScrubbingRuleEntryMatchOperatorEqualsAny, + } +} + +// ScrubbingRuleEntryMatchVariable - The variable to be scrubbed from the logs. +type ScrubbingRuleEntryMatchVariable string + +const ( + ScrubbingRuleEntryMatchVariableQueryStringArgNames ScrubbingRuleEntryMatchVariable = "QueryStringArgNames" + ScrubbingRuleEntryMatchVariableRequestBodyJSONArgNames ScrubbingRuleEntryMatchVariable = "RequestBodyJsonArgNames" + ScrubbingRuleEntryMatchVariableRequestBodyPostArgNames ScrubbingRuleEntryMatchVariable = "RequestBodyPostArgNames" + ScrubbingRuleEntryMatchVariableRequestCookieNames ScrubbingRuleEntryMatchVariable = "RequestCookieNames" + ScrubbingRuleEntryMatchVariableRequestHeaderNames ScrubbingRuleEntryMatchVariable = "RequestHeaderNames" + ScrubbingRuleEntryMatchVariableRequestIPAddress ScrubbingRuleEntryMatchVariable = "RequestIPAddress" + ScrubbingRuleEntryMatchVariableRequestURI ScrubbingRuleEntryMatchVariable = "RequestUri" +) + +// PossibleScrubbingRuleEntryMatchVariableValues returns the possible values for the ScrubbingRuleEntryMatchVariable const type. +func PossibleScrubbingRuleEntryMatchVariableValues() []ScrubbingRuleEntryMatchVariable { + return []ScrubbingRuleEntryMatchVariable{ + ScrubbingRuleEntryMatchVariableQueryStringArgNames, + ScrubbingRuleEntryMatchVariableRequestBodyJSONArgNames, + ScrubbingRuleEntryMatchVariableRequestBodyPostArgNames, + ScrubbingRuleEntryMatchVariableRequestCookieNames, + ScrubbingRuleEntryMatchVariableRequestHeaderNames, + ScrubbingRuleEntryMatchVariableRequestIPAddress, + ScrubbingRuleEntryMatchVariableRequestURI, + } +} + +// ScrubbingRuleEntryState - Defines the state of a log scrubbing rule. Default value is enabled. +type ScrubbingRuleEntryState string + +const ( + ScrubbingRuleEntryStateDisabled ScrubbingRuleEntryState = "Disabled" + ScrubbingRuleEntryStateEnabled ScrubbingRuleEntryState = "Enabled" +) + +// PossibleScrubbingRuleEntryStateValues returns the possible values for the ScrubbingRuleEntryState const type. +func PossibleScrubbingRuleEntryStateValues() []ScrubbingRuleEntryState { + return []ScrubbingRuleEntryState{ + ScrubbingRuleEntryStateDisabled, + ScrubbingRuleEntryStateEnabled, + } +} + // SessionAffinityEnabledState - Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' type SessionAffinityEnabledState string @@ -1020,3 +1080,37 @@ func PossibleTransformTypeValues() []TransformType { TransformTypeUppercase, } } + +// VariableName - Describes the supported variable for group by +type VariableName string + +const ( + VariableNameGeoLocation VariableName = "GeoLocation" + VariableNameNone VariableName = "None" + VariableNameSocketAddr VariableName = "SocketAddr" +) + +// PossibleVariableNameValues returns the possible values for the VariableName const type. +func PossibleVariableNameValues() []VariableName { + return []VariableName{ + VariableNameGeoLocation, + VariableNameNone, + VariableNameSocketAddr, + } +} + +// WebApplicationFirewallScrubbingState - State of the log scrubbing config. Default value is Enabled. +type WebApplicationFirewallScrubbingState string + +const ( + WebApplicationFirewallScrubbingStateDisabled WebApplicationFirewallScrubbingState = "Disabled" + WebApplicationFirewallScrubbingStateEnabled WebApplicationFirewallScrubbingState = "Enabled" +) + +// PossibleWebApplicationFirewallScrubbingStateValues returns the possible values for the WebApplicationFirewallScrubbingState const type. +func PossibleWebApplicationFirewallScrubbingStateValues() []WebApplicationFirewallScrubbingState { + return []WebApplicationFirewallScrubbingState{ + WebApplicationFirewallScrubbingStateDisabled, + WebApplicationFirewallScrubbingStateEnabled, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/endpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/endpoints_client.go index e467d9da..1bac6fc3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/endpoints_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/endpoints_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -34,7 +33,7 @@ type EndpointsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointsClient, error) { - cl, err := arm.NewClient(moduleName+".EndpointsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,11 +61,15 @@ func (client *EndpointsClient) BeginPurgeContent(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EndpointsClientPurgeContentResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EndpointsClientPurgeContentResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EndpointsClientPurgeContentResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EndpointsClientPurgeContentResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -75,18 +78,24 @@ func (client *EndpointsClient) BeginPurgeContent(ctx context.Context, resourceGr // // Generated from API version 2021-06-01 func (client *EndpointsClient) purgeContent(ctx context.Context, resourceGroupName string, frontDoorName string, contentFilePaths PurgeParameters, options *EndpointsClientBeginPurgeContentOptions) (*http.Response, error) { + var err error + const operationName = "EndpointsClient.BeginPurgeContent" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.purgeContentCreateRequest(ctx, resourceGroupName, frontDoorName, contentFilePaths, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // purgeContentCreateRequest creates the PurgeContent request. @@ -112,5 +121,8 @@ func (client *EndpointsClient) purgeContentCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, contentFilePaths) + if err := runtime.MarshalAsJSON(req, contentFilePaths); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/experiments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/experiments_client.go index 9e32d856..16c96362 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/experiments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/experiments_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -34,7 +33,7 @@ type ExperimentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExperimentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExperimentsClient, error) { - cl, err := arm.NewClient(moduleName+".ExperimentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,9 +60,14 @@ func (client *ExperimentsClient) BeginCreateOrUpdate(ctx context.Context, resour if err != nil { return nil, err } - return runtime.NewPoller[ExperimentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExperimentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ExperimentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExperimentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +76,24 @@ func (client *ExperimentsClient) BeginCreateOrUpdate(ctx context.Context, resour // // Generated from API version 2019-11-01 func (client *ExperimentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, profileName string, experimentName string, parameters Experiment, options *ExperimentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ExperimentsClient.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, profileName, experimentName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -113,7 +123,10 @@ func (client *ExperimentsClient) createOrUpdateCreateRequest(ctx context.Context reqQP.Set("api-version", "2019-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an Experiment @@ -130,9 +143,14 @@ func (client *ExperimentsClient) BeginDelete(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[ExperimentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExperimentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ExperimentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExperimentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -141,18 +159,24 @@ func (client *ExperimentsClient) BeginDelete(ctx context.Context, resourceGroupN // // Generated from API version 2019-11-01 func (client *ExperimentsClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, experimentName string, options *ExperimentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ExperimentsClient.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, profileName, experimentName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -194,18 +218,25 @@ func (client *ExperimentsClient) deleteCreateRequest(ctx context.Context, resour // - experimentName - The Experiment identifier associated with the Experiment // - options - ExperimentsClientGetOptions contains the optional parameters for the ExperimentsClient.Get method. func (client *ExperimentsClient) Get(ctx context.Context, resourceGroupName string, profileName string, experimentName string, options *ExperimentsClientGetOptions) (ExperimentsClientGetResponse, error) { + var err error + const operationName = "ExperimentsClient.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, profileName, experimentName, options) if err != nil { return ExperimentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExperimentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExperimentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExperimentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -260,25 +291,20 @@ func (client *ExperimentsClient) NewListByProfilePager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ExperimentsClientListByProfileResponse) (ExperimentsClientListByProfileResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExperimentsClientListByProfileResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExperimentsClient.NewListByProfilePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) + }, nil) if err != nil { return ExperimentsClientListByProfileResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExperimentsClientListByProfileResponse{}, runtime.NewResponseError(resp) - } return client.listByProfileHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -332,9 +358,14 @@ func (client *ExperimentsClient) BeginUpdate(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[ExperimentsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExperimentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ExperimentsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExperimentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -343,18 +374,24 @@ func (client *ExperimentsClient) BeginUpdate(ctx context.Context, resourceGroupN // // Generated from API version 2019-11-01 func (client *ExperimentsClient) update(ctx context.Context, resourceGroupName string, profileName string, experimentName string, parameters ExperimentUpdateModel, options *ExperimentsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ExperimentsClient.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, profileName, experimentName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -384,5 +421,8 @@ func (client *ExperimentsClient) updateCreateRequest(ctx context.Context, resour reqQP.Set("api-version", "2019-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + 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/frontdoor/armfrontdoor/frontdoors_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/frontdoors_client.go index 7286dcc8..9e118419 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/frontdoors_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/frontdoors_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -34,7 +33,7 @@ type FrontDoorsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFrontDoorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FrontDoorsClient, error) { - cl, err := arm.NewClient(moduleName+".FrontDoorsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,11 +59,15 @@ func (client *FrontDoorsClient) BeginCreateOrUpdate(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FrontDoorsClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FrontDoorsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[FrontDoorsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FrontDoorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +76,24 @@ func (client *FrontDoorsClient) BeginCreateOrUpdate(ctx context.Context, resourc // // Generated from API version 2021-06-01 func (client *FrontDoorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, frontDoorName string, frontDoorParameters FrontDoor, options *FrontDoorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FrontDoorsClient.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, frontDoorName, frontDoorParameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -110,7 +119,10 @@ func (client *FrontDoorsClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, frontDoorParameters) + if err := runtime.MarshalAsJSON(req, frontDoorParameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an existing Front Door with the specified parameters. @@ -126,11 +138,15 @@ func (client *FrontDoorsClient) BeginDelete(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FrontDoorsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FrontDoorsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[FrontDoorsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FrontDoorsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -139,18 +155,24 @@ func (client *FrontDoorsClient) BeginDelete(ctx context.Context, resourceGroupNa // // Generated from API version 2021-06-01 func (client *FrontDoorsClient) deleteOperation(ctx context.Context, resourceGroupName string, frontDoorName string, options *FrontDoorsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "FrontDoorsClient.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, frontDoorName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -187,18 +209,25 @@ func (client *FrontDoorsClient) deleteCreateRequest(ctx context.Context, resourc // - frontDoorName - Name of the Front Door which is globally unique. // - options - FrontDoorsClientGetOptions contains the optional parameters for the FrontDoorsClient.Get method. func (client *FrontDoorsClient) Get(ctx context.Context, resourceGroupName string, frontDoorName string, options *FrontDoorsClientGetOptions) (FrontDoorsClientGetResponse, error) { + var err error + const operationName = "FrontDoorsClient.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, frontDoorName, options) if err != nil { return FrontDoorsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FrontDoorsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FrontDoorsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FrontDoorsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -246,25 +275,20 @@ func (client *FrontDoorsClient) NewListPager(options *FrontDoorsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *FrontDoorsClientListResponse) (FrontDoorsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FrontDoorsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FrontDoorsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 FrontDoorsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FrontDoorsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -307,25 +331,20 @@ func (client *FrontDoorsClient) NewListByResourceGroupPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *FrontDoorsClientListByResourceGroupResponse) (FrontDoorsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FrontDoorsClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FrontDoorsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 FrontDoorsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FrontDoorsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -370,18 +389,25 @@ func (client *FrontDoorsClient) listByResourceGroupHandleResponse(resp *http.Res // - options - FrontDoorsClientValidateCustomDomainOptions contains the optional parameters for the FrontDoorsClient.ValidateCustomDomain // method. func (client *FrontDoorsClient) ValidateCustomDomain(ctx context.Context, resourceGroupName string, frontDoorName string, customDomainProperties ValidateCustomDomainInput, options *FrontDoorsClientValidateCustomDomainOptions) (FrontDoorsClientValidateCustomDomainResponse, error) { + var err error + const operationName = "FrontDoorsClient.ValidateCustomDomain" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.validateCustomDomainCreateRequest(ctx, resourceGroupName, frontDoorName, customDomainProperties, options) if err != nil { return FrontDoorsClientValidateCustomDomainResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FrontDoorsClientValidateCustomDomainResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FrontDoorsClientValidateCustomDomainResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FrontDoorsClientValidateCustomDomainResponse{}, err } - return client.validateCustomDomainHandleResponse(resp) + resp, err := client.validateCustomDomainHandleResponse(httpResp) + return resp, err } // validateCustomDomainCreateRequest creates the ValidateCustomDomain request. @@ -407,7 +433,10 @@ func (client *FrontDoorsClient) validateCustomDomainCreateRequest(ctx context.Co reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, customDomainProperties) + if err := runtime.MarshalAsJSON(req, customDomainProperties); err != nil { + return nil, err + } + return req, nil } // validateCustomDomainHandleResponse handles the ValidateCustomDomain response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/frontendendpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/frontendendpoints_client.go index 037ef26c..9dc27563 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/frontendendpoints_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/frontendendpoints_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -34,7 +33,7 @@ type FrontendEndpointsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFrontendEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FrontendEndpointsClient, error) { - cl, err := arm.NewClient(moduleName+".FrontendEndpointsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,11 +59,15 @@ func (client *FrontendEndpointsClient) BeginDisableHTTPS(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FrontendEndpointsClientDisableHTTPSResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FrontendEndpointsClientDisableHTTPSResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[FrontendEndpointsClientDisableHTTPSResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FrontendEndpointsClientDisableHTTPSResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +76,24 @@ func (client *FrontendEndpointsClient) BeginDisableHTTPS(ctx context.Context, re // // Generated from API version 2021-06-01 func (client *FrontendEndpointsClient) disableHTTPS(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string, options *FrontendEndpointsClientBeginDisableHTTPSOptions) (*http.Response, error) { + var err error + const operationName = "FrontendEndpointsClient.BeginDisableHTTPS" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.disableHTTPSCreateRequest(ctx, resourceGroupName, frontDoorName, frontendEndpointName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // disableHTTPSCreateRequest creates the DisableHTTPS request. @@ -133,11 +142,15 @@ func (client *FrontendEndpointsClient) BeginEnableHTTPS(ctx context.Context, res if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FrontendEndpointsClientEnableHTTPSResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FrontendEndpointsClientEnableHTTPSResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[FrontendEndpointsClientEnableHTTPSResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FrontendEndpointsClientEnableHTTPSResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -146,18 +159,24 @@ func (client *FrontendEndpointsClient) BeginEnableHTTPS(ctx context.Context, res // // Generated from API version 2021-06-01 func (client *FrontendEndpointsClient) enableHTTPS(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string, customHTTPSConfiguration CustomHTTPSConfiguration, options *FrontendEndpointsClientBeginEnableHTTPSOptions) (*http.Response, error) { + var err error + const operationName = "FrontendEndpointsClient.BeginEnableHTTPS" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.enableHTTPSCreateRequest(ctx, resourceGroupName, frontDoorName, frontendEndpointName, customHTTPSConfiguration, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // enableHTTPSCreateRequest creates the EnableHTTPS request. @@ -187,7 +206,10 @@ func (client *FrontendEndpointsClient) enableHTTPSCreateRequest(ctx context.Cont reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, customHTTPSConfiguration) + if err := runtime.MarshalAsJSON(req, customHTTPSConfiguration); err != nil { + return nil, err + } + return req, nil } // Get - Gets a Frontend endpoint with the specified name within the specified Front Door. @@ -199,18 +221,25 @@ func (client *FrontendEndpointsClient) enableHTTPSCreateRequest(ctx context.Cont // - frontendEndpointName - Name of the Frontend endpoint which is unique within the Front Door. // - options - FrontendEndpointsClientGetOptions contains the optional parameters for the FrontendEndpointsClient.Get method. func (client *FrontendEndpointsClient) Get(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string, options *FrontendEndpointsClientGetOptions) (FrontendEndpointsClientGetResponse, error) { + var err error + const operationName = "FrontendEndpointsClient.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, frontDoorName, frontendEndpointName, options) if err != nil { return FrontendEndpointsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FrontendEndpointsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FrontendEndpointsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FrontendEndpointsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -265,25 +294,20 @@ func (client *FrontendEndpointsClient) NewListByFrontDoorPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *FrontendEndpointsClientListByFrontDoorResponse) (FrontendEndpointsClientListByFrontDoorResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByFrontDoorCreateRequest(ctx, resourceGroupName, frontDoorName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FrontendEndpointsClientListByFrontDoorResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FrontendEndpointsClient.NewListByFrontDoorPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByFrontDoorCreateRequest(ctx, resourceGroupName, frontDoorName, options) + }, nil) if err != nil { return FrontendEndpointsClientListByFrontDoorResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FrontendEndpointsClientListByFrontDoorResponse{}, runtime.NewResponseError(resp) - } return client.listByFrontDoorHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/interfaces.go new file mode 100644 index 00000000..1b16f0e4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/interfaces.go @@ -0,0 +1,18 @@ +//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 armfrontdoor + +// RouteConfigurationClassification provides polymorphic access to related types. +// Call the interface's GetRouteConfiguration() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ForwardingConfiguration, *RedirectConfiguration, *RouteConfiguration +type RouteConfigurationClassification interface { + // GetRouteConfiguration returns the RouteConfiguration content of the underlying type. + GetRouteConfiguration() *RouteConfiguration +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/managedrulesets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/managedrulesets_client.go index f2cd82d5..d24b6ead 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/managedrulesets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/managedrulesets_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -34,7 +33,7 @@ type ManagedRuleSetsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewManagedRuleSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedRuleSetsClient, error) { - cl, err := arm.NewClient(moduleName+".ManagedRuleSetsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewManagedRuleSetsClient(subscriptionID string, credential azcore.TokenCred // NewListPager - Lists all available managed rule sets. // -// Generated from API version 2022-05-01 +// Generated from API version 2024-02-01 // - options - ManagedRuleSetsClientListOptions contains the optional parameters for the ManagedRuleSetsClient.NewListPager // method. func (client *ManagedRuleSetsClient) NewListPager(options *ManagedRuleSetsClientListOptions) *runtime.Pager[ManagedRuleSetsClientListResponse] { @@ -56,25 +55,20 @@ func (client *ManagedRuleSetsClient) NewListPager(options *ManagedRuleSetsClient return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ManagedRuleSetsClientListResponse) (ManagedRuleSetsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedRuleSetsClient.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 ManagedRuleSetsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedRuleSetsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedRuleSetsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -90,7 +84,7 @@ func (client *ManagedRuleSetsClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2024-02-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/frontdoor/armfrontdoor/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/models.go index c86dfcd9..109d51fc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -204,6 +203,9 @@ type CustomRule struct { // Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. EnabledState *CustomRuleEnabledState + // Describes the list of variables to group the rate limit requests + GroupBy []*GroupByVariable + // Describes the name of the rule. Name *string @@ -245,12 +247,6 @@ type Endpoint struct { Name *string } -// EndpointsClientBeginPurgeContentOptions contains the optional parameters for the EndpointsClient.BeginPurgeContent method. -type EndpointsClientBeginPurgeContentOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - type Error struct { Code *string Details []*ErrorDetails @@ -348,36 +344,6 @@ type ExperimentUpdateProperties struct { EnabledState *State } -// ExperimentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExperimentsClient.BeginCreateOrUpdate -// method. -type ExperimentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExperimentsClientBeginDeleteOptions contains the optional parameters for the ExperimentsClient.BeginDelete method. -type ExperimentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExperimentsClientBeginUpdateOptions contains the optional parameters for the ExperimentsClient.BeginUpdate method. -type ExperimentsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExperimentsClientGetOptions contains the optional parameters for the ExperimentsClient.Get method. -type ExperimentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExperimentsClientListByProfileOptions contains the optional parameters for the ExperimentsClient.NewListByProfilePager -// method. -type ExperimentsClientListByProfileOptions struct { - // placeholder for future optional parameters -} - // ForwardingConfiguration - Describes Forwarding Route. type ForwardingConfiguration struct { // REQUIRED @@ -425,41 +391,6 @@ type FrontDoor struct { Type *string } -// FrontDoorsClientBeginCreateOrUpdateOptions contains the optional parameters for the FrontDoorsClient.BeginCreateOrUpdate -// method. -type FrontDoorsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FrontDoorsClientBeginDeleteOptions contains the optional parameters for the FrontDoorsClient.BeginDelete method. -type FrontDoorsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FrontDoorsClientGetOptions contains the optional parameters for the FrontDoorsClient.Get method. -type FrontDoorsClientGetOptions struct { - // placeholder for future optional parameters -} - -// FrontDoorsClientListByResourceGroupOptions contains the optional parameters for the FrontDoorsClient.NewListByResourceGroupPager -// method. -type FrontDoorsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// FrontDoorsClientListOptions contains the optional parameters for the FrontDoorsClient.NewListPager method. -type FrontDoorsClientListOptions struct { - // placeholder for future optional parameters -} - -// FrontDoorsClientValidateCustomDomainOptions contains the optional parameters for the FrontDoorsClient.ValidateCustomDomain -// method. -type FrontDoorsClientValidateCustomDomainOptions struct { - // placeholder for future optional parameters -} - // FrontendEndpoint - A frontend endpoint used for routing. type FrontendEndpoint struct { // Resource ID. @@ -530,31 +461,6 @@ type FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink struct { ID *string } -// FrontendEndpointsClientBeginDisableHTTPSOptions contains the optional parameters for the FrontendEndpointsClient.BeginDisableHTTPS -// method. -type FrontendEndpointsClientBeginDisableHTTPSOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FrontendEndpointsClientBeginEnableHTTPSOptions contains the optional parameters for the FrontendEndpointsClient.BeginEnableHTTPS -// method. -type FrontendEndpointsClientBeginEnableHTTPSOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FrontendEndpointsClientGetOptions contains the optional parameters for the FrontendEndpointsClient.Get method. -type FrontendEndpointsClientGetOptions struct { - // placeholder for future optional parameters -} - -// FrontendEndpointsClientListByFrontDoorOptions contains the optional parameters for the FrontendEndpointsClient.NewListByFrontDoorPager -// method. -type FrontendEndpointsClientListByFrontDoorOptions struct { - // placeholder for future optional parameters -} - // FrontendEndpointsListResult - Result of the request to list frontend endpoints. It contains a list of Frontend endpoint // objects and a URL link to get the next set of results. type FrontendEndpointsListResult struct { @@ -565,6 +471,12 @@ type FrontendEndpointsListResult struct { Value []*FrontendEndpoint } +// GroupByVariable - Describes the variables available to group the rate limit requests +type GroupByVariable struct { + // REQUIRED; Describes the supported variable for group by + VariableName *VariableName +} + // HeaderAction - An action that can manipulate an http header. type HeaderAction struct { // REQUIRED; Which type of manipulation to apply to the header. @@ -946,11 +858,6 @@ type ManagedRuleSetList struct { ManagedRuleSets []*ManagedRuleSet } -// ManagedRuleSetsClientListOptions contains the optional parameters for the ManagedRuleSetsClient.NewListPager method. -type ManagedRuleSetsClientListOptions struct { - // placeholder for future optional parameters -} - // MatchCondition - Define a match condition. type MatchCondition struct { // REQUIRED; List of possible match values. @@ -972,90 +879,6 @@ type MatchCondition struct { Transforms []*TransformType } -// NameAvailabilityClientCheckOptions contains the optional parameters for the NameAvailabilityClient.Check method. -type NameAvailabilityClientCheckOptions struct { - // placeholder for future optional parameters -} - -// NameAvailabilityWithSubscriptionClientCheckOptions contains the optional parameters for the NameAvailabilityWithSubscriptionClient.Check -// method. -type NameAvailabilityWithSubscriptionClientCheckOptions struct { - // placeholder for future optional parameters -} - -// NetworkExperimentProfilesClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginCreateOrUpdate -// method. -type NetworkExperimentProfilesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NetworkExperimentProfilesClientBeginDeleteOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginDelete -// method. -type NetworkExperimentProfilesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NetworkExperimentProfilesClientBeginUpdateOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginUpdate -// method. -type NetworkExperimentProfilesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NetworkExperimentProfilesClientGetOptions contains the optional parameters for the NetworkExperimentProfilesClient.Get -// method. -type NetworkExperimentProfilesClientGetOptions struct { - // placeholder for future optional parameters -} - -// NetworkExperimentProfilesClientListByResourceGroupOptions contains the optional parameters for the NetworkExperimentProfilesClient.NewListByResourceGroupPager -// method. -type NetworkExperimentProfilesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// NetworkExperimentProfilesClientListOptions contains the optional parameters for the NetworkExperimentProfilesClient.NewListPager -// method. -type NetworkExperimentProfilesClientListOptions struct { - // placeholder for future optional parameters -} - -// PoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the PoliciesClient.BeginCreateOrUpdate method. -type PoliciesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PoliciesClientBeginDeleteOptions contains the optional parameters for the PoliciesClient.BeginDelete method. -type PoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PoliciesClientBeginUpdateOptions contains the optional parameters for the PoliciesClient.BeginUpdate method. -type PoliciesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method. -type PoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PoliciesClientListBySubscriptionOptions contains the optional parameters for the PoliciesClient.NewListBySubscriptionPager -// method. -type PoliciesClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// PoliciesClientListOptions contains the optional parameters for the PoliciesClient.NewListPager method. -type PoliciesClientListOptions struct { - // placeholder for future optional parameters -} - // PolicySettings - Defines top-level WebApplicationFirewallPolicy configuration settings. type PolicySettings struct { // If the action type is block, customer can override the response body. The body must be specified in base64 encoding. @@ -1067,6 +890,14 @@ type PolicySettings struct { // Describes if the policy is in enabled or disabled state. Defaults to Enabled if not specified. EnabledState *PolicyEnabledState + // Defines the JavaScript challenge cookie validity lifetime in minutes. This setting is only applicable to Premium_AzureFrontDoor. + // Value must be an integer between 5 and 1440 with the default value + // being 30. + JavascriptChallengeExpirationInMinutes *int32 + + // Defines rules that scrub sensitive fields in the Web Application Firewall logs. + LogScrubbing *PolicySettingsLogScrubbing + // Describes if it is in detection mode or prevention mode at policy level. Mode *PolicyMode @@ -1077,6 +908,15 @@ type PolicySettings struct { RequestBodyCheck *PolicyRequestBodyCheck } +// PolicySettingsLogScrubbing - Defines rules that scrub sensitive fields in the Web Application Firewall logs. +type PolicySettingsLogScrubbing struct { + // List of log scrubbing rules applied to the Web Application Firewall logs. + ScrubbingRules []*WebApplicationFirewallScrubbingRules + + // State of the log scrubbing config. Default value is Enabled. + State *WebApplicationFirewallScrubbingState +} + // PreconfiguredEndpoint - Defines the properties of a preconfigured endpoint type PreconfiguredEndpoint struct { // Resource location. @@ -1122,12 +962,6 @@ type PreconfiguredEndpointProperties struct { EndpointType *EndpointType } -// PreconfiguredEndpointsClientListOptions contains the optional parameters for the PreconfiguredEndpointsClient.NewListPager -// method. -type PreconfiguredEndpointsClientListOptions struct { - // placeholder for future optional parameters -} - // Profile - Defines an Network Experiment Profile and lists of Experiments type Profile struct { // Gets a unique read-only string that changes whenever the resource is updated. @@ -1271,22 +1105,6 @@ func (r *RedirectConfiguration) GetRouteConfiguration() *RouteConfiguration { } } -// ReportsClientGetLatencyScorecardsOptions contains the optional parameters for the ReportsClient.GetLatencyScorecards method. -type ReportsClientGetLatencyScorecardsOptions struct { - // The country associated with the Latency Scorecard. Values are country ISO codes as specified here- https://www.iso.org/iso-3166-country-codes.html - Country *string - // The end DateTime of the Latency Scorecard in UTC - EndDateTimeUTC *string -} - -// ReportsClientGetTimeseriesOptions contains the optional parameters for the ReportsClient.GetTimeseries method. -type ReportsClientGetTimeseriesOptions struct { - // The country associated with the Timeseries. Values are country ISO codes as specified here- https://www.iso.org/iso-3166-country-codes.html - Country *string - // The specific endpoint - Endpoint *string -} - // Resource - Common resource representation. type Resource struct { // Resource location. @@ -1305,15 +1123,6 @@ type Resource struct { Type *string } -// RouteConfigurationClassification provides polymorphic access to related types. -// Call the interface's GetRouteConfiguration() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ForwardingConfiguration, *RedirectConfiguration, *RouteConfiguration -type RouteConfigurationClassification interface { - // GetRouteConfiguration returns the RouteConfiguration content of the underlying type. - GetRouteConfiguration() *RouteConfiguration -} - // RouteConfiguration - Base class for all types of Route. type RouteConfiguration struct { // REQUIRED @@ -1510,30 +1319,6 @@ type RulesEngineUpdateParameters struct { Rules []*RulesEngineRule } -// RulesEnginesClientBeginCreateOrUpdateOptions contains the optional parameters for the RulesEnginesClient.BeginCreateOrUpdate -// method. -type RulesEnginesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RulesEnginesClientBeginDeleteOptions contains the optional parameters for the RulesEnginesClient.BeginDelete method. -type RulesEnginesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RulesEnginesClientGetOptions contains the optional parameters for the RulesEnginesClient.Get method. -type RulesEnginesClientGetOptions struct { - // placeholder for future optional parameters -} - -// RulesEnginesClientListByFrontDoorOptions contains the optional parameters for the RulesEnginesClient.NewListByFrontDoorPager -// method. -type RulesEnginesClientListByFrontDoorOptions struct { - // placeholder for future optional parameters -} - // SKU - The pricing tier of the web application firewall policy. type SKU struct { // Name of the pricing tier. @@ -1720,3 +1505,19 @@ type WebApplicationFirewallPolicyProperties struct { // READ-ONLY; Describes Security Policy associated with this Web Application Firewall policy. SecurityPolicyLinks []*SecurityPolicyLink } + +// WebApplicationFirewallScrubbingRules - Defines the contents of the log scrubbing rules. +type WebApplicationFirewallScrubbingRules struct { + // REQUIRED; The variable to be scrubbed from the logs. + MatchVariable *ScrubbingRuleEntryMatchVariable + + // REQUIRED; When matchVariable is a collection, operate on the selector to specify which elements in the collection this + // rule applies to. + SelectorMatchOperator *ScrubbingRuleEntryMatchOperator + + // When matchVariable is a collection, operator used to specify which elements in the collection this rule applies to. + Selector *string + + // Defines the state of a log scrubbing rule. Default value is enabled. + State *ScrubbingRuleEntryState +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/models_serde.go index 36f90cf8..ae14c711 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -473,6 +472,7 @@ func (c CustomRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "action", c.Action) populate(objectMap, "enabledState", c.EnabledState) + populate(objectMap, "groupBy", c.GroupBy) populate(objectMap, "matchConditions", c.MatchConditions) populate(objectMap, "name", c.Name) populate(objectMap, "priority", c.Priority) @@ -497,6 +497,9 @@ func (c *CustomRule) UnmarshalJSON(data []byte) error { case "enabledState": err = unpopulate(val, "EnabledState", &c.EnabledState) delete(rawMsg, key) + case "groupBy": + err = unpopulate(val, "GroupBy", &c.GroupBy) + delete(rawMsg, key) case "matchConditions": err = unpopulate(val, "MatchConditions", &c.MatchConditions) delete(rawMsg, key) @@ -1247,6 +1250,33 @@ func (f *FrontendEndpointsListResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type GroupByVariable. +func (g GroupByVariable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "variableName", g.VariableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GroupByVariable. +func (g *GroupByVariable) UnmarshalJSON(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 "variableName": + err = unpopulate(val, "VariableName", &g.VariableName) + 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 HeaderAction. func (h HeaderAction) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1619,13 +1649,13 @@ func (l LatencyScorecardProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "country", l.Country) populate(objectMap, "description", l.Description) - populateTimeRFC3339(objectMap, "endDateTimeUTC", l.EndDateTimeUTC) + populateDateTimeRFC3339(objectMap, "endDateTimeUTC", l.EndDateTimeUTC) populate(objectMap, "endpointA", l.EndpointA) populate(objectMap, "endpointB", l.EndpointB) populate(objectMap, "id", l.ID) populate(objectMap, "latencyMetrics", l.LatencyMetrics) populate(objectMap, "name", l.Name) - populateTimeRFC3339(objectMap, "startDateTimeUTC", l.StartDateTimeUTC) + populateDateTimeRFC3339(objectMap, "startDateTimeUTC", l.StartDateTimeUTC) return json.Marshal(objectMap) } @@ -1645,7 +1675,7 @@ func (l *LatencyScorecardProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Description", &l.Description) delete(rawMsg, key) case "endDateTimeUTC": - err = unpopulateTimeRFC3339(val, "EndDateTimeUTC", &l.EndDateTimeUTC) + err = unpopulateDateTimeRFC3339(val, "EndDateTimeUTC", &l.EndDateTimeUTC) delete(rawMsg, key) case "endpointA": err = unpopulate(val, "EndpointA", &l.EndpointA) @@ -1663,7 +1693,7 @@ func (l *LatencyScorecardProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Name", &l.Name) delete(rawMsg, key) case "startDateTimeUTC": - err = unpopulateTimeRFC3339(val, "StartDateTimeUTC", &l.StartDateTimeUTC) + err = unpopulateDateTimeRFC3339(val, "StartDateTimeUTC", &l.StartDateTimeUTC) delete(rawMsg, key) } if err != nil { @@ -2275,6 +2305,8 @@ func (p PolicySettings) MarshalJSON() ([]byte, error) { populate(objectMap, "customBlockResponseBody", p.CustomBlockResponseBody) populate(objectMap, "customBlockResponseStatusCode", p.CustomBlockResponseStatusCode) populate(objectMap, "enabledState", p.EnabledState) + populate(objectMap, "javascriptChallengeExpirationInMinutes", p.JavascriptChallengeExpirationInMinutes) + populate(objectMap, "logScrubbing", p.LogScrubbing) populate(objectMap, "mode", p.Mode) populate(objectMap, "redirectUrl", p.RedirectURL) populate(objectMap, "requestBodyCheck", p.RequestBodyCheck) @@ -2299,6 +2331,12 @@ func (p *PolicySettings) UnmarshalJSON(data []byte) error { case "enabledState": err = unpopulate(val, "EnabledState", &p.EnabledState) delete(rawMsg, key) + case "javascriptChallengeExpirationInMinutes": + err = unpopulate(val, "JavascriptChallengeExpirationInMinutes", &p.JavascriptChallengeExpirationInMinutes) + delete(rawMsg, key) + case "logScrubbing": + err = unpopulate(val, "LogScrubbing", &p.LogScrubbing) + delete(rawMsg, key) case "mode": err = unpopulate(val, "Mode", &p.Mode) delete(rawMsg, key) @@ -2316,6 +2354,37 @@ func (p *PolicySettings) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type PolicySettingsLogScrubbing. +func (p PolicySettingsLogScrubbing) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "scrubbingRules", p.ScrubbingRules) + populate(objectMap, "state", p.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicySettingsLogScrubbing. +func (p *PolicySettingsLogScrubbing) UnmarshalJSON(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 "scrubbingRules": + err = unpopulate(val, "ScrubbingRules", &p.ScrubbingRules) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + 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 PreconfiguredEndpoint. func (p PreconfiguredEndpoint) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3809,6 +3878,45 @@ func (w *WebApplicationFirewallPolicyProperties) UnmarshalJSON(data []byte) erro return nil } +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallScrubbingRules. +func (w WebApplicationFirewallScrubbingRules) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchVariable", w.MatchVariable) + populate(objectMap, "selector", w.Selector) + populate(objectMap, "selectorMatchOperator", w.SelectorMatchOperator) + populate(objectMap, "state", w.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallScrubbingRules. +func (w *WebApplicationFirewallScrubbingRules) UnmarshalJSON(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 "matchVariable": + err = unpopulate(val, "MatchVariable", &w.MatchVariable) + delete(rawMsg, key) + case "selector": + err = unpopulate(val, "Selector", &w.Selector) + delete(rawMsg, key) + case "selectorMatchOperator": + err = unpopulate(val, "SelectorMatchOperator", &w.SelectorMatchOperator) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &w.State) + 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 @@ -3820,7 +3928,7 @@ func populate(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/frontdoor/armfrontdoor/nameavailability_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/nameavailability_client.go index c5c91c3a..02b12d11 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/nameavailability_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/nameavailability_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -28,7 +27,7 @@ type NameAvailabilityClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewNameAvailabilityClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*NameAvailabilityClient, error) { - cl, err := arm.NewClient(moduleName+".NameAvailabilityClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -45,18 +44,25 @@ func NewNameAvailabilityClient(credential azcore.TokenCredential, options *arm.C // - checkFrontDoorNameAvailabilityInput - Input to check. // - options - NameAvailabilityClientCheckOptions contains the optional parameters for the NameAvailabilityClient.Check method. func (client *NameAvailabilityClient) Check(ctx context.Context, checkFrontDoorNameAvailabilityInput CheckNameAvailabilityInput, options *NameAvailabilityClientCheckOptions) (NameAvailabilityClientCheckResponse, error) { + var err error + const operationName = "NameAvailabilityClient.Check" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkCreateRequest(ctx, checkFrontDoorNameAvailabilityInput, options) if err != nil { return NameAvailabilityClientCheckResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NameAvailabilityClientCheckResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NameAvailabilityClientCheckResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NameAvailabilityClientCheckResponse{}, err } - return client.checkHandleResponse(resp) + resp, err := client.checkHandleResponse(httpResp) + return resp, err } // checkCreateRequest creates the Check request. @@ -70,7 +76,10 @@ func (client *NameAvailabilityClient) checkCreateRequest(ctx context.Context, ch reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, checkFrontDoorNameAvailabilityInput) + if err := runtime.MarshalAsJSON(req, checkFrontDoorNameAvailabilityInput); err != nil { + return nil, err + } + return req, nil } // checkHandleResponse handles the Check response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/nameavailabilitywithsubscription_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/nameavailabilitywithsubscription_client.go index 1377b285..0d37d39d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/nameavailabilitywithsubscription_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/nameavailabilitywithsubscription_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -34,7 +33,7 @@ type NameAvailabilityWithSubscriptionClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewNameAvailabilityWithSubscriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NameAvailabilityWithSubscriptionClient, error) { - cl, err := arm.NewClient(moduleName+".NameAvailabilityWithSubscriptionClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewNameAvailabilityWithSubscriptionClient(subscriptionID string, credential // - options - NameAvailabilityWithSubscriptionClientCheckOptions contains the optional parameters for the NameAvailabilityWithSubscriptionClient.Check // method. func (client *NameAvailabilityWithSubscriptionClient) Check(ctx context.Context, checkFrontDoorNameAvailabilityInput CheckNameAvailabilityInput, options *NameAvailabilityWithSubscriptionClientCheckOptions) (NameAvailabilityWithSubscriptionClientCheckResponse, error) { + var err error + const operationName = "NameAvailabilityWithSubscriptionClient.Check" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkCreateRequest(ctx, checkFrontDoorNameAvailabilityInput, options) if err != nil { return NameAvailabilityWithSubscriptionClientCheckResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NameAvailabilityWithSubscriptionClientCheckResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NameAvailabilityWithSubscriptionClientCheckResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NameAvailabilityWithSubscriptionClientCheckResponse{}, err } - return client.checkHandleResponse(resp) + resp, err := client.checkHandleResponse(httpResp) + return resp, err } // checkCreateRequest creates the Check request. @@ -82,7 +88,10 @@ func (client *NameAvailabilityWithSubscriptionClient) checkCreateRequest(ctx con reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, checkFrontDoorNameAvailabilityInput) + if err := runtime.MarshalAsJSON(req, checkFrontDoorNameAvailabilityInput); err != nil { + return nil, err + } + return req, nil } // checkHandleResponse handles the Check response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/networkexperimentprofiles_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/networkexperimentprofiles_client.go index c9390ce6..f4eb26ca 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/networkexperimentprofiles_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/networkexperimentprofiles_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -34,7 +33,7 @@ type NetworkExperimentProfilesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewNetworkExperimentProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkExperimentProfilesClient, error) { - cl, err := arm.NewClient(moduleName+".NetworkExperimentProfilesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *NetworkExperimentProfilesClient) BeginCreateOrUpdate(ctx context.C if err != nil { return nil, err } - return runtime.NewPoller[NetworkExperimentProfilesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NetworkExperimentProfilesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[NetworkExperimentProfilesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NetworkExperimentProfilesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *NetworkExperimentProfilesClient) BeginCreateOrUpdate(ctx context.C // // Generated from API version 2019-11-01 func (client *NetworkExperimentProfilesClient) createOrUpdate(ctx context.Context, profileName string, resourceGroupName string, parameters Profile, options *NetworkExperimentProfilesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "NetworkExperimentProfilesClient.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, profileName, resourceGroupName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -108,7 +118,10 @@ func (client *NetworkExperimentProfilesClient) createOrUpdateCreateRequest(ctx c reqQP.Set("api-version", "2019-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an NetworkExperiment Profile by ProfileName @@ -125,9 +138,14 @@ func (client *NetworkExperimentProfilesClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[NetworkExperimentProfilesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NetworkExperimentProfilesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[NetworkExperimentProfilesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NetworkExperimentProfilesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -136,18 +154,24 @@ func (client *NetworkExperimentProfilesClient) BeginDelete(ctx context.Context, // // Generated from API version 2019-11-01 func (client *NetworkExperimentProfilesClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, options *NetworkExperimentProfilesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "NetworkExperimentProfilesClient.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, profileName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -185,18 +209,25 @@ func (client *NetworkExperimentProfilesClient) deleteCreateRequest(ctx context.C // - options - NetworkExperimentProfilesClientGetOptions contains the optional parameters for the NetworkExperimentProfilesClient.Get // method. func (client *NetworkExperimentProfilesClient) Get(ctx context.Context, resourceGroupName string, profileName string, options *NetworkExperimentProfilesClientGetOptions) (NetworkExperimentProfilesClientGetResponse, error) { + var err error + const operationName = "NetworkExperimentProfilesClient.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, profileName, options) if err != nil { return NetworkExperimentProfilesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NetworkExperimentProfilesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NetworkExperimentProfilesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NetworkExperimentProfilesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -245,25 +276,20 @@ func (client *NetworkExperimentProfilesClient) NewListPager(options *NetworkExpe return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *NetworkExperimentProfilesClientListResponse) (NetworkExperimentProfilesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return NetworkExperimentProfilesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NetworkExperimentProfilesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 NetworkExperimentProfilesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NetworkExperimentProfilesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -306,25 +332,20 @@ func (client *NetworkExperimentProfilesClient) NewListByResourceGroupPager(resou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *NetworkExperimentProfilesClientListByResourceGroupResponse) (NetworkExperimentProfilesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NetworkExperimentProfilesClient.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 NetworkExperimentProfilesClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return NetworkExperimentProfilesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NetworkExperimentProfilesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -374,9 +395,14 @@ func (client *NetworkExperimentProfilesClient) BeginUpdate(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[NetworkExperimentProfilesClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NetworkExperimentProfilesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[NetworkExperimentProfilesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NetworkExperimentProfilesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -385,18 +411,24 @@ func (client *NetworkExperimentProfilesClient) BeginUpdate(ctx context.Context, // // Generated from API version 2019-11-01 func (client *NetworkExperimentProfilesClient) update(ctx context.Context, resourceGroupName string, profileName string, parameters ProfileUpdateModel, options *NetworkExperimentProfilesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "NetworkExperimentProfilesClient.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, profileName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -422,5 +454,8 @@ func (client *NetworkExperimentProfilesClient) updateCreateRequest(ctx context.C reqQP.Set("api-version", "2019-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + 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/frontdoor/armfrontdoor/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/options.go new file mode 100644 index 00000000..0f502215 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/options.go @@ -0,0 +1,242 @@ +//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 armfrontdoor + +// EndpointsClientBeginPurgeContentOptions contains the optional parameters for the EndpointsClient.BeginPurgeContent method. +type EndpointsClientBeginPurgeContentOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExperimentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExperimentsClient.BeginCreateOrUpdate +// method. +type ExperimentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExperimentsClientBeginDeleteOptions contains the optional parameters for the ExperimentsClient.BeginDelete method. +type ExperimentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExperimentsClientBeginUpdateOptions contains the optional parameters for the ExperimentsClient.BeginUpdate method. +type ExperimentsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExperimentsClientGetOptions contains the optional parameters for the ExperimentsClient.Get method. +type ExperimentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExperimentsClientListByProfileOptions contains the optional parameters for the ExperimentsClient.NewListByProfilePager +// method. +type ExperimentsClientListByProfileOptions struct { + // placeholder for future optional parameters +} + +// FrontDoorsClientBeginCreateOrUpdateOptions contains the optional parameters for the FrontDoorsClient.BeginCreateOrUpdate +// method. +type FrontDoorsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FrontDoorsClientBeginDeleteOptions contains the optional parameters for the FrontDoorsClient.BeginDelete method. +type FrontDoorsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FrontDoorsClientGetOptions contains the optional parameters for the FrontDoorsClient.Get method. +type FrontDoorsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FrontDoorsClientListByResourceGroupOptions contains the optional parameters for the FrontDoorsClient.NewListByResourceGroupPager +// method. +type FrontDoorsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// FrontDoorsClientListOptions contains the optional parameters for the FrontDoorsClient.NewListPager method. +type FrontDoorsClientListOptions struct { + // placeholder for future optional parameters +} + +// FrontDoorsClientValidateCustomDomainOptions contains the optional parameters for the FrontDoorsClient.ValidateCustomDomain +// method. +type FrontDoorsClientValidateCustomDomainOptions struct { + // placeholder for future optional parameters +} + +// FrontendEndpointsClientBeginDisableHTTPSOptions contains the optional parameters for the FrontendEndpointsClient.BeginDisableHTTPS +// method. +type FrontendEndpointsClientBeginDisableHTTPSOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FrontendEndpointsClientBeginEnableHTTPSOptions contains the optional parameters for the FrontendEndpointsClient.BeginEnableHTTPS +// method. +type FrontendEndpointsClientBeginEnableHTTPSOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FrontendEndpointsClientGetOptions contains the optional parameters for the FrontendEndpointsClient.Get method. +type FrontendEndpointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FrontendEndpointsClientListByFrontDoorOptions contains the optional parameters for the FrontendEndpointsClient.NewListByFrontDoorPager +// method. +type FrontendEndpointsClientListByFrontDoorOptions struct { + // placeholder for future optional parameters +} + +// ManagedRuleSetsClientListOptions contains the optional parameters for the ManagedRuleSetsClient.NewListPager method. +type ManagedRuleSetsClientListOptions struct { + // placeholder for future optional parameters +} + +// NameAvailabilityClientCheckOptions contains the optional parameters for the NameAvailabilityClient.Check method. +type NameAvailabilityClientCheckOptions struct { + // placeholder for future optional parameters +} + +// NameAvailabilityWithSubscriptionClientCheckOptions contains the optional parameters for the NameAvailabilityWithSubscriptionClient.Check +// method. +type NameAvailabilityWithSubscriptionClientCheckOptions struct { + // placeholder for future optional parameters +} + +// NetworkExperimentProfilesClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginCreateOrUpdate +// method. +type NetworkExperimentProfilesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// NetworkExperimentProfilesClientBeginDeleteOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginDelete +// method. +type NetworkExperimentProfilesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// NetworkExperimentProfilesClientBeginUpdateOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginUpdate +// method. +type NetworkExperimentProfilesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// NetworkExperimentProfilesClientGetOptions contains the optional parameters for the NetworkExperimentProfilesClient.Get +// method. +type NetworkExperimentProfilesClientGetOptions struct { + // placeholder for future optional parameters +} + +// NetworkExperimentProfilesClientListByResourceGroupOptions contains the optional parameters for the NetworkExperimentProfilesClient.NewListByResourceGroupPager +// method. +type NetworkExperimentProfilesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// NetworkExperimentProfilesClientListOptions contains the optional parameters for the NetworkExperimentProfilesClient.NewListPager +// method. +type NetworkExperimentProfilesClientListOptions struct { + // placeholder for future optional parameters +} + +// PoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the PoliciesClient.BeginCreateOrUpdate method. +type PoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PoliciesClientBeginDeleteOptions contains the optional parameters for the PoliciesClient.BeginDelete method. +type PoliciesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PoliciesClientBeginUpdateOptions contains the optional parameters for the PoliciesClient.BeginUpdate method. +type PoliciesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method. +type PoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PoliciesClientListBySubscriptionOptions contains the optional parameters for the PoliciesClient.NewListBySubscriptionPager +// method. +type PoliciesClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// PoliciesClientListOptions contains the optional parameters for the PoliciesClient.NewListPager method. +type PoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// PreconfiguredEndpointsClientListOptions contains the optional parameters for the PreconfiguredEndpointsClient.NewListPager +// method. +type PreconfiguredEndpointsClientListOptions struct { + // placeholder for future optional parameters +} + +// ReportsClientGetLatencyScorecardsOptions contains the optional parameters for the ReportsClient.GetLatencyScorecards method. +type ReportsClientGetLatencyScorecardsOptions struct { + // The country associated with the Latency Scorecard. Values are country ISO codes as specified here- https://www.iso.org/iso-3166-country-codes.html + Country *string + + // The end DateTime of the Latency Scorecard in UTC + EndDateTimeUTC *string +} + +// ReportsClientGetTimeseriesOptions contains the optional parameters for the ReportsClient.GetTimeseries method. +type ReportsClientGetTimeseriesOptions struct { + // The country associated with the Timeseries. Values are country ISO codes as specified here- https://www.iso.org/iso-3166-country-codes.html + Country *string + + // The specific endpoint + Endpoint *string +} + +// RulesEnginesClientBeginCreateOrUpdateOptions contains the optional parameters for the RulesEnginesClient.BeginCreateOrUpdate +// method. +type RulesEnginesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RulesEnginesClientBeginDeleteOptions contains the optional parameters for the RulesEnginesClient.BeginDelete method. +type RulesEnginesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RulesEnginesClientGetOptions contains the optional parameters for the RulesEnginesClient.Get method. +type RulesEnginesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RulesEnginesClientListByFrontDoorOptions contains the optional parameters for the RulesEnginesClient.NewListByFrontDoorPager +// method. +type RulesEnginesClientListByFrontDoorOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/policies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/policies_client.go index 8f17437c..0bad3056 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/policies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/policies_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -34,7 +33,7 @@ type PoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".PoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,7 +47,7 @@ func NewPoliciesClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Create or update policy with specified rule set name within a resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-05-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - policyName - The name of the Web Application Firewall Policy. // - parameters - Policy to be created. @@ -60,29 +59,40 @@ func (client *PoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[PoliciesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create or update policy with specified rule set name within a resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-05-01 +// Generated from API version 2024-02-01 func (client *PoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy, options *PoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PoliciesClient.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, policyName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -105,16 +115,19 @@ func (client *PoliciesClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes Policy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-05-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - policyName - The name of the Web Application Firewall Policy. // - options - PoliciesClientBeginDeleteOptions contains the optional parameters for the PoliciesClient.BeginDelete method. @@ -124,29 +137,40 @@ func (client *PoliciesClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[PoliciesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PoliciesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes Policy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-05-01 +// Generated from API version 2024-02-01 func (client *PoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, policyName string, options *PoliciesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PoliciesClient.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, policyName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -169,7 +193,7 @@ func (client *PoliciesClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -177,23 +201,30 @@ func (client *PoliciesClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Retrieve protection policy with specified name within a resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-05-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - policyName - The name of the Web Application Firewall Policy. // - options - PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method. func (client *PoliciesClient) Get(ctx context.Context, resourceGroupName string, policyName string, options *PoliciesClientGetOptions) (PoliciesClientGetResponse, error) { + var err error + const operationName = "PoliciesClient.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, policyName, options) if err != nil { return PoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -216,7 +247,7 @@ func (client *PoliciesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,7 +264,7 @@ func (client *PoliciesClient) getHandleResponse(resp *http.Response) (PoliciesCl // NewListPager - Lists all of the protection policies within a resource group. // -// Generated from API version 2022-05-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - options - PoliciesClientListOptions contains the optional parameters for the PoliciesClient.NewListPager method. func (client *PoliciesClient) NewListPager(resourceGroupName string, options *PoliciesClientListOptions) *runtime.Pager[PoliciesClientListResponse] { @@ -242,25 +273,20 @@ func (client *PoliciesClient) NewListPager(resourceGroupName string, options *Po return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PoliciesClientListResponse) (PoliciesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PoliciesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PoliciesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 PoliciesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PoliciesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -280,7 +306,7 @@ func (client *PoliciesClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -297,7 +323,7 @@ func (client *PoliciesClient) listHandleResponse(resp *http.Response) (PoliciesC // NewListBySubscriptionPager - Lists all of the protection policies within a subscription. // -// Generated from API version 2022-05-01 +// Generated from API version 2024-02-01 // - options - PoliciesClientListBySubscriptionOptions contains the optional parameters for the PoliciesClient.NewListBySubscriptionPager // method. func (client *PoliciesClient) NewListBySubscriptionPager(options *PoliciesClientListBySubscriptionOptions) *runtime.Pager[PoliciesClientListBySubscriptionResponse] { @@ -306,25 +332,20 @@ func (client *PoliciesClient) NewListBySubscriptionPager(options *PoliciesClient return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PoliciesClientListBySubscriptionResponse) (PoliciesClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PoliciesClient.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 PoliciesClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PoliciesClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PoliciesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -340,7 +361,7 @@ func (client *PoliciesClient) listBySubscriptionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -359,7 +380,7 @@ func (client *PoliciesClient) listBySubscriptionHandleResponse(resp *http.Respon // and resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-05-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - policyName - The name of the Web Application Firewall Policy. // - parameters - FrontdoorWebApplicationFirewallPolicy parameters to be patched. @@ -370,9 +391,14 @@ func (client *PoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[PoliciesClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PoliciesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -380,20 +406,26 @@ func (client *PoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName // resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-05-01 +// Generated from API version 2024-02-01 func (client *PoliciesClient) update(ctx context.Context, resourceGroupName string, policyName string, parameters TagsObject, options *PoliciesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PoliciesClient.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, policyName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -416,8 +448,11 @@ func (client *PoliciesClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + 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/frontdoor/armfrontdoor/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/polymorphic_helpers.go index 4f79c84d..97eb5bc8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/polymorphic_helpers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/polymorphic_helpers.go @@ -3,16 +3,15 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor import "encoding/json" func unmarshalRouteConfigurationClassification(rawMsg json.RawMessage) (RouteConfigurationClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -28,5 +27,8 @@ func unmarshalRouteConfigurationClassification(rawMsg json.RawMessage) (RouteCon default: b = &RouteConfiguration{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/preconfiguredendpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/preconfiguredendpoints_client.go index 9cb04cb7..3c1461bd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/preconfiguredendpoints_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/preconfiguredendpoints_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -34,7 +33,7 @@ type PreconfiguredEndpointsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPreconfiguredEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PreconfiguredEndpointsClient, error) { - cl, err := arm.NewClient(moduleName+".PreconfiguredEndpointsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,25 +57,20 @@ func (client *PreconfiguredEndpointsClient) NewListPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PreconfiguredEndpointsClientListResponse) (PreconfiguredEndpointsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, profileName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PreconfiguredEndpointsClient.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, profileName, options) + }, nil) if err != nil { return PreconfiguredEndpointsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PreconfiguredEndpointsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PreconfiguredEndpointsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/reports_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/reports_client.go index 8a6864dd..bbd0a432 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/reports_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/reports_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -35,7 +34,7 @@ type ReportsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReportsClient, error) { - cl, err := arm.NewClient(moduleName+".ReportsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,18 +56,25 @@ func NewReportsClient(subscriptionID string, credential azcore.TokenCredential, // - options - ReportsClientGetLatencyScorecardsOptions contains the optional parameters for the ReportsClient.GetLatencyScorecards // method. func (client *ReportsClient) GetLatencyScorecards(ctx context.Context, resourceGroupName string, profileName string, experimentName string, aggregationInterval LatencyScorecardAggregationInterval, options *ReportsClientGetLatencyScorecardsOptions) (ReportsClientGetLatencyScorecardsResponse, error) { + var err error + const operationName = "ReportsClient.GetLatencyScorecards" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getLatencyScorecardsCreateRequest(ctx, resourceGroupName, profileName, experimentName, aggregationInterval, options) if err != nil { return ReportsClientGetLatencyScorecardsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ReportsClientGetLatencyScorecardsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReportsClientGetLatencyScorecardsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReportsClientGetLatencyScorecardsResponse{}, err } - return client.getLatencyScorecardsHandleResponse(resp) + resp, err := client.getLatencyScorecardsHandleResponse(httpResp) + return resp, err } // getLatencyScorecardsCreateRequest creates the GetLatencyScorecards request. @@ -95,14 +101,14 @@ func (client *ReportsClient) getLatencyScorecardsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() + reqQP.Set("aggregationInterval", string(aggregationInterval)) reqQP.Set("api-version", "2019-11-01") - if options != nil && options.EndDateTimeUTC != nil { - reqQP.Set("endDateTimeUTC", *options.EndDateTimeUTC) - } if options != nil && options.Country != nil { reqQP.Set("country", *options.Country) } - reqQP.Set("aggregationInterval", string(aggregationInterval)) + if options != nil && options.EndDateTimeUTC != nil { + reqQP.Set("endDateTimeUTC", *options.EndDateTimeUTC) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -130,18 +136,25 @@ func (client *ReportsClient) getLatencyScorecardsHandleResponse(resp *http.Respo // - timeseriesType - The type of Timeseries // - options - ReportsClientGetTimeseriesOptions contains the optional parameters for the ReportsClient.GetTimeseries method. func (client *ReportsClient) GetTimeseries(ctx context.Context, resourceGroupName string, profileName string, experimentName string, startDateTimeUTC time.Time, endDateTimeUTC time.Time, aggregationInterval TimeseriesAggregationInterval, timeseriesType TimeseriesType, options *ReportsClientGetTimeseriesOptions) (ReportsClientGetTimeseriesResponse, error) { + var err error + const operationName = "ReportsClient.GetTimeseries" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getTimeseriesCreateRequest(ctx, resourceGroupName, profileName, experimentName, startDateTimeUTC, endDateTimeUTC, aggregationInterval, timeseriesType, options) if err != nil { return ReportsClientGetTimeseriesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ReportsClientGetTimeseriesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReportsClientGetTimeseriesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReportsClientGetTimeseriesResponse{}, err } - return client.getTimeseriesHandleResponse(resp) + resp, err := client.getTimeseriesHandleResponse(httpResp) + return resp, err } // getTimeseriesCreateRequest creates the GetTimeseries request. @@ -168,17 +181,17 @@ func (client *ReportsClient) getTimeseriesCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() + reqQP.Set("aggregationInterval", string(aggregationInterval)) reqQP.Set("api-version", "2019-11-01") - reqQP.Set("startDateTimeUTC", startDateTimeUTC.Format(time.RFC3339Nano)) + if options != nil && options.Country != nil { + reqQP.Set("country", *options.Country) + } reqQP.Set("endDateTimeUTC", endDateTimeUTC.Format(time.RFC3339Nano)) - reqQP.Set("aggregationInterval", string(aggregationInterval)) - reqQP.Set("timeseriesType", string(timeseriesType)) if options != nil && options.Endpoint != nil { reqQP.Set("endpoint", *options.Endpoint) } - if options != nil && options.Country != nil { - reqQP.Set("country", *options.Country) - } + reqQP.Set("startDateTimeUTC", startDateTimeUTC.Format(time.RFC3339Nano)) + reqQP.Set("timeseriesType", string(timeseriesType)) 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/frontdoor/armfrontdoor/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/responses.go similarity index 73% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/response_types.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/responses.go index df50897d..6c8766cb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/responses.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -16,6 +15,7 @@ type EndpointsClientPurgeContentResponse struct { // ExperimentsClientCreateOrUpdateResponse contains the response from method ExperimentsClient.BeginCreateOrUpdate. type ExperimentsClientCreateOrUpdateResponse struct { + // Defines the properties of an Experiment Experiment } @@ -26,21 +26,26 @@ type ExperimentsClientDeleteResponse struct { // ExperimentsClientGetResponse contains the response from method ExperimentsClient.Get. type ExperimentsClientGetResponse struct { + // Defines the properties of an Experiment Experiment } // ExperimentsClientListByProfileResponse contains the response from method ExperimentsClient.NewListByProfilePager. type ExperimentsClientListByProfileResponse struct { + // Defines a list of Experiments. It contains a list of Experiment objects and a URL link to get the next set of results. ExperimentList } // ExperimentsClientUpdateResponse contains the response from method ExperimentsClient.BeginUpdate. type ExperimentsClientUpdateResponse struct { + // Defines the properties of an Experiment Experiment } // FrontDoorsClientCreateOrUpdateResponse contains the response from method FrontDoorsClient.BeginCreateOrUpdate. type FrontDoorsClientCreateOrUpdateResponse struct { + // Front Door represents a collection of backend endpoints to route traffic to along with rules that specify how traffic is + // sent there. FrontDoor } @@ -51,21 +56,28 @@ type FrontDoorsClientDeleteResponse struct { // FrontDoorsClientGetResponse contains the response from method FrontDoorsClient.Get. type FrontDoorsClientGetResponse struct { + // Front Door represents a collection of backend endpoints to route traffic to along with rules that specify how traffic is + // sent there. FrontDoor } // FrontDoorsClientListByResourceGroupResponse contains the response from method FrontDoorsClient.NewListByResourceGroupPager. type FrontDoorsClientListByResourceGroupResponse struct { + // Result of the request to list Front Doors. It contains a list of Front Door objects and a URL link to get the next set + // of results. ListResult } // FrontDoorsClientListResponse contains the response from method FrontDoorsClient.NewListPager. type FrontDoorsClientListResponse struct { + // Result of the request to list Front Doors. It contains a list of Front Door objects and a URL link to get the next set + // of results. ListResult } // FrontDoorsClientValidateCustomDomainResponse contains the response from method FrontDoorsClient.ValidateCustomDomain. type FrontDoorsClientValidateCustomDomainResponse struct { + // Output of custom domain validation. ValidateCustomDomainOutput } @@ -81,31 +93,38 @@ type FrontendEndpointsClientEnableHTTPSResponse struct { // FrontendEndpointsClientGetResponse contains the response from method FrontendEndpointsClient.Get. type FrontendEndpointsClientGetResponse struct { + // A frontend endpoint used for routing. FrontendEndpoint } // FrontendEndpointsClientListByFrontDoorResponse contains the response from method FrontendEndpointsClient.NewListByFrontDoorPager. type FrontendEndpointsClientListByFrontDoorResponse struct { + // Result of the request to list frontend endpoints. It contains a list of Frontend endpoint objects and a URL link to get + // the next set of results. FrontendEndpointsListResult } // ManagedRuleSetsClientListResponse contains the response from method ManagedRuleSetsClient.NewListPager. type ManagedRuleSetsClientListResponse struct { + // List of managed rule set definitions available for use in a policy. ManagedRuleSetDefinitionList } // NameAvailabilityClientCheckResponse contains the response from method NameAvailabilityClient.Check. type NameAvailabilityClientCheckResponse struct { + // Output of check name availability API. CheckNameAvailabilityOutput } // NameAvailabilityWithSubscriptionClientCheckResponse contains the response from method NameAvailabilityWithSubscriptionClient.Check. type NameAvailabilityWithSubscriptionClientCheckResponse struct { + // Output of check name availability API. CheckNameAvailabilityOutput } // NetworkExperimentProfilesClientCreateOrUpdateResponse contains the response from method NetworkExperimentProfilesClient.BeginCreateOrUpdate. type NetworkExperimentProfilesClientCreateOrUpdateResponse struct { + // Defines an Network Experiment Profile and lists of Experiments Profile } @@ -116,26 +135,31 @@ type NetworkExperimentProfilesClientDeleteResponse struct { // NetworkExperimentProfilesClientGetResponse contains the response from method NetworkExperimentProfilesClient.Get. type NetworkExperimentProfilesClientGetResponse struct { + // Defines an Network Experiment Profile and lists of Experiments Profile } // NetworkExperimentProfilesClientListByResourceGroupResponse contains the response from method NetworkExperimentProfilesClient.NewListByResourceGroupPager. type NetworkExperimentProfilesClientListByResourceGroupResponse struct { + // Defines a list of Profiles. It contains a list of Profile objects and a URL link to get the next set of results. ProfileList } // NetworkExperimentProfilesClientListResponse contains the response from method NetworkExperimentProfilesClient.NewListPager. type NetworkExperimentProfilesClientListResponse struct { + // Defines a list of Profiles. It contains a list of Profile objects and a URL link to get the next set of results. ProfileList } // NetworkExperimentProfilesClientUpdateResponse contains the response from method NetworkExperimentProfilesClient.BeginUpdate. type NetworkExperimentProfilesClientUpdateResponse struct { + // Defines an Network Experiment Profile and lists of Experiments Profile } // PoliciesClientCreateOrUpdateResponse contains the response from method PoliciesClient.BeginCreateOrUpdate. type PoliciesClientCreateOrUpdateResponse struct { + // Defines web application firewall policy. WebApplicationFirewallPolicy } @@ -146,41 +170,52 @@ type PoliciesClientDeleteResponse struct { // PoliciesClientGetResponse contains the response from method PoliciesClient.Get. type PoliciesClientGetResponse struct { + // Defines web application firewall policy. WebApplicationFirewallPolicy } // PoliciesClientListBySubscriptionResponse contains the response from method PoliciesClient.NewListBySubscriptionPager. type PoliciesClientListBySubscriptionResponse struct { + // Defines a list of WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects and a URL + // link to get the next set of results. WebApplicationFirewallPolicyList } // PoliciesClientListResponse contains the response from method PoliciesClient.NewListPager. type PoliciesClientListResponse struct { + // Defines a list of WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects and a URL + // link to get the next set of results. WebApplicationFirewallPolicyList } // PoliciesClientUpdateResponse contains the response from method PoliciesClient.BeginUpdate. type PoliciesClientUpdateResponse struct { + // Defines web application firewall policy. WebApplicationFirewallPolicy } // PreconfiguredEndpointsClientListResponse contains the response from method PreconfiguredEndpointsClient.NewListPager. type PreconfiguredEndpointsClientListResponse struct { + // Defines a list of preconfigured endpoints. PreconfiguredEndpointList } // ReportsClientGetLatencyScorecardsResponse contains the response from method ReportsClient.GetLatencyScorecards. type ReportsClientGetLatencyScorecardsResponse struct { + // Defines the LatencyScorecard LatencyScorecard } // ReportsClientGetTimeseriesResponse contains the response from method ReportsClient.GetTimeseries. type ReportsClientGetTimeseriesResponse struct { + // Defines the Timeseries Timeseries } // RulesEnginesClientCreateOrUpdateResponse contains the response from method RulesEnginesClient.BeginCreateOrUpdate. type RulesEnginesClientCreateOrUpdateResponse struct { + // A rules engine configuration containing a list of rules that will run to modify the runtime behavior of the request and + // response. RulesEngine } @@ -191,10 +226,14 @@ type RulesEnginesClientDeleteResponse struct { // RulesEnginesClientGetResponse contains the response from method RulesEnginesClient.Get. type RulesEnginesClientGetResponse struct { + // A rules engine configuration containing a list of rules that will run to modify the runtime behavior of the request and + // response. RulesEngine } // RulesEnginesClientListByFrontDoorResponse contains the response from method RulesEnginesClient.NewListByFrontDoorPager. type RulesEnginesClientListByFrontDoorResponse struct { + // Result of the request to list Rules Engine Configurations. It contains a list of RulesEngine objects and a URL link to + // get the next set of results. RulesEngineListResult } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/rulesengines_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/rulesengines_client.go index 87bd6f08..6dea01f7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/rulesengines_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/rulesengines_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -34,7 +33,7 @@ type RulesEnginesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRulesEnginesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RulesEnginesClient, error) { - cl, err := arm.NewClient(moduleName+".RulesEnginesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,11 +60,15 @@ func (client *RulesEnginesClient) BeginCreateOrUpdate(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RulesEnginesClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RulesEnginesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[RulesEnginesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RulesEnginesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -74,18 +77,24 @@ func (client *RulesEnginesClient) BeginCreateOrUpdate(ctx context.Context, resou // // Generated from API version 2021-06-01 func (client *RulesEnginesClient) createOrUpdate(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string, rulesEngineParameters RulesEngine, options *RulesEnginesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RulesEnginesClient.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, frontDoorName, rulesEngineName, rulesEngineParameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -115,7 +124,10 @@ func (client *RulesEnginesClient) createOrUpdateCreateRequest(ctx context.Contex reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, rulesEngineParameters) + if err := runtime.MarshalAsJSON(req, rulesEngineParameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an existing Rules Engine Configuration with the specified parameters. @@ -133,11 +145,15 @@ func (client *RulesEnginesClient) BeginDelete(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RulesEnginesClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RulesEnginesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[RulesEnginesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RulesEnginesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -146,18 +162,24 @@ func (client *RulesEnginesClient) BeginDelete(ctx context.Context, resourceGroup // // Generated from API version 2021-06-01 func (client *RulesEnginesClient) deleteOperation(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string, options *RulesEnginesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RulesEnginesClient.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, frontDoorName, rulesEngineName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -199,18 +221,25 @@ func (client *RulesEnginesClient) deleteCreateRequest(ctx context.Context, resou // - rulesEngineName - Name of the Rules Engine which is unique within the Front Door. // - options - RulesEnginesClientGetOptions contains the optional parameters for the RulesEnginesClient.Get method. func (client *RulesEnginesClient) Get(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string, options *RulesEnginesClientGetOptions) (RulesEnginesClientGetResponse, error) { + var err error + const operationName = "RulesEnginesClient.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, frontDoorName, rulesEngineName, options) if err != nil { return RulesEnginesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RulesEnginesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RulesEnginesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RulesEnginesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -265,25 +294,20 @@ func (client *RulesEnginesClient) NewListByFrontDoorPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *RulesEnginesClientListByFrontDoorResponse) (RulesEnginesClientListByFrontDoorResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByFrontDoorCreateRequest(ctx, resourceGroupName, frontDoorName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RulesEnginesClientListByFrontDoorResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RulesEnginesClient.NewListByFrontDoorPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByFrontDoorCreateRequest(ctx, resourceGroupName, frontDoorName, options) + }, nil) if err != nil { return RulesEnginesClientListByFrontDoorResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RulesEnginesClientListByFrontDoorResponse{}, runtime.NewResponseError(resp) - } return client.listByFrontDoorHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/time_rfc3339.go index 7b872581..8c8007d5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armfrontdoor @@ -19,50 +18,74 @@ import ( "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 ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + 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 + `"` ) -// 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+)*"*$`) - -type timeRFC3339 time.Time +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON +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 *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(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 *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +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) { @@ -71,14 +94,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/CHANGELOG.md index cba4a768..21b1b8c6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/CHANGELOG.md @@ -1,5 +1,17 @@ # Release History +## 1.2.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 1.2.0-beta.1 (2023-07-28) +### Features Added + +- New field `EnableSecureChannel` in struct `StorageAccount` +- Added feature to support selecting use secure channel during creation. The paramter would force to true if the cluster created based on a stroage account that secure transfer enabled, no matter it use 'blob' or 'dfs' type. + ## 1.1.1 (2023-04-14) ### Bug Fixes @@ -18,4 +30,4 @@ The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/ 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 +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/README.md index 17da0cab..0543b87d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewVirtualMachinesClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/applications_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/applications_client.go index 80083525..0f5e18a3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/applications_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/applications_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -34,7 +33,7 @@ type ApplicationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewApplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationsClient, error) { - cl, err := arm.NewClient(moduleName+".ApplicationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,11 +60,15 @@ func (client *ApplicationsClient) BeginCreate(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationsClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationsClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ApplicationsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -74,18 +77,24 @@ func (client *ApplicationsClient) BeginCreate(ctx context.Context, resourceGroup // // Generated from API version 2021-06-01 func (client *ApplicationsClient) create(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, parameters Application, options *ApplicationsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationsClient.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, applicationName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -115,7 +124,10 @@ func (client *ApplicationsClient) createCreateRequest(ctx context.Context, resou reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the specified application on the HDInsight cluster. @@ -133,11 +145,15 @@ func (client *ApplicationsClient) BeginDelete(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ApplicationsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -146,18 +162,24 @@ func (client *ApplicationsClient) BeginDelete(ctx context.Context, resourceGroup // // Generated from API version 2021-06-01 func (client *ApplicationsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, options *ApplicationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationsClient.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, applicationName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -199,18 +221,25 @@ func (client *ApplicationsClient) deleteCreateRequest(ctx context.Context, resou // - applicationName - The constant value for the application name. // - options - ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method. func (client *ApplicationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, options *ApplicationsClientGetOptions) (ApplicationsClientGetResponse, error) { + var err error + const operationName = "ApplicationsClient.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, applicationName, options) if err != nil { return ApplicationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ApplicationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -263,18 +292,25 @@ func (client *ApplicationsClient) getHandleResponse(resp *http.Response) (Applic // - options - ApplicationsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ApplicationsClient.GetAzureAsyncOperationStatus // method. func (client *ApplicationsClient) GetAzureAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, operationID string, options *ApplicationsClientGetAzureAsyncOperationStatusOptions) (ApplicationsClientGetAzureAsyncOperationStatusResponse, error) { + var err error + const operationName = "ApplicationsClient.GetAzureAsyncOperationStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAzureAsyncOperationStatusCreateRequest(ctx, resourceGroupName, clusterName, applicationName, operationID, options) if err != nil { return ApplicationsClientGetAzureAsyncOperationStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ApplicationsClientGetAzureAsyncOperationStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationsClientGetAzureAsyncOperationStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationsClientGetAzureAsyncOperationStatusResponse{}, err } - return client.getAzureAsyncOperationStatusHandleResponse(resp) + resp, err := client.getAzureAsyncOperationStatusHandleResponse(httpResp) + return resp, err } // getAzureAsyncOperationStatusCreateRequest creates the GetAzureAsyncOperationStatus request. @@ -333,25 +369,20 @@ func (client *ApplicationsClient) NewListByClusterPager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ApplicationsClientListByClusterResponse) (ApplicationsClientListByClusterResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationsClientListByClusterResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationsClient.NewListByClusterPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) + }, nil) if err != nil { return ApplicationsClientListByClusterResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationsClientListByClusterResponse{}, runtime.NewResponseError(resp) - } return client.listByClusterHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/autorest.md index facedca7..9e7dbdf4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/autorest.md @@ -8,7 +8,7 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 +module-version: 1.2.0 directive: - from: cluster.json where: $.definitions.Resource diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/client_factory.go index 6927254b..3ed5e802 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -29,7 +28,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -39,57 +38,68 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewClustersClient() *ClustersClient { - subClient, _ := NewClustersClient(c.subscriptionID, c.credential, c.options) - return subClient -} - +// NewApplicationsClient creates a new instance of ApplicationsClient. func (c *ClientFactory) NewApplicationsClient() *ApplicationsClient { subClient, _ := NewApplicationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewLocationsClient() *LocationsClient { - subClient, _ := NewLocationsClient(c.subscriptionID, c.credential, c.options) +// NewClustersClient creates a new instance of ClustersClient. +func (c *ClientFactory) NewClustersClient() *ClustersClient { + subClient, _ := NewClustersClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewConfigurationsClient creates a new instance of ConfigurationsClient. func (c *ClientFactory) NewConfigurationsClient() *ConfigurationsClient { subClient, _ := NewConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExtensionsClient creates a new instance of ExtensionsClient. func (c *ClientFactory) NewExtensionsClient() *ExtensionsClient { subClient, _ := NewExtensionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewScriptActionsClient() *ScriptActionsClient { - subClient, _ := NewScriptActionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewScriptExecutionHistoryClient() *ScriptExecutionHistoryClient { - subClient, _ := NewScriptExecutionHistoryClient(c.subscriptionID, c.credential, c.options) +// NewLocationsClient creates a new instance of LocationsClient. +func (c *ClientFactory) NewLocationsClient() *LocationsClient { + subClient, _ := NewLocationsClient(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 } -func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient { - subClient, _ := NewVirtualMachinesClient(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 } + +// NewScriptActionsClient creates a new instance of ScriptActionsClient. +func (c *ClientFactory) NewScriptActionsClient() *ScriptActionsClient { + subClient, _ := NewScriptActionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewScriptExecutionHistoryClient creates a new instance of ScriptExecutionHistoryClient. +func (c *ClientFactory) NewScriptExecutionHistoryClient() *ScriptExecutionHistoryClient { + subClient, _ := NewScriptExecutionHistoryClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewVirtualMachinesClient creates a new instance of VirtualMachinesClient. +func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient { + subClient, _ := NewVirtualMachinesClient(c.subscriptionID, c.credential, c.options) + return subClient +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/clusters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/clusters_client.go index 74ba10cb..04560c13 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/clusters_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/clusters_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -34,7 +33,7 @@ type ClustersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClustersClient, error) { - cl, err := arm.NewClient(moduleName+".ClustersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,11 +58,15 @@ func (client *ClustersClient) BeginCreate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +75,24 @@ func (client *ClustersClient) BeginCreate(ctx context.Context, resourceGroupName // // Generated from API version 2021-06-01 func (client *ClustersClient) create(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterCreateParametersExtended, options *ClustersClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.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, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -109,7 +118,10 @@ func (client *ClustersClient) createCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the specified HDInsight cluster. @@ -125,11 +137,15 @@ func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,18 +154,24 @@ func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName // // Generated from API version 2021-06-01 func (client *ClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.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 } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -193,11 +215,15 @@ func (client *ClustersClient) BeginExecuteScriptActions(ctx context.Context, res if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientExecuteScriptActionsResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientExecuteScriptActionsResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientExecuteScriptActionsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientExecuteScriptActionsResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -206,18 +232,24 @@ func (client *ClustersClient) BeginExecuteScriptActions(ctx context.Context, res // // Generated from API version 2021-06-01 func (client *ClustersClient) executeScriptActions(ctx context.Context, resourceGroupName string, clusterName string, parameters ExecuteScriptActionParameters, options *ClustersClientBeginExecuteScriptActionsOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginExecuteScriptActions" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.executeScriptActionsCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // executeScriptActionsCreateRequest creates the ExecuteScriptActions request. @@ -243,7 +275,10 @@ func (client *ClustersClient) executeScriptActionsCreateRequest(ctx context.Cont reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Get - Gets the specified cluster. @@ -254,18 +289,25 @@ func (client *ClustersClient) executeScriptActionsCreateRequest(ctx context.Cont // - clusterName - The name of the cluster. // - options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (ClustersClientGetResponse, error) { + var err error + const operationName = "ClustersClient.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 ClustersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClustersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClustersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -313,18 +355,25 @@ func (client *ClustersClient) getHandleResponse(resp *http.Response) (ClustersCl // - options - ClustersClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ClustersClient.GetAzureAsyncOperationStatus // method. func (client *ClustersClient) GetAzureAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, operationID string, options *ClustersClientGetAzureAsyncOperationStatusOptions) (ClustersClientGetAzureAsyncOperationStatusResponse, error) { + var err error + const operationName = "ClustersClient.GetAzureAsyncOperationStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAzureAsyncOperationStatusCreateRequest(ctx, resourceGroupName, clusterName, operationID, options) if err != nil { return ClustersClientGetAzureAsyncOperationStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClustersClientGetAzureAsyncOperationStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientGetAzureAsyncOperationStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClustersClientGetAzureAsyncOperationStatusResponse{}, err } - return client.getAzureAsyncOperationStatusHandleResponse(resp) + resp, err := client.getAzureAsyncOperationStatusHandleResponse(httpResp) + return resp, err } // getAzureAsyncOperationStatusCreateRequest creates the GetAzureAsyncOperationStatus request. @@ -375,18 +424,25 @@ func (client *ClustersClient) getAzureAsyncOperationStatusHandleResponse(resp *h // - options - ClustersClientGetGatewaySettingsOptions contains the optional parameters for the ClustersClient.GetGatewaySettings // method. func (client *ClustersClient) GetGatewaySettings(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetGatewaySettingsOptions) (ClustersClientGetGatewaySettingsResponse, error) { + var err error + const operationName = "ClustersClient.GetGatewaySettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getGatewaySettingsCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { return ClustersClientGetGatewaySettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClustersClientGetGatewaySettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientGetGatewaySettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClustersClientGetGatewaySettingsResponse{}, err } - return client.getGatewaySettingsHandleResponse(resp) + resp, err := client.getGatewaySettingsHandleResponse(httpResp) + return resp, err } // getGatewaySettingsCreateRequest creates the GetGatewaySettings request. @@ -434,25 +490,20 @@ func (client *ClustersClient) NewListPager(options *ClustersClientListOptions) * return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ClustersClientListResponse) (ClustersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.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 ClustersClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClustersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -495,25 +546,20 @@ func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ClustersClientListByResourceGroupResponse) (ClustersClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.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 ClustersClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClustersClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -563,11 +609,15 @@ func (client *ClustersClient) BeginResize(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientResizeResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientResizeResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientResizeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientResizeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -576,18 +626,24 @@ func (client *ClustersClient) BeginResize(ctx context.Context, resourceGroupName // // Generated from API version 2021-06-01 func (client *ClustersClient) resize(ctx context.Context, resourceGroupName string, clusterName string, roleName RoleName, parameters ClusterResizeParameters, options *ClustersClientBeginResizeOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginResize" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resizeCreateRequest(ctx, resourceGroupName, clusterName, roleName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // resizeCreateRequest creates the Resize request. @@ -617,7 +673,10 @@ func (client *ClustersClient) resizeCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginRotateDiskEncryptionKey - Rotate disk encryption key of the specified HDInsight cluster. @@ -635,11 +694,15 @@ func (client *ClustersClient) BeginRotateDiskEncryptionKey(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientRotateDiskEncryptionKeyResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientRotateDiskEncryptionKeyResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientRotateDiskEncryptionKeyResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientRotateDiskEncryptionKeyResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -648,18 +711,24 @@ func (client *ClustersClient) BeginRotateDiskEncryptionKey(ctx context.Context, // // Generated from API version 2021-06-01 func (client *ClustersClient) rotateDiskEncryptionKey(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterDiskEncryptionParameters, options *ClustersClientBeginRotateDiskEncryptionKeyOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginRotateDiskEncryptionKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.rotateDiskEncryptionKeyCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // rotateDiskEncryptionKeyCreateRequest creates the RotateDiskEncryptionKey request. @@ -685,7 +754,10 @@ func (client *ClustersClient) rotateDiskEncryptionKeyCreateRequest(ctx context.C reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Update - Patch HDInsight cluster with the specified parameters. @@ -697,18 +769,25 @@ func (client *ClustersClient) rotateDiskEncryptionKeyCreateRequest(ctx context.C // - parameters - The cluster patch request. // - options - ClustersClientUpdateOptions contains the optional parameters for the ClustersClient.Update method. func (client *ClustersClient) Update(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterPatchParameters, options *ClustersClientUpdateOptions) (ClustersClientUpdateResponse, error) { + var err error + const operationName = "ClustersClient.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, parameters, options) if err != nil { return ClustersClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClustersClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClustersClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -734,7 +813,10 @@ func (client *ClustersClient) updateCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -762,11 +844,15 @@ func (client *ClustersClient) BeginUpdateAutoScaleConfiguration(ctx context.Cont if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientUpdateAutoScaleConfigurationResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientUpdateAutoScaleConfigurationResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientUpdateAutoScaleConfigurationResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientUpdateAutoScaleConfigurationResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -775,18 +861,24 @@ func (client *ClustersClient) BeginUpdateAutoScaleConfiguration(ctx context.Cont // // Generated from API version 2021-06-01 func (client *ClustersClient) updateAutoScaleConfiguration(ctx context.Context, resourceGroupName string, clusterName string, roleName RoleName, parameters AutoscaleConfigurationUpdateParameter, options *ClustersClientBeginUpdateAutoScaleConfigurationOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginUpdateAutoScaleConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateAutoScaleConfigurationCreateRequest(ctx, resourceGroupName, clusterName, roleName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateAutoScaleConfigurationCreateRequest creates the UpdateAutoScaleConfiguration request. @@ -816,7 +908,10 @@ func (client *ClustersClient) updateAutoScaleConfigurationCreateRequest(ctx cont reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginUpdateGatewaySettings - Configures the gateway settings on the specified cluster. @@ -834,11 +929,15 @@ func (client *ClustersClient) BeginUpdateGatewaySettings(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientUpdateGatewaySettingsResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientUpdateGatewaySettingsResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientUpdateGatewaySettingsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientUpdateGatewaySettingsResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -847,18 +946,24 @@ func (client *ClustersClient) BeginUpdateGatewaySettings(ctx context.Context, re // // Generated from API version 2021-06-01 func (client *ClustersClient) updateGatewaySettings(ctx context.Context, resourceGroupName string, clusterName string, parameters UpdateGatewaySettingsParameters, options *ClustersClientBeginUpdateGatewaySettingsOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginUpdateGatewaySettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateGatewaySettingsCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateGatewaySettingsCreateRequest creates the UpdateGatewaySettings request. @@ -884,7 +989,10 @@ func (client *ClustersClient) updateGatewaySettingsCreateRequest(ctx context.Con reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginUpdateIdentityCertificate - Updates the cluster identity certificate. @@ -902,11 +1010,15 @@ func (client *ClustersClient) BeginUpdateIdentityCertificate(ctx context.Context if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientUpdateIdentityCertificateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientUpdateIdentityCertificateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientUpdateIdentityCertificateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientUpdateIdentityCertificateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -915,18 +1027,24 @@ func (client *ClustersClient) BeginUpdateIdentityCertificate(ctx context.Context // // Generated from API version 2021-06-01 func (client *ClustersClient) updateIdentityCertificate(ctx context.Context, resourceGroupName string, clusterName string, parameters UpdateClusterIdentityCertificateParameters, options *ClustersClientBeginUpdateIdentityCertificateOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginUpdateIdentityCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateIdentityCertificateCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateIdentityCertificateCreateRequest creates the UpdateIdentityCertificate request. @@ -952,5 +1070,8 @@ func (client *ClustersClient) updateIdentityCertificateCreateRequest(ctx context reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + 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/hdinsight/armhdinsight/configurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/configurations_client.go index 9d7c0237..ccb31973 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/configurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/configurations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -34,7 +33,7 @@ type ConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".ConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewConfigurationsClient(subscriptionID string, credential azcore.TokenCrede // - configurationName - The name of the cluster configuration. // - options - ConfigurationsClientGetOptions contains the optional parameters for the ConfigurationsClient.Get method. func (client *ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, configurationName string, options *ConfigurationsClientGetOptions) (ConfigurationsClientGetResponse, error) { + var err error + const operationName = "ConfigurationsClient.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, configurationName, options) if err != nil { return ConfigurationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConfigurationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConfigurationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConfigurationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -116,18 +122,25 @@ func (client *ConfigurationsClient) getHandleResponse(resp *http.Response) (Conf // - clusterName - The name of the cluster. // - options - ConfigurationsClientListOptions contains the optional parameters for the ConfigurationsClient.List method. func (client *ConfigurationsClient) List(ctx context.Context, resourceGroupName string, clusterName string, options *ConfigurationsClientListOptions) (ConfigurationsClientListResponse, error) { + var err error + const operationName = "ConfigurationsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { return ConfigurationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConfigurationsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConfigurationsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConfigurationsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -182,11 +195,15 @@ func (client *ConfigurationsClient) BeginUpdate(ctx context.Context, resourceGro if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationsClientUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationsClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ConfigurationsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConfigurationsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -196,18 +213,24 @@ func (client *ConfigurationsClient) BeginUpdate(ctx context.Context, resourceGro // // Generated from API version 2021-06-01 func (client *ConfigurationsClient) update(ctx context.Context, resourceGroupName string, clusterName string, configurationName string, parameters map[string]*string, options *ConfigurationsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ConfigurationsClient.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, clusterName, configurationName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -237,5 +260,8 @@ func (client *ConfigurationsClient) updateCreateRequest(ctx context.Context, res reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + 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/hdinsight/armhdinsight/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/constants.go index 406ec6fe..0f522e4d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight const ( - moduleName = "armhdinsight" - moduleVersion = "v1.1.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" + moduleVersion = "v1.2.0" ) // AsyncOperationState - The async operation state. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/extensions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/extensions_client.go index b747bc5c..252a787e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/extensions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/extensions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -34,7 +33,7 @@ type ExtensionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExtensionsClient, error) { - cl, err := arm.NewClient(moduleName+".ExtensionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,11 +59,15 @@ func (client *ExtensionsClient) BeginCreate(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtensionsClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtensionsClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ExtensionsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExtensionsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +76,24 @@ func (client *ExtensionsClient) BeginCreate(ctx context.Context, resourceGroupNa // // Generated from API version 2021-06-01 func (client *ExtensionsClient) create(ctx context.Context, resourceGroupName string, clusterName string, extensionName string, parameters Extension, options *ExtensionsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ExtensionsClient.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, extensionName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -114,7 +123,10 @@ func (client *ExtensionsClient) createCreateRequest(ctx context.Context, resourc reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the specified extension for HDInsight cluster. @@ -131,11 +143,15 @@ func (client *ExtensionsClient) BeginDelete(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtensionsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtensionsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ExtensionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExtensionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,18 +160,24 @@ func (client *ExtensionsClient) BeginDelete(ctx context.Context, resourceGroupNa // // Generated from API version 2021-06-01 func (client *ExtensionsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, extensionName string, options *ExtensionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ExtensionsClient.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, extensionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -202,11 +224,15 @@ func (client *ExtensionsClient) BeginDisableAzureMonitor(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtensionsClientDisableAzureMonitorResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtensionsClientDisableAzureMonitorResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ExtensionsClientDisableAzureMonitorResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExtensionsClientDisableAzureMonitorResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -215,18 +241,24 @@ func (client *ExtensionsClient) BeginDisableAzureMonitor(ctx context.Context, re // // Generated from API version 2021-06-01 func (client *ExtensionsClient) disableAzureMonitor(ctx context.Context, resourceGroupName string, clusterName string, options *ExtensionsClientBeginDisableAzureMonitorOptions) (*http.Response, error) { + var err error + const operationName = "ExtensionsClient.BeginDisableAzureMonitor" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.disableAzureMonitorCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // disableAzureMonitorCreateRequest creates the DisableAzureMonitor request. @@ -269,11 +301,15 @@ func (client *ExtensionsClient) BeginDisableMonitoring(ctx context.Context, reso if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtensionsClientDisableMonitoringResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtensionsClientDisableMonitoringResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ExtensionsClientDisableMonitoringResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExtensionsClientDisableMonitoringResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -282,18 +318,24 @@ func (client *ExtensionsClient) BeginDisableMonitoring(ctx context.Context, reso // // Generated from API version 2021-06-01 func (client *ExtensionsClient) disableMonitoring(ctx context.Context, resourceGroupName string, clusterName string, options *ExtensionsClientBeginDisableMonitoringOptions) (*http.Response, error) { + var err error + const operationName = "ExtensionsClient.BeginDisableMonitoring" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.disableMonitoringCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // disableMonitoringCreateRequest creates the DisableMonitoring request. @@ -337,11 +379,15 @@ func (client *ExtensionsClient) BeginEnableAzureMonitor(ctx context.Context, res if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtensionsClientEnableAzureMonitorResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtensionsClientEnableAzureMonitorResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ExtensionsClientEnableAzureMonitorResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExtensionsClientEnableAzureMonitorResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -350,18 +396,24 @@ func (client *ExtensionsClient) BeginEnableAzureMonitor(ctx context.Context, res // // Generated from API version 2021-06-01 func (client *ExtensionsClient) enableAzureMonitor(ctx context.Context, resourceGroupName string, clusterName string, parameters AzureMonitorRequest, options *ExtensionsClientBeginEnableAzureMonitorOptions) (*http.Response, error) { + var err error + const operationName = "ExtensionsClient.BeginEnableAzureMonitor" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.enableAzureMonitorCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // enableAzureMonitorCreateRequest creates the EnableAzureMonitor request. @@ -387,7 +439,10 @@ func (client *ExtensionsClient) enableAzureMonitorCreateRequest(ctx context.Cont reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginEnableMonitoring - Enables the Operations Management Suite (OMS) on the HDInsight cluster. @@ -405,11 +460,15 @@ func (client *ExtensionsClient) BeginEnableMonitoring(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtensionsClientEnableMonitoringResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtensionsClientEnableMonitoringResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ExtensionsClientEnableMonitoringResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExtensionsClientEnableMonitoringResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -418,18 +477,24 @@ func (client *ExtensionsClient) BeginEnableMonitoring(ctx context.Context, resou // // Generated from API version 2021-06-01 func (client *ExtensionsClient) enableMonitoring(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterMonitoringRequest, options *ExtensionsClientBeginEnableMonitoringOptions) (*http.Response, error) { + var err error + const operationName = "ExtensionsClient.BeginEnableMonitoring" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.enableMonitoringCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // enableMonitoringCreateRequest creates the EnableMonitoring request. @@ -455,7 +520,10 @@ func (client *ExtensionsClient) enableMonitoringCreateRequest(ctx context.Contex reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Get - Gets the extension properties for the specified HDInsight cluster extension. @@ -467,18 +535,25 @@ func (client *ExtensionsClient) enableMonitoringCreateRequest(ctx context.Contex // - extensionName - The name of the cluster extension. // - options - ExtensionsClientGetOptions contains the optional parameters for the ExtensionsClient.Get method. func (client *ExtensionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, extensionName string, options *ExtensionsClientGetOptions) (ExtensionsClientGetResponse, error) { + var err error + const operationName = "ExtensionsClient.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, extensionName, options) if err != nil { return ExtensionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExtensionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExtensionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExtensionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -531,18 +606,25 @@ func (client *ExtensionsClient) getHandleResponse(resp *http.Response) (Extensio // - options - ExtensionsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ExtensionsClient.GetAzureAsyncOperationStatus // method. func (client *ExtensionsClient) GetAzureAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, extensionName string, operationID string, options *ExtensionsClientGetAzureAsyncOperationStatusOptions) (ExtensionsClientGetAzureAsyncOperationStatusResponse, error) { + var err error + const operationName = "ExtensionsClient.GetAzureAsyncOperationStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAzureAsyncOperationStatusCreateRequest(ctx, resourceGroupName, clusterName, extensionName, operationID, options) if err != nil { return ExtensionsClientGetAzureAsyncOperationStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExtensionsClientGetAzureAsyncOperationStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExtensionsClientGetAzureAsyncOperationStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExtensionsClientGetAzureAsyncOperationStatusResponse{}, err } - return client.getAzureAsyncOperationStatusHandleResponse(resp) + resp, err := client.getAzureAsyncOperationStatusHandleResponse(httpResp) + return resp, err } // getAzureAsyncOperationStatusCreateRequest creates the GetAzureAsyncOperationStatus request. @@ -597,18 +679,25 @@ func (client *ExtensionsClient) getAzureAsyncOperationStatusHandleResponse(resp // - options - ExtensionsClientGetAzureMonitorStatusOptions contains the optional parameters for the ExtensionsClient.GetAzureMonitorStatus // method. func (client *ExtensionsClient) GetAzureMonitorStatus(ctx context.Context, resourceGroupName string, clusterName string, options *ExtensionsClientGetAzureMonitorStatusOptions) (ExtensionsClientGetAzureMonitorStatusResponse, error) { + var err error + const operationName = "ExtensionsClient.GetAzureMonitorStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAzureMonitorStatusCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { return ExtensionsClientGetAzureMonitorStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExtensionsClientGetAzureMonitorStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExtensionsClientGetAzureMonitorStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExtensionsClientGetAzureMonitorStatusResponse{}, err } - return client.getAzureMonitorStatusHandleResponse(resp) + resp, err := client.getAzureMonitorStatusHandleResponse(httpResp) + return resp, err } // getAzureMonitorStatusCreateRequest creates the GetAzureMonitorStatus request. @@ -655,18 +744,25 @@ func (client *ExtensionsClient) getAzureMonitorStatusHandleResponse(resp *http.R // - options - ExtensionsClientGetMonitoringStatusOptions contains the optional parameters for the ExtensionsClient.GetMonitoringStatus // method. func (client *ExtensionsClient) GetMonitoringStatus(ctx context.Context, resourceGroupName string, clusterName string, options *ExtensionsClientGetMonitoringStatusOptions) (ExtensionsClientGetMonitoringStatusResponse, error) { + var err error + const operationName = "ExtensionsClient.GetMonitoringStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getMonitoringStatusCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { return ExtensionsClientGetMonitoringStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExtensionsClientGetMonitoringStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExtensionsClientGetMonitoringStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExtensionsClientGetMonitoringStatusResponse{}, err } - return client.getMonitoringStatusHandleResponse(resp) + resp, err := client.getMonitoringStatusHandleResponse(httpResp) + return resp, err } // getMonitoringStatusCreateRequest creates the GetMonitoringStatus request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/locations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/locations_client.go index bdac71e4..cc078ff9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/locations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/locations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -34,7 +33,7 @@ type LocationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationsClient, error) { - cl, err := arm.NewClient(moduleName+".LocationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewLocationsClient(subscriptionID string, credential azcore.TokenCredential // - options - LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability // method. func (client *LocationsClient) CheckNameAvailability(ctx context.Context, location string, parameters NameAvailabilityCheckRequestParameters, options *LocationsClientCheckNameAvailabilityOptions) (LocationsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "LocationsClient.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, location, parameters, options) if err != nil { return LocationsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocationsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocationsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocationsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -86,7 +92,10 @@ func (client *LocationsClient) checkNameAvailabilityCreateRequest(ctx context.Co reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -107,18 +116,25 @@ func (client *LocationsClient) checkNameAvailabilityHandleResponse(resp *http.Re // - options - LocationsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the LocationsClient.GetAzureAsyncOperationStatus // method. func (client *LocationsClient) GetAzureAsyncOperationStatus(ctx context.Context, location string, operationID string, options *LocationsClientGetAzureAsyncOperationStatusOptions) (LocationsClientGetAzureAsyncOperationStatusResponse, error) { + var err error + const operationName = "LocationsClient.GetAzureAsyncOperationStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAzureAsyncOperationStatusCreateRequest(ctx, location, operationID, options) if err != nil { return LocationsClientGetAzureAsyncOperationStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocationsClientGetAzureAsyncOperationStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocationsClientGetAzureAsyncOperationStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocationsClientGetAzureAsyncOperationStatusResponse{}, err } - return client.getAzureAsyncOperationStatusHandleResponse(resp) + resp, err := client.getAzureAsyncOperationStatusHandleResponse(httpResp) + return resp, err } // getAzureAsyncOperationStatusCreateRequest creates the GetAzureAsyncOperationStatus request. @@ -164,18 +180,25 @@ func (client *LocationsClient) getAzureAsyncOperationStatusHandleResponse(resp * // - options - LocationsClientGetCapabilitiesOptions contains the optional parameters for the LocationsClient.GetCapabilities // method. func (client *LocationsClient) GetCapabilities(ctx context.Context, location string, options *LocationsClientGetCapabilitiesOptions) (LocationsClientGetCapabilitiesResponse, error) { + var err error + const operationName = "LocationsClient.GetCapabilities" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCapabilitiesCreateRequest(ctx, location, options) if err != nil { return LocationsClientGetCapabilitiesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocationsClientGetCapabilitiesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocationsClientGetCapabilitiesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocationsClientGetCapabilitiesResponse{}, err } - return client.getCapabilitiesHandleResponse(resp) + resp, err := client.getCapabilitiesHandleResponse(httpResp) + return resp, err } // getCapabilitiesCreateRequest creates the GetCapabilities request. @@ -217,18 +240,25 @@ func (client *LocationsClient) getCapabilitiesHandleResponse(resp *http.Response // - options - LocationsClientListBillingSpecsOptions contains the optional parameters for the LocationsClient.ListBillingSpecs // method. func (client *LocationsClient) ListBillingSpecs(ctx context.Context, location string, options *LocationsClientListBillingSpecsOptions) (LocationsClientListBillingSpecsResponse, error) { + var err error + const operationName = "LocationsClient.ListBillingSpecs" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listBillingSpecsCreateRequest(ctx, location, options) if err != nil { return LocationsClientListBillingSpecsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocationsClientListBillingSpecsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocationsClientListBillingSpecsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocationsClientListBillingSpecsResponse{}, err } - return client.listBillingSpecsHandleResponse(resp) + resp, err := client.listBillingSpecsHandleResponse(httpResp) + return resp, err } // listBillingSpecsCreateRequest creates the ListBillingSpecs request. @@ -269,18 +299,25 @@ func (client *LocationsClient) listBillingSpecsHandleResponse(resp *http.Respons // - location - The Azure location (region) for which to make the request. // - options - LocationsClientListUsagesOptions contains the optional parameters for the LocationsClient.ListUsages method. func (client *LocationsClient) ListUsages(ctx context.Context, location string, options *LocationsClientListUsagesOptions) (LocationsClientListUsagesResponse, error) { + var err error + const operationName = "LocationsClient.ListUsages" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listUsagesCreateRequest(ctx, location, options) if err != nil { return LocationsClientListUsagesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocationsClientListUsagesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocationsClientListUsagesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocationsClientListUsagesResponse{}, err } - return client.listUsagesHandleResponse(resp) + resp, err := client.listUsagesHandleResponse(httpResp) + return resp, err } // listUsagesCreateRequest creates the ListUsages request. @@ -322,18 +359,25 @@ func (client *LocationsClient) listUsagesHandleResponse(resp *http.Response) (Lo // - options - LocationsClientValidateClusterCreateRequestOptions contains the optional parameters for the LocationsClient.ValidateClusterCreateRequest // method. func (client *LocationsClient) ValidateClusterCreateRequest(ctx context.Context, location string, parameters ClusterCreateRequestValidationParameters, options *LocationsClientValidateClusterCreateRequestOptions) (LocationsClientValidateClusterCreateRequestResponse, error) { + var err error + const operationName = "LocationsClient.ValidateClusterCreateRequest" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.validateClusterCreateRequestCreateRequest(ctx, location, parameters, options) if err != nil { return LocationsClientValidateClusterCreateRequestResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocationsClientValidateClusterCreateRequestResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocationsClientValidateClusterCreateRequestResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocationsClientValidateClusterCreateRequestResponse{}, err } - return client.validateClusterCreateRequestHandleResponse(resp) + resp, err := client.validateClusterCreateRequestHandleResponse(httpResp) + return resp, err } // validateClusterCreateRequestCreateRequest creates the ValidateClusterCreateRequest request. @@ -355,7 +399,10 @@ func (client *LocationsClient) validateClusterCreateRequestCreateRequest(ctx con reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // validateClusterCreateRequestHandleResponse handles the ValidateClusterCreateRequest response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/models.go index 05db414a..f687c529 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -147,35 +146,6 @@ type ApplicationProperties struct { ProvisioningState *string } -// ApplicationsClientBeginCreateOptions contains the optional parameters for the ApplicationsClient.BeginCreate method. -type ApplicationsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationsClientBeginDeleteOptions contains the optional parameters for the ApplicationsClient.BeginDelete method. -type ApplicationsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ApplicationsClient.GetAzureAsyncOperationStatus -// method. -type ApplicationsClientGetAzureAsyncOperationStatusOptions struct { - // placeholder for future optional parameters -} - -// ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method. -type ApplicationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ApplicationsClientListByClusterOptions contains the optional parameters for the ApplicationsClient.NewListByClusterPager -// method. -type ApplicationsClientListByClusterOptions struct { - // placeholder for future optional parameters -} - // AsyncOperationResult - The azure async operation response. type AsyncOperationResult struct { // The operation error information. @@ -663,91 +633,6 @@ type ClusterResizeParameters struct { TargetInstanceCount *int32 } -// ClustersClientBeginCreateOptions contains the optional parameters for the ClustersClient.BeginCreate method. -type ClustersClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method. -type ClustersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginExecuteScriptActionsOptions contains the optional parameters for the ClustersClient.BeginExecuteScriptActions -// method. -type ClustersClientBeginExecuteScriptActionsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginResizeOptions contains the optional parameters for the ClustersClient.BeginResize method. -type ClustersClientBeginResizeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginRotateDiskEncryptionKeyOptions contains the optional parameters for the ClustersClient.BeginRotateDiskEncryptionKey -// method. -type ClustersClientBeginRotateDiskEncryptionKeyOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginUpdateAutoScaleConfigurationOptions contains the optional parameters for the ClustersClient.BeginUpdateAutoScaleConfiguration -// method. -type ClustersClientBeginUpdateAutoScaleConfigurationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginUpdateGatewaySettingsOptions contains the optional parameters for the ClustersClient.BeginUpdateGatewaySettings -// method. -type ClustersClientBeginUpdateGatewaySettingsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginUpdateIdentityCertificateOptions contains the optional parameters for the ClustersClient.BeginUpdateIdentityCertificate -// method. -type ClustersClientBeginUpdateIdentityCertificateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ClustersClient.GetAzureAsyncOperationStatus -// method. -type ClustersClientGetAzureAsyncOperationStatusOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientGetGatewaySettingsOptions contains the optional parameters for the ClustersClient.GetGatewaySettings method. -type ClustersClientGetGatewaySettingsOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. -type ClustersClientGetOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager -// method. -type ClustersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method. -type ClustersClientListOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientUpdateOptions contains the optional parameters for the ClustersClient.Update method. -type ClustersClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ComputeIsolationProperties - The compute isolation properties. type ComputeIsolationProperties struct { // The flag indicates whether enable compute isolation or not. @@ -763,22 +648,6 @@ type ComputeProfile struct { Roles []*Role } -// ConfigurationsClientBeginUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginUpdate method. -type ConfigurationsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigurationsClientGetOptions contains the optional parameters for the ConfigurationsClient.Get method. -type ConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConfigurationsClientListOptions contains the optional parameters for the ConfigurationsClient.List method. -type ConfigurationsClientListOptions struct { - // placeholder for future optional parameters -} - // ConnectivityEndpoint - The connectivity properties type ConnectivityEndpoint struct { // The location of the endpoint. @@ -908,69 +777,6 @@ type Extension struct { WorkspaceID *string } -// ExtensionsClientBeginCreateOptions contains the optional parameters for the ExtensionsClient.BeginCreate method. -type ExtensionsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExtensionsClientBeginDeleteOptions contains the optional parameters for the ExtensionsClient.BeginDelete method. -type ExtensionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExtensionsClientBeginDisableAzureMonitorOptions contains the optional parameters for the ExtensionsClient.BeginDisableAzureMonitor -// method. -type ExtensionsClientBeginDisableAzureMonitorOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExtensionsClientBeginDisableMonitoringOptions contains the optional parameters for the ExtensionsClient.BeginDisableMonitoring -// method. -type ExtensionsClientBeginDisableMonitoringOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExtensionsClientBeginEnableAzureMonitorOptions contains the optional parameters for the ExtensionsClient.BeginEnableAzureMonitor -// method. -type ExtensionsClientBeginEnableAzureMonitorOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExtensionsClientBeginEnableMonitoringOptions contains the optional parameters for the ExtensionsClient.BeginEnableMonitoring -// method. -type ExtensionsClientBeginEnableMonitoringOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExtensionsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ExtensionsClient.GetAzureAsyncOperationStatus -// method. -type ExtensionsClientGetAzureAsyncOperationStatusOptions struct { - // placeholder for future optional parameters -} - -// ExtensionsClientGetAzureMonitorStatusOptions contains the optional parameters for the ExtensionsClient.GetAzureMonitorStatus -// method. -type ExtensionsClientGetAzureMonitorStatusOptions struct { - // placeholder for future optional parameters -} - -// ExtensionsClientGetMonitoringStatusOptions contains the optional parameters for the ExtensionsClient.GetMonitoringStatus -// method. -type ExtensionsClientGetMonitoringStatusOptions struct { - // placeholder for future optional parameters -} - -// ExtensionsClientGetOptions contains the optional parameters for the ExtensionsClient.Get method. -type ExtensionsClientGetOptions struct { - // placeholder for future optional parameters -} - // GatewaySettings - Gateway settings. type GatewaySettings struct { // READ-ONLY; Indicates whether or not the gateway settings based authorization is enabled. @@ -1064,39 +870,6 @@ type LocalizedName struct { Value *string } -// LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability -// method. -type LocationsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// LocationsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the LocationsClient.GetAzureAsyncOperationStatus -// method. -type LocationsClientGetAzureAsyncOperationStatusOptions struct { - // placeholder for future optional parameters -} - -// LocationsClientGetCapabilitiesOptions contains the optional parameters for the LocationsClient.GetCapabilities method. -type LocationsClientGetCapabilitiesOptions struct { - // placeholder for future optional parameters -} - -// LocationsClientListBillingSpecsOptions contains the optional parameters for the LocationsClient.ListBillingSpecs method. -type LocationsClientListBillingSpecsOptions struct { - // placeholder for future optional parameters -} - -// LocationsClientListUsagesOptions contains the optional parameters for the LocationsClient.ListUsages method. -type LocationsClientListUsagesOptions struct { - // placeholder for future optional parameters -} - -// LocationsClientValidateClusterCreateRequestOptions contains the optional parameters for the LocationsClient.ValidateClusterCreateRequest -// method. -type LocationsClientValidateClusterCreateRequestOptions struct { - // placeholder for future optional parameters -} - // MetricSpecifications - The details of metric specifications. type MetricSpecifications struct { // The aggregation type of the metric specification. @@ -1224,11 +997,6 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // OsProfile - The Linux operation systems profile. type OsProfile struct { // The Linux OS profile. @@ -1283,32 +1051,6 @@ type PrivateEndpointConnectionProperties struct { ProvisioningState *PrivateEndpointConnectionProvisioningState } -// 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 -} - -// PrivateEndpointConnectionsClientListByClusterOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByClusterPager -// method. -type PrivateEndpointConnectionsClientListByClusterOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkConfiguration - The private link configuration. type PrivateLinkConfiguration struct { // REQUIRED; The name of private link configuration. @@ -1373,17 +1115,6 @@ type PrivateLinkResourceProperties struct { RequiredMembers []*string } -// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. -type PrivateLinkResourcesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkResourcesClientListByClusterOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByCluster -// method. -type PrivateLinkResourcesClientListByClusterOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkServiceConnectionState - The private link service connection state. type PrivateLinkServiceConnectionState struct { // REQUIRED; The concrete private link service connection. @@ -1616,29 +1347,6 @@ type ScriptActionPersistedGetResponseSpec struct { URI *string } -// ScriptActionsClientDeleteOptions contains the optional parameters for the ScriptActionsClient.Delete method. -type ScriptActionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ScriptActionsClientGetExecutionAsyncOperationStatusOptions contains the optional parameters for the ScriptActionsClient.GetExecutionAsyncOperationStatus -// method. -type ScriptActionsClientGetExecutionAsyncOperationStatusOptions struct { - // placeholder for future optional parameters -} - -// ScriptActionsClientGetExecutionDetailOptions contains the optional parameters for the ScriptActionsClient.GetExecutionDetail -// method. -type ScriptActionsClientGetExecutionDetailOptions struct { - // placeholder for future optional parameters -} - -// ScriptActionsClientListByClusterOptions contains the optional parameters for the ScriptActionsClient.NewListByClusterPager -// method. -type ScriptActionsClientListByClusterOptions struct { - // placeholder for future optional parameters -} - // ScriptActionsList - The persisted script action for the cluster. type ScriptActionsList struct { // The list of persisted script action details for the cluster. @@ -1648,18 +1356,6 @@ type ScriptActionsList struct { NextLink *string } -// ScriptExecutionHistoryClientListByClusterOptions contains the optional parameters for the ScriptExecutionHistoryClient.NewListByClusterPager -// method. -type ScriptExecutionHistoryClientListByClusterOptions struct { - // placeholder for future optional parameters -} - -// ScriptExecutionHistoryClientPromoteOptions contains the optional parameters for the ScriptExecutionHistoryClient.Promote -// method. -type ScriptExecutionHistoryClientPromoteOptions struct { - // placeholder for future optional parameters -} - // SecurityProfile - The security profile which contains Ssh public key for the HDInsight cluster. type SecurityProfile struct { // The resource ID of the user's Azure Active Directory Domain Service. @@ -1934,24 +1630,6 @@ type VersionsCapability struct { Available []*VersionSpec } -// VirtualMachinesClientBeginRestartHostsOptions contains the optional parameters for the VirtualMachinesClient.BeginRestartHosts -// method. -type VirtualMachinesClientBeginRestartHostsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualMachinesClientGetAsyncOperationStatusOptions contains the optional parameters for the VirtualMachinesClient.GetAsyncOperationStatus -// method. -type VirtualMachinesClientGetAsyncOperationStatusOptions struct { - // placeholder for future optional parameters -} - -// VirtualMachinesClientListHostsOptions contains the optional parameters for the VirtualMachinesClient.ListHosts method. -type VirtualMachinesClientListHostsOptions struct { - // placeholder for future optional parameters -} - // VirtualNetworkProfile - The virtual network properties. type VirtualNetworkProfile struct { // The ID of the virtual network. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/models_serde.go index fe615a58..827f2ba9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -3780,10 +3779,10 @@ func (s *StorageProfile) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -3799,7 +3798,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -3808,7 +3807,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/operations_client.go index 4fba766d..7a5f3288 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,20 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/options.go new file mode 100644 index 00000000..f0ca1dce --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/options.go @@ -0,0 +1,330 @@ +//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 armhdinsight + +// ApplicationsClientBeginCreateOptions contains the optional parameters for the ApplicationsClient.BeginCreate method. +type ApplicationsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationsClientBeginDeleteOptions contains the optional parameters for the ApplicationsClient.BeginDelete method. +type ApplicationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ApplicationsClient.GetAzureAsyncOperationStatus +// method. +type ApplicationsClientGetAzureAsyncOperationStatusOptions struct { + // placeholder for future optional parameters +} + +// ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method. +type ApplicationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationsClientListByClusterOptions contains the optional parameters for the ApplicationsClient.NewListByClusterPager +// method. +type ApplicationsClientListByClusterOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientBeginCreateOptions contains the optional parameters for the ClustersClient.BeginCreate method. +type ClustersClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method. +type ClustersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginExecuteScriptActionsOptions contains the optional parameters for the ClustersClient.BeginExecuteScriptActions +// method. +type ClustersClientBeginExecuteScriptActionsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginResizeOptions contains the optional parameters for the ClustersClient.BeginResize method. +type ClustersClientBeginResizeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginRotateDiskEncryptionKeyOptions contains the optional parameters for the ClustersClient.BeginRotateDiskEncryptionKey +// method. +type ClustersClientBeginRotateDiskEncryptionKeyOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginUpdateAutoScaleConfigurationOptions contains the optional parameters for the ClustersClient.BeginUpdateAutoScaleConfiguration +// method. +type ClustersClientBeginUpdateAutoScaleConfigurationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginUpdateGatewaySettingsOptions contains the optional parameters for the ClustersClient.BeginUpdateGatewaySettings +// method. +type ClustersClientBeginUpdateGatewaySettingsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginUpdateIdentityCertificateOptions contains the optional parameters for the ClustersClient.BeginUpdateIdentityCertificate +// method. +type ClustersClientBeginUpdateIdentityCertificateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ClustersClient.GetAzureAsyncOperationStatus +// method. +type ClustersClientGetAzureAsyncOperationStatusOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientGetGatewaySettingsOptions contains the optional parameters for the ClustersClient.GetGatewaySettings method. +type ClustersClientGetGatewaySettingsOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. +type ClustersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager +// method. +type ClustersClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method. +type ClustersClientListOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientUpdateOptions contains the optional parameters for the ClustersClient.Update method. +type ClustersClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConfigurationsClientBeginUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginUpdate method. +type ConfigurationsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConfigurationsClientGetOptions contains the optional parameters for the ConfigurationsClient.Get method. +type ConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConfigurationsClientListOptions contains the optional parameters for the ConfigurationsClient.List method. +type ConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExtensionsClientBeginCreateOptions contains the optional parameters for the ExtensionsClient.BeginCreate method. +type ExtensionsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExtensionsClientBeginDeleteOptions contains the optional parameters for the ExtensionsClient.BeginDelete method. +type ExtensionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExtensionsClientBeginDisableAzureMonitorOptions contains the optional parameters for the ExtensionsClient.BeginDisableAzureMonitor +// method. +type ExtensionsClientBeginDisableAzureMonitorOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExtensionsClientBeginDisableMonitoringOptions contains the optional parameters for the ExtensionsClient.BeginDisableMonitoring +// method. +type ExtensionsClientBeginDisableMonitoringOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExtensionsClientBeginEnableAzureMonitorOptions contains the optional parameters for the ExtensionsClient.BeginEnableAzureMonitor +// method. +type ExtensionsClientBeginEnableAzureMonitorOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExtensionsClientBeginEnableMonitoringOptions contains the optional parameters for the ExtensionsClient.BeginEnableMonitoring +// method. +type ExtensionsClientBeginEnableMonitoringOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExtensionsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ExtensionsClient.GetAzureAsyncOperationStatus +// method. +type ExtensionsClientGetAzureAsyncOperationStatusOptions struct { + // placeholder for future optional parameters +} + +// ExtensionsClientGetAzureMonitorStatusOptions contains the optional parameters for the ExtensionsClient.GetAzureMonitorStatus +// method. +type ExtensionsClientGetAzureMonitorStatusOptions struct { + // placeholder for future optional parameters +} + +// ExtensionsClientGetMonitoringStatusOptions contains the optional parameters for the ExtensionsClient.GetMonitoringStatus +// method. +type ExtensionsClientGetMonitoringStatusOptions struct { + // placeholder for future optional parameters +} + +// ExtensionsClientGetOptions contains the optional parameters for the ExtensionsClient.Get method. +type ExtensionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability +// method. +type LocationsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// LocationsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the LocationsClient.GetAzureAsyncOperationStatus +// method. +type LocationsClientGetAzureAsyncOperationStatusOptions struct { + // placeholder for future optional parameters +} + +// LocationsClientGetCapabilitiesOptions contains the optional parameters for the LocationsClient.GetCapabilities method. +type LocationsClientGetCapabilitiesOptions struct { + // placeholder for future optional parameters +} + +// LocationsClientListBillingSpecsOptions contains the optional parameters for the LocationsClient.ListBillingSpecs method. +type LocationsClientListBillingSpecsOptions struct { + // placeholder for future optional parameters +} + +// LocationsClientListUsagesOptions contains the optional parameters for the LocationsClient.ListUsages method. +type LocationsClientListUsagesOptions struct { + // placeholder for future optional parameters +} + +// LocationsClientValidateClusterCreateRequestOptions contains the optional parameters for the LocationsClient.ValidateClusterCreateRequest +// method. +type LocationsClientValidateClusterCreateRequestOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions 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 +} + +// PrivateEndpointConnectionsClientListByClusterOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByClusterPager +// method. +type PrivateEndpointConnectionsClientListByClusterOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. +type PrivateLinkResourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListByClusterOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByCluster +// method. +type PrivateLinkResourcesClientListByClusterOptions struct { + // placeholder for future optional parameters +} + +// ScriptActionsClientDeleteOptions contains the optional parameters for the ScriptActionsClient.Delete method. +type ScriptActionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ScriptActionsClientGetExecutionAsyncOperationStatusOptions contains the optional parameters for the ScriptActionsClient.GetExecutionAsyncOperationStatus +// method. +type ScriptActionsClientGetExecutionAsyncOperationStatusOptions struct { + // placeholder for future optional parameters +} + +// ScriptActionsClientGetExecutionDetailOptions contains the optional parameters for the ScriptActionsClient.GetExecutionDetail +// method. +type ScriptActionsClientGetExecutionDetailOptions struct { + // placeholder for future optional parameters +} + +// ScriptActionsClientListByClusterOptions contains the optional parameters for the ScriptActionsClient.NewListByClusterPager +// method. +type ScriptActionsClientListByClusterOptions struct { + // placeholder for future optional parameters +} + +// ScriptExecutionHistoryClientListByClusterOptions contains the optional parameters for the ScriptExecutionHistoryClient.NewListByClusterPager +// method. +type ScriptExecutionHistoryClientListByClusterOptions struct { + // placeholder for future optional parameters +} + +// ScriptExecutionHistoryClientPromoteOptions contains the optional parameters for the ScriptExecutionHistoryClient.Promote +// method. +type ScriptExecutionHistoryClientPromoteOptions struct { + // placeholder for future optional parameters +} + +// VirtualMachinesClientBeginRestartHostsOptions contains the optional parameters for the VirtualMachinesClient.BeginRestartHosts +// method. +type VirtualMachinesClientBeginRestartHostsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualMachinesClientGetAsyncOperationStatusOptions contains the optional parameters for the VirtualMachinesClient.GetAsyncOperationStatus +// method. +type VirtualMachinesClientGetAsyncOperationStatusOptions struct { + // placeholder for future optional parameters +} + +// VirtualMachinesClientListHostsOptions contains the optional parameters for the VirtualMachinesClient.ListHosts method. +type VirtualMachinesClientListHostsOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/privateendpointconnections_client.go index c2c50dfa..856498bc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/privateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/privateendpointconnections_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -34,7 +33,7 @@ type PrivateEndpointConnectionsClient struct { // - 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+".PrivateEndpointConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,11 +60,15 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -74,18 +77,24 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. // // Generated from API version 2021-06-01 func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName 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, clusterName, privateEndpointConnectionName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -115,7 +124,10 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the specific private endpoint connection. @@ -133,11 +145,15 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -146,18 +162,24 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // // Generated from API version 2021-06-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName 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, clusterName, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -200,18 +222,25 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get // method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, clusterName 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, clusterName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -266,25 +295,20 @@ func (client *PrivateEndpointConnectionsClient) NewListByClusterPager(resourceGr return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsClientListByClusterResponse) (PrivateEndpointConnectionsClientListByClusterResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateEndpointConnectionsClientListByClusterResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointConnectionsClient.NewListByClusterPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) + }, nil) if err != nil { return PrivateEndpointConnectionsClientListByClusterResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientListByClusterResponse{}, runtime.NewResponseError(resp) - } return client.listByClusterHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/privatelinkresources_client.go index f4dcb843..c4d37d13 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/privatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/privatelinkresources_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -34,7 +33,7 @@ type PrivateLinkResourcesClient struct { // - 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+".PrivateLinkResourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // - options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get // method. func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, privateLinkResourceName 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, clusterName, privateLinkResourceName, options) if err != nil { return PrivateLinkResourcesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -117,18 +123,25 @@ func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) // - options - PrivateLinkResourcesClientListByClusterOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByCluster // method. func (client *PrivateLinkResourcesClient) ListByCluster(ctx context.Context, resourceGroupName string, clusterName string, options *PrivateLinkResourcesClientListByClusterOptions) (PrivateLinkResourcesClientListByClusterResponse, error) { + var err error + const operationName = "PrivateLinkResourcesClient.ListByCluster" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { return PrivateLinkResourcesClientListByClusterResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientListByClusterResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientListByClusterResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientListByClusterResponse{}, err } - return client.listByClusterHandleResponse(resp) + resp, err := client.listByClusterHandleResponse(httpResp) + return resp, err } // listByClusterCreateRequest creates the ListByCluster request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/response_types.go index 0c2be861..859d7760 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/response_types.go @@ -3,14 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight // ApplicationsClientCreateResponse contains the response from method ApplicationsClient.BeginCreate. type ApplicationsClientCreateResponse struct { + // The HDInsight cluster application Application } @@ -21,21 +21,26 @@ type ApplicationsClientDeleteResponse struct { // ApplicationsClientGetAzureAsyncOperationStatusResponse contains the response from method ApplicationsClient.GetAzureAsyncOperationStatus. type ApplicationsClientGetAzureAsyncOperationStatusResponse struct { + // The azure async operation response. AsyncOperationResult } // ApplicationsClientGetResponse contains the response from method ApplicationsClient.Get. type ApplicationsClientGetResponse struct { + // The HDInsight cluster application Application } // ApplicationsClientListByClusterResponse contains the response from method ApplicationsClient.NewListByClusterPager. type ApplicationsClientListByClusterResponse struct { + // Result of the request to list cluster Applications. It contains a list of operations and a URL link to get the next set + // of results. ApplicationListResult } // ClustersClientCreateResponse contains the response from method ClustersClient.BeginCreate. type ClustersClientCreateResponse struct { + // The HDInsight cluster. Cluster } @@ -51,26 +56,31 @@ type ClustersClientExecuteScriptActionsResponse struct { // ClustersClientGetAzureAsyncOperationStatusResponse contains the response from method ClustersClient.GetAzureAsyncOperationStatus. type ClustersClientGetAzureAsyncOperationStatusResponse struct { + // The azure async operation response. AsyncOperationResult } // ClustersClientGetGatewaySettingsResponse contains the response from method ClustersClient.GetGatewaySettings. type ClustersClientGetGatewaySettingsResponse struct { + // Gateway settings. GatewaySettings } // ClustersClientGetResponse contains the response from method ClustersClient.Get. type ClustersClientGetResponse struct { + // The HDInsight cluster. Cluster } // ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.NewListByResourceGroupPager. type ClustersClientListByResourceGroupResponse struct { + // The List Cluster operation response. ClusterListResult } // ClustersClientListResponse contains the response from method ClustersClient.NewListPager. type ClustersClientListResponse struct { + // The List Cluster operation response. ClusterListResult } @@ -101,6 +111,7 @@ type ClustersClientUpdateIdentityCertificateResponse struct { // ClustersClientUpdateResponse contains the response from method ClustersClient.Update. type ClustersClientUpdateResponse struct { + // The HDInsight cluster. Cluster } @@ -112,6 +123,7 @@ type ConfigurationsClientGetResponse struct { // ConfigurationsClientListResponse contains the response from method ConfigurationsClient.List. type ConfigurationsClientListResponse struct { + // The configuration object for the specified cluster. ClusterConfigurations } @@ -152,61 +164,74 @@ type ExtensionsClientEnableMonitoringResponse struct { // ExtensionsClientGetAzureAsyncOperationStatusResponse contains the response from method ExtensionsClient.GetAzureAsyncOperationStatus. type ExtensionsClientGetAzureAsyncOperationStatusResponse struct { + // The azure async operation response. AsyncOperationResult } // ExtensionsClientGetAzureMonitorStatusResponse contains the response from method ExtensionsClient.GetAzureMonitorStatus. type ExtensionsClientGetAzureMonitorStatusResponse struct { + // The azure monitor status response. AzureMonitorResponse } // ExtensionsClientGetMonitoringStatusResponse contains the response from method ExtensionsClient.GetMonitoringStatus. type ExtensionsClientGetMonitoringStatusResponse struct { + // The cluster monitoring status response. ClusterMonitoringResponse } // ExtensionsClientGetResponse contains the response from method ExtensionsClient.Get. type ExtensionsClientGetResponse struct { + // The cluster monitoring status response. ClusterMonitoringResponse } // LocationsClientCheckNameAvailabilityResponse contains the response from method LocationsClient.CheckNameAvailability. type LocationsClientCheckNameAvailabilityResponse struct { + // The response spec of checking name availability. NameAvailabilityCheckResult } // LocationsClientGetAzureAsyncOperationStatusResponse contains the response from method LocationsClient.GetAzureAsyncOperationStatus. type LocationsClientGetAzureAsyncOperationStatusResponse struct { + // The azure async operation response. AsyncOperationResult } // LocationsClientGetCapabilitiesResponse contains the response from method LocationsClient.GetCapabilities. type LocationsClientGetCapabilitiesResponse struct { + // The Get Capabilities operation response. CapabilitiesResult } // LocationsClientListBillingSpecsResponse contains the response from method LocationsClient.ListBillingSpecs. type LocationsClientListBillingSpecsResponse struct { + // The response for the operation to get regional billingSpecs for a subscription. BillingResponseListResult } // LocationsClientListUsagesResponse contains the response from method LocationsClient.ListUsages. type LocationsClientListUsagesResponse struct { + // The response for the operation to get regional usages for a subscription. UsagesListResult } // LocationsClientValidateClusterCreateRequestResponse contains the response from method LocationsClient.ValidateClusterCreateRequest. type LocationsClientValidateClusterCreateRequestResponse struct { + // The response of cluster create request validation. ClusterCreateValidationResult } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list HDInsight operations. It contains a list of operations and a URL link to get the next set + // of results. OperationListResult } // PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate. type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct { + // The private endpoint connection. PrivateEndpointConnection } @@ -217,21 +242,25 @@ type PrivateEndpointConnectionsClientDeleteResponse struct { // PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. type PrivateEndpointConnectionsClientGetResponse struct { + // The private endpoint connection. PrivateEndpointConnection } // PrivateEndpointConnectionsClientListByClusterResponse contains the response from method PrivateEndpointConnectionsClient.NewListByClusterPager. type PrivateEndpointConnectionsClientListByClusterResponse struct { + // The list private endpoint connections response. PrivateEndpointConnectionListResult } // PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get. type PrivateLinkResourcesClientGetResponse struct { + // A private link resource PrivateLinkResource } // PrivateLinkResourcesClientListByClusterResponse contains the response from method PrivateLinkResourcesClient.ListByCluster. type PrivateLinkResourcesClientListByClusterResponse struct { + // A list of private link resources PrivateLinkResourceListResult } @@ -242,21 +271,25 @@ type ScriptActionsClientDeleteResponse struct { // ScriptActionsClientGetExecutionAsyncOperationStatusResponse contains the response from method ScriptActionsClient.GetExecutionAsyncOperationStatus. type ScriptActionsClientGetExecutionAsyncOperationStatusResponse struct { + // The azure async operation response. AsyncOperationResult } // ScriptActionsClientGetExecutionDetailResponse contains the response from method ScriptActionsClient.GetExecutionDetail. type ScriptActionsClientGetExecutionDetailResponse struct { + // The execution details of a script action. RuntimeScriptActionDetail } // ScriptActionsClientListByClusterResponse contains the response from method ScriptActionsClient.NewListByClusterPager. type ScriptActionsClientListByClusterResponse struct { + // The persisted script action for the cluster. ScriptActionsList } // ScriptExecutionHistoryClientListByClusterResponse contains the response from method ScriptExecutionHistoryClient.NewListByClusterPager. type ScriptExecutionHistoryClientListByClusterResponse struct { + // The list script execution history response. ScriptActionExecutionHistoryList } @@ -267,6 +300,7 @@ type ScriptExecutionHistoryClientPromoteResponse struct { // VirtualMachinesClientGetAsyncOperationStatusResponse contains the response from method VirtualMachinesClient.GetAsyncOperationStatus. type VirtualMachinesClientGetAsyncOperationStatusResponse struct { + // The azure async operation response. AsyncOperationResult } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/scriptactions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/scriptactions_client.go index 936e562d..48fefb1e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/scriptactions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/scriptactions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -34,7 +33,7 @@ type ScriptActionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewScriptActionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScriptActionsClient, error) { - cl, err := arm.NewClient(moduleName+".ScriptActionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,16 +53,22 @@ func NewScriptActionsClient(subscriptionID string, credential azcore.TokenCreden // - scriptName - The name of the script. // - options - ScriptActionsClientDeleteOptions contains the optional parameters for the ScriptActionsClient.Delete method. func (client *ScriptActionsClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, scriptName string, options *ScriptActionsClientDeleteOptions) (ScriptActionsClientDeleteResponse, error) { + var err error + const operationName = "ScriptActionsClient.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, clusterName, scriptName, options) if err != nil { return ScriptActionsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScriptActionsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ScriptActionsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ScriptActionsClientDeleteResponse{}, err } return ScriptActionsClientDeleteResponse{}, nil } @@ -108,18 +113,25 @@ func (client *ScriptActionsClient) deleteCreateRequest(ctx context.Context, reso // - options - ScriptActionsClientGetExecutionAsyncOperationStatusOptions contains the optional parameters for the ScriptActionsClient.GetExecutionAsyncOperationStatus // method. func (client *ScriptActionsClient) GetExecutionAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, operationID string, options *ScriptActionsClientGetExecutionAsyncOperationStatusOptions) (ScriptActionsClientGetExecutionAsyncOperationStatusResponse, error) { + var err error + const operationName = "ScriptActionsClient.GetExecutionAsyncOperationStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getExecutionAsyncOperationStatusCreateRequest(ctx, resourceGroupName, clusterName, operationID, options) if err != nil { return ScriptActionsClientGetExecutionAsyncOperationStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScriptActionsClientGetExecutionAsyncOperationStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScriptActionsClientGetExecutionAsyncOperationStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScriptActionsClientGetExecutionAsyncOperationStatusResponse{}, err } - return client.getExecutionAsyncOperationStatusHandleResponse(resp) + resp, err := client.getExecutionAsyncOperationStatusHandleResponse(httpResp) + return resp, err } // getExecutionAsyncOperationStatusCreateRequest creates the GetExecutionAsyncOperationStatus request. @@ -171,18 +183,25 @@ func (client *ScriptActionsClient) getExecutionAsyncOperationStatusHandleRespons // - options - ScriptActionsClientGetExecutionDetailOptions contains the optional parameters for the ScriptActionsClient.GetExecutionDetail // method. func (client *ScriptActionsClient) GetExecutionDetail(ctx context.Context, resourceGroupName string, clusterName string, scriptExecutionID string, options *ScriptActionsClientGetExecutionDetailOptions) (ScriptActionsClientGetExecutionDetailResponse, error) { + var err error + const operationName = "ScriptActionsClient.GetExecutionDetail" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getExecutionDetailCreateRequest(ctx, resourceGroupName, clusterName, scriptExecutionID, options) if err != nil { return ScriptActionsClientGetExecutionDetailResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScriptActionsClientGetExecutionDetailResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScriptActionsClientGetExecutionDetailResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScriptActionsClientGetExecutionDetailResponse{}, err } - return client.getExecutionDetailHandleResponse(resp) + resp, err := client.getExecutionDetailHandleResponse(httpResp) + return resp, err } // getExecutionDetailCreateRequest creates the GetExecutionDetail request. @@ -237,25 +256,20 @@ func (client *ScriptActionsClient) NewListByClusterPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ScriptActionsClientListByClusterResponse) (ScriptActionsClientListByClusterResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ScriptActionsClient.NewListByClusterPager") + 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.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) + }, nil) if err != nil { return ScriptActionsClientListByClusterResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ScriptActionsClientListByClusterResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScriptActionsClientListByClusterResponse{}, runtime.NewResponseError(resp) - } return client.listByClusterHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/scriptexecutionhistory_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/scriptexecutionhistory_client.go index 5aa06335..996a2442 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/scriptexecutionhistory_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/scriptexecutionhistory_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -34,7 +33,7 @@ type ScriptExecutionHistoryClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewScriptExecutionHistoryClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScriptExecutionHistoryClient, error) { - cl, err := arm.NewClient(moduleName+".ScriptExecutionHistoryClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,25 +57,20 @@ func (client *ScriptExecutionHistoryClient) NewListByClusterPager(resourceGroupN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ScriptExecutionHistoryClientListByClusterResponse) (ScriptExecutionHistoryClientListByClusterResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ScriptExecutionHistoryClient.NewListByClusterPager") + 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.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) + }, nil) if err != nil { return ScriptExecutionHistoryClientListByClusterResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ScriptExecutionHistoryClientListByClusterResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScriptExecutionHistoryClientListByClusterResponse{}, runtime.NewResponseError(resp) - } return client.listByClusterHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -125,16 +119,22 @@ func (client *ScriptExecutionHistoryClient) listByClusterHandleResponse(resp *ht // - options - ScriptExecutionHistoryClientPromoteOptions contains the optional parameters for the ScriptExecutionHistoryClient.Promote // method. func (client *ScriptExecutionHistoryClient) Promote(ctx context.Context, resourceGroupName string, clusterName string, scriptExecutionID string, options *ScriptExecutionHistoryClientPromoteOptions) (ScriptExecutionHistoryClientPromoteResponse, error) { + var err error + const operationName = "ScriptExecutionHistoryClient.Promote" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.promoteCreateRequest(ctx, resourceGroupName, clusterName, scriptExecutionID, options) if err != nil { return ScriptExecutionHistoryClientPromoteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScriptExecutionHistoryClientPromoteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScriptExecutionHistoryClientPromoteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScriptExecutionHistoryClientPromoteResponse{}, err } return ScriptExecutionHistoryClientPromoteResponse{}, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/time_rfc3339.go index 9fafbcd1..7abc0991 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/virtualmachines_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/virtualmachines_client.go index 20009ba6..5e3edf1f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/virtualmachines_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/virtualmachines_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armhdinsight @@ -34,7 +33,7 @@ type VirtualMachinesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachinesClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachinesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCred // - options - VirtualMachinesClientGetAsyncOperationStatusOptions contains the optional parameters for the VirtualMachinesClient.GetAsyncOperationStatus // method. func (client *VirtualMachinesClient) GetAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, operationID string, options *VirtualMachinesClientGetAsyncOperationStatusOptions) (VirtualMachinesClientGetAsyncOperationStatusResponse, error) { + var err error + const operationName = "VirtualMachinesClient.GetAsyncOperationStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAsyncOperationStatusCreateRequest(ctx, resourceGroupName, clusterName, operationID, options) if err != nil { return VirtualMachinesClientGetAsyncOperationStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VirtualMachinesClientGetAsyncOperationStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualMachinesClientGetAsyncOperationStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualMachinesClientGetAsyncOperationStatusResponse{}, err } - return client.getAsyncOperationStatusHandleResponse(resp) + resp, err := client.getAsyncOperationStatusHandleResponse(httpResp) + return resp, err } // getAsyncOperationStatusCreateRequest creates the GetAsyncOperationStatus request. @@ -117,18 +123,25 @@ func (client *VirtualMachinesClient) getAsyncOperationStatusHandleResponse(resp // - options - VirtualMachinesClientListHostsOptions contains the optional parameters for the VirtualMachinesClient.ListHosts // method. func (client *VirtualMachinesClient) ListHosts(ctx context.Context, resourceGroupName string, clusterName string, options *VirtualMachinesClientListHostsOptions) (VirtualMachinesClientListHostsResponse, error) { + var err error + const operationName = "VirtualMachinesClient.ListHosts" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listHostsCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { return VirtualMachinesClientListHostsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VirtualMachinesClientListHostsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualMachinesClientListHostsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualMachinesClientListHostsResponse{}, err } - return client.listHostsHandleResponse(resp) + resp, err := client.listHostsHandleResponse(httpResp) + return resp, err } // listHostsCreateRequest creates the ListHosts request. @@ -181,11 +194,15 @@ func (client *VirtualMachinesClient) BeginRestartHosts(ctx context.Context, reso if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientRestartHostsResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientRestartHostsResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientRestartHostsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientRestartHostsResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -194,18 +211,24 @@ func (client *VirtualMachinesClient) BeginRestartHosts(ctx context.Context, reso // // Generated from API version 2021-06-01 func (client *VirtualMachinesClient) restartHosts(ctx context.Context, resourceGroupName string, clusterName string, hosts []*string, options *VirtualMachinesClientBeginRestartHostsOptions) (*http.Response, error) { + var err error + const operationName = "VirtualMachinesClient.BeginRestartHosts" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restartHostsCreateRequest(ctx, resourceGroupName, clusterName, hosts, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // restartHostsCreateRequest creates the RestartHosts request. @@ -231,5 +254,8 @@ func (client *VirtualMachinesClient) restartHostsCreateRequest(ctx context.Conte reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hosts) + if err := runtime.MarshalAsJSON(req, hosts); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/CHANGELOG.md index 0558796f..6bfb2c9d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/CHANGELOG.md @@ -1,5 +1,18 @@ # Release History +## 1.3.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 1.2.0 (2023-09-22) +### Features Added + +- New struct `RoutingCosmosDBSQLAPIProperties` +- New field `CosmosDBSQLContainers` in struct `RoutingEndpoints` + + ## 1.1.1 (2023-04-14) ### Bug Fixes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/README.md index 1a925af1..7474f42b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewResourceClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/assets.json new file mode 100644 index 00000000..6c341b8a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/iothub/armiothub", + "Tag": "go/resourcemanager/iothub/armiothub_2cadee7353" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/autorest.md index e33bbcc1..823f15e4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/autorest.md @@ -5,8 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/iothub/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/iothub/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 +module-version: 1.3.0 +tag: package-2023-06 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/certificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/certificates_client.go index ce3075a0..000f0eda 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/certificates_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/certificates_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub @@ -33,7 +32,7 @@ type CertificatesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificatesClient, error) { - cl, err := arm.NewClient(moduleName+".CertificatesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Adds new or replaces existing certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - certificateName - The name of the certificate @@ -55,18 +54,25 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent // - options - CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate // method. func (client *CertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, certificateDescription CertificateDescription, options *CertificatesClientCreateOrUpdateOptions) (CertificatesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "CertificatesClient.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, resourceName, certificateName, certificateDescription, options) if err != nil { return CertificatesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return CertificatesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -93,13 +99,16 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateDescription) + if err := runtime.MarshalAsJSON(req, certificateDescription); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -114,23 +123,29 @@ func (client *CertificatesClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Deletes an existing X509 certificate or does nothing if it does not exist. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - certificateName - The name of the certificate // - ifMatch - ETag of the Certificate. // - options - CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. func (client *CertificatesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, ifMatch string, options *CertificatesClientDeleteOptions) (CertificatesClientDeleteResponse, error) { + var err error + const operationName = "CertificatesClient.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, resourceName, certificateName, ifMatch, options) if err != nil { return CertificatesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return CertificatesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientDeleteResponse{}, err } return CertificatesClientDeleteResponse{}, nil } @@ -159,7 +174,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} @@ -170,7 +185,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou // to generate a leaf certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - certificateName - The name of the certificate @@ -178,18 +193,25 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou // - options - CertificatesClientGenerateVerificationCodeOptions contains the optional parameters for the CertificatesClient.GenerateVerificationCode // method. func (client *CertificatesClient) GenerateVerificationCode(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, ifMatch string, options *CertificatesClientGenerateVerificationCodeOptions) (CertificatesClientGenerateVerificationCodeResponse, error) { + var err error + const operationName = "CertificatesClient.GenerateVerificationCode" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.generateVerificationCodeCreateRequest(ctx, resourceGroupName, resourceName, certificateName, ifMatch, options) if err != nil { return CertificatesClientGenerateVerificationCodeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientGenerateVerificationCodeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientGenerateVerificationCodeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientGenerateVerificationCodeResponse{}, err } - return client.generateVerificationCodeHandleResponse(resp) + resp, err := client.generateVerificationCodeHandleResponse(httpResp) + return resp, err } // generateVerificationCodeCreateRequest creates the GenerateVerificationCode request. @@ -216,7 +238,7 @@ func (client *CertificatesClient) generateVerificationCodeCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} @@ -235,24 +257,31 @@ func (client *CertificatesClient) generateVerificationCodeHandleResponse(resp *h // Get - Returns the certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - certificateName - The name of the certificate // - options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, options *CertificatesClientGetOptions) (CertificatesClientGetResponse, error) { + var err error + const operationName = "CertificatesClient.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, resourceName, certificateName, options) if err != nil { return CertificatesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -279,7 +308,7 @@ func (client *CertificatesClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -297,24 +326,31 @@ func (client *CertificatesClient) getHandleResponse(resp *http.Response) (Certif // ListByIotHub - Returns the list of certificates. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - CertificatesClientListByIotHubOptions contains the optional parameters for the CertificatesClient.ListByIotHub // method. func (client *CertificatesClient) ListByIotHub(ctx context.Context, resourceGroupName string, resourceName string, options *CertificatesClientListByIotHubOptions) (CertificatesClientListByIotHubResponse, error) { + var err error + const operationName = "CertificatesClient.ListByIotHub" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByIotHubCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return CertificatesClientListByIotHubResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientListByIotHubResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientListByIotHubResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientListByIotHubResponse{}, err } - return client.listByIotHubHandleResponse(resp) + resp, err := client.listByIotHubHandleResponse(httpResp) + return resp, err } // listByIotHubCreateRequest creates the ListByIotHub request. @@ -337,7 +373,7 @@ func (client *CertificatesClient) listByIotHubCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -356,7 +392,7 @@ func (client *CertificatesClient) listByIotHubHandleResponse(resp *http.Response // certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - certificateName - The name of the certificate @@ -364,18 +400,25 @@ func (client *CertificatesClient) listByIotHubHandleResponse(resp *http.Response // - certificateVerificationBody - The name of the certificate // - options - CertificatesClientVerifyOptions contains the optional parameters for the CertificatesClient.Verify method. func (client *CertificatesClient) Verify(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, ifMatch string, certificateVerificationBody CertificateVerificationDescription, options *CertificatesClientVerifyOptions) (CertificatesClientVerifyResponse, error) { + var err error + const operationName = "CertificatesClient.Verify" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.verifyCreateRequest(ctx, resourceGroupName, resourceName, certificateName, ifMatch, certificateVerificationBody, options) if err != nil { return CertificatesClientVerifyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientVerifyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientVerifyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientVerifyResponse{}, err } - return client.verifyHandleResponse(resp) + resp, err := client.verifyHandleResponse(httpResp) + return resp, err } // verifyCreateRequest creates the Verify request. @@ -402,11 +445,14 @@ func (client *CertificatesClient) verifyCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateVerificationBody) + if err := runtime.MarshalAsJSON(req, certificateVerificationBody); err != nil { + return nil, err + } + return req, nil } // verifyHandleResponse handles the Verify response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/client.go index fce2bf21..3180ad04 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub @@ -33,7 +32,7 @@ type Client struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { - cl, err := arm.NewClient(moduleName+".Client", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewClient(subscriptionID string, credential azcore.TokenCredential, options // BeginManualFailover - Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see https://aka.ms/manualfailover // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - iotHubName - Name of the IoT hub to failover // - resourceGroupName - Name of the resource group containing the IoT hub resource // - failoverInput - Region to failover to. Must be the Azure paired region. Get the value from the secondary location in the @@ -59,29 +58,40 @@ func (client *Client) BeginManualFailover(ctx context.Context, iotHubName string if err != nil { return nil, err } - return runtime.NewPoller[ClientManualFailoverResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientManualFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientManualFailoverResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientManualFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) } } // ManualFailover - Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see https://aka.ms/manualfailover // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 func (client *Client) manualFailover(ctx context.Context, iotHubName string, resourceGroupName string, failoverInput FailoverInput, options *ClientBeginManualFailoverOptions) (*http.Response, error) { + var err error + const operationName = "Client.BeginManualFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.manualFailoverCreateRequest(ctx, iotHubName, resourceGroupName, failoverInput, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // manualFailoverCreateRequest creates the ManualFailover request. @@ -104,8 +114,11 @@ func (client *Client) manualFailoverCreateRequest(ctx context.Context, iotHubNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, failoverInput) + if err := runtime.MarshalAsJSON(req, failoverInput); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/client_factory.go index 93ee5197..95e13ebc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub @@ -28,7 +27,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,37 +37,44 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +// NewCertificatesClient creates a new instance of CertificatesClient. +func (c *ClientFactory) NewCertificatesClient() *CertificatesClient { + subClient, _ := NewCertificatesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewResourceClient() *ResourceClient { - subClient, _ := NewResourceClient(c.subscriptionID, c.credential, c.options) +// NewClient creates a new instance of Client. +func (c *ClientFactory) NewClient() *Client { + subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewResourceProviderCommonClient() *ResourceProviderCommonClient { - subClient, _ := NewResourceProviderCommonClient(c.subscriptionID, c.credential, c.options) +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewCertificatesClient() *CertificatesClient { - subClient, _ := NewCertificatesClient(c.subscriptionID, c.credential, c.options) +// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient. +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewClient() *Client { - subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient. +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) +// NewResourceClient creates a new instance of ResourceClient. +func (c *ClientFactory) NewResourceClient() *ResourceClient { + subClient, _ := NewResourceClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) +// NewResourceProviderCommonClient creates a new instance of ResourceProviderCommonClient. +func (c *ClientFactory) NewResourceProviderCommonClient() *ResourceProviderCommonClient { + subClient, _ := NewResourceProviderCommonClient(c.subscriptionID, c.credential, c.options) return subClient } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/constants.go index 7b073c6e..973afbb8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/constants.go @@ -3,56 +3,55 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub const ( - moduleName = "armiothub" - moduleVersion = "v1.1.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" + moduleVersion = "v1.3.0" ) // AccessRights - The permissions assigned to the shared access policy. type AccessRights string const ( - AccessRightsRegistryRead AccessRights = "RegistryRead" - AccessRightsRegistryWrite AccessRights = "RegistryWrite" - AccessRightsServiceConnect AccessRights = "ServiceConnect" AccessRightsDeviceConnect AccessRights = "DeviceConnect" - AccessRightsRegistryReadRegistryWrite AccessRights = "RegistryRead, RegistryWrite" - AccessRightsRegistryReadServiceConnect AccessRights = "RegistryRead, ServiceConnect" + AccessRightsRegistryRead AccessRights = "RegistryRead" AccessRightsRegistryReadDeviceConnect AccessRights = "RegistryRead, DeviceConnect" - AccessRightsRegistryWriteServiceConnect AccessRights = "RegistryWrite, ServiceConnect" - AccessRightsRegistryWriteDeviceConnect AccessRights = "RegistryWrite, DeviceConnect" - AccessRightsServiceConnectDeviceConnect AccessRights = "ServiceConnect, DeviceConnect" - AccessRightsRegistryReadRegistryWriteServiceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect" + AccessRightsRegistryReadRegistryWrite AccessRights = "RegistryRead, RegistryWrite" AccessRightsRegistryReadRegistryWriteDeviceConnect AccessRights = "RegistryRead, RegistryWrite, DeviceConnect" + AccessRightsRegistryReadRegistryWriteServiceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect" + AccessRightsRegistryReadRegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect" + AccessRightsRegistryReadServiceConnect AccessRights = "RegistryRead, ServiceConnect" AccessRightsRegistryReadServiceConnectDeviceConnect AccessRights = "RegistryRead, ServiceConnect, DeviceConnect" + AccessRightsRegistryWrite AccessRights = "RegistryWrite" + AccessRightsRegistryWriteDeviceConnect AccessRights = "RegistryWrite, DeviceConnect" + AccessRightsRegistryWriteServiceConnect AccessRights = "RegistryWrite, ServiceConnect" AccessRightsRegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryWrite, ServiceConnect, DeviceConnect" - AccessRightsRegistryReadRegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect" + AccessRightsServiceConnect AccessRights = "ServiceConnect" + AccessRightsServiceConnectDeviceConnect AccessRights = "ServiceConnect, DeviceConnect" ) // PossibleAccessRightsValues returns the possible values for the AccessRights const type. func PossibleAccessRightsValues() []AccessRights { return []AccessRights{ - AccessRightsRegistryRead, - AccessRightsRegistryWrite, - AccessRightsServiceConnect, AccessRightsDeviceConnect, - AccessRightsRegistryReadRegistryWrite, - AccessRightsRegistryReadServiceConnect, + AccessRightsRegistryRead, AccessRightsRegistryReadDeviceConnect, - AccessRightsRegistryWriteServiceConnect, - AccessRightsRegistryWriteDeviceConnect, - AccessRightsServiceConnectDeviceConnect, - AccessRightsRegistryReadRegistryWriteServiceConnect, + AccessRightsRegistryReadRegistryWrite, AccessRightsRegistryReadRegistryWriteDeviceConnect, + AccessRightsRegistryReadRegistryWriteServiceConnect, + AccessRightsRegistryReadRegistryWriteServiceConnectDeviceConnect, + AccessRightsRegistryReadServiceConnect, AccessRightsRegistryReadServiceConnectDeviceConnect, + AccessRightsRegistryWrite, + AccessRightsRegistryWriteDeviceConnect, + AccessRightsRegistryWriteServiceConnect, AccessRightsRegistryWriteServiceConnectDeviceConnect, - AccessRightsRegistryReadRegistryWriteServiceConnectDeviceConnect, + AccessRightsServiceConnect, + AccessRightsServiceConnectDeviceConnect, } } @@ -173,15 +172,15 @@ func PossibleIPFilterActionTypeValues() []IPFilterActionType { type IotHubNameUnavailabilityReason string const ( - IotHubNameUnavailabilityReasonInvalid IotHubNameUnavailabilityReason = "Invalid" IotHubNameUnavailabilityReasonAlreadyExists IotHubNameUnavailabilityReason = "AlreadyExists" + IotHubNameUnavailabilityReasonInvalid IotHubNameUnavailabilityReason = "Invalid" ) // PossibleIotHubNameUnavailabilityReasonValues returns the possible values for the IotHubNameUnavailabilityReason const type. func PossibleIotHubNameUnavailabilityReasonValues() []IotHubNameUnavailabilityReason { return []IotHubNameUnavailabilityReason{ - IotHubNameUnavailabilityReasonInvalid, IotHubNameUnavailabilityReasonAlreadyExists, + IotHubNameUnavailabilityReasonInvalid, } } @@ -233,17 +232,17 @@ func PossibleIotHubSKUValues() []IotHubSKU { type IotHubSKUTier string const ( + IotHubSKUTierBasic IotHubSKUTier = "Basic" IotHubSKUTierFree IotHubSKUTier = "Free" IotHubSKUTierStandard IotHubSKUTier = "Standard" - IotHubSKUTierBasic IotHubSKUTier = "Basic" ) // PossibleIotHubSKUTierValues returns the possible values for the IotHubSKUTier const type. func PossibleIotHubSKUTierValues() []IotHubSKUTier { return []IotHubSKUTier{ + IotHubSKUTierBasic, IotHubSKUTierFree, IotHubSKUTierStandard, - IotHubSKUTierBasic, } } @@ -269,23 +268,23 @@ func PossibleIotHubScaleTypeValues() []IotHubScaleType { type JobStatus string const ( - JobStatusUnknown JobStatus = "unknown" - JobStatusEnqueued JobStatus = "enqueued" - JobStatusRunning JobStatus = "running" + JobStatusCancelled JobStatus = "cancelled" JobStatusCompleted JobStatus = "completed" + JobStatusEnqueued JobStatus = "enqueued" JobStatusFailed JobStatus = "failed" - JobStatusCancelled JobStatus = "cancelled" + JobStatusRunning JobStatus = "running" + JobStatusUnknown JobStatus = "unknown" ) // PossibleJobStatusValues returns the possible values for the JobStatus const type. func PossibleJobStatusValues() []JobStatus { return []JobStatus{ - JobStatusUnknown, - JobStatusEnqueued, - JobStatusRunning, + JobStatusCancelled, JobStatusCompleted, + JobStatusEnqueued, JobStatusFailed, - JobStatusCancelled, + JobStatusRunning, + JobStatusUnknown, } } @@ -377,19 +376,19 @@ func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { type ResourceIdentityType string const ( + ResourceIdentityTypeNone ResourceIdentityType = "None" ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" - ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" - ResourceIdentityTypeNone ResourceIdentityType = "None" + ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" ) // PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type. func PossibleResourceIdentityTypeValues() []ResourceIdentityType { return []ResourceIdentityType{ + ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, - ResourceIdentityTypeUserAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, - ResourceIdentityTypeNone, + ResourceIdentityTypeUserAssigned, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/models.go index 29249325..19123b6d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub @@ -159,44 +158,6 @@ type CertificateWithNonceDescription struct { Type *string } -// CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate method. -type CertificatesClientCreateOrUpdateOptions struct { - // ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate. - IfMatch *string -} - -// CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. -type CertificatesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientGenerateVerificationCodeOptions contains the optional parameters for the CertificatesClient.GenerateVerificationCode -// method. -type CertificatesClientGenerateVerificationCodeOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. -type CertificatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientListByIotHubOptions contains the optional parameters for the CertificatesClient.ListByIotHub method. -type CertificatesClientListByIotHubOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientVerifyOptions contains the optional parameters for the CertificatesClient.Verify method. -type CertificatesClientVerifyOptions struct { - // placeholder for future optional parameters -} - -// ClientBeginManualFailoverOptions contains the optional parameters for the Client.BeginManualFailover method. -type ClientBeginManualFailoverOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // CloudToDeviceProperties - The IoT hub cloud-to-device messaging properties. type CloudToDeviceProperties struct { // The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. @@ -662,11 +623,6 @@ type OperationListResult struct { Value []*Operation } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateEndpoint - The private endpoint property of a private endpoint connection type PrivateEndpoint struct { // READ-ONLY; The resource identifier. @@ -697,48 +653,12 @@ type PrivateEndpointConnectionProperties struct { PrivateEndpoint *PrivateEndpoint } -// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete -// method. -type PrivateEndpointConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginUpdate -// method. -type PrivateEndpointConnectionsClientBeginUpdateOptions 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 -} - -// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List -// method. -type PrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkResources - The available private link resources for an IotHub type PrivateLinkResources struct { // The list of available private link resources for an IotHub Value []*GroupIDInformation } -// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. -type PrivateLinkResourcesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method. -type PrivateLinkResourcesClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkServiceConnectionState - The current state of a private endpoint connection type PrivateLinkServiceConnectionState struct { // REQUIRED; The description for the current state of a private endpoint connection @@ -882,140 +802,6 @@ type Resource struct { Type *string } -// ResourceClientBeginCreateOrUpdateOptions contains the optional parameters for the ResourceClient.BeginCreateOrUpdate method. -type ResourceClientBeginCreateOrUpdateOptions struct { - // ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an existing IoT Hub. - IfMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ResourceClientBeginDeleteOptions contains the optional parameters for the ResourceClient.BeginDelete method. -type ResourceClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ResourceClientBeginUpdateOptions contains the optional parameters for the ResourceClient.BeginUpdate method. -type ResourceClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability -// method. -type ResourceClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientCreateEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.CreateEventHubConsumerGroup -// method. -type ResourceClientCreateEventHubConsumerGroupOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientDeleteEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.DeleteEventHubConsumerGroup -// method. -type ResourceClientDeleteEventHubConsumerGroupOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientExportDevicesOptions contains the optional parameters for the ResourceClient.ExportDevices method. -type ResourceClientExportDevicesOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetEndpointHealthOptions contains the optional parameters for the ResourceClient.NewGetEndpointHealthPager -// method. -type ResourceClientGetEndpointHealthOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.GetEventHubConsumerGroup -// method. -type ResourceClientGetEventHubConsumerGroupOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetJobOptions contains the optional parameters for the ResourceClient.GetJob method. -type ResourceClientGetJobOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetKeysForKeyNameOptions contains the optional parameters for the ResourceClient.GetKeysForKeyName method. -type ResourceClientGetKeysForKeyNameOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetOptions contains the optional parameters for the ResourceClient.Get method. -type ResourceClientGetOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetQuotaMetricsOptions contains the optional parameters for the ResourceClient.NewGetQuotaMetricsPager method. -type ResourceClientGetQuotaMetricsOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetStatsOptions contains the optional parameters for the ResourceClient.GetStats method. -type ResourceClientGetStatsOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetValidSKUsOptions contains the optional parameters for the ResourceClient.NewGetValidSKUsPager method. -type ResourceClientGetValidSKUsOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientImportDevicesOptions contains the optional parameters for the ResourceClient.ImportDevices method. -type ResourceClientImportDevicesOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientListByResourceGroupOptions contains the optional parameters for the ResourceClient.NewListByResourceGroupPager -// method. -type ResourceClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientListBySubscriptionOptions contains the optional parameters for the ResourceClient.NewListBySubscriptionPager -// method. -type ResourceClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientListEventHubConsumerGroupsOptions contains the optional parameters for the ResourceClient.NewListEventHubConsumerGroupsPager -// method. -type ResourceClientListEventHubConsumerGroupsOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientListJobsOptions contains the optional parameters for the ResourceClient.NewListJobsPager method. -type ResourceClientListJobsOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientListKeysOptions contains the optional parameters for the ResourceClient.NewListKeysPager method. -type ResourceClientListKeysOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientTestAllRoutesOptions contains the optional parameters for the ResourceClient.TestAllRoutes method. -type ResourceClientTestAllRoutesOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientTestRouteOptions contains the optional parameters for the ResourceClient.TestRoute method. -type ResourceClientTestRouteOptions struct { - // placeholder for future optional parameters -} - -// ResourceProviderCommonClientGetSubscriptionQuotaOptions contains the optional parameters for the ResourceProviderCommonClient.GetSubscriptionQuota -// method. -type ResourceProviderCommonClientGetSubscriptionQuotaOptions struct { - // placeholder for future optional parameters -} - // RouteCompilationError - Compilation error when evaluating route type RouteCompilationError struct { // Location where the route error happened @@ -1068,10 +854,60 @@ type RouteProperties struct { Condition *string } +// RoutingCosmosDBSQLAPIProperties - The properties related to a cosmos DB sql container endpoint. +type RoutingCosmosDBSQLAPIProperties struct { + // REQUIRED; The name of the cosmos DB sql container in the cosmos DB database. + ContainerName *string + + // REQUIRED; The name of the cosmos DB database in the cosmos DB account. + DatabaseName *string + + // REQUIRED; The url of the cosmos DB account. It must include the protocol https:// + EndpointURI *string + + // REQUIRED; The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, + // hyphens and has a maximum length of 64 characters. The following names are reserved: + // events, fileNotifications, $default. Endpoint names must be unique across endpoint types. + Name *string + + // Method used to authenticate against the cosmos DB sql container endpoint + AuthenticationType *AuthenticationType + + // Managed identity properties of routing cosmos DB container endpoint. + Identity *ManagedIdentity + + // The name of the partition key associated with this cosmos DB sql container if one exists. This is an optional parameter. + PartitionKeyName *string + + // The template for generating a synthetic partition key value for use with this cosmos DB sql container. The template must + // include at least one of the following placeholders: {iothub}, {deviceid}, {DD}, + // {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and non-placeholder components are arbitrary. + // This parameter is only required if PartitionKeyName is specified. + PartitionKeyTemplate *string + + // The primary key of the cosmos DB account. + PrimaryKey *string + + // The name of the resource group of the cosmos DB account. + ResourceGroup *string + + // The secondary key of the cosmos DB account. + SecondaryKey *string + + // The subscription identifier of the cosmos DB account. + SubscriptionID *string + + // READ-ONLY; Id of the cosmos DB sql container endpoint + ID *string +} + // RoutingEndpoints - The properties related to the custom endpoints to which your IoT hub routes messages based on the routing // rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs // and only 1 custom endpoint is allowed across all endpoint types for free hubs. type RoutingEndpoints struct { + // The list of Cosmos DB container endpoints that IoT hub routes messages to, based on the routing rules. + CosmosDBSQLContainers []*RoutingCosmosDBSQLAPIProperties + // The list of Event Hubs endpoints that IoT hub routes messages to, based on the routing rules. This list does not include // the built-in Event Hubs endpoint. EventHubs []*RoutingEventHubProperties @@ -1142,9 +978,8 @@ type RoutingProperties struct { Enrichments []*EnrichmentProperties // The properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section - // are met. This is an optional parameter. When this property is not set, the - // messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub - // endpoint. + // are met. This is an optional parameter. When this property is not present in + // the template, the fallback route is disabled by default. FallbackRoute *FallbackRouteProperties // The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/models_serde.go index 9393f53f..8a86a24a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub @@ -230,12 +229,12 @@ func (c *CertificateListDescription) UnmarshalJSON(data []byte) error { func (c CertificateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "certificate", c.Certificate) - populateTimeRFC1123(objectMap, "created", c.Created) - populateTimeRFC1123(objectMap, "expiry", c.Expiry) + populateDateTimeRFC1123(objectMap, "created", c.Created) + populateDateTimeRFC1123(objectMap, "expiry", c.Expiry) populate(objectMap, "isVerified", c.IsVerified) populate(objectMap, "subject", c.Subject) populate(objectMap, "thumbprint", c.Thumbprint) - populateTimeRFC1123(objectMap, "updated", c.Updated) + populateDateTimeRFC1123(objectMap, "updated", c.Updated) return json.Marshal(objectMap) } @@ -252,10 +251,10 @@ func (c *CertificateProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Certificate", &c.Certificate) delete(rawMsg, key) case "created": - err = unpopulateTimeRFC1123(val, "Created", &c.Created) + err = unpopulateDateTimeRFC1123(val, "Created", &c.Created) delete(rawMsg, key) case "expiry": - err = unpopulateTimeRFC1123(val, "Expiry", &c.Expiry) + err = unpopulateDateTimeRFC1123(val, "Expiry", &c.Expiry) delete(rawMsg, key) case "isVerified": err = unpopulate(val, "IsVerified", &c.IsVerified) @@ -267,7 +266,7 @@ func (c *CertificateProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Thumbprint", &c.Thumbprint) delete(rawMsg, key) case "updated": - err = unpopulateTimeRFC1123(val, "Updated", &c.Updated) + err = unpopulateDateTimeRFC1123(val, "Updated", &c.Updated) delete(rawMsg, key) } if err != nil { @@ -281,12 +280,12 @@ func (c *CertificateProperties) UnmarshalJSON(data []byte) error { func (c CertificatePropertiesWithNonce) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "certificate", c.Certificate) - populateTimeRFC1123(objectMap, "created", c.Created) - populateTimeRFC1123(objectMap, "expiry", c.Expiry) + populateDateTimeRFC1123(objectMap, "created", c.Created) + populateDateTimeRFC1123(objectMap, "expiry", c.Expiry) populate(objectMap, "isVerified", c.IsVerified) populate(objectMap, "subject", c.Subject) populate(objectMap, "thumbprint", c.Thumbprint) - populateTimeRFC1123(objectMap, "updated", c.Updated) + populateDateTimeRFC1123(objectMap, "updated", c.Updated) populate(objectMap, "verificationCode", c.VerificationCode) return json.Marshal(objectMap) } @@ -304,10 +303,10 @@ func (c *CertificatePropertiesWithNonce) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Certificate", &c.Certificate) delete(rawMsg, key) case "created": - err = unpopulateTimeRFC1123(val, "Created", &c.Created) + err = unpopulateDateTimeRFC1123(val, "Created", &c.Created) delete(rawMsg, key) case "expiry": - err = unpopulateTimeRFC1123(val, "Expiry", &c.Expiry) + err = unpopulateDateTimeRFC1123(val, "Expiry", &c.Expiry) delete(rawMsg, key) case "isVerified": err = unpopulate(val, "IsVerified", &c.IsVerified) @@ -319,7 +318,7 @@ func (c *CertificatePropertiesWithNonce) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Thumbprint", &c.Thumbprint) delete(rawMsg, key) case "updated": - err = unpopulateTimeRFC1123(val, "Updated", &c.Updated) + err = unpopulateDateTimeRFC1123(val, "Updated", &c.Updated) delete(rawMsg, key) case "verificationCode": err = unpopulate(val, "VerificationCode", &c.VerificationCode) @@ -537,9 +536,9 @@ func (e EndpointHealthData) MarshalJSON() ([]byte, error) { populate(objectMap, "endpointId", e.EndpointID) populate(objectMap, "healthStatus", e.HealthStatus) populate(objectMap, "lastKnownError", e.LastKnownError) - populateTimeRFC1123(objectMap, "lastKnownErrorTime", e.LastKnownErrorTime) - populateTimeRFC1123(objectMap, "lastSendAttemptTime", e.LastSendAttemptTime) - populateTimeRFC1123(objectMap, "lastSuccessfulSendAttemptTime", e.LastSuccessfulSendAttemptTime) + populateDateTimeRFC1123(objectMap, "lastKnownErrorTime", e.LastKnownErrorTime) + populateDateTimeRFC1123(objectMap, "lastSendAttemptTime", e.LastSendAttemptTime) + populateDateTimeRFC1123(objectMap, "lastSuccessfulSendAttemptTime", e.LastSuccessfulSendAttemptTime) return json.Marshal(objectMap) } @@ -562,13 +561,13 @@ func (e *EndpointHealthData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "LastKnownError", &e.LastKnownError) delete(rawMsg, key) case "lastKnownErrorTime": - err = unpopulateTimeRFC1123(val, "LastKnownErrorTime", &e.LastKnownErrorTime) + err = unpopulateDateTimeRFC1123(val, "LastKnownErrorTime", &e.LastKnownErrorTime) delete(rawMsg, key) case "lastSendAttemptTime": - err = unpopulateTimeRFC1123(val, "LastSendAttemptTime", &e.LastSendAttemptTime) + err = unpopulateDateTimeRFC1123(val, "LastSendAttemptTime", &e.LastSendAttemptTime) delete(rawMsg, key) case "lastSuccessfulSendAttemptTime": - err = unpopulateTimeRFC1123(val, "LastSuccessfulSendAttemptTime", &e.LastSuccessfulSendAttemptTime) + err = unpopulateDateTimeRFC1123(val, "LastSuccessfulSendAttemptTime", &e.LastSuccessfulSendAttemptTime) delete(rawMsg, key) } if err != nil { @@ -1177,11 +1176,11 @@ func (i *ImportDevicesRequest) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobResponse. func (j JobResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC1123(objectMap, "endTimeUtc", j.EndTimeUTC) + populateDateTimeRFC1123(objectMap, "endTimeUtc", j.EndTimeUTC) populate(objectMap, "failureReason", j.FailureReason) populate(objectMap, "jobId", j.JobID) populate(objectMap, "parentJobId", j.ParentJobID) - populateTimeRFC1123(objectMap, "startTimeUtc", j.StartTimeUTC) + populateDateTimeRFC1123(objectMap, "startTimeUtc", j.StartTimeUTC) populate(objectMap, "status", j.Status) populate(objectMap, "statusMessage", j.StatusMessage) populate(objectMap, "type", j.Type) @@ -1198,7 +1197,7 @@ func (j *JobResponse) UnmarshalJSON(data []byte) error { var err error switch key { case "endTimeUtc": - err = unpopulateTimeRFC1123(val, "EndTimeUTC", &j.EndTimeUTC) + err = unpopulateDateTimeRFC1123(val, "EndTimeUTC", &j.EndTimeUTC) delete(rawMsg, key) case "failureReason": err = unpopulate(val, "FailureReason", &j.FailureReason) @@ -1210,7 +1209,7 @@ func (j *JobResponse) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ParentJobID", &j.ParentJobID) delete(rawMsg, key) case "startTimeUtc": - err = unpopulateTimeRFC1123(val, "StartTimeUTC", &j.StartTimeUTC) + err = unpopulateDateTimeRFC1123(val, "StartTimeUTC", &j.StartTimeUTC) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &j.Status) @@ -2206,9 +2205,85 @@ func (r *RouteProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type RoutingCosmosDBSQLAPIProperties. +func (r RoutingCosmosDBSQLAPIProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authenticationType", r.AuthenticationType) + populate(objectMap, "containerName", r.ContainerName) + populate(objectMap, "databaseName", r.DatabaseName) + populate(objectMap, "endpointUri", r.EndpointURI) + populate(objectMap, "id", r.ID) + populate(objectMap, "identity", r.Identity) + populate(objectMap, "name", r.Name) + populate(objectMap, "partitionKeyName", r.PartitionKeyName) + populate(objectMap, "partitionKeyTemplate", r.PartitionKeyTemplate) + populate(objectMap, "primaryKey", r.PrimaryKey) + populate(objectMap, "resourceGroup", r.ResourceGroup) + populate(objectMap, "secondaryKey", r.SecondaryKey) + populate(objectMap, "subscriptionId", r.SubscriptionID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingCosmosDBSQLAPIProperties. +func (r *RoutingCosmosDBSQLAPIProperties) UnmarshalJSON(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 "authenticationType": + err = unpopulate(val, "AuthenticationType", &r.AuthenticationType) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &r.ContainerName) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &r.DatabaseName) + delete(rawMsg, key) + case "endpointUri": + err = unpopulate(val, "EndpointURI", &r.EndpointURI) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &r.Identity) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "partitionKeyName": + err = unpopulate(val, "PartitionKeyName", &r.PartitionKeyName) + delete(rawMsg, key) + case "partitionKeyTemplate": + err = unpopulate(val, "PartitionKeyTemplate", &r.PartitionKeyTemplate) + delete(rawMsg, key) + case "primaryKey": + err = unpopulate(val, "PrimaryKey", &r.PrimaryKey) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &r.ResourceGroup) + delete(rawMsg, key) + case "secondaryKey": + err = unpopulate(val, "SecondaryKey", &r.SecondaryKey) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &r.SubscriptionID) + 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 RoutingEndpoints. func (r RoutingEndpoints) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "cosmosDBSqlContainers", r.CosmosDBSQLContainers) populate(objectMap, "eventHubs", r.EventHubs) populate(objectMap, "serviceBusQueues", r.ServiceBusQueues) populate(objectMap, "serviceBusTopics", r.ServiceBusTopics) @@ -2225,6 +2300,9 @@ func (r *RoutingEndpoints) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "cosmosDBSqlContainers": + err = unpopulate(val, "CosmosDBSQLContainers", &r.CosmosDBSQLContainers) + delete(rawMsg, key) case "eventHubs": err = unpopulate(val, "EventHubs", &r.EventHubs) delete(rawMsg, key) @@ -2850,10 +2928,10 @@ func (s *StorageEndpointProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -2869,7 +2947,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -2878,7 +2956,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/operations_client.go index 1f784327..2fd004a6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -40,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available IoT Hub REST API operations. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - 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]{ @@ -48,25 +47,20 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -78,7 +72,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") 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/iothub/armiothub/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/options.go new file mode 100644 index 00000000..79a2d977 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/options.go @@ -0,0 +1,223 @@ +//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 armiothub + +// CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate method. +type CertificatesClientCreateOrUpdateOptions struct { + // ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate. + IfMatch *string +} + +// CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. +type CertificatesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientGenerateVerificationCodeOptions contains the optional parameters for the CertificatesClient.GenerateVerificationCode +// method. +type CertificatesClientGenerateVerificationCodeOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. +type CertificatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientListByIotHubOptions contains the optional parameters for the CertificatesClient.ListByIotHub method. +type CertificatesClientListByIotHubOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientVerifyOptions contains the optional parameters for the CertificatesClient.Verify method. +type CertificatesClientVerifyOptions struct { + // placeholder for future optional parameters +} + +// ClientBeginManualFailoverOptions contains the optional parameters for the Client.BeginManualFailover method. +type ClientBeginManualFailoverOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete +// method. +type PrivateEndpointConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginUpdate +// method. +type PrivateEndpointConnectionsClientBeginUpdateOptions 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 +} + +// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List +// method. +type PrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. +type PrivateLinkResourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method. +type PrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientBeginCreateOrUpdateOptions contains the optional parameters for the ResourceClient.BeginCreateOrUpdate method. +type ResourceClientBeginCreateOrUpdateOptions struct { + // ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an existing IoT Hub. + IfMatch *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ResourceClientBeginDeleteOptions contains the optional parameters for the ResourceClient.BeginDelete method. +type ResourceClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ResourceClientBeginUpdateOptions contains the optional parameters for the ResourceClient.BeginUpdate method. +type ResourceClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability +// method. +type ResourceClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientCreateEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.CreateEventHubConsumerGroup +// method. +type ResourceClientCreateEventHubConsumerGroupOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientDeleteEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.DeleteEventHubConsumerGroup +// method. +type ResourceClientDeleteEventHubConsumerGroupOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientExportDevicesOptions contains the optional parameters for the ResourceClient.ExportDevices method. +type ResourceClientExportDevicesOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetEndpointHealthOptions contains the optional parameters for the ResourceClient.NewGetEndpointHealthPager +// method. +type ResourceClientGetEndpointHealthOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.GetEventHubConsumerGroup +// method. +type ResourceClientGetEventHubConsumerGroupOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetJobOptions contains the optional parameters for the ResourceClient.GetJob method. +type ResourceClientGetJobOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetKeysForKeyNameOptions contains the optional parameters for the ResourceClient.GetKeysForKeyName method. +type ResourceClientGetKeysForKeyNameOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetOptions contains the optional parameters for the ResourceClient.Get method. +type ResourceClientGetOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetQuotaMetricsOptions contains the optional parameters for the ResourceClient.NewGetQuotaMetricsPager method. +type ResourceClientGetQuotaMetricsOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetStatsOptions contains the optional parameters for the ResourceClient.GetStats method. +type ResourceClientGetStatsOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetValidSKUsOptions contains the optional parameters for the ResourceClient.NewGetValidSKUsPager method. +type ResourceClientGetValidSKUsOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientImportDevicesOptions contains the optional parameters for the ResourceClient.ImportDevices method. +type ResourceClientImportDevicesOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientListByResourceGroupOptions contains the optional parameters for the ResourceClient.NewListByResourceGroupPager +// method. +type ResourceClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientListBySubscriptionOptions contains the optional parameters for the ResourceClient.NewListBySubscriptionPager +// method. +type ResourceClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientListEventHubConsumerGroupsOptions contains the optional parameters for the ResourceClient.NewListEventHubConsumerGroupsPager +// method. +type ResourceClientListEventHubConsumerGroupsOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientListJobsOptions contains the optional parameters for the ResourceClient.NewListJobsPager method. +type ResourceClientListJobsOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientListKeysOptions contains the optional parameters for the ResourceClient.NewListKeysPager method. +type ResourceClientListKeysOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientTestAllRoutesOptions contains the optional parameters for the ResourceClient.TestAllRoutes method. +type ResourceClientTestAllRoutesOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientTestRouteOptions contains the optional parameters for the ResourceClient.TestRoute method. +type ResourceClientTestRouteOptions struct { + // placeholder for future optional parameters +} + +// ResourceProviderCommonClientGetSubscriptionQuotaOptions contains the optional parameters for the ResourceProviderCommonClient.GetSubscriptionQuota +// method. +type ResourceProviderCommonClientGetSubscriptionQuotaOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/privateendpointconnections_client.go index 6971577f..6521efdb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/privateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/privateendpointconnections_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub @@ -33,7 +32,7 @@ type PrivateEndpointConnectionsClient struct { // - 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+".PrivateEndpointConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // BeginDelete - Delete private endpoint connection with the specified name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - privateEndpointConnectionName - The name of the private endpoint connection @@ -59,29 +58,40 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete private endpoint connection with the specified name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName 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, resourceName, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -108,7 +118,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -117,25 +127,32 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Get private endpoint connection properties // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - 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, resourceName 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, resourceName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -162,7 +179,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,24 +197,31 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // List - List private endpoint connection properties // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List // method. func (client *PrivateEndpointConnectionsClient) List(ctx context.Context, resourceGroupName string, resourceName string, options *PrivateEndpointConnectionsClientListOptions) (PrivateEndpointConnectionsClientListResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return PrivateEndpointConnectionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -220,7 +244,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,7 +262,7 @@ func (client *PrivateEndpointConnectionsClient) listHandleResponse(resp *http.Re // BeginUpdate - Update the status of a private endpoint connection with the specified name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - privateEndpointConnectionName - The name of the private endpoint connection @@ -251,29 +275,40 @@ func (client *PrivateEndpointConnectionsClient) BeginUpdate(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Update the status of a private endpoint connection with the specified name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 func (client *PrivateEndpointConnectionsClient) update(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.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, resourceName, privateEndpointConnectionName, privateEndpointConnection, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -300,8 +335,11 @@ func (client *PrivateEndpointConnectionsClient) updateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateEndpointConnection) + if err := runtime.MarshalAsJSON(req, privateEndpointConnection); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/privatelinkresources_client.go index 4e1db9ec..499ba35b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/privatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/privatelinkresources_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub @@ -33,7 +32,7 @@ type PrivateLinkResourcesClient struct { // - 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+".PrivateLinkResourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,25 +46,32 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // Get - Get the specified private link resource for the given IotHub // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - groupID - 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, resourceName string, groupID 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, resourceName, groupID, options) if err != nil { return PrivateLinkResourcesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -92,7 +98,7 @@ func (client *PrivateLinkResourcesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -110,24 +116,31 @@ func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) // List - List private link resources for the given IotHub // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List // method. func (client *PrivateLinkResourcesClient) List(ctx context.Context, resourceGroupName string, resourceName string, options *PrivateLinkResourcesClientListOptions) (PrivateLinkResourcesClientListResponse, error) { + var err error + const operationName = "PrivateLinkResourcesClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return PrivateLinkResourcesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -150,7 +163,7 @@ func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") 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/iothub/armiothub/resource_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/resource_client.go index 16fbac7f..be7f4062 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/resource_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/resource_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub @@ -33,7 +32,7 @@ type ResourceClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewResourceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceClient, error) { - cl, err := arm.NewClient(moduleName+".ResourceClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,23 +46,30 @@ func NewResourceClient(subscriptionID string, credential azcore.TokenCredential, // CheckNameAvailability - Check if an IoT hub name is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - operationInputs - Set the name parameter in the OperationInputs structure to the name of the IoT hub to check. // - options - ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability // method. func (client *ResourceClient) CheckNameAvailability(ctx context.Context, operationInputs OperationInputs, options *ResourceClientCheckNameAvailabilityOptions) (ResourceClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "ResourceClient.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, operationInputs, options) if err != nil { return ResourceClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -78,10 +84,13 @@ func (client *ResourceClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, operationInputs) + if err := runtime.MarshalAsJSON(req, operationInputs); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -96,7 +105,7 @@ func (client *ResourceClient) checkNameAvailabilityHandleResponse(resp *http.Res // CreateEventHubConsumerGroup - Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - eventHubEndpointName - The name of the Event Hub-compatible endpoint in the IoT hub. @@ -105,18 +114,25 @@ func (client *ResourceClient) checkNameAvailabilityHandleResponse(resp *http.Res // - options - ResourceClientCreateEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.CreateEventHubConsumerGroup // method. func (client *ResourceClient) CreateEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string, consumerGroupBody EventHubConsumerGroupBodyDescription, options *ResourceClientCreateEventHubConsumerGroupOptions) (ResourceClientCreateEventHubConsumerGroupResponse, error) { + var err error + const operationName = "ResourceClient.CreateEventHubConsumerGroup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createEventHubConsumerGroupCreateRequest(ctx, resourceGroupName, resourceName, eventHubEndpointName, name, consumerGroupBody, options) if err != nil { return ResourceClientCreateEventHubConsumerGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientCreateEventHubConsumerGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientCreateEventHubConsumerGroupResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientCreateEventHubConsumerGroupResponse{}, err } - return client.createEventHubConsumerGroupHandleResponse(resp) + resp, err := client.createEventHubConsumerGroupHandleResponse(httpResp) + return resp, err } // createEventHubConsumerGroupCreateRequest creates the CreateEventHubConsumerGroup request. @@ -147,10 +163,13 @@ func (client *ResourceClient) createEventHubConsumerGroupCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, consumerGroupBody) + if err := runtime.MarshalAsJSON(req, consumerGroupBody); err != nil { + return nil, err + } + return req, nil } // createEventHubConsumerGroupHandleResponse handles the CreateEventHubConsumerGroup response. @@ -168,7 +187,7 @@ func (client *ResourceClient) createEventHubConsumerGroupHandleResponse(resp *ht // to default, which may lead to unexpected behavior. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - iotHubDescription - The IoT hub metadata and security metadata. @@ -180,9 +199,14 @@ func (client *ResourceClient) BeginCreateOrUpdate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[ResourceClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ResourceClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ResourceClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ResourceClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -192,20 +216,26 @@ func (client *ResourceClient) BeginCreateOrUpdate(ctx context.Context, resourceG // to default, which may lead to unexpected behavior. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 func (client *ResourceClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, iotHubDescription Description, options *ResourceClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ResourceClient.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, resourceName, iotHubDescription, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -228,19 +258,22 @@ func (client *ResourceClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, iotHubDescription) + if err := runtime.MarshalAsJSON(req, iotHubDescription); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientBeginDeleteOptions contains the optional parameters for the ResourceClient.BeginDelete method. @@ -250,29 +283,40 @@ func (client *ResourceClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ResourceClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ResourceClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ResourceClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ResourceClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 func (client *ResourceClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ResourceClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ResourceClient.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, resourceName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -295,7 +339,7 @@ func (client *ResourceClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -304,7 +348,7 @@ func (client *ResourceClient) deleteCreateRequest(ctx context.Context, resourceG // DeleteEventHubConsumerGroup - Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - eventHubEndpointName - The name of the Event Hub-compatible endpoint in the IoT hub. @@ -312,16 +356,22 @@ func (client *ResourceClient) deleteCreateRequest(ctx context.Context, resourceG // - options - ResourceClientDeleteEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.DeleteEventHubConsumerGroup // method. func (client *ResourceClient) DeleteEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string, options *ResourceClientDeleteEventHubConsumerGroupOptions) (ResourceClientDeleteEventHubConsumerGroupResponse, error) { + var err error + const operationName = "ResourceClient.DeleteEventHubConsumerGroup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteEventHubConsumerGroupCreateRequest(ctx, resourceGroupName, resourceName, eventHubEndpointName, name, options) if err != nil { return ResourceClientDeleteEventHubConsumerGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientDeleteEventHubConsumerGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientDeleteEventHubConsumerGroupResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientDeleteEventHubConsumerGroupResponse{}, err } return ResourceClientDeleteEventHubConsumerGroupResponse{}, nil } @@ -354,7 +404,7 @@ func (client *ResourceClient) deleteEventHubConsumerGroupCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -365,24 +415,31 @@ func (client *ResourceClient) deleteEventHubConsumerGroupCreateRequest(ctx conte // https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - exportDevicesParameters - The parameters that specify the export devices operation. // - options - ResourceClientExportDevicesOptions contains the optional parameters for the ResourceClient.ExportDevices method. func (client *ResourceClient) ExportDevices(ctx context.Context, resourceGroupName string, resourceName string, exportDevicesParameters ExportDevicesRequest, options *ResourceClientExportDevicesOptions) (ResourceClientExportDevicesResponse, error) { + var err error + const operationName = "ResourceClient.ExportDevices" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.exportDevicesCreateRequest(ctx, resourceGroupName, resourceName, exportDevicesParameters, options) if err != nil { return ResourceClientExportDevicesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientExportDevicesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientExportDevicesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientExportDevicesResponse{}, err } - return client.exportDevicesHandleResponse(resp) + resp, err := client.exportDevicesHandleResponse(httpResp) + return resp, err } // exportDevicesCreateRequest creates the ExportDevices request. @@ -405,10 +462,13 @@ func (client *ResourceClient) exportDevicesCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, exportDevicesParameters) + if err := runtime.MarshalAsJSON(req, exportDevicesParameters); err != nil { + return nil, err + } + return req, nil } // exportDevicesHandleResponse handles the ExportDevices response. @@ -423,23 +483,30 @@ func (client *ResourceClient) exportDevicesHandleResponse(resp *http.Response) ( // Get - Get the non-security related metadata of an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientGetOptions contains the optional parameters for the ResourceClient.Get method. func (client *ResourceClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ResourceClientGetOptions) (ResourceClientGetResponse, error) { + var err error + const operationName = "ResourceClient.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, resourceName, options) if err != nil { return ResourceClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -462,7 +529,7 @@ func (client *ResourceClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -479,7 +546,7 @@ func (client *ResourceClient) getHandleResponse(resp *http.Response) (ResourceCl // NewGetEndpointHealthPager - Get the health for routing endpoints. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - options - ResourceClientGetEndpointHealthOptions contains the optional parameters for the ResourceClient.NewGetEndpointHealthPager // method. func (client *ResourceClient) NewGetEndpointHealthPager(resourceGroupName string, iotHubName string, options *ResourceClientGetEndpointHealthOptions) *runtime.Pager[ResourceClientGetEndpointHealthResponse] { @@ -488,25 +555,20 @@ func (client *ResourceClient) NewGetEndpointHealthPager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceClientGetEndpointHealthResponse) (ResourceClientGetEndpointHealthResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getEndpointHealthCreateRequest(ctx, resourceGroupName, iotHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceClient.NewGetEndpointHealthPager") + 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.getEndpointHealthCreateRequest(ctx, resourceGroupName, iotHubName, options) + }, nil) if err != nil { return ResourceClientGetEndpointHealthResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ResourceClientGetEndpointHealthResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientGetEndpointHealthResponse{}, runtime.NewResponseError(resp) - } return client.getEndpointHealthHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -530,7 +592,7 @@ func (client *ResourceClient) getEndpointHealthCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -548,7 +610,7 @@ func (client *ResourceClient) getEndpointHealthHandleResponse(resp *http.Respons // GetEventHubConsumerGroup - Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - eventHubEndpointName - The name of the Event Hub-compatible endpoint in the IoT hub. @@ -556,18 +618,25 @@ func (client *ResourceClient) getEndpointHealthHandleResponse(resp *http.Respons // - options - ResourceClientGetEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.GetEventHubConsumerGroup // method. func (client *ResourceClient) GetEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string, options *ResourceClientGetEventHubConsumerGroupOptions) (ResourceClientGetEventHubConsumerGroupResponse, error) { + var err error + const operationName = "ResourceClient.GetEventHubConsumerGroup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEventHubConsumerGroupCreateRequest(ctx, resourceGroupName, resourceName, eventHubEndpointName, name, options) if err != nil { return ResourceClientGetEventHubConsumerGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientGetEventHubConsumerGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientGetEventHubConsumerGroupResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientGetEventHubConsumerGroupResponse{}, err } - return client.getEventHubConsumerGroupHandleResponse(resp) + resp, err := client.getEventHubConsumerGroupHandleResponse(httpResp) + return resp, err } // getEventHubConsumerGroupCreateRequest creates the GetEventHubConsumerGroup request. @@ -598,7 +667,7 @@ func (client *ResourceClient) getEventHubConsumerGroupCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -616,24 +685,31 @@ func (client *ResourceClient) getEventHubConsumerGroupHandleResponse(resp *http. // GetJob - Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - jobID - The job identifier. // - options - ResourceClientGetJobOptions contains the optional parameters for the ResourceClient.GetJob method. func (client *ResourceClient) GetJob(ctx context.Context, resourceGroupName string, resourceName string, jobID string, options *ResourceClientGetJobOptions) (ResourceClientGetJobResponse, error) { + var err error + const operationName = "ResourceClient.GetJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getJobCreateRequest(ctx, resourceGroupName, resourceName, jobID, options) if err != nil { return ResourceClientGetJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientGetJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientGetJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientGetJobResponse{}, err } - return client.getJobHandleResponse(resp) + resp, err := client.getJobHandleResponse(httpResp) + return resp, err } // getJobCreateRequest creates the GetJob request. @@ -660,7 +736,7 @@ func (client *ResourceClient) getJobCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -678,25 +754,32 @@ func (client *ResourceClient) getJobHandleResponse(resp *http.Response) (Resourc // GetKeysForKeyName - Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - keyName - The name of the shared access policy. // - options - ResourceClientGetKeysForKeyNameOptions contains the optional parameters for the ResourceClient.GetKeysForKeyName // method. func (client *ResourceClient) GetKeysForKeyName(ctx context.Context, resourceGroupName string, resourceName string, keyName string, options *ResourceClientGetKeysForKeyNameOptions) (ResourceClientGetKeysForKeyNameResponse, error) { + var err error + const operationName = "ResourceClient.GetKeysForKeyName" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getKeysForKeyNameCreateRequest(ctx, resourceGroupName, resourceName, keyName, options) if err != nil { return ResourceClientGetKeysForKeyNameResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientGetKeysForKeyNameResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientGetKeysForKeyNameResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientGetKeysForKeyNameResponse{}, err } - return client.getKeysForKeyNameHandleResponse(resp) + resp, err := client.getKeysForKeyNameHandleResponse(httpResp) + return resp, err } // getKeysForKeyNameCreateRequest creates the GetKeysForKeyName request. @@ -723,7 +806,7 @@ func (client *ResourceClient) getKeysForKeyNameCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -740,7 +823,7 @@ func (client *ResourceClient) getKeysForKeyNameHandleResponse(resp *http.Respons // NewGetQuotaMetricsPager - Get the quota metrics for an IoT hub. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientGetQuotaMetricsOptions contains the optional parameters for the ResourceClient.NewGetQuotaMetricsPager @@ -751,25 +834,20 @@ func (client *ResourceClient) NewGetQuotaMetricsPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceClientGetQuotaMetricsResponse) (ResourceClientGetQuotaMetricsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getQuotaMetricsCreateRequest(ctx, resourceGroupName, resourceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceClientGetQuotaMetricsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceClient.NewGetQuotaMetricsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getQuotaMetricsCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) if err != nil { return ResourceClientGetQuotaMetricsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientGetQuotaMetricsResponse{}, runtime.NewResponseError(resp) - } return client.getQuotaMetricsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -793,7 +871,7 @@ func (client *ResourceClient) getQuotaMetricsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -811,23 +889,30 @@ func (client *ResourceClient) getQuotaMetricsHandleResponse(resp *http.Response) // GetStats - Get the statistics from an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientGetStatsOptions contains the optional parameters for the ResourceClient.GetStats method. func (client *ResourceClient) GetStats(ctx context.Context, resourceGroupName string, resourceName string, options *ResourceClientGetStatsOptions) (ResourceClientGetStatsResponse, error) { + var err error + const operationName = "ResourceClient.GetStats" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getStatsCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return ResourceClientGetStatsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientGetStatsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientGetStatsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientGetStatsResponse{}, err } - return client.getStatsHandleResponse(resp) + resp, err := client.getStatsHandleResponse(httpResp) + return resp, err } // getStatsCreateRequest creates the GetStats request. @@ -850,7 +935,7 @@ func (client *ResourceClient) getStatsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -867,7 +952,7 @@ func (client *ResourceClient) getStatsHandleResponse(resp *http.Response) (Resou // NewGetValidSKUsPager - Get the list of valid SKUs for an IoT hub. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientGetValidSKUsOptions contains the optional parameters for the ResourceClient.NewGetValidSKUsPager @@ -878,25 +963,20 @@ func (client *ResourceClient) NewGetValidSKUsPager(resourceGroupName string, res return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceClientGetValidSKUsResponse) (ResourceClientGetValidSKUsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getValidSKUsCreateRequest(ctx, resourceGroupName, resourceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceClient.NewGetValidSKUsPager") + 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.getValidSKUsCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) if err != nil { return ResourceClientGetValidSKUsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ResourceClientGetValidSKUsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientGetValidSKUsResponse{}, runtime.NewResponseError(resp) - } return client.getValidSKUsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -920,7 +1000,7 @@ func (client *ResourceClient) getValidSKUsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -940,24 +1020,31 @@ func (client *ResourceClient) getValidSKUsHandleResponse(resp *http.Response) (R // https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - importDevicesParameters - The parameters that specify the import devices operation. // - options - ResourceClientImportDevicesOptions contains the optional parameters for the ResourceClient.ImportDevices method. func (client *ResourceClient) ImportDevices(ctx context.Context, resourceGroupName string, resourceName string, importDevicesParameters ImportDevicesRequest, options *ResourceClientImportDevicesOptions) (ResourceClientImportDevicesResponse, error) { + var err error + const operationName = "ResourceClient.ImportDevices" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.importDevicesCreateRequest(ctx, resourceGroupName, resourceName, importDevicesParameters, options) if err != nil { return ResourceClientImportDevicesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientImportDevicesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientImportDevicesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientImportDevicesResponse{}, err } - return client.importDevicesHandleResponse(resp) + resp, err := client.importDevicesHandleResponse(httpResp) + return resp, err } // importDevicesCreateRequest creates the ImportDevices request. @@ -980,10 +1067,13 @@ func (client *ResourceClient) importDevicesCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, importDevicesParameters) + if err := runtime.MarshalAsJSON(req, importDevicesParameters); err != nil { + return nil, err + } + return req, nil } // importDevicesHandleResponse handles the ImportDevices response. @@ -997,7 +1087,7 @@ func (client *ResourceClient) importDevicesHandleResponse(resp *http.Response) ( // NewListByResourceGroupPager - Get all the IoT hubs in a resource group. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - options - ResourceClientListByResourceGroupOptions contains the optional parameters for the ResourceClient.NewListByResourceGroupPager // method. @@ -1007,25 +1097,20 @@ func (client *ResourceClient) NewListByResourceGroupPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceClientListByResourceGroupResponse) (ResourceClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceClient.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 ResourceClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ResourceClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1045,7 +1130,7 @@ func (client *ResourceClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1062,7 +1147,7 @@ func (client *ResourceClient) listByResourceGroupHandleResponse(resp *http.Respo // NewListBySubscriptionPager - Get all the IoT hubs in a subscription. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - options - ResourceClientListBySubscriptionOptions contains the optional parameters for the ResourceClient.NewListBySubscriptionPager // method. func (client *ResourceClient) NewListBySubscriptionPager(options *ResourceClientListBySubscriptionOptions) *runtime.Pager[ResourceClientListBySubscriptionResponse] { @@ -1071,25 +1156,20 @@ func (client *ResourceClient) NewListBySubscriptionPager(options *ResourceClient return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceClientListBySubscriptionResponse) (ResourceClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceClientListBySubscriptionResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 ResourceClientListBySubscriptionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1105,7 +1185,7 @@ func (client *ResourceClient) listBySubscriptionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1123,7 +1203,7 @@ func (client *ResourceClient) listBySubscriptionHandleResponse(resp *http.Respon // NewListEventHubConsumerGroupsPager - Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint // in an IoT hub. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - eventHubEndpointName - The name of the Event Hub-compatible endpoint. @@ -1135,25 +1215,20 @@ func (client *ResourceClient) NewListEventHubConsumerGroupsPager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceClientListEventHubConsumerGroupsResponse) (ResourceClientListEventHubConsumerGroupsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listEventHubConsumerGroupsCreateRequest(ctx, resourceGroupName, resourceName, eventHubEndpointName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceClientListEventHubConsumerGroupsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceClient.NewListEventHubConsumerGroupsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listEventHubConsumerGroupsCreateRequest(ctx, resourceGroupName, resourceName, eventHubEndpointName, options) + }, nil) if err != nil { return ResourceClientListEventHubConsumerGroupsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientListEventHubConsumerGroupsResponse{}, runtime.NewResponseError(resp) - } return client.listEventHubConsumerGroupsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1181,7 +1256,7 @@ func (client *ResourceClient) listEventHubConsumerGroupsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1198,7 +1273,7 @@ func (client *ResourceClient) listEventHubConsumerGroupsHandleResponse(resp *htt // NewListJobsPager - Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientListJobsOptions contains the optional parameters for the ResourceClient.NewListJobsPager method. @@ -1208,25 +1283,20 @@ func (client *ResourceClient) NewListJobsPager(resourceGroupName string, resourc return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceClientListJobsResponse) (ResourceClientListJobsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listJobsCreateRequest(ctx, resourceGroupName, resourceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceClientListJobsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceClient.NewListJobsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listJobsCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) if err != nil { return ResourceClientListJobsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientListJobsResponse{}, runtime.NewResponseError(resp) - } return client.listJobsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1250,7 +1320,7 @@ func (client *ResourceClient) listJobsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1267,7 +1337,7 @@ func (client *ResourceClient) listJobsHandleResponse(resp *http.Response) (Resou // NewListKeysPager - Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientListKeysOptions contains the optional parameters for the ResourceClient.NewListKeysPager method. @@ -1277,25 +1347,20 @@ func (client *ResourceClient) NewListKeysPager(resourceGroupName string, resourc return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceClientListKeysResponse) (ResourceClientListKeysResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listKeysCreateRequest(ctx, resourceGroupName, resourceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceClient.NewListKeysPager") + 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.listKeysCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) if err != nil { return ResourceClientListKeysResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ResourceClientListKeysResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientListKeysResponse{}, runtime.NewResponseError(resp) - } return client.listKeysHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1319,7 +1384,7 @@ func (client *ResourceClient) listKeysCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1337,24 +1402,31 @@ func (client *ResourceClient) listKeysHandleResponse(resp *http.Response) (Resou // TestAllRoutes - Test all routes configured in this Iot Hub // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - iotHubName - IotHub to be tested // - resourceGroupName - resource group which Iot Hub belongs to // - input - Input for testing all routes // - options - ResourceClientTestAllRoutesOptions contains the optional parameters for the ResourceClient.TestAllRoutes method. func (client *ResourceClient) TestAllRoutes(ctx context.Context, iotHubName string, resourceGroupName string, input TestAllRoutesInput, options *ResourceClientTestAllRoutesOptions) (ResourceClientTestAllRoutesResponse, error) { + var err error + const operationName = "ResourceClient.TestAllRoutes" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.testAllRoutesCreateRequest(ctx, iotHubName, resourceGroupName, input, options) if err != nil { return ResourceClientTestAllRoutesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientTestAllRoutesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientTestAllRoutesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientTestAllRoutesResponse{}, err } - return client.testAllRoutesHandleResponse(resp) + resp, err := client.testAllRoutesHandleResponse(httpResp) + return resp, err } // testAllRoutesCreateRequest creates the TestAllRoutes request. @@ -1377,10 +1449,13 @@ func (client *ResourceClient) testAllRoutesCreateRequest(ctx context.Context, io return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil } // testAllRoutesHandleResponse handles the TestAllRoutes response. @@ -1395,24 +1470,31 @@ func (client *ResourceClient) testAllRoutesHandleResponse(resp *http.Response) ( // TestRoute - Test the new route for this Iot Hub // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - iotHubName - IotHub to be tested // - resourceGroupName - resource group which Iot Hub belongs to // - input - Route that needs to be tested // - options - ResourceClientTestRouteOptions contains the optional parameters for the ResourceClient.TestRoute method. func (client *ResourceClient) TestRoute(ctx context.Context, iotHubName string, resourceGroupName string, input TestRouteInput, options *ResourceClientTestRouteOptions) (ResourceClientTestRouteResponse, error) { + var err error + const operationName = "ResourceClient.TestRoute" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.testRouteCreateRequest(ctx, iotHubName, resourceGroupName, input, options) if err != nil { return ResourceClientTestRouteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientTestRouteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientTestRouteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientTestRouteResponse{}, err } - return client.testRouteHandleResponse(resp) + resp, err := client.testRouteHandleResponse(httpResp) + return resp, err } // testRouteCreateRequest creates the TestRoute request. @@ -1435,10 +1517,13 @@ func (client *ResourceClient) testRouteCreateRequest(ctx context.Context, iotHub return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil } // testRouteHandleResponse handles the TestRoute response. @@ -1453,7 +1538,7 @@ func (client *ResourceClient) testRouteHandleResponse(resp *http.Response) (Reso // BeginUpdate - Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - resourceGroupName - Resource group identifier. // - resourceName - Name of iot hub to update. // - iotHubTags - Updated tag information to set into the iot hub instance. @@ -1464,29 +1549,40 @@ func (client *ResourceClient) BeginUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ResourceClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ResourceClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ResourceClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ResourceClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 func (client *ResourceClient) update(ctx context.Context, resourceGroupName string, resourceName string, iotHubTags TagsResource, options *ResourceClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ResourceClient.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, resourceName, iotHubTags, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -1509,8 +1605,11 @@ func (client *ResourceClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, iotHubTags) + if err := runtime.MarshalAsJSON(req, iotHubTags); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/resourceprovidercommon_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/resourceprovidercommon_client.go index ece414a5..f17652c2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/resourceprovidercommon_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/resourceprovidercommon_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub @@ -33,7 +32,7 @@ type ResourceProviderCommonClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewResourceProviderCommonClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceProviderCommonClient, error) { - cl, err := arm.NewClient(moduleName+".ResourceProviderCommonClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,22 +46,29 @@ func NewResourceProviderCommonClient(subscriptionID string, credential azcore.To // GetSubscriptionQuota - Get the number of free and paid iot hubs in the subscription // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-07-02 +// Generated from API version 2023-06-30 // - options - ResourceProviderCommonClientGetSubscriptionQuotaOptions contains the optional parameters for the ResourceProviderCommonClient.GetSubscriptionQuota // method. func (client *ResourceProviderCommonClient) GetSubscriptionQuota(ctx context.Context, options *ResourceProviderCommonClientGetSubscriptionQuotaOptions) (ResourceProviderCommonClientGetSubscriptionQuotaResponse, error) { + var err error + const operationName = "ResourceProviderCommonClient.GetSubscriptionQuota" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSubscriptionQuotaCreateRequest(ctx, options) if err != nil { return ResourceProviderCommonClientGetSubscriptionQuotaResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceProviderCommonClientGetSubscriptionQuotaResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceProviderCommonClientGetSubscriptionQuotaResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceProviderCommonClientGetSubscriptionQuotaResponse{}, err } - return client.getSubscriptionQuotaHandleResponse(resp) + resp, err := client.getSubscriptionQuotaHandleResponse(httpResp) + return resp, err } // getSubscriptionQuotaCreateRequest creates the GetSubscriptionQuota request. @@ -77,7 +83,7 @@ func (client *ResourceProviderCommonClient) getSubscriptionQuotaCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-02") + reqQP.Set("api-version", "2023-06-30") 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/iothub/armiothub/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/response_types.go index cfb1efaf..9fe3d923 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/response_types.go @@ -3,14 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub // CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.CreateOrUpdate. type CertificatesClientCreateOrUpdateResponse struct { + // The X509 Certificate. CertificateDescription } @@ -21,21 +21,25 @@ type CertificatesClientDeleteResponse struct { // CertificatesClientGenerateVerificationCodeResponse contains the response from method CertificatesClient.GenerateVerificationCode. type CertificatesClientGenerateVerificationCodeResponse struct { + // The X509 Certificate. CertificateWithNonceDescription } // CertificatesClientGetResponse contains the response from method CertificatesClient.Get. type CertificatesClientGetResponse struct { + // The X509 Certificate. CertificateDescription } // CertificatesClientListByIotHubResponse contains the response from method CertificatesClient.ListByIotHub. type CertificatesClientListByIotHubResponse struct { + // The JSON-serialized array of Certificate objects. CertificateListDescription } // CertificatesClientVerifyResponse contains the response from method CertificatesClient.Verify. type CertificatesClientVerifyResponse struct { + // The X509 Certificate. CertificateDescription } @@ -46,16 +50,20 @@ type ClientManualFailoverResponse struct { // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list IoT Hub operations. It contains a list of operations and a URL link to get the next set of + // results. OperationListResult } // PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete. type PrivateEndpointConnectionsClientDeleteResponse struct { + // The private endpoint connection of an IotHub PrivateEndpointConnection } // PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. type PrivateEndpointConnectionsClientGetResponse struct { + // The private endpoint connection of an IotHub PrivateEndpointConnection } @@ -67,31 +75,37 @@ type PrivateEndpointConnectionsClientListResponse struct { // PrivateEndpointConnectionsClientUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginUpdate. type PrivateEndpointConnectionsClientUpdateResponse struct { + // The private endpoint connection of an IotHub PrivateEndpointConnection } // PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get. type PrivateLinkResourcesClientGetResponse struct { + // The group information for creating a private endpoint on an IotHub GroupIDInformation } // PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.List. type PrivateLinkResourcesClientListResponse struct { + // The available private link resources for an IotHub PrivateLinkResources } // ResourceClientCheckNameAvailabilityResponse contains the response from method ResourceClient.CheckNameAvailability. type ResourceClientCheckNameAvailabilityResponse struct { + // The properties indicating whether a given IoT hub name is available. NameAvailabilityInfo } // ResourceClientCreateEventHubConsumerGroupResponse contains the response from method ResourceClient.CreateEventHubConsumerGroup. type ResourceClientCreateEventHubConsumerGroupResponse struct { + // The properties of the EventHubConsumerGroupInfo object. EventHubConsumerGroupInfo } // ResourceClientCreateOrUpdateResponse contains the response from method ResourceClient.BeginCreateOrUpdate. type ResourceClientCreateOrUpdateResponse struct { + // The description of the IoT hub. Description } @@ -102,100 +116,120 @@ type ResourceClientDeleteEventHubConsumerGroupResponse struct { // ResourceClientDeleteResponse contains the response from method ResourceClient.BeginDelete. type ResourceClientDeleteResponse struct { + // The description of the IoT hub. Description } // ResourceClientExportDevicesResponse contains the response from method ResourceClient.ExportDevices. type ResourceClientExportDevicesResponse struct { + // The properties of the Job Response object. JobResponse } // ResourceClientGetEndpointHealthResponse contains the response from method ResourceClient.NewGetEndpointHealthPager. type ResourceClientGetEndpointHealthResponse struct { + // The JSON-serialized array of EndpointHealthData objects with a next link. EndpointHealthDataListResult } // ResourceClientGetEventHubConsumerGroupResponse contains the response from method ResourceClient.GetEventHubConsumerGroup. type ResourceClientGetEventHubConsumerGroupResponse struct { + // The properties of the EventHubConsumerGroupInfo object. EventHubConsumerGroupInfo } // ResourceClientGetJobResponse contains the response from method ResourceClient.GetJob. type ResourceClientGetJobResponse struct { + // The properties of the Job Response object. JobResponse } // ResourceClientGetKeysForKeyNameResponse contains the response from method ResourceClient.GetKeysForKeyName. type ResourceClientGetKeysForKeyNameResponse struct { + // The properties of an IoT hub shared access policy. SharedAccessSignatureAuthorizationRule } // ResourceClientGetQuotaMetricsResponse contains the response from method ResourceClient.NewGetQuotaMetricsPager. type ResourceClientGetQuotaMetricsResponse struct { + // The JSON-serialized array of IotHubQuotaMetricInfo objects with a next link. QuotaMetricInfoListResult } // ResourceClientGetResponse contains the response from method ResourceClient.Get. type ResourceClientGetResponse struct { + // The description of the IoT hub. Description } // ResourceClientGetStatsResponse contains the response from method ResourceClient.GetStats. type ResourceClientGetStatsResponse struct { + // Identity registry statistics. RegistryStatistics } // ResourceClientGetValidSKUsResponse contains the response from method ResourceClient.NewGetValidSKUsPager. type ResourceClientGetValidSKUsResponse struct { + // The JSON-serialized array of IotHubSkuDescription objects with a next link. SKUDescriptionListResult } // ResourceClientImportDevicesResponse contains the response from method ResourceClient.ImportDevices. type ResourceClientImportDevicesResponse struct { + // The properties of the Job Response object. JobResponse } // ResourceClientListByResourceGroupResponse contains the response from method ResourceClient.NewListByResourceGroupPager. type ResourceClientListByResourceGroupResponse struct { + // The JSON-serialized array of IotHubDescription objects with a next link. DescriptionListResult } // ResourceClientListBySubscriptionResponse contains the response from method ResourceClient.NewListBySubscriptionPager. type ResourceClientListBySubscriptionResponse struct { + // The JSON-serialized array of IotHubDescription objects with a next link. DescriptionListResult } // ResourceClientListEventHubConsumerGroupsResponse contains the response from method ResourceClient.NewListEventHubConsumerGroupsPager. type ResourceClientListEventHubConsumerGroupsResponse struct { + // The JSON-serialized array of Event Hub-compatible consumer group names with a next link. EventHubConsumerGroupsListResult } // ResourceClientListJobsResponse contains the response from method ResourceClient.NewListJobsPager. type ResourceClientListJobsResponse struct { + // The JSON-serialized array of JobResponse objects with a next link. JobResponseListResult } // ResourceClientListKeysResponse contains the response from method ResourceClient.NewListKeysPager. type ResourceClientListKeysResponse struct { + // The list of shared access policies with a next link. SharedAccessSignatureAuthorizationRuleListResult } // ResourceClientTestAllRoutesResponse contains the response from method ResourceClient.TestAllRoutes. type ResourceClientTestAllRoutesResponse struct { + // Result of testing all routes TestAllRoutesResult } // ResourceClientTestRouteResponse contains the response from method ResourceClient.TestRoute. type ResourceClientTestRouteResponse struct { + // Result of testing one route TestRouteResult } // ResourceClientUpdateResponse contains the response from method ResourceClient.BeginUpdate. type ResourceClientUpdateResponse struct { + // The description of the IoT hub. Description } // ResourceProviderCommonClientGetSubscriptionQuotaResponse contains the response from method ResourceProviderCommonClient.GetSubscriptionQuota. type ResourceProviderCommonClientGetSubscriptionQuotaResponse struct { + // Json-serialized array of User subscription quota response UserSubscriptionQuotaListResult } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/time_rfc1123.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/time_rfc1123.go index a3598527..a6daa27b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/time_rfc1123.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/time_rfc1123.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub @@ -19,34 +18,34 @@ import ( ) const ( - rfc1123JSON = `"` + time.RFC1123 + `"` + dateTimeRFC1123JSON = `"` + time.RFC1123 + `"` ) -type timeRFC1123 time.Time +type dateTimeRFC1123 time.Time -func (t timeRFC1123) MarshalJSON() ([]byte, error) { - b := []byte(time.Time(t).Format(rfc1123JSON)) +func (t dateTimeRFC1123) MarshalJSON() ([]byte, error) { + b := []byte(time.Time(t).Format(dateTimeRFC1123JSON)) return b, nil } -func (t timeRFC1123) MarshalText() ([]byte, error) { +func (t dateTimeRFC1123) MarshalText() ([]byte, error) { b := []byte(time.Time(t).Format(time.RFC1123)) return b, nil } -func (t *timeRFC1123) UnmarshalJSON(data []byte) error { - p, err := time.Parse(rfc1123JSON, strings.ToUpper(string(data))) - *t = timeRFC1123(p) +func (t *dateTimeRFC1123) UnmarshalJSON(data []byte) error { + p, err := time.Parse(dateTimeRFC1123JSON, strings.ToUpper(string(data))) + *t = dateTimeRFC1123(p) return err } -func (t *timeRFC1123) UnmarshalText(data []byte) error { +func (t *dateTimeRFC1123) UnmarshalText(data []byte) error { p, err := time.Parse(time.RFC1123, string(data)) - *t = timeRFC1123(p) + *t = dateTimeRFC1123(p) return err } -func populateTimeRFC1123(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC1123(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -55,14 +54,14 @@ func populateTimeRFC1123(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC1123)(t) + m[k] = (*dateTimeRFC1123)(t) } -func unpopulateTimeRFC1123(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC1123(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC1123 + var aux dateTimeRFC1123 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/time_rfc3339.go index c32fab2f..a13b5d86 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armiothub @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md index f9cd65aa..9c91dc4c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md @@ -1,5 +1,30 @@ # Release History +## 1.5.0 (2025-03-28) +### Features Added + +- New value `ManagedHsmSKUFamilyC` added to enum type `ManagedHsmSKUFamily` +- New value `ManagedHsmSKUNameCustomC10`, `ManagedHsmSKUNameCustomC42` added to enum type `ManagedHsmSKUName` + + +## 1.4.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 1.3.0 (2023-10-27) +### Features Added + +- New value `ManagedHsmSKUNameCustomB6` added to enum type `ManagedHsmSKUName` +- New enum type `ManagedServiceIdentityType` with values `ManagedServiceIdentityTypeNone`, `ManagedServiceIdentityTypeSystemAssigned`, `ManagedServiceIdentityTypeSystemAssignedUserAssigned`, `ManagedServiceIdentityTypeUserAssigned` +- New struct `ManagedServiceIdentity` +- New struct `UserAssignedIdentity` +- New field `Identity` in struct `MHSMPrivateEndpointConnection` +- New field `Identity` in struct `MHSMPrivateLinkResource` +- New field `Identity` in struct `ManagedHsm` + + ## 1.2.0 (2023-04-28) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/README.md index 11dbffa4..78b73941 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/README.md @@ -1,7 +1,5 @@ # Azure Key Vault Module for Go -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault) - The `armkeyvault` module provides operations for working with Azure Key Vault. [Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/keyvault/armkeyvault) @@ -11,7 +9,7 @@ The `armkeyvault` module provides operations for working with Azure Key Vault. ## 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).) +- [Supported](https://aka.ms/azsdk/go/supported-versions) version of Go (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 @@ -25,7 +23,7 @@ go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvaul ## Authorization -When creating a client, you will need to provide a credential for authenticating with Azure Key Vault. 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 Key Vault. 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,12 +52,19 @@ clientFactory, err := armkeyvault.NewClientFactory(, cred, &opt ## 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.NewVaultsClient() +client := clientFactory.NewKeysClient() ``` +## 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 - [Key](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/keyvault/key) @@ -88,4 +93,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/keyvault/armkeyvault/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json index 9ae804c3..4f378308 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/keyvault/armkeyvault", - "Tag": "go/resourcemanager/keyvault/armkeyvault_283c3f03b2" + "Tag": "go/resourcemanager/keyvault/armkeyvault_78ef05dfb2" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md index 4692f2f5..1cbdc513 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md @@ -5,11 +5,11 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/keyvault/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/keyvault/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/ee1eec42dcc710ff88db2d1bf574b2f9afe3d654/specification/keyvault/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/ee1eec42dcc710ff88db2d1bf574b2f9afe3d654/specification/keyvault/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.2.0 +module-version: 1.5.0 modelerfour: seal-single-value-enum-by-default: true -tag: package-2023-02 +tag: package-2024-11-01 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go index c3da538e..ef03d767 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go @@ -2,6 +2,6 @@ // 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/keyvault/armkeyvault +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -removeUnreferencedTypes resourcemanager/keyvault/armkeyvault package armkeyvault diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/ci.yml index db5bcb59..07fa6eef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/ci.yml +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/ci.yml @@ -21,8 +21,9 @@ pr: include: - sdk/resourcemanager/keyvault/armkeyvault/ -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/keyvault/armkeyvault' + UsePipelineProxy: false diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go index ff61f910..0bd1b63a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -18,8 +14,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. @@ -29,67 +24,99 @@ 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+".ClientFactory", 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 } +// NewKeysClient creates a new instance of KeysClient. func (c *ClientFactory) NewKeysClient() *KeysClient { - subClient, _ := NewKeysClient(c.subscriptionID, c.credential, c.options) - return subClient + return &KeysClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewManagedHsmKeysClient() *ManagedHsmKeysClient { - subClient, _ := NewManagedHsmKeysClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewMHSMPrivateEndpointConnectionsClient creates a new instance of MHSMPrivateEndpointConnectionsClient. +func (c *ClientFactory) NewMHSMPrivateEndpointConnectionsClient() *MHSMPrivateEndpointConnectionsClient { + return &MHSMPrivateEndpointConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewVaultsClient() *VaultsClient { - subClient, _ := NewVaultsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewMHSMPrivateLinkResourcesClient creates a new instance of MHSMPrivateLinkResourcesClient. +func (c *ClientFactory) NewMHSMPrivateLinkResourcesClient() *MHSMPrivateLinkResourcesClient { + return &MHSMPrivateLinkResourcesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewMHSMRegionsClient creates a new instance of MHSMRegionsClient. +func (c *ClientFactory) NewMHSMRegionsClient() *MHSMRegionsClient { + return &MHSMRegionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewManagedHsmKeysClient creates a new instance of ManagedHsmKeysClient. +func (c *ClientFactory) NewManagedHsmKeysClient() *ManagedHsmKeysClient { + return &ManagedHsmKeysClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewManagedHsmsClient creates a new instance of ManagedHsmsClient. func (c *ClientFactory) NewManagedHsmsClient() *ManagedHsmsClient { - subClient, _ := NewManagedHsmsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &ManagedHsmsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewMHSMPrivateEndpointConnectionsClient() *MHSMPrivateEndpointConnectionsClient { - subClient, _ := NewMHSMPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } } -func (c *ClientFactory) NewMHSMPrivateLinkResourcesClient() *MHSMPrivateLinkResourcesClient { - subClient, _ := NewMHSMPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient. +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + return &PrivateEndpointConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewMHSMRegionsClient() *MHSMRegionsClient { - subClient, _ := NewMHSMRegionsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient. +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + return &PrivateLinkResourcesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient +// NewSecretsClient creates a new instance of SecretsClient. +func (c *ClientFactory) NewSecretsClient() *SecretsClient { + return &SecretsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewSecretsClient() *SecretsClient { - subClient, _ := NewSecretsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewVaultsClient creates a new instance of VaultsClient. +func (c *ClientFactory) NewVaultsClient() *VaultsClient { + return &VaultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go index d6415ed5..3eec8f6d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go @@ -1,33 +1,29 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault const ( - moduleName = "armkeyvault" - moduleVersion = "v1.2.0" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault" + moduleVersion = "v1.5.0" ) type AccessPolicyUpdateKind string const ( AccessPolicyUpdateKindAdd AccessPolicyUpdateKind = "add" - AccessPolicyUpdateKindReplace AccessPolicyUpdateKind = "replace" AccessPolicyUpdateKindRemove AccessPolicyUpdateKind = "remove" + AccessPolicyUpdateKindReplace AccessPolicyUpdateKind = "replace" ) // PossibleAccessPolicyUpdateKindValues returns the possible values for the AccessPolicyUpdateKind const type. func PossibleAccessPolicyUpdateKindValues() []AccessPolicyUpdateKind { return []AccessPolicyUpdateKind{ AccessPolicyUpdateKindAdd, - AccessPolicyUpdateKindReplace, AccessPolicyUpdateKindRemove, + AccessPolicyUpdateKindReplace, } } @@ -118,15 +114,15 @@ func PossibleCertificatePermissionsValues() []CertificatePermissions { type CreateMode string const ( - CreateModeRecover CreateMode = "recover" CreateModeDefault CreateMode = "default" + CreateModeRecover CreateMode = "recover" ) // PossibleCreateModeValues returns the possible values for the CreateMode const type. func PossibleCreateModeValues() []CreateMode { return []CreateMode{ - CreateModeRecover, CreateModeDefault, + CreateModeRecover, } } @@ -196,7 +192,8 @@ func PossibleIdentityTypeValues() []IdentityType { } } -// JSONWebKeyCurveName - The elliptic curve name. For valid values, see JsonWebKeyCurveName. +// JSONWebKeyCurveName - The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default for EC and EC-HSM keys +// is P-256 type JSONWebKeyCurveName string const ( @@ -321,15 +318,15 @@ func PossibleKeyPermissionsValues() []KeyPermissions { type KeyRotationPolicyActionType string const ( - KeyRotationPolicyActionTypeRotate KeyRotationPolicyActionType = "rotate" KeyRotationPolicyActionTypeNotify KeyRotationPolicyActionType = "notify" + KeyRotationPolicyActionTypeRotate KeyRotationPolicyActionType = "rotate" ) // PossibleKeyRotationPolicyActionTypeValues returns the possible values for the KeyRotationPolicyActionType const type. func PossibleKeyRotationPolicyActionTypeValues() []KeyRotationPolicyActionType { return []KeyRotationPolicyActionType{ - KeyRotationPolicyActionTypeRotate, KeyRotationPolicyActionTypeNotify, + KeyRotationPolicyActionTypeRotate, } } @@ -338,12 +335,14 @@ type ManagedHsmSKUFamily string const ( ManagedHsmSKUFamilyB ManagedHsmSKUFamily = "B" + ManagedHsmSKUFamilyC ManagedHsmSKUFamily = "C" ) // PossibleManagedHsmSKUFamilyValues returns the possible values for the ManagedHsmSKUFamily const type. func PossibleManagedHsmSKUFamilyValues() []ManagedHsmSKUFamily { return []ManagedHsmSKUFamily{ ManagedHsmSKUFamilyB, + ManagedHsmSKUFamilyC, } } @@ -351,15 +350,41 @@ func PossibleManagedHsmSKUFamilyValues() []ManagedHsmSKUFamily { type ManagedHsmSKUName string const ( - ManagedHsmSKUNameStandardB1 ManagedHsmSKUName = "Standard_B1" ManagedHsmSKUNameCustomB32 ManagedHsmSKUName = "Custom_B32" + ManagedHsmSKUNameCustomB6 ManagedHsmSKUName = "Custom_B6" + ManagedHsmSKUNameCustomC10 ManagedHsmSKUName = "Custom_C10" + ManagedHsmSKUNameCustomC42 ManagedHsmSKUName = "Custom_C42" + ManagedHsmSKUNameStandardB1 ManagedHsmSKUName = "Standard_B1" ) // PossibleManagedHsmSKUNameValues returns the possible values for the ManagedHsmSKUName const type. func PossibleManagedHsmSKUNameValues() []ManagedHsmSKUName { return []ManagedHsmSKUName{ - ManagedHsmSKUNameStandardB1, ManagedHsmSKUNameCustomB32, + ManagedHsmSKUNameCustomB6, + ManagedHsmSKUNameCustomC10, + ManagedHsmSKUNameCustomC42, + ManagedHsmSKUNameStandardB1, + } +} + +// ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). +type ManagedServiceIdentityType string + +const ( + ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" + ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" + ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" + ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" +) + +// PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type. +func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { + return []ManagedServiceIdentityType{ + ManagedServiceIdentityTypeNone, + ManagedServiceIdentityTypeSystemAssigned, + ManagedServiceIdentityTypeSystemAssignedUserAssigned, + ManagedServiceIdentityTypeUserAssigned, } } @@ -477,7 +502,7 @@ func PossibleProvisioningStateValues() []ProvisioningState { } } -// PublicNetworkAccess - Control permission for data plane traffic coming from public networks while private endpoint is enabled. +// PublicNetworkAccess - Control permission to the managed HSM from public networks. type PublicNetworkAccess string const ( @@ -527,15 +552,15 @@ func PossibleSKUFamilyValues() []SKUFamily { type SKUName string const ( - SKUNameStandard SKUName = "standard" SKUNamePremium SKUName = "premium" + SKUNameStandard SKUName = "standard" ) // PossibleSKUNameValues returns the possible values for the SKUName const type. func PossibleSKUNameValues() []SKUName { return []SKUName{ - SKUNameStandard, SKUNamePremium, + SKUNameStandard, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go index bd55b5b7..c1f23602 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -34,7 +30,7 @@ type KeysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KeysClient, error) { - cl, err := arm.NewClient(moduleName+".KeysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -50,7 +46,7 @@ func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, opt // versions, and does not update existing keys. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group which contains the specified key vault. // - vaultName - The name of the key vault which contains the key to be created. // - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the @@ -59,22 +55,29 @@ func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, opt // - parameters - The parameters used to create the specified key. // - options - KeysClientCreateIfNotExistOptions contains the optional parameters for the KeysClient.CreateIfNotExist method. func (client *KeysClient) CreateIfNotExist(ctx context.Context, resourceGroupName string, vaultName string, keyName string, parameters KeyCreateParameters, options *KeysClientCreateIfNotExistOptions) (KeysClientCreateIfNotExistResponse, error) { + var err error + const operationName = "KeysClient.CreateIfNotExist" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createIfNotExistCreateRequest(ctx, resourceGroupName, vaultName, keyName, parameters, options) if err != nil { return KeysClientCreateIfNotExistResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientCreateIfNotExistResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KeysClientCreateIfNotExistResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KeysClientCreateIfNotExistResponse{}, err } - return client.createIfNotExistHandleResponse(resp) + resp, err := client.createIfNotExistHandleResponse(httpResp) + return resp, err } // createIfNotExistCreateRequest creates the CreateIfNotExist request. -func (client *KeysClient) createIfNotExistCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, keyName string, parameters KeyCreateParameters, options *KeysClientCreateIfNotExistOptions) (*policy.Request, error) { +func (client *KeysClient) createIfNotExistCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, keyName string, parameters KeyCreateParameters, _ *KeysClientCreateIfNotExistOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -97,10 +100,13 @@ func (client *KeysClient) createIfNotExistCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createIfNotExistHandleResponse handles the CreateIfNotExist response. @@ -115,28 +121,35 @@ func (client *KeysClient) createIfNotExistHandleResponse(resp *http.Response) (K // Get - Gets the current version of the specified key from the specified key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group which contains the specified key vault. // - vaultName - The name of the vault which contains the key to be retrieved. // - keyName - The name of the key to be retrieved. // - options - KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. func (client *KeysClient) Get(ctx context.Context, resourceGroupName string, vaultName string, keyName string, options *KeysClientGetOptions) (KeysClientGetResponse, error) { + var err error + const operationName = "KeysClient.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, vaultName, keyName, options) if err != nil { return KeysClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KeysClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KeysClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *KeysClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, keyName string, options *KeysClientGetOptions) (*policy.Request, error) { +func (client *KeysClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, keyName string, _ *KeysClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -159,7 +172,7 @@ func (client *KeysClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -177,29 +190,36 @@ func (client *KeysClient) getHandleResponse(resp *http.Response) (KeysClientGetR // GetVersion - Gets the specified version of the specified key in the specified key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group which contains the specified key vault. // - vaultName - The name of the vault which contains the key version to be retrieved. // - keyName - The name of the key version to be retrieved. // - keyVersion - The version of the key to be retrieved. // - options - KeysClientGetVersionOptions contains the optional parameters for the KeysClient.GetVersion method. func (client *KeysClient) GetVersion(ctx context.Context, resourceGroupName string, vaultName string, keyName string, keyVersion string, options *KeysClientGetVersionOptions) (KeysClientGetVersionResponse, error) { + var err error + const operationName = "KeysClient.GetVersion" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getVersionCreateRequest(ctx, resourceGroupName, vaultName, keyName, keyVersion, options) if err != nil { return KeysClientGetVersionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientGetVersionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KeysClientGetVersionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KeysClientGetVersionResponse{}, err } - return client.getVersionHandleResponse(resp) + resp, err := client.getVersionHandleResponse(httpResp) + return resp, err } // getVersionCreateRequest creates the GetVersion request. -func (client *KeysClient) getVersionCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, keyName string, keyVersion string, options *KeysClientGetVersionOptions) (*policy.Request, error) { +func (client *KeysClient) getVersionCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, keyName string, keyVersion string, _ *KeysClientGetVersionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions/{keyVersion}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -226,7 +246,7 @@ func (client *KeysClient) getVersionCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -243,7 +263,7 @@ func (client *KeysClient) getVersionHandleResponse(resp *http.Response) (KeysCli // NewListPager - Lists the keys in the specified key vault. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group which contains the specified key vault. // - vaultName - The name of the vault which contains the keys to be retrieved. // - options - KeysClientListOptions contains the optional parameters for the KeysClient.NewListPager method. @@ -253,30 +273,25 @@ func (client *KeysClient) NewListPager(resourceGroupName string, vaultName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *KeysClientListResponse) (KeysClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, vaultName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KeysClient.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, vaultName, options) + }, nil) if err != nil { return KeysClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return KeysClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KeysClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listCreateRequest creates the List request. -func (client *KeysClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *KeysClientListOptions) (*policy.Request, error) { +func (client *KeysClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, _ *KeysClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -295,7 +310,7 @@ func (client *KeysClient) listCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -312,7 +327,7 @@ func (client *KeysClient) listHandleResponse(resp *http.Response) (KeysClientLis // NewListVersionsPager - Lists the versions of the specified key in the specified key vault. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group which contains the specified key vault. // - vaultName - The name of the vault which contains the key versions to be retrieved. // - keyName - The name of the key versions to be retrieved. @@ -323,30 +338,25 @@ func (client *KeysClient) NewListVersionsPager(resourceGroupName string, vaultNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *KeysClientListVersionsResponse) (KeysClientListVersionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listVersionsCreateRequest(ctx, resourceGroupName, vaultName, keyName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KeysClient.NewListVersionsPager") + 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.listVersionsCreateRequest(ctx, resourceGroupName, vaultName, keyName, options) + }, nil) if err != nil { return KeysClientListVersionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return KeysClientListVersionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KeysClientListVersionsResponse{}, runtime.NewResponseError(resp) - } return client.listVersionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listVersionsCreateRequest creates the ListVersions request. -func (client *KeysClient) listVersionsCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, keyName string, options *KeysClientListVersionsOptions) (*policy.Request, error) { +func (client *KeysClient) listVersionsCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, keyName string, _ *KeysClientListVersionsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -369,7 +379,7 @@ func (client *KeysClient) listVersionsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-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/keyvault/armkeyvault/managedhsmkeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsmkeys_client.go index 3288eefd..2517ca67 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsmkeys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsmkeys_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -34,7 +30,7 @@ type ManagedHsmKeysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewManagedHsmKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedHsmKeysClient, error) { - cl, err := arm.NewClient(moduleName+".ManagedHsmKeysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -50,7 +46,7 @@ func NewManagedHsmKeysClient(subscriptionID string, credential azcore.TokenCrede // versions, and does not update existing keys. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - name - The name of the Managed HSM Pool within the specified resource group. // - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the @@ -60,22 +56,29 @@ func NewManagedHsmKeysClient(subscriptionID string, credential azcore.TokenCrede // - options - ManagedHsmKeysClientCreateIfNotExistOptions contains the optional parameters for the ManagedHsmKeysClient.CreateIfNotExist // method. func (client *ManagedHsmKeysClient) CreateIfNotExist(ctx context.Context, resourceGroupName string, name string, keyName string, parameters ManagedHsmKeyCreateParameters, options *ManagedHsmKeysClientCreateIfNotExistOptions) (ManagedHsmKeysClientCreateIfNotExistResponse, error) { + var err error + const operationName = "ManagedHsmKeysClient.CreateIfNotExist" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createIfNotExistCreateRequest(ctx, resourceGroupName, name, keyName, parameters, options) if err != nil { return ManagedHsmKeysClientCreateIfNotExistResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmKeysClientCreateIfNotExistResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmKeysClientCreateIfNotExistResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedHsmKeysClientCreateIfNotExistResponse{}, err } - return client.createIfNotExistHandleResponse(resp) + resp, err := client.createIfNotExistHandleResponse(httpResp) + return resp, err } // createIfNotExistCreateRequest creates the CreateIfNotExist request. -func (client *ManagedHsmKeysClient) createIfNotExistCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, parameters ManagedHsmKeyCreateParameters, options *ManagedHsmKeysClientCreateIfNotExistOptions) (*policy.Request, error) { +func (client *ManagedHsmKeysClient) createIfNotExistCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, parameters ManagedHsmKeyCreateParameters, _ *ManagedHsmKeysClientCreateIfNotExistOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -98,10 +101,13 @@ func (client *ManagedHsmKeysClient) createIfNotExistCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createIfNotExistHandleResponse handles the CreateIfNotExist response. @@ -116,7 +122,7 @@ func (client *ManagedHsmKeysClient) createIfNotExistHandleResponse(resp *http.Re // Get - Gets the current version of the specified key from the specified managed HSM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - name - The name of the Managed HSM Pool within the specified resource group. // - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the @@ -124,22 +130,29 @@ func (client *ManagedHsmKeysClient) createIfNotExistHandleResponse(resp *http.Re // information. // - options - ManagedHsmKeysClientGetOptions contains the optional parameters for the ManagedHsmKeysClient.Get method. func (client *ManagedHsmKeysClient) Get(ctx context.Context, resourceGroupName string, name string, keyName string, options *ManagedHsmKeysClientGetOptions) (ManagedHsmKeysClientGetResponse, error) { + var err error + const operationName = "ManagedHsmKeysClient.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, name, keyName, options) if err != nil { return ManagedHsmKeysClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmKeysClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmKeysClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedHsmKeysClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *ManagedHsmKeysClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, options *ManagedHsmKeysClientGetOptions) (*policy.Request, error) { +func (client *ManagedHsmKeysClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, _ *ManagedHsmKeysClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -162,7 +175,7 @@ func (client *ManagedHsmKeysClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +193,7 @@ func (client *ManagedHsmKeysClient) getHandleResponse(resp *http.Response) (Mana // GetVersion - Gets the specified version of the specified key in the specified managed HSM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - name - The name of the Managed HSM Pool within the specified resource group. // - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the @@ -190,22 +203,29 @@ func (client *ManagedHsmKeysClient) getHandleResponse(resp *http.Response) (Mana // - options - ManagedHsmKeysClientGetVersionOptions contains the optional parameters for the ManagedHsmKeysClient.GetVersion // method. func (client *ManagedHsmKeysClient) GetVersion(ctx context.Context, resourceGroupName string, name string, keyName string, keyVersion string, options *ManagedHsmKeysClientGetVersionOptions) (ManagedHsmKeysClientGetVersionResponse, error) { + var err error + const operationName = "ManagedHsmKeysClient.GetVersion" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getVersionCreateRequest(ctx, resourceGroupName, name, keyName, keyVersion, options) if err != nil { return ManagedHsmKeysClientGetVersionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmKeysClientGetVersionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmKeysClientGetVersionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedHsmKeysClientGetVersionResponse{}, err } - return client.getVersionHandleResponse(resp) + resp, err := client.getVersionHandleResponse(httpResp) + return resp, err } // getVersionCreateRequest creates the GetVersion request. -func (client *ManagedHsmKeysClient) getVersionCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, keyVersion string, options *ManagedHsmKeysClientGetVersionOptions) (*policy.Request, error) { +func (client *ManagedHsmKeysClient) getVersionCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, keyVersion string, _ *ManagedHsmKeysClientGetVersionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}/versions/{keyVersion}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -232,7 +252,7 @@ func (client *ManagedHsmKeysClient) getVersionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +269,7 @@ func (client *ManagedHsmKeysClient) getVersionHandleResponse(resp *http.Response // NewListPager - Lists the keys in the specified managed HSM. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - name - The name of the Managed HSM Pool within the specified resource group. // - options - ManagedHsmKeysClientListOptions contains the optional parameters for the ManagedHsmKeysClient.NewListPager method. @@ -259,30 +279,25 @@ func (client *ManagedHsmKeysClient) NewListPager(resourceGroupName string, name return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ManagedHsmKeysClientListResponse) (ManagedHsmKeysClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedHsmKeysClient.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, name, options) + }, nil) if err != nil { return ManagedHsmKeysClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedHsmKeysClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmKeysClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listCreateRequest creates the List request. -func (client *ManagedHsmKeysClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmKeysClientListOptions) (*policy.Request, error) { +func (client *ManagedHsmKeysClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, _ *ManagedHsmKeysClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -301,7 +316,7 @@ func (client *ManagedHsmKeysClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -318,7 +333,7 @@ func (client *ManagedHsmKeysClient) listHandleResponse(resp *http.Response) (Man // NewListVersionsPager - Lists the versions of the specified key in the specified managed HSM. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - name - The name of the Managed HSM Pool within the specified resource group. // - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the @@ -332,30 +347,25 @@ func (client *ManagedHsmKeysClient) NewListVersionsPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ManagedHsmKeysClientListVersionsResponse) (ManagedHsmKeysClientListVersionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listVersionsCreateRequest(ctx, resourceGroupName, name, keyName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedHsmKeysClient.NewListVersionsPager") + 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.listVersionsCreateRequest(ctx, resourceGroupName, name, keyName, options) + }, nil) if err != nil { return ManagedHsmKeysClientListVersionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedHsmKeysClientListVersionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmKeysClientListVersionsResponse{}, runtime.NewResponseError(resp) - } return client.listVersionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listVersionsCreateRequest creates the ListVersions request. -func (client *ManagedHsmKeysClient) listVersionsCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, options *ManagedHsmKeysClientListVersionsOptions) (*policy.Request, error) { +func (client *ManagedHsmKeysClient) listVersionsCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, _ *ManagedHsmKeysClientListVersionsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}/versions" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -378,7 +388,7 @@ func (client *ManagedHsmKeysClient) listVersionsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-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/keyvault/armkeyvault/managedhsms_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsms_client.go index 21d87f4e..a3413714 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsms_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsms_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -35,7 +31,7 @@ type ManagedHsmsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewManagedHsmsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedHsmsClient, error) { - cl, err := arm.NewClient(moduleName+".ManagedHsmsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,27 +45,34 @@ func NewManagedHsmsClient(subscriptionID string, credential azcore.TokenCredenti // CheckMhsmNameAvailability - Checks that the managed hsm name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - mhsmName - The name of the managed hsm. // - options - ManagedHsmsClientCheckMhsmNameAvailabilityOptions contains the optional parameters for the ManagedHsmsClient.CheckMhsmNameAvailability // method. func (client *ManagedHsmsClient) CheckMhsmNameAvailability(ctx context.Context, mhsmName CheckMhsmNameAvailabilityParameters, options *ManagedHsmsClientCheckMhsmNameAvailabilityOptions) (ManagedHsmsClientCheckMhsmNameAvailabilityResponse, error) { + var err error + const operationName = "ManagedHsmsClient.CheckMhsmNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkMhsmNameAvailabilityCreateRequest(ctx, mhsmName, options) if err != nil { return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, err } - return client.checkMhsmNameAvailabilityHandleResponse(resp) + resp, err := client.checkMhsmNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkMhsmNameAvailabilityCreateRequest creates the CheckMhsmNameAvailability request. -func (client *ManagedHsmsClient) checkMhsmNameAvailabilityCreateRequest(ctx context.Context, mhsmName CheckMhsmNameAvailabilityParameters, options *ManagedHsmsClientCheckMhsmNameAvailabilityOptions) (*policy.Request, error) { +func (client *ManagedHsmsClient) checkMhsmNameAvailabilityCreateRequest(ctx context.Context, mhsmName CheckMhsmNameAvailabilityParameters, _ *ManagedHsmsClientCheckMhsmNameAvailabilityOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkMhsmNameAvailability" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -80,10 +83,13 @@ func (client *ManagedHsmsClient) checkMhsmNameAvailabilityCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, mhsmName) + if err := runtime.MarshalAsJSON(req, mhsmName); err != nil { + return nil, err + } + return req, nil } // checkMhsmNameAvailabilityHandleResponse handles the CheckMhsmNameAvailability response. @@ -98,7 +104,7 @@ func (client *ManagedHsmsClient) checkMhsmNameAvailabilityHandleResponse(resp *h // BeginCreateOrUpdate - Create or update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - parameters - Parameters to create or update the managed HSM Pool @@ -110,33 +116,44 @@ func (client *ManagedHsmsClient) BeginCreateOrUpdate(ctx context.Context, resour if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedHsmsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ManagedHsmsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedHsmsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create or update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 func (client *ManagedHsmsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedHsmsClient.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, name, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ManagedHsmsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ManagedHsmsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, _ *ManagedHsmsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -155,16 +172,19 @@ func (client *ManagedHsmsClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the specified managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - The name of the managed HSM Pool to delete // - options - ManagedHsmsClientBeginDeleteOptions contains the optional parameters for the ManagedHsmsClient.BeginDelete method. @@ -174,33 +194,44 @@ func (client *ManagedHsmsClient) BeginDelete(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedHsmsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ManagedHsmsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedHsmsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes the specified managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 func (client *ManagedHsmsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ManagedHsmsClient.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, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. -func (client *ManagedHsmsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmsClientBeginDeleteOptions) (*policy.Request, error) { +func (client *ManagedHsmsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, _ *ManagedHsmsClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -219,7 +250,7 @@ func (client *ManagedHsmsClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -228,27 +259,34 @@ func (client *ManagedHsmsClient) deleteCreateRequest(ctx context.Context, resour // Get - Gets the specified managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - The name of the managed HSM Pool. // - options - ManagedHsmsClientGetOptions contains the optional parameters for the ManagedHsmsClient.Get method. func (client *ManagedHsmsClient) Get(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmsClientGetOptions) (ManagedHsmsClientGetResponse, error) { + var err error + const operationName = "ManagedHsmsClient.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, name, options) if err != nil { return ManagedHsmsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ManagedHsmsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ManagedHsmsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *ManagedHsmsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmsClientGetOptions) (*policy.Request, error) { +func (client *ManagedHsmsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, _ *ManagedHsmsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -267,7 +305,7 @@ func (client *ManagedHsmsClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -285,27 +323,34 @@ func (client *ManagedHsmsClient) getHandleResponse(resp *http.Response) (Managed // GetDeleted - Gets the specified deleted managed HSM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - name - The name of the deleted managed HSM. // - location - The location of the deleted managed HSM. // - options - ManagedHsmsClientGetDeletedOptions contains the optional parameters for the ManagedHsmsClient.GetDeleted method. func (client *ManagedHsmsClient) GetDeleted(ctx context.Context, name string, location string, options *ManagedHsmsClientGetDeletedOptions) (ManagedHsmsClientGetDeletedResponse, error) { + var err error + const operationName = "ManagedHsmsClient.GetDeleted" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDeletedCreateRequest(ctx, name, location, options) if err != nil { return ManagedHsmsClientGetDeletedResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientGetDeletedResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmsClientGetDeletedResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedHsmsClientGetDeletedResponse{}, err } - return client.getDeletedHandleResponse(resp) + resp, err := client.getDeletedHandleResponse(httpResp) + return resp, err } // getDeletedCreateRequest creates the GetDeleted request. -func (client *ManagedHsmsClient) getDeletedCreateRequest(ctx context.Context, name string, location string, options *ManagedHsmsClientGetDeletedOptions) (*policy.Request, error) { +func (client *ManagedHsmsClient) getDeletedCreateRequest(ctx context.Context, name string, location string, _ *ManagedHsmsClientGetDeletedOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}" if name == "" { return nil, errors.New("parameter name cannot be empty") @@ -324,7 +369,7 @@ func (client *ManagedHsmsClient) getDeletedCreateRequest(ctx context.Context, na return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -342,7 +387,7 @@ func (client *ManagedHsmsClient) getDeletedHandleResponse(resp *http.Response) ( // NewListByResourceGroupPager - The List operation gets information about the managed HSM Pools associated with the subscription // and within the specified resource group. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - options - ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.NewListByResourceGroupPager // method. @@ -352,25 +397,20 @@ func (client *ManagedHsmsClient) NewListByResourceGroupPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ManagedHsmsClientListByResourceGroupResponse) (ManagedHsmsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ManagedHsmsClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedHsmsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 ManagedHsmsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -393,7 +433,7 @@ func (client *ManagedHsmsClient) listByResourceGroupCreateRequest(ctx context.Co if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -410,7 +450,7 @@ func (client *ManagedHsmsClient) listByResourceGroupHandleResponse(resp *http.Re // NewListBySubscriptionPager - The List operation gets information about the managed HSM Pools associated with the subscription. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - options - ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.NewListBySubscriptionPager // method. func (client *ManagedHsmsClient) NewListBySubscriptionPager(options *ManagedHsmsClientListBySubscriptionOptions) *runtime.Pager[ManagedHsmsClientListBySubscriptionResponse] { @@ -419,25 +459,20 @@ func (client *ManagedHsmsClient) NewListBySubscriptionPager(options *ManagedHsms return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ManagedHsmsClientListBySubscriptionResponse) (ManagedHsmsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ManagedHsmsClientListBySubscriptionResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedHsmsClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 ManagedHsmsClientListBySubscriptionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -456,7 +491,7 @@ func (client *ManagedHsmsClient) listBySubscriptionCreateRequest(ctx context.Con if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -473,7 +508,7 @@ func (client *ManagedHsmsClient) listBySubscriptionHandleResponse(resp *http.Res // NewListDeletedPager - The List operation gets information about the deleted managed HSMs associated with the subscription. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - options - ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.NewListDeletedPager // method. func (client *ManagedHsmsClient) NewListDeletedPager(options *ManagedHsmsClientListDeletedOptions) *runtime.Pager[ManagedHsmsClientListDeletedResponse] { @@ -482,30 +517,25 @@ func (client *ManagedHsmsClient) NewListDeletedPager(options *ManagedHsmsClientL return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ManagedHsmsClientListDeletedResponse) (ManagedHsmsClientListDeletedResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listDeletedCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ManagedHsmsClientListDeletedResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedHsmsClient.NewListDeletedPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listDeletedCreateRequest(ctx, options) + }, nil) if err != nil { return ManagedHsmsClientListDeletedResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmsClientListDeletedResponse{}, runtime.NewResponseError(resp) - } return client.listDeletedHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listDeletedCreateRequest creates the ListDeleted request. -func (client *ManagedHsmsClient) listDeletedCreateRequest(ctx context.Context, options *ManagedHsmsClientListDeletedOptions) (*policy.Request, error) { +func (client *ManagedHsmsClient) listDeletedCreateRequest(ctx context.Context, _ *ManagedHsmsClientListDeletedOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedManagedHSMs" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -516,7 +546,7 @@ func (client *ManagedHsmsClient) listDeletedCreateRequest(ctx context.Context, o return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -534,7 +564,7 @@ func (client *ManagedHsmsClient) listDeletedHandleResponse(resp *http.Response) // BeginPurgeDeleted - Permanently deletes the specified managed HSM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - name - The name of the soft-deleted managed HSM. // - location - The location of the soft-deleted managed HSM. // - options - ManagedHsmsClientBeginPurgeDeletedOptions contains the optional parameters for the ManagedHsmsClient.BeginPurgeDeleted @@ -545,33 +575,44 @@ func (client *ManagedHsmsClient) BeginPurgeDeleted(ctx context.Context, name str if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientPurgeDeletedResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedHsmsClientPurgeDeletedResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ManagedHsmsClientPurgeDeletedResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedHsmsClientPurgeDeletedResponse]{ + Tracer: client.internal.Tracer(), + }) } } // PurgeDeleted - Permanently deletes the specified managed HSM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 func (client *ManagedHsmsClient) purgeDeleted(ctx context.Context, name string, location string, options *ManagedHsmsClientBeginPurgeDeletedOptions) (*http.Response, error) { + var err error + const operationName = "ManagedHsmsClient.BeginPurgeDeleted" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.purgeDeletedCreateRequest(ctx, name, location, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // purgeDeletedCreateRequest creates the PurgeDeleted request. -func (client *ManagedHsmsClient) purgeDeletedCreateRequest(ctx context.Context, name string, location string, options *ManagedHsmsClientBeginPurgeDeletedOptions) (*policy.Request, error) { +func (client *ManagedHsmsClient) purgeDeletedCreateRequest(ctx context.Context, name string, location string, _ *ManagedHsmsClientBeginPurgeDeletedOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}/purge" if name == "" { return nil, errors.New("parameter name cannot be empty") @@ -590,7 +631,7 @@ func (client *ManagedHsmsClient) purgeDeletedCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -599,7 +640,7 @@ func (client *ManagedHsmsClient) purgeDeletedCreateRequest(ctx context.Context, // BeginUpdate - Update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - parameters - Parameters to patch the managed HSM Pool @@ -610,33 +651,44 @@ func (client *ManagedHsmsClient) BeginUpdate(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedHsmsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ManagedHsmsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedHsmsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 func (client *ManagedHsmsClient) update(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedHsmsClient.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, name, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. -func (client *ManagedHsmsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginUpdateOptions) (*policy.Request, error) { +func (client *ManagedHsmsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, _ *ManagedHsmsClientBeginUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -655,8 +707,11 @@ func (client *ManagedHsmsClient) updateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + 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/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go index b8b66a49..42be4b11 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -35,7 +31,7 @@ type MHSMPrivateEndpointConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewMHSMPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MHSMPrivateEndpointConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".MHSMPrivateEndpointConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,7 +45,7 @@ func NewMHSMPrivateEndpointConnectionsClient(subscriptionID string, credential a // BeginDelete - Deletes the specified private endpoint connection associated with the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. @@ -61,33 +57,44 @@ func (client *MHSMPrivateEndpointConnectionsClient) BeginDelete(ctx context.Cont if err != nil { return nil, err } - return runtime.NewPoller[MHSMPrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MHSMPrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[MHSMPrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[MHSMPrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes the specified private endpoint connection associated with the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 func (client *MHSMPrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *MHSMPrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "MHSMPrivateEndpointConnectionsClient.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, name, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. -func (client *MHSMPrivateEndpointConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *MHSMPrivateEndpointConnectionsClientBeginDeleteOptions) (*policy.Request, error) { +func (client *MHSMPrivateEndpointConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, _ *MHSMPrivateEndpointConnectionsClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -110,7 +117,7 @@ func (client *MHSMPrivateEndpointConnectionsClient) deleteCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -119,29 +126,36 @@ func (client *MHSMPrivateEndpointConnectionsClient) deleteCreateRequest(ctx cont // Get - Gets the specified private endpoint connection associated with the managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. // - options - MHSMPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Get // method. func (client *MHSMPrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *MHSMPrivateEndpointConnectionsClientGetOptions) (MHSMPrivateEndpointConnectionsClientGetResponse, error) { + var err error + const operationName = "MHSMPrivateEndpointConnectionsClient.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, name, privateEndpointConnectionName, options) if err != nil { return MHSMPrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MHSMPrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MHSMPrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *MHSMPrivateEndpointConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *MHSMPrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { +func (client *MHSMPrivateEndpointConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, _ *MHSMPrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -164,7 +178,7 @@ func (client *MHSMPrivateEndpointConnectionsClient) getCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +196,7 @@ func (client *MHSMPrivateEndpointConnectionsClient) getHandleResponse(resp *http // NewListByResourcePager - The List operation gets information about the private endpoint connections associated with the // managed HSM Pool. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - options - MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.NewListByResourcePager @@ -193,30 +207,25 @@ func (client *MHSMPrivateEndpointConnectionsClient) NewListByResourcePager(resou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *MHSMPrivateEndpointConnectionsClientListByResourceResponse) (MHSMPrivateEndpointConnectionsClientListByResourceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MHSMPrivateEndpointConnectionsClient.NewListByResourcePager") + 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.listByResourceCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return MHSMPrivateEndpointConnectionsClientListByResourceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return MHSMPrivateEndpointConnectionsClientListByResourceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MHSMPrivateEndpointConnectionsClientListByResourceResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listByResourceCreateRequest creates the ListByResource request. -func (client *MHSMPrivateEndpointConnectionsClient) listByResourceCreateRequest(ctx context.Context, resourceGroupName string, name string, options *MHSMPrivateEndpointConnectionsClientListByResourceOptions) (*policy.Request, error) { +func (client *MHSMPrivateEndpointConnectionsClient) listByResourceCreateRequest(ctx context.Context, resourceGroupName string, name string, _ *MHSMPrivateEndpointConnectionsClientListByResourceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -235,7 +244,7 @@ func (client *MHSMPrivateEndpointConnectionsClient) listByResourceCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -253,7 +262,7 @@ func (client *MHSMPrivateEndpointConnectionsClient) listByResourceHandleResponse // Put - Updates the specified private endpoint connection associated with the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. @@ -261,22 +270,29 @@ func (client *MHSMPrivateEndpointConnectionsClient) listByResourceHandleResponse // - options - MHSMPrivateEndpointConnectionsClientPutOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Put // method. func (client *MHSMPrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, properties MHSMPrivateEndpointConnection, options *MHSMPrivateEndpointConnectionsClientPutOptions) (MHSMPrivateEndpointConnectionsClientPutResponse, error) { + var err error + const operationName = "MHSMPrivateEndpointConnectionsClient.Put" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.putCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, properties, options) if err != nil { return MHSMPrivateEndpointConnectionsClientPutResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateEndpointConnectionsClientPutResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MHSMPrivateEndpointConnectionsClientPutResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MHSMPrivateEndpointConnectionsClientPutResponse{}, err } - return client.putHandleResponse(resp) + resp, err := client.putHandleResponse(httpResp) + return resp, err } // putCreateRequest creates the Put request. -func (client *MHSMPrivateEndpointConnectionsClient) putCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, properties MHSMPrivateEndpointConnection, options *MHSMPrivateEndpointConnectionsClientPutOptions) (*policy.Request, error) { +func (client *MHSMPrivateEndpointConnectionsClient) putCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, properties MHSMPrivateEndpointConnection, _ *MHSMPrivateEndpointConnectionsClientPutOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -299,15 +315,21 @@ func (client *MHSMPrivateEndpointConnectionsClient) putCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } // putHandleResponse handles the Put response. func (client *MHSMPrivateEndpointConnectionsClient) putHandleResponse(resp *http.Response) (MHSMPrivateEndpointConnectionsClientPutResponse, error) { result := MHSMPrivateEndpointConnectionsClientPutResponse{} + if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { + result.AzureAsyncOperation = &val + } if val := resp.Header.Get("Retry-After"); val != "" { retryAfter32, err := strconv.ParseInt(val, 10, 32) retryAfter := int32(retryAfter32) @@ -316,9 +338,6 @@ func (client *MHSMPrivateEndpointConnectionsClient) putHandleResponse(resp *http } result.RetryAfter = &retryAfter } - if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { - result.AzureAsyncOperation = &val - } if err := runtime.UnmarshalAsJSON(resp, &result.MHSMPrivateEndpointConnection); err != nil { return MHSMPrivateEndpointConnectionsClientPutResponse{}, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go index 4bff50b0..8c734d61 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -34,7 +30,7 @@ type MHSMPrivateLinkResourcesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewMHSMPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MHSMPrivateLinkResourcesClient, error) { - cl, err := arm.NewClient(moduleName+".MHSMPrivateLinkResourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,28 +44,35 @@ func NewMHSMPrivateLinkResourcesClient(subscriptionID string, credential azcore. // ListByMHSMResource - Gets the private link resources supported for the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - options - MHSMPrivateLinkResourcesClientListByMHSMResourceOptions contains the optional parameters for the MHSMPrivateLinkResourcesClient.ListByMHSMResource // method. func (client *MHSMPrivateLinkResourcesClient) ListByMHSMResource(ctx context.Context, resourceGroupName string, name string, options *MHSMPrivateLinkResourcesClientListByMHSMResourceOptions) (MHSMPrivateLinkResourcesClientListByMHSMResourceResponse, error) { + var err error + const operationName = "MHSMPrivateLinkResourcesClient.ListByMHSMResource" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByMHSMResourceCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return MHSMPrivateLinkResourcesClientListByMHSMResourceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateLinkResourcesClientListByMHSMResourceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MHSMPrivateLinkResourcesClientListByMHSMResourceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MHSMPrivateLinkResourcesClientListByMHSMResourceResponse{}, err } - return client.listByMHSMResourceHandleResponse(resp) + resp, err := client.listByMHSMResourceHandleResponse(httpResp) + return resp, err } // listByMHSMResourceCreateRequest creates the ListByMHSMResource request. -func (client *MHSMPrivateLinkResourcesClient) listByMHSMResourceCreateRequest(ctx context.Context, resourceGroupName string, name string, options *MHSMPrivateLinkResourcesClientListByMHSMResourceOptions) (*policy.Request, error) { +func (client *MHSMPrivateLinkResourcesClient) listByMHSMResourceCreateRequest(ctx context.Context, resourceGroupName string, name string, _ *MHSMPrivateLinkResourcesClientListByMHSMResourceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateLinkResources" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -88,7 +91,7 @@ func (client *MHSMPrivateLinkResourcesClient) listByMHSMResourceCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-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/keyvault/armkeyvault/mhsmregions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmregions_client.go index 64692ec1..0a80bc09 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmregions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmregions_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -34,7 +30,7 @@ type MHSMRegionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewMHSMRegionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MHSMRegionsClient, error) { - cl, err := arm.NewClient(moduleName+".MHSMRegionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +43,7 @@ func NewMHSMRegionsClient(subscriptionID string, credential azcore.TokenCredenti // NewListByResourcePager - The List operation gets information about the regions associated with the managed HSM Pool. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - options - MHSMRegionsClientListByResourceOptions contains the optional parameters for the MHSMRegionsClient.NewListByResourcePager @@ -58,30 +54,25 @@ func (client *MHSMRegionsClient) NewListByResourcePager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *MHSMRegionsClientListByResourceResponse) (MHSMRegionsClientListByResourceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MHSMRegionsClient.NewListByResourcePager") + 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.listByResourceCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return MHSMRegionsClientListByResourceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return MHSMRegionsClientListByResourceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MHSMRegionsClientListByResourceResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listByResourceCreateRequest creates the ListByResource request. -func (client *MHSMRegionsClient) listByResourceCreateRequest(ctx context.Context, resourceGroupName string, name string, options *MHSMRegionsClientListByResourceOptions) (*policy.Request, error) { +func (client *MHSMRegionsClient) listByResourceCreateRequest(ctx context.Context, resourceGroupName string, name string, _ *MHSMRegionsClientListByResourceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/regions" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -100,7 +91,7 @@ func (client *MHSMRegionsClient) listByResourceCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-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/keyvault/armkeyvault/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models.go index 27413da2..19a1c4a8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -16,1578 +12,1336 @@ import "time" type AccessPolicyEntry struct { // REQUIRED; The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. // The object ID must be unique for the list of access policies. - ObjectID *string `json:"objectId,omitempty"` + ObjectID *string // REQUIRED; Permissions the identity has for keys, secrets and certificates. - Permissions *Permissions `json:"permissions,omitempty"` + Permissions *Permissions // REQUIRED; The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // Application ID of the client making request on behalf of a principal - ApplicationID *string `json:"applicationId,omitempty"` + ApplicationID *string } type Action struct { // The type of action. - Type *KeyRotationPolicyActionType `json:"type,omitempty"` -} - -// Attributes - The object attributes managed by the KeyVault service. -type Attributes struct { - // Determines whether the object is enabled. - Enabled *bool `json:"enabled,omitempty"` - - // Expiry date in seconds since 1970-01-01T00:00:00Z. - Expires *time.Time `json:"exp,omitempty"` - - // Not before date in seconds since 1970-01-01T00:00:00Z. - NotBefore *time.Time `json:"nbf,omitempty"` - - // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. - Created *time.Time `json:"created,omitempty" azure:"ro"` - - // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. - Updated *time.Time `json:"updated,omitempty" azure:"ro"` + Type *KeyRotationPolicyActionType } // CheckMhsmNameAvailabilityParameters - The parameters used to check the availability of the managed hsm name. type CheckMhsmNameAvailabilityParameters struct { // REQUIRED; The managed hsm name. - Name *string `json:"name,omitempty"` + Name *string } // CheckMhsmNameAvailabilityResult - The CheckMhsmNameAvailability operation response. type CheckMhsmNameAvailabilityResult struct { // READ-ONLY; An error message explaining the Reason value in more detail. - Message *string `json:"message,omitempty" azure:"ro"` + Message *string // READ-ONLY; A boolean value that indicates whether the name is available for you to use. If true, the name is available. // If false, the name has already been taken or is invalid and cannot be used. - NameAvailable *bool `json:"nameAvailable,omitempty" azure:"ro"` + NameAvailable *bool // READ-ONLY; The reason that a managed hsm name could not be used. The reason element is only returned if NameAvailable is // false. - Reason *Reason `json:"reason,omitempty" azure:"ro"` + Reason *Reason } // CheckNameAvailabilityResult - The CheckNameAvailability operation response. type CheckNameAvailabilityResult struct { // READ-ONLY; An error message explaining the Reason value in more detail. - Message *string `json:"message,omitempty" azure:"ro"` + Message *string // READ-ONLY; A boolean value that indicates whether the name is available for you to use. If true, the name is available. // If false, the name has already been taken or is invalid and cannot be used. - NameAvailable *bool `json:"nameAvailable,omitempty" azure:"ro"` + NameAvailable *bool // READ-ONLY; The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false. - Reason *Reason `json:"reason,omitempty" azure:"ro"` + Reason *Reason } type DeletedManagedHsm struct { // Properties of the deleted managed HSM - Properties *DeletedManagedHsmProperties `json:"properties,omitempty"` + Properties *DeletedManagedHsmProperties // READ-ONLY; The Azure Resource Manager resource ID for the deleted managed HSM Pool. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the managed HSM Pool. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The resource type of the managed HSM Pool. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // DeletedManagedHsmListResult - List of deleted managed HSM Pools type DeletedManagedHsmListResult struct { // The URL to get the next set of deleted managed HSM Pools. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of deleted managed HSM Pools. - Value []*DeletedManagedHsm `json:"value,omitempty"` + Value []*DeletedManagedHsm } // DeletedManagedHsmProperties - Properties of the deleted managed HSM. type DeletedManagedHsmProperties struct { // READ-ONLY; The deleted date. - DeletionDate *time.Time `json:"deletionDate,omitempty" azure:"ro"` + DeletionDate *time.Time // READ-ONLY; The location of the original managed HSM. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; The resource id of the original managed HSM. - MhsmID *string `json:"mhsmId,omitempty" azure:"ro"` + MhsmID *string // READ-ONLY; Purge protection status of the original managed HSM. - PurgeProtectionEnabled *bool `json:"purgeProtectionEnabled,omitempty" azure:"ro"` + PurgeProtectionEnabled *bool // READ-ONLY; The scheduled purged date. - ScheduledPurgeDate *time.Time `json:"scheduledPurgeDate,omitempty" azure:"ro"` + ScheduledPurgeDate *time.Time // READ-ONLY; Tags of the original managed HSM. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string } // DeletedVault - Deleted vault information with extended details. type DeletedVault struct { // Properties of the vault - Properties *DeletedVaultProperties `json:"properties,omitempty"` + Properties *DeletedVaultProperties // READ-ONLY; The resource ID for the deleted key vault. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the key vault. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The resource type of the key vault. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // DeletedVaultListResult - List of vaults type DeletedVaultListResult struct { // The URL to get the next set of deleted vaults. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of deleted vaults. - Value []*DeletedVault `json:"value,omitempty"` + Value []*DeletedVault } // DeletedVaultProperties - Properties of the deleted vault. type DeletedVaultProperties struct { // READ-ONLY; The deleted date. - DeletionDate *time.Time `json:"deletionDate,omitempty" azure:"ro"` + DeletionDate *time.Time // READ-ONLY; The location of the original vault. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Purge protection status of the original vault. - PurgeProtectionEnabled *bool `json:"purgeProtectionEnabled,omitempty" azure:"ro"` + PurgeProtectionEnabled *bool // READ-ONLY; The scheduled purged date. - ScheduledPurgeDate *time.Time `json:"scheduledPurgeDate,omitempty" azure:"ro"` + ScheduledPurgeDate *time.Time // READ-ONLY; Tags of the original vault. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string // READ-ONLY; The resource id of the original vault. - VaultID *string `json:"vaultId,omitempty" azure:"ro"` + VaultID *string } // DimensionProperties - Type of operation: get, read, delete, etc. type DimensionProperties struct { // Display name of dimension. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Name of dimension. - Name *string `json:"name,omitempty"` + Name *string // Property to specify whether the dimension should be exported for Shoebox. - ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"` -} - -// Error - The server error. -type Error struct { - // READ-ONLY; The error code. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; The inner error, contains a more specific error code. - InnerError *Error `json:"innererror,omitempty" azure:"ro"` - - // READ-ONLY; The error message. - Message *string `json:"message,omitempty" azure:"ro"` + ToBeExportedForShoebox *bool } // IPRule - A rule governing the accessibility of a vault from a specific ip address or ip range. type IPRule struct { // REQUIRED; An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses // that start with 124.56.78). - Value *string `json:"value,omitempty"` + Value *string } // Key - The key resource. type Key struct { // REQUIRED; The properties of the key. - Properties *KeyProperties `json:"properties,omitempty"` + Properties *KeyProperties // READ-ONLY; Fully qualified identifier of the key vault resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Azure location of the key vault resource. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Name of the key vault resource. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Tags assigned to the key vault resource. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string // READ-ONLY; Resource type of the key vault resource. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // KeyAttributes - The object attributes managed by the Azure Key Vault service. type KeyAttributes struct { // Determines whether or not the object is enabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // Expiry date in seconds since 1970-01-01T00:00:00Z. - Expires *int64 `json:"exp,omitempty"` + Expires *int64 // Indicates if the private key can be exported. - Exportable *bool `json:"exportable,omitempty"` + Exportable *bool // Not before date in seconds since 1970-01-01T00:00:00Z. - NotBefore *int64 `json:"nbf,omitempty"` + NotBefore *int64 // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. - Created *int64 `json:"created,omitempty" azure:"ro"` + Created *int64 // READ-ONLY; The deletion recovery level currently in effect for the object. If it contains 'Purgeable', then the object // can be permanently deleted by a privileged user; otherwise, only the system can purge the // object at the end of the retention interval. - RecoveryLevel *DeletionRecoveryLevel `json:"recoveryLevel,omitempty" azure:"ro"` + RecoveryLevel *DeletionRecoveryLevel // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. - Updated *int64 `json:"updated,omitempty" azure:"ro"` + Updated *int64 } // KeyCreateParameters - The parameters used to create a key. type KeyCreateParameters struct { // REQUIRED; The properties of the key to be created. - Properties *KeyProperties `json:"properties,omitempty"` + Properties *KeyProperties // The tags that will be assigned to the key. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // KeyListResult - The page of keys. type KeyListResult struct { // The URL to get the next page of keys. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The key resources. - Value []*Key `json:"value,omitempty"` + Value []*Key } // KeyProperties - The properties of the key. type KeyProperties struct { // The attributes of the key. - Attributes *KeyAttributes `json:"attributes,omitempty"` + Attributes *KeyAttributes - // The elliptic curve name. For valid values, see JsonWebKeyCurveName. - CurveName *JSONWebKeyCurveName `json:"curveName,omitempty"` - KeyOps []*JSONWebKeyOperation `json:"keyOps,omitempty"` + // The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default for EC and EC-HSM keys is P-256 + CurveName *JSONWebKeyCurveName + KeyOps []*JSONWebKeyOperation - // The key size in bits. For example: 2048, 3072, or 4096 for RSA. - KeySize *int32 `json:"keySize,omitempty"` + // The key size in bits. For example: 2048, 3072, or 4096 for RSA. Default for RSA and RSA-HSM keys is 2048. Exception made + // for bring your own key (BYOK), key exchange keys default to 4096. + KeySize *int32 // The type of the key. For valid values, see JsonWebKeyType. - Kty *JSONWebKeyType `json:"kty,omitempty"` + Kty *JSONWebKeyType // Key release policy in response. It will be used for both output and input. Omitted if empty - ReleasePolicy *KeyReleasePolicy `json:"release_policy,omitempty"` + ReleasePolicy *KeyReleasePolicy // Key rotation policy in response. It will be used for both output and input. Omitted if empty - RotationPolicy *RotationPolicy `json:"rotationPolicy,omitempty"` + RotationPolicy *RotationPolicy // READ-ONLY; The URI to retrieve the current version of the key. - KeyURI *string `json:"keyUri,omitempty" azure:"ro"` + KeyURI *string // READ-ONLY; The URI to retrieve the specific version of the key. - KeyURIWithVersion *string `json:"keyUriWithVersion,omitempty" azure:"ro"` + KeyURIWithVersion *string } type KeyReleasePolicy struct { // Content type and version of key release policy - ContentType *string `json:"contentType,omitempty"` + ContentType *string // Blob encoding the policy rules under which the key can be released. - Data []byte `json:"data,omitempty"` + Data []byte } type KeyRotationPolicyAttributes struct { // The expiration time for the new key version. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'. - ExpiryTime *string `json:"expiryTime,omitempty"` + ExpiryTime *string // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. - Created *int64 `json:"created,omitempty" azure:"ro"` + Created *int64 // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. - Updated *int64 `json:"updated,omitempty" azure:"ro"` -} - -// KeysClientCreateIfNotExistOptions contains the optional parameters for the KeysClient.CreateIfNotExist method. -type KeysClientCreateIfNotExistOptions struct { - // placeholder for future optional parameters -} - -// KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. -type KeysClientGetOptions struct { - // placeholder for future optional parameters -} - -// KeysClientGetVersionOptions contains the optional parameters for the KeysClient.GetVersion method. -type KeysClientGetVersionOptions struct { - // placeholder for future optional parameters -} - -// KeysClientListOptions contains the optional parameters for the KeysClient.NewListPager method. -type KeysClientListOptions struct { - // placeholder for future optional parameters -} - -// KeysClientListVersionsOptions contains the optional parameters for the KeysClient.NewListVersionsPager method. -type KeysClientListVersionsOptions struct { - // placeholder for future optional parameters + Updated *int64 } type LifetimeAction struct { // The action of key rotation policy lifetimeAction. - Action *Action `json:"action,omitempty"` + Action *Action // The trigger of key rotation policy lifetimeAction. - Trigger *Trigger `json:"trigger,omitempty"` + Trigger *Trigger } // LogSpecification - Log specification of operation. type LogSpecification struct { // Blob duration of specification. - BlobDuration *string `json:"blobDuration,omitempty"` + BlobDuration *string // Display name of log specification. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Name of log specification. - Name *string `json:"name,omitempty"` + Name *string } // MHSMGeoReplicatedRegion - A region that this managed HSM Pool has been extended to. type MHSMGeoReplicatedRegion struct { // A boolean value that indicates whether the region is the primary region or a secondary region. - IsPrimary *bool `json:"isPrimary,omitempty"` + IsPrimary *bool // Name of the geo replicated region. - Name *string `json:"name,omitempty"` + Name *string // READ-ONLY; Provisioning state of the geo replicated region. - ProvisioningState *GeoReplicationRegionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *GeoReplicationRegionProvisioningState } // MHSMIPRule - A rule governing the accessibility of a managed HSM pool from a specific IP address or IP range. type MHSMIPRule struct { // REQUIRED; An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses // that start with 124.56.78). - Value *string `json:"value,omitempty"` + Value *string } // MHSMNetworkRuleSet - A set of rules governing the network accessibility of a managed hsm pool. type MHSMNetworkRuleSet struct { // Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. - Bypass *NetworkRuleBypassOptions `json:"bypass,omitempty"` + Bypass *NetworkRuleBypassOptions // 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 `json:"defaultAction,omitempty"` + DefaultAction *NetworkRuleAction // The list of IP address rules. - IPRules []*MHSMIPRule `json:"ipRules,omitempty"` + IPRules []*MHSMIPRule // The list of virtual network rules. - VirtualNetworkRules []*MHSMVirtualNetworkRule `json:"virtualNetworkRules,omitempty"` + VirtualNetworkRules []*MHSMVirtualNetworkRule } // MHSMPrivateEndpoint - Private endpoint object properties. type MHSMPrivateEndpoint struct { // READ-ONLY; Full identifier of the private endpoint resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string } // MHSMPrivateEndpointConnection - Private endpoint connection resource. type MHSMPrivateEndpointConnection struct { // Modified whenever there is a change in the state of private endpoint connection. - Etag *string `json:"etag,omitempty"` + Etag *string + + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity // The supported Azure location where the managed HSM Pool should be created. - Location *string `json:"location,omitempty"` + Location *string // Resource properties. - Properties *MHSMPrivateEndpointConnectionProperties `json:"properties,omitempty"` + Properties *MHSMPrivateEndpointConnectionProperties // SKU details - SKU *ManagedHsmSKU `json:"sku,omitempty"` + SKU *ManagedHsmSKU // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; The Azure Resource Manager resource ID for the managed HSM Pool. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the managed HSM Pool. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the key vault resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The resource type of the managed HSM Pool. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // MHSMPrivateEndpointConnectionItem - Private endpoint connection item. type MHSMPrivateEndpointConnectionItem struct { // Modified whenever there is a change in the state of private endpoint connection. - Etag *string `json:"etag,omitempty"` + Etag *string // Id of private endpoint connection. - ID *string `json:"id,omitempty"` + ID *string // Private endpoint connection properties. - Properties *MHSMPrivateEndpointConnectionProperties `json:"properties,omitempty"` + Properties *MHSMPrivateEndpointConnectionProperties } // MHSMPrivateEndpointConnectionProperties - Properties of the private endpoint connection resource. type MHSMPrivateEndpointConnectionProperties struct { // Properties of the private endpoint object. - PrivateEndpoint *MHSMPrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateEndpoint *MHSMPrivateEndpoint // Approval state of the private link connection. - PrivateLinkServiceConnectionState *MHSMPrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + PrivateLinkServiceConnectionState *MHSMPrivateLinkServiceConnectionState // Provisioning state of the private endpoint connection. - ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` -} - -// MHSMPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.BeginDelete -// method. -type MHSMPrivateEndpointConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// MHSMPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Get -// method. -type MHSMPrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.NewListByResourcePager -// method. -type MHSMPrivateEndpointConnectionsClientListByResourceOptions struct { - // placeholder for future optional parameters -} - -// MHSMPrivateEndpointConnectionsClientPutOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Put -// method. -type MHSMPrivateEndpointConnectionsClientPutOptions struct { - // placeholder for future optional parameters + ProvisioningState *PrivateEndpointConnectionProvisioningState } // MHSMPrivateEndpointConnectionsListResult - List of private endpoint connections associated with a managed HSM Pools type MHSMPrivateEndpointConnectionsListResult struct { // The URL to get the next set of managed HSM Pools. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The private endpoint connection associated with a managed HSM Pools. - Value []*MHSMPrivateEndpointConnection `json:"value,omitempty"` + Value []*MHSMPrivateEndpointConnection } // MHSMPrivateLinkResource - A private link resource type MHSMPrivateLinkResource struct { + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity + // The supported Azure location where the managed HSM Pool should be created. - Location *string `json:"location,omitempty"` + Location *string // Resource properties. - Properties *MHSMPrivateLinkResourceProperties `json:"properties,omitempty"` + Properties *MHSMPrivateLinkResourceProperties // SKU details - SKU *ManagedHsmSKU `json:"sku,omitempty"` + SKU *ManagedHsmSKU // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; The Azure Resource Manager resource ID for the managed HSM Pool. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the managed HSM Pool. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the key vault resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The resource type of the managed HSM Pool. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // MHSMPrivateLinkResourceListResult - A list of private link resources type MHSMPrivateLinkResourceListResult struct { // Array of private link resources - Value []*MHSMPrivateLinkResource `json:"value,omitempty"` + Value []*MHSMPrivateLinkResource } // MHSMPrivateLinkResourceProperties - Properties of a private link resource. type MHSMPrivateLinkResourceProperties struct { // Required DNS zone names of the the private link resource. - RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` + RequiredZoneNames []*string // READ-ONLY; Group identifier of private link resource. - GroupID *string `json:"groupId,omitempty" azure:"ro"` + GroupID *string // READ-ONLY; Required member names of private link resource. - RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` -} - -// MHSMPrivateLinkResourcesClientListByMHSMResourceOptions contains the optional parameters for the MHSMPrivateLinkResourcesClient.ListByMHSMResource -// method. -type MHSMPrivateLinkResourcesClientListByMHSMResourceOptions struct { - // placeholder for future optional parameters + RequiredMembers []*string } // MHSMPrivateLinkServiceConnectionState - An object that represents the approval state of the private link connection. type MHSMPrivateLinkServiceConnectionState struct { // A message indicating if changes on the service provider require any updates on the consumer. - ActionsRequired *ActionsRequired `json:"actionsRequired,omitempty"` + ActionsRequired *ActionsRequired // The reason for approval or rejection. - Description *string `json:"description,omitempty"` + Description *string // Indicates whether the connection has been approved, rejected or removed by the key vault owner. - Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` -} - -// MHSMRegionsClientListByResourceOptions contains the optional parameters for the MHSMRegionsClient.NewListByResourcePager -// method. -type MHSMRegionsClientListByResourceOptions struct { - // placeholder for future optional parameters + Status *PrivateEndpointServiceConnectionStatus } // MHSMRegionsListResult - List of regions associated with a managed HSM Pools type MHSMRegionsListResult struct { // The URL to get the next set of managed HSM Pools. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The region associated with a managed HSM Pools. - Value []*MHSMGeoReplicatedRegion `json:"value,omitempty"` + Value []*MHSMGeoReplicatedRegion } // MHSMVirtualNetworkRule - A rule governing the accessibility of a managed hsm pool from a specific virtual network. type MHSMVirtualNetworkRule struct { // REQUIRED; Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. - ID *string `json:"id,omitempty"` + ID *string } // ManagedHSMSecurityDomainProperties - The security domain properties of the managed hsm. type ManagedHSMSecurityDomainProperties struct { // READ-ONLY; Activation Status - ActivationStatus *ActivationStatus `json:"activationStatus,omitempty" azure:"ro"` + ActivationStatus *ActivationStatus // READ-ONLY; Activation Status Message. - ActivationStatusMessage *string `json:"activationStatusMessage,omitempty" azure:"ro"` + ActivationStatusMessage *string } // ManagedHsm - Resource information with extended details. type ManagedHsm struct { + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity + // The supported Azure location where the managed HSM Pool should be created. - Location *string `json:"location,omitempty"` + Location *string // Properties of the managed HSM - Properties *ManagedHsmProperties `json:"properties,omitempty"` + Properties *ManagedHsmProperties // SKU details - SKU *ManagedHsmSKU `json:"sku,omitempty"` + SKU *ManagedHsmSKU // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; The Azure Resource Manager resource ID for the managed HSM Pool. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the managed HSM Pool. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the key vault resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The resource type of the managed HSM Pool. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } type ManagedHsmAction struct { // The type of action. - Type *KeyRotationPolicyActionType `json:"type,omitempty"` -} - -// ManagedHsmError - The error exception. -type ManagedHsmError struct { - // READ-ONLY; The server error. - Error *Error `json:"error,omitempty" azure:"ro"` + Type *KeyRotationPolicyActionType } // ManagedHsmKey - The key resource. type ManagedHsmKey struct { // REQUIRED; The properties of the key. - Properties *ManagedHsmKeyProperties `json:"properties,omitempty"` + Properties *ManagedHsmKeyProperties // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ManagedHsmKeyAttributes - The object attributes managed by the Azure Key Vault service. type ManagedHsmKeyAttributes struct { // Determines whether or not the object is enabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // Expiry date in seconds since 1970-01-01T00:00:00Z. - Expires *int64 `json:"exp,omitempty"` + Expires *int64 // Indicates if the private key can be exported. - Exportable *bool `json:"exportable,omitempty"` + Exportable *bool // Not before date in seconds since 1970-01-01T00:00:00Z. - NotBefore *int64 `json:"nbf,omitempty"` + NotBefore *int64 // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. - Created *int64 `json:"created,omitempty" azure:"ro"` + Created *int64 // READ-ONLY; The deletion recovery level currently in effect for the object. If it contains 'Purgeable', then the object // can be permanently deleted by a privileged user; otherwise, only the system can purge the // object at the end of the retention interval. - RecoveryLevel *DeletionRecoveryLevel `json:"recoveryLevel,omitempty" azure:"ro"` + RecoveryLevel *DeletionRecoveryLevel // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. - Updated *int64 `json:"updated,omitempty" azure:"ro"` + Updated *int64 } // ManagedHsmKeyCreateParameters - The parameters used to create a key. type ManagedHsmKeyCreateParameters struct { // REQUIRED; The properties of the key to be created. - Properties *ManagedHsmKeyProperties `json:"properties,omitempty"` + Properties *ManagedHsmKeyProperties // The tags that will be assigned to the key. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // ManagedHsmKeyListResult - The page of keys. type ManagedHsmKeyListResult struct { // The URL to get the next page of keys. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The key resources. - Value []*ManagedHsmKey `json:"value,omitempty"` + Value []*ManagedHsmKey } // ManagedHsmKeyProperties - The properties of the key. type ManagedHsmKeyProperties struct { // The attributes of the key. - Attributes *ManagedHsmKeyAttributes `json:"attributes,omitempty"` + Attributes *ManagedHsmKeyAttributes - // The elliptic curve name. For valid values, see JsonWebKeyCurveName. - CurveName *JSONWebKeyCurveName `json:"curveName,omitempty"` - KeyOps []*JSONWebKeyOperation `json:"keyOps,omitempty"` + // The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default for EC and EC-HSM keys is P-256 + CurveName *JSONWebKeyCurveName + KeyOps []*JSONWebKeyOperation - // The key size in bits. For example: 2048, 3072, or 4096 for RSA. - KeySize *int32 `json:"keySize,omitempty"` + // The key size in bits. For example: 2048, 3072, or 4096 for RSA. Default for RSA and RSA-HSM keys is 2048. Exception made + // for bring your own key (BYOK), key exchange keys default to 4096. + KeySize *int32 // The type of the key. For valid values, see JsonWebKeyType. - Kty *JSONWebKeyType `json:"kty,omitempty"` + Kty *JSONWebKeyType // Key release policy in response. It will be used for both output and input. Omitted if empty - ReleasePolicy *ManagedHsmKeyReleasePolicy `json:"release_policy,omitempty"` + ReleasePolicy *ManagedHsmKeyReleasePolicy // Key rotation policy in response. It will be used for both output and input. Omitted if empty - RotationPolicy *ManagedHsmRotationPolicy `json:"rotationPolicy,omitempty"` + RotationPolicy *ManagedHsmRotationPolicy // READ-ONLY; The URI to retrieve the current version of the key. - KeyURI *string `json:"keyUri,omitempty" azure:"ro"` + KeyURI *string // READ-ONLY; The URI to retrieve the specific version of the key. - KeyURIWithVersion *string `json:"keyUriWithVersion,omitempty" azure:"ro"` + KeyURIWithVersion *string } type ManagedHsmKeyReleasePolicy struct { // Content type and version of key release policy - ContentType *string `json:"contentType,omitempty"` + ContentType *string // Blob encoding the policy rules under which the key can be released. - Data []byte `json:"data,omitempty"` + Data []byte } type ManagedHsmKeyRotationPolicyAttributes struct { // The expiration time for the new key version. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'. - ExpiryTime *string `json:"expiryTime,omitempty"` + ExpiryTime *string // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. - Created *int64 `json:"created,omitempty" azure:"ro"` + Created *int64 // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. - Updated *int64 `json:"updated,omitempty" azure:"ro"` -} - -// ManagedHsmKeysClientCreateIfNotExistOptions contains the optional parameters for the ManagedHsmKeysClient.CreateIfNotExist -// method. -type ManagedHsmKeysClientCreateIfNotExistOptions struct { - // placeholder for future optional parameters -} - -// ManagedHsmKeysClientGetOptions contains the optional parameters for the ManagedHsmKeysClient.Get method. -type ManagedHsmKeysClientGetOptions struct { - // placeholder for future optional parameters -} - -// ManagedHsmKeysClientGetVersionOptions contains the optional parameters for the ManagedHsmKeysClient.GetVersion method. -type ManagedHsmKeysClientGetVersionOptions struct { - // placeholder for future optional parameters -} - -// ManagedHsmKeysClientListOptions contains the optional parameters for the ManagedHsmKeysClient.NewListPager method. -type ManagedHsmKeysClientListOptions struct { - // placeholder for future optional parameters -} - -// ManagedHsmKeysClientListVersionsOptions contains the optional parameters for the ManagedHsmKeysClient.NewListVersionsPager -// method. -type ManagedHsmKeysClientListVersionsOptions struct { - // placeholder for future optional parameters + Updated *int64 } type ManagedHsmLifetimeAction struct { // The action of key rotation policy lifetimeAction. - Action *ManagedHsmAction `json:"action,omitempty"` + Action *ManagedHsmAction // The trigger of key rotation policy lifetimeAction. - Trigger *ManagedHsmTrigger `json:"trigger,omitempty"` + Trigger *ManagedHsmTrigger } // ManagedHsmListResult - List of managed HSM Pools type ManagedHsmListResult struct { // The URL to get the next set of managed HSM Pools. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of managed HSM Pools. - Value []*ManagedHsm `json:"value,omitempty"` + Value []*ManagedHsm } // ManagedHsmProperties - Properties of the managed HSM Pool type ManagedHsmProperties struct { // The create mode to indicate whether the resource is being created or is being recovered from a deleted resource. - CreateMode *CreateMode `json:"createMode,omitempty"` + CreateMode *CreateMode // Property specifying whether protection against purge is enabled for this managed HSM pool. Setting this property to true // activates protection against purge for this managed HSM pool and its content - - // only the Managed HSM service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete - // is also enabled. Enabling this functionality is irreversible. - EnablePurgeProtection *bool `json:"enablePurgeProtection,omitempty"` + // only the Managed HSM service may initiate a hard, irrecoverable deletion. Enabling this functionality is irreversible. + EnablePurgeProtection *bool - // Property to specify whether the 'soft delete' functionality is enabled for this managed HSM pool. If it's not set to any - // value(true or false) when creating new managed HSM pool, it will be set to true - // by default. Once set to true, it cannot be reverted to false. - EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` + // Property to specify whether the 'soft delete' functionality is enabled for this managed HSM pool. Soft delete is enabled + // by default for all managed HSMs and is immutable. + EnableSoftDelete *bool // Array of initial administrators object ids for this managed hsm pool. - InitialAdminObjectIDs []*string `json:"initialAdminObjectIds,omitempty"` + InitialAdminObjectIDs []*string // Rules governing the accessibility of the key vault from specific network locations. - NetworkACLs *MHSMNetworkRuleSet `json:"networkAcls,omitempty"` + NetworkACLs *MHSMNetworkRuleSet - // Control permission for data plane traffic coming from public networks while private endpoint is enabled. - PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // Control permission to the managed HSM from public networks. + PublicNetworkAccess *PublicNetworkAccess // List of all regions associated with the managed hsm pool. - Regions []*MHSMGeoReplicatedRegion `json:"regions,omitempty"` + Regions []*MHSMGeoReplicatedRegion - // softDelete data retention days. It accepts >=7 and <=90. - SoftDeleteRetentionInDays *int32 `json:"softDeleteRetentionInDays,omitempty"` + // Soft deleted data retention days. When you delete an HSM or a key, it will remain recoverable for the configured retention + // period or for a default period of 90 days. It accepts values between 7 and + // 90. + SoftDeleteRetentionInDays *int32 // The Azure Active Directory tenant ID that should be used for authenticating requests to the managed HSM pool. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // READ-ONLY; The URI of the managed hsm pool for performing operations on keys. - HsmURI *string `json:"hsmUri,omitempty" azure:"ro"` + HsmURI *string // READ-ONLY; List of private endpoint connections associated with the managed hsm pool. - PrivateEndpointConnections []*MHSMPrivateEndpointConnectionItem `json:"privateEndpointConnections,omitempty" azure:"ro"` + PrivateEndpointConnections []*MHSMPrivateEndpointConnectionItem // READ-ONLY; Provisioning state. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState // READ-ONLY; The scheduled purge date in UTC. - ScheduledPurgeDate *time.Time `json:"scheduledPurgeDate,omitempty" azure:"ro"` + ScheduledPurgeDate *time.Time // READ-ONLY; Managed HSM security domain properties. - SecurityDomainProperties *ManagedHSMSecurityDomainProperties `json:"securityDomainProperties,omitempty" azure:"ro"` + SecurityDomainProperties *ManagedHSMSecurityDomainProperties // READ-ONLY; Resource Status Message. - StatusMessage *string `json:"statusMessage,omitempty" azure:"ro"` -} - -// ManagedHsmResource - Managed HSM resource -type ManagedHsmResource struct { - // The supported Azure location where the managed HSM Pool should be created. - Location *string `json:"location,omitempty"` - - // SKU details - SKU *ManagedHsmSKU `json:"sku,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The Azure Resource Manager resource ID for the managed HSM Pool. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the managed HSM Pool. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the key vault resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The resource type of the managed HSM Pool. - Type *string `json:"type,omitempty" azure:"ro"` + StatusMessage *string } type ManagedHsmRotationPolicy struct { // The attributes of key rotation policy. - Attributes *ManagedHsmKeyRotationPolicyAttributes `json:"attributes,omitempty"` + Attributes *ManagedHsmKeyRotationPolicyAttributes // The lifetimeActions for key rotation action. - LifetimeActions []*ManagedHsmLifetimeAction `json:"lifetimeActions,omitempty"` + LifetimeActions []*ManagedHsmLifetimeAction } // ManagedHsmSKU - SKU details type ManagedHsmSKU struct { // REQUIRED; SKU Family of the managed HSM Pool - Family *ManagedHsmSKUFamily `json:"family,omitempty"` + Family *ManagedHsmSKUFamily // REQUIRED; SKU of the managed HSM Pool - Name *ManagedHsmSKUName `json:"name,omitempty"` + Name *ManagedHsmSKUName } type ManagedHsmTrigger struct { // The time duration after key creation to rotate the key. It only applies to rotate. It will be in ISO 8601 duration format. // Eg: 'P90D', 'P1Y'. - TimeAfterCreate *string `json:"timeAfterCreate,omitempty"` + TimeAfterCreate *string // The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. - TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty"` -} - -// ManagedHsmsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginCreateOrUpdate -// method. -type ManagedHsmsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedHsmsClientBeginDeleteOptions contains the optional parameters for the ManagedHsmsClient.BeginDelete method. -type ManagedHsmsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedHsmsClientBeginPurgeDeletedOptions contains the optional parameters for the ManagedHsmsClient.BeginPurgeDeleted -// method. -type ManagedHsmsClientBeginPurgeDeletedOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedHsmsClientBeginUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginUpdate method. -type ManagedHsmsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedHsmsClientCheckMhsmNameAvailabilityOptions contains the optional parameters for the ManagedHsmsClient.CheckMhsmNameAvailability -// method. -type ManagedHsmsClientCheckMhsmNameAvailabilityOptions struct { - // placeholder for future optional parameters + TimeBeforeExpiry *string } -// ManagedHsmsClientGetDeletedOptions contains the optional parameters for the ManagedHsmsClient.GetDeleted method. -type ManagedHsmsClientGetDeletedOptions struct { - // placeholder for future optional parameters -} +// 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 -// ManagedHsmsClientGetOptions contains the optional parameters for the ManagedHsmsClient.Get method. -type ManagedHsmsClientGetOptions struct { - // placeholder for future optional parameters -} + // 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 -// ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.NewListByResourceGroupPager -// method. -type ManagedHsmsClientListByResourceGroupOptions struct { - // Maximum number of results to return. - Top *int32 -} - -// ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.NewListBySubscriptionPager -// method. -type ManagedHsmsClientListBySubscriptionOptions struct { - // Maximum number of results to return. - Top *int32 -} + // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned + // identity. + PrincipalID *string -// ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.NewListDeletedPager method. -type ManagedHsmsClientListDeletedOptions struct { - // placeholder for future optional parameters + // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + TenantID *string } // MetricSpecification - Metric specification of operation. type MetricSpecification struct { // The metric aggregation type. Possible values include: 'Average', 'Count', 'Total'. - AggregationType *string `json:"aggregationType,omitempty"` + AggregationType *string // The dimensions of metric - Dimensions []*DimensionProperties `json:"dimensions,omitempty"` + Dimensions []*DimensionProperties // Display description of metric specification. - DisplayDescription *string `json:"displayDescription,omitempty"` + DisplayDescription *string // Display name of metric specification. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Property to specify whether to fill gap with zero. - FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` + FillGapWithZero *bool // The internal metric name. - InternalMetricName *string `json:"internalMetricName,omitempty"` + InternalMetricName *string // The metric lock aggregation type. - LockAggregationType *string `json:"lockAggregationType,omitempty"` + LockAggregationType *string // Name of metric specification. - Name *string `json:"name,omitempty"` + Name *string // The supported aggregation types for the metrics. - SupportedAggregationTypes []*string `json:"supportedAggregationTypes,omitempty"` + SupportedAggregationTypes []*string // The supported time grain types for the metrics. - SupportedTimeGrainTypes []*string `json:"supportedTimeGrainTypes,omitempty"` + SupportedTimeGrainTypes []*string // The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. - Unit *string `json:"unit,omitempty"` + Unit *string } // NetworkRuleSet - A set of rules governing the network accessibility of a vault. type NetworkRuleSet struct { // Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. - Bypass *NetworkRuleBypassOptions `json:"bypass,omitempty"` + Bypass *NetworkRuleBypassOptions // 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 `json:"defaultAction,omitempty"` + DefaultAction *NetworkRuleAction // The list of IP address rules. - IPRules []*IPRule `json:"ipRules,omitempty"` + IPRules []*IPRule // The list of virtual network rules. - VirtualNetworkRules []*VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` + VirtualNetworkRules []*VirtualNetworkRule } // Operation - Key Vault REST API operation definition. type Operation struct { // Display metadata associated with the operation. - Display *OperationDisplay `json:"display,omitempty"` + Display *OperationDisplay // Property to specify whether the action is a data action. - IsDataAction *bool `json:"isDataAction,omitempty"` + IsDataAction *bool // Operation name: {provider}/{resource}/{operation} - Name *string `json:"name,omitempty"` + Name *string // Properties of operation, include metric specifications. - OperationProperties *OperationProperties `json:"properties,omitempty"` + OperationProperties *OperationProperties // The origin of operations. - Origin *string `json:"origin,omitempty"` + Origin *string } // OperationDisplay - Display metadata associated with the operation. type OperationDisplay struct { // Description of operation. - Description *string `json:"description,omitempty"` + Description *string // Type of operation: get, read, delete, etc. - Operation *string `json:"operation,omitempty"` + Operation *string // Service provider: Microsoft Key Vault. - Provider *string `json:"provider,omitempty"` + Provider *string // Resource on which the operation is performed etc. - Resource *string `json:"resource,omitempty"` + Resource *string } // OperationListResult - Result of the request to list Storage operations. It contains a list of operations and a URL link // to get the next set of results. type OperationListResult struct { // The URL to get the next set of operations. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // List of Storage operations supported by the Storage resource provider. - Value []*Operation `json:"value,omitempty"` + Value []*Operation } // OperationProperties - Properties of operation, include metric specifications. type OperationProperties struct { // One property of operation, include metric specifications. - ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters + ServiceSpecification *ServiceSpecification } // Permissions the identity has for keys, secrets, certificates and storage. type Permissions struct { // Permissions to certificates - Certificates []*CertificatePermissions `json:"certificates,omitempty"` + Certificates []*CertificatePermissions // Permissions to keys - Keys []*KeyPermissions `json:"keys,omitempty"` + Keys []*KeyPermissions // Permissions to secrets - Secrets []*SecretPermissions `json:"secrets,omitempty"` + Secrets []*SecretPermissions // Permissions to storage accounts - Storage []*StoragePermissions `json:"storage,omitempty"` + Storage []*StoragePermissions } // PrivateEndpoint - Private endpoint object properties. type PrivateEndpoint struct { // READ-ONLY; Full identifier of the private endpoint resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string } // PrivateEndpointConnection - Private endpoint connection resource. type PrivateEndpointConnection struct { // Modified whenever there is a change in the state of private endpoint connection. - Etag *string `json:"etag,omitempty"` + Etag *string // Resource properties. - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + Properties *PrivateEndpointConnectionProperties // READ-ONLY; Fully qualified identifier of the key vault resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Azure location of the key vault resource. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Name of the key vault resource. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Tags assigned to the key vault resource. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string // READ-ONLY; Resource type of the key vault resource. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // PrivateEndpointConnectionItem - Private endpoint connection item. type PrivateEndpointConnectionItem struct { // Modified whenever there is a change in the state of private endpoint connection. - Etag *string `json:"etag,omitempty"` + Etag *string // Id of private endpoint connection. - ID *string `json:"id,omitempty"` + ID *string // Private endpoint connection properties. - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + Properties *PrivateEndpointConnectionProperties } // PrivateEndpointConnectionListResult - List of private endpoint connections. type PrivateEndpointConnectionListResult struct { // The URL to get the next set of private endpoint connections. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of private endpoint connections. - Value []*PrivateEndpointConnection `json:"value,omitempty"` + Value []*PrivateEndpointConnection } // PrivateEndpointConnectionProperties - Properties of the private endpoint connection resource. type PrivateEndpointConnectionProperties struct { // Properties of the private endpoint object. - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateEndpoint *PrivateEndpoint // Approval state of the private link connection. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState // Provisioning state of the private endpoint connection. - ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` -} - -// 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 -} - -// PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByResourcePager -// method. -type PrivateEndpointConnectionsClientListByResourceOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put -// method. -type PrivateEndpointConnectionsClientPutOptions struct { - // placeholder for future optional parameters + ProvisioningState *PrivateEndpointConnectionProvisioningState } // PrivateLinkResource - A private link resource type PrivateLinkResource struct { // Resource properties. - Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` + Properties *PrivateLinkResourceProperties // READ-ONLY; Fully qualified identifier of the key vault resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Azure location of the key vault resource. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Name of the key vault resource. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Tags assigned to the key vault resource. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string // READ-ONLY; Resource type of the key vault resource. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // PrivateLinkResourceListResult - A list of private link resources type PrivateLinkResourceListResult struct { // Array of private link resources - Value []*PrivateLinkResource `json:"value,omitempty"` + Value []*PrivateLinkResource } // PrivateLinkResourceProperties - Properties of a private link resource. type PrivateLinkResourceProperties struct { // Required DNS zone names of the the private link resource. - RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` + RequiredZoneNames []*string // READ-ONLY; Group identifier of private link resource. - GroupID *string `json:"groupId,omitempty" azure:"ro"` + GroupID *string // READ-ONLY; Required member names of private link resource. - RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` -} - -// PrivateLinkResourcesClientListByVaultOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByVault -// method. -type PrivateLinkResourcesClientListByVaultOptions struct { - // placeholder for future optional parameters + RequiredMembers []*string } // PrivateLinkServiceConnectionState - An object that represents the approval state of the private link connection. type PrivateLinkServiceConnectionState struct { // A message indicating if changes on the service provider require any updates on the consumer. - ActionsRequired *ActionsRequired `json:"actionsRequired,omitempty"` + ActionsRequired *ActionsRequired // The reason for approval or rejection. - Description *string `json:"description,omitempty"` + Description *string // Indicates whether the connection has been approved, rejected or removed by the key vault owner. - Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` -} - -// ProxyResourceWithoutSystemData - Common fields that are returned in the response for all Azure Resource Manager resources -type ProxyResourceWithoutSystemData struct { - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Status *PrivateEndpointServiceConnectionStatus } // Resource - Key Vault resource type Resource struct { // READ-ONLY; Fully qualified identifier of the key vault resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Azure location of the key vault resource. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Name of the key vault resource. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Tags assigned to the key vault resource. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string // READ-ONLY; Resource type of the key vault resource. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ResourceListResult - List of vault resources. type ResourceListResult struct { // The URL to get the next set of vault resources. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of vault resources. - Value []*Resource `json:"value,omitempty"` + Value []*Resource } type RotationPolicy struct { // The attributes of key rotation policy. - Attributes *KeyRotationPolicyAttributes `json:"attributes,omitempty"` + Attributes *KeyRotationPolicyAttributes // The lifetimeActions for key rotation action. - LifetimeActions []*LifetimeAction `json:"lifetimeActions,omitempty"` + LifetimeActions []*LifetimeAction } // SKU details type SKU struct { // REQUIRED; SKU family name - Family *SKUFamily `json:"family,omitempty"` + Family *SKUFamily // REQUIRED; SKU name to specify whether the key vault is a standard vault or a premium vault. - Name *SKUName `json:"name,omitempty"` + Name *SKUName } // Secret - Resource information with extended details. type Secret struct { // REQUIRED; Properties of the secret - Properties *SecretProperties `json:"properties,omitempty"` + Properties *SecretProperties // READ-ONLY; Fully qualified identifier of the key vault resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Azure location of the key vault resource. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Name of the key vault resource. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Tags assigned to the key vault resource. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string // READ-ONLY; Resource type of the key vault resource. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // SecretAttributes - The secret management attributes. type SecretAttributes struct { // Determines whether the object is enabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // Expiry date in seconds since 1970-01-01T00:00:00Z. - Expires *time.Time `json:"exp,omitempty"` + Expires *time.Time // Not before date in seconds since 1970-01-01T00:00:00Z. - NotBefore *time.Time `json:"nbf,omitempty"` + NotBefore *time.Time // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. - Created *time.Time `json:"created,omitempty" azure:"ro"` + Created *time.Time // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. - Updated *time.Time `json:"updated,omitempty" azure:"ro"` + Updated *time.Time } // SecretCreateOrUpdateParameters - Parameters for creating or updating a secret type SecretCreateOrUpdateParameters struct { // REQUIRED; Properties of the secret - Properties *SecretProperties `json:"properties,omitempty"` + Properties *SecretProperties // The tags that will be assigned to the secret. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // SecretListResult - List of secrets type SecretListResult struct { // The URL to get the next set of secrets. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of secrets. - Value []*Secret `json:"value,omitempty"` + Value []*Secret } // SecretPatchParameters - Parameters for patching a secret type SecretPatchParameters struct { // Properties of the secret - Properties *SecretPatchProperties `json:"properties,omitempty"` + Properties *SecretPatchProperties // The tags that will be assigned to the secret. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // SecretPatchProperties - Properties of the secret type SecretPatchProperties struct { // The attributes of the secret. - Attributes *SecretAttributes `json:"attributes,omitempty"` + Attributes *SecretAttributes // The content type of the secret. - ContentType *string `json:"contentType,omitempty"` + ContentType *string // The value of the secret. - Value *string `json:"value,omitempty"` + Value *string } // SecretProperties - Properties of the secret type SecretProperties struct { // The attributes of the secret. - Attributes *SecretAttributes `json:"attributes,omitempty"` + Attributes *SecretAttributes // The content type of the secret. - ContentType *string `json:"contentType,omitempty"` + ContentType *string // The value of the secret. NOTE: 'value' will never be returned from the service, as APIs using this model are is intended // for internal use in ARM deployments. Users should use the data-plane REST // service for interaction with vault secrets. - Value *string `json:"value,omitempty"` + Value *string // READ-ONLY; The URI to retrieve the current version of the secret. - SecretURI *string `json:"secretUri,omitempty" azure:"ro"` + SecretURI *string // READ-ONLY; The URI to retrieve the specific version of the secret. - SecretURIWithVersion *string `json:"secretUriWithVersion,omitempty" azure:"ro"` -} - -// SecretsClientCreateOrUpdateOptions contains the optional parameters for the SecretsClient.CreateOrUpdate method. -type SecretsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. -type SecretsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method. -type SecretsClientListOptions struct { - // Maximum number of results to return. - Top *int32 -} - -// SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method. -type SecretsClientUpdateOptions struct { - // placeholder for future optional parameters + SecretURIWithVersion *string } // ServiceSpecification - One property of operation, include log specifications. type ServiceSpecification struct { // Log specifications of operation. - LogSpecifications []*LogSpecification `json:"logSpecifications,omitempty"` + LogSpecifications []*LogSpecification // Metric specifications of operation. - MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"` + MetricSpecifications []*MetricSpecification } // SystemData - Metadata pertaining to creation and last modification of the key vault resource. type SystemData struct { // The timestamp of the key vault resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` + CreatedAt *time.Time // The identity that created the key vault resource. - CreatedBy *string `json:"createdBy,omitempty"` + CreatedBy *string // The type of identity that created the key vault resource. - CreatedByType *IdentityType `json:"createdByType,omitempty"` + CreatedByType *IdentityType // The timestamp of the key vault resource last modification (UTC). - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` + LastModifiedAt *time.Time // The identity that last modified the key vault resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedBy *string // The type of identity that last modified the key vault resource. - LastModifiedByType *IdentityType `json:"lastModifiedByType,omitempty"` + LastModifiedByType *IdentityType } type Trigger struct { // The time duration after key creation to rotate the key. It only applies to rotate. It will be in ISO 8601 duration format. // Eg: 'P90D', 'P1Y'. - TimeAfterCreate *string `json:"timeAfterCreate,omitempty"` + TimeAfterCreate *string // The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. - TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty"` + TimeBeforeExpiry *string +} + +// UserAssignedIdentity - User assigned identity properties +type UserAssignedIdentity struct { + // READ-ONLY; The client ID of the assigned identity. + ClientID *string + + // READ-ONLY; The principal ID of the assigned identity. + PrincipalID *string } // Vault - Resource information with extended details. type Vault struct { // REQUIRED; Properties of the vault - Properties *VaultProperties `json:"properties,omitempty"` + Properties *VaultProperties // Azure location of the key vault resource. - Location *string `json:"location,omitempty"` + Location *string // Tags assigned to the key vault resource. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Fully qualified identifier of the key vault resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the key vault resource. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System metadata for the key vault. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Resource type of the key vault resource. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // VaultAccessPolicyParameters - Parameters for updating the access policy in a vault type VaultAccessPolicyParameters struct { // REQUIRED; Properties of the access policy - Properties *VaultAccessPolicyProperties `json:"properties,omitempty"` + Properties *VaultAccessPolicyProperties // READ-ONLY; The resource id of the access policy. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The resource type of the access policy. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; The resource name of the access policy. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The resource name of the access policy. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // VaultAccessPolicyProperties - Properties of the vault access policy type VaultAccessPolicyProperties struct { // REQUIRED; An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same // tenant ID as the key vault's tenant ID. - AccessPolicies []*AccessPolicyEntry `json:"accessPolicies,omitempty"` + AccessPolicies []*AccessPolicyEntry } // VaultCheckNameAvailabilityParameters - The parameters used to check the availability of the vault name. type VaultCheckNameAvailabilityParameters struct { // REQUIRED; The vault name. - Name *string `json:"name,omitempty"` + Name *string // CONSTANT; The type of resource, Microsoft.KeyVault/vaults // Field has constant value "Microsoft.KeyVault/vaults", any specified value is ignored. - Type *string `json:"type,omitempty"` + Type *string } // VaultCreateOrUpdateParameters - Parameters for creating or updating a vault type VaultCreateOrUpdateParameters struct { // REQUIRED; The supported Azure location where the key vault should be created. - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; Properties of the vault - Properties *VaultProperties `json:"properties,omitempty"` + Properties *VaultProperties // The tags that will be assigned to the key vault. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // VaultListResult - List of vaults type VaultListResult struct { // The URL to get the next set of vaults. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of vaults. - Value []*Vault `json:"value,omitempty"` + Value []*Vault } // VaultPatchParameters - Parameters for creating or updating a vault type VaultPatchParameters struct { // Properties of the vault - Properties *VaultPatchProperties `json:"properties,omitempty"` + Properties *VaultPatchProperties // The tags that will be assigned to the key vault. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // VaultPatchProperties - Properties of the vault type VaultPatchProperties struct { // An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant // ID as the key vault's tenant ID. - AccessPolicies []*AccessPolicyEntry `json:"accessPolicies,omitempty"` + AccessPolicies []*AccessPolicyEntry // The vault's create mode to indicate whether the vault need to be recovered or not. - CreateMode *CreateMode `json:"createMode,omitempty"` + CreateMode *CreateMode // Property specifying whether protection against purge is enabled for this vault. Setting this property to true activates // protection against purge for this vault and its content - only the Key Vault // service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling // this functionality is irreversible - that is, the property does not accept // false as its value. - EnablePurgeProtection *bool `json:"enablePurgeProtection,omitempty"` + EnablePurgeProtection *bool // Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) // for authorization of data actions, and the access policies specified in vault // properties will be ignored. When false, the key vault will use the access policies specified in vault properties, and any // policy stored on Azure Resource Manager will be ignored. If null or not // specified, the value of this property will not change. - EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"` + EnableRbacAuthorization *bool // Property to specify whether the 'soft delete' functionality is enabled for this key vault. Once set to true, it cannot // be reverted to false. - EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` + EnableSoftDelete *bool // Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key // vault. - EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"` + EnabledForDeployment *bool // Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. - EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty"` + EnabledForDiskEncryption *bool // Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. - EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty"` + EnabledForTemplateDeployment *bool // A collection of rules governing the accessibility of the vault from specific network locations. - NetworkACLs *NetworkRuleSet `json:"networkAcls,omitempty"` + NetworkACLs *NetworkRuleSet // Property to specify whether the vault will accept traffic from public internet. If set to 'disabled' all traffic except // private endpoint traffic and that that originates from trusted services will be // blocked. This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor // the rules. - PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + PublicNetworkAccess *string // SKU details - SKU *SKU `json:"sku,omitempty"` + SKU *SKU // softDelete data retention days. It accepts >=7 and <=90. - SoftDeleteRetentionInDays *int32 `json:"softDeleteRetentionInDays,omitempty"` + SoftDeleteRetentionInDays *int32 // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // VaultProperties - Properties of the vault type VaultProperties struct { // REQUIRED; SKU details - SKU *SKU `json:"sku,omitempty"` + SKU *SKU // REQUIRED; The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // An array of 0 to 1024 identities that have access to the key vault. All identities in the array must use the same tenant // ID as the key vault's tenant ID. When createMode is set to recover, access // policies are not required. Otherwise, access policies are required. - AccessPolicies []*AccessPolicyEntry `json:"accessPolicies,omitempty"` + AccessPolicies []*AccessPolicyEntry // The vault's create mode to indicate whether the vault need to be recovered or not. - CreateMode *CreateMode `json:"createMode,omitempty"` + CreateMode *CreateMode // Property specifying whether protection against purge is enabled for this vault. Setting this property to true activates // protection against purge for this vault and its content - only the Key Vault // service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling // this functionality is irreversible - that is, the property does not accept // false as its value. - EnablePurgeProtection *bool `json:"enablePurgeProtection,omitempty"` + EnablePurgeProtection *bool // Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) // for authorization of data actions, and the access policies specified in vault @@ -1595,120 +1349,53 @@ type VaultProperties struct { // policy stored on Azure Resource Manager will be ignored. If null or not // specified, the vault is created with the default value of false. Note that management actions are always authorized with // RBAC. - EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"` + EnableRbacAuthorization *bool // Property to specify whether the 'soft delete' functionality is enabled for this key vault. If it's not set to any value(true // or false) when creating new key vault, it will be set to true by default. // Once set to true, it cannot be reverted to false. - EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` + EnableSoftDelete *bool // Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key // vault. - EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"` + EnabledForDeployment *bool // Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. - EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty"` + EnabledForDiskEncryption *bool // Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. - EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty"` + EnabledForTemplateDeployment *bool // Rules governing the accessibility of the key vault from specific network locations. - NetworkACLs *NetworkRuleSet `json:"networkAcls,omitempty"` + NetworkACLs *NetworkRuleSet // Provisioning state of the vault. - ProvisioningState *VaultProvisioningState `json:"provisioningState,omitempty"` + ProvisioningState *VaultProvisioningState // Property to specify whether the vault will accept traffic from public internet. If set to 'disabled' all traffic except // private endpoint traffic and that that originates from trusted services will be // blocked. This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor // the rules. - PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + PublicNetworkAccess *string // softDelete data retention days. It accepts >=7 and <=90. - SoftDeleteRetentionInDays *int32 `json:"softDeleteRetentionInDays,omitempty"` + SoftDeleteRetentionInDays *int32 // The URI of the vault for performing operations on keys and secrets. - VaultURI *string `json:"vaultUri,omitempty"` + VaultURI *string // READ-ONLY; The resource id of HSM Pool. - HsmPoolResourceID *string `json:"hsmPoolResourceId,omitempty" azure:"ro"` + HsmPoolResourceID *string // READ-ONLY; List of private endpoint connections associated with the key vault. - PrivateEndpointConnections []*PrivateEndpointConnectionItem `json:"privateEndpointConnections,omitempty" azure:"ro"` -} - -// VaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the VaultsClient.BeginCreateOrUpdate method. -type VaultsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VaultsClientBeginPurgeDeletedOptions contains the optional parameters for the VaultsClient.BeginPurgeDeleted method. -type VaultsClientBeginPurgeDeletedOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VaultsClientCheckNameAvailabilityOptions contains the optional parameters for the VaultsClient.CheckNameAvailability method. -type VaultsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// VaultsClientDeleteOptions contains the optional parameters for the VaultsClient.Delete method. -type VaultsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// VaultsClientGetDeletedOptions contains the optional parameters for the VaultsClient.GetDeleted method. -type VaultsClientGetDeletedOptions struct { - // placeholder for future optional parameters -} - -// VaultsClientGetOptions contains the optional parameters for the VaultsClient.Get method. -type VaultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.NewListByResourceGroupPager -// method. -type VaultsClientListByResourceGroupOptions struct { - // Maximum number of results to return. - Top *int32 -} - -// VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.NewListBySubscriptionPager -// method. -type VaultsClientListBySubscriptionOptions struct { - // Maximum number of results to return. - Top *int32 -} - -// VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.NewListDeletedPager method. -type VaultsClientListDeletedOptions struct { - // placeholder for future optional parameters -} - -// VaultsClientListOptions contains the optional parameters for the VaultsClient.NewListPager method. -type VaultsClientListOptions struct { - // Maximum number of results to return. - Top *int32 -} - -// VaultsClientUpdateAccessPolicyOptions contains the optional parameters for the VaultsClient.UpdateAccessPolicy method. -type VaultsClientUpdateAccessPolicyOptions struct { - // placeholder for future optional parameters -} - -// VaultsClientUpdateOptions contains the optional parameters for the VaultsClient.Update method. -type VaultsClientUpdateOptions struct { - // placeholder for future optional parameters + PrivateEndpointConnections []*PrivateEndpointConnectionItem } // VirtualNetworkRule - A rule governing the accessibility of a vault from a specific virtual network. type VirtualNetworkRule struct { // REQUIRED; Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. - ID *string `json:"id,omitempty"` + ID *string // Property to specify whether NRP will ignore the check if parent subnet has serviceEndpoints configured. - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` + IgnoreMissingVnetServiceEndpoint *bool } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go index 7f7a5e10..6463e0c1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -84,49 +80,6 @@ func (a *Action) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Attributes. -func (a Attributes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeUnix(objectMap, "created", a.Created) - populate(objectMap, "enabled", a.Enabled) - populateTimeUnix(objectMap, "exp", a.Expires) - populateTimeUnix(objectMap, "nbf", a.NotBefore) - populateTimeUnix(objectMap, "updated", a.Updated) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Attributes. -func (a *Attributes) UnmarshalJSON(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 "created": - err = unpopulateTimeUnix(val, "Created", &a.Created) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &a.Enabled) - delete(rawMsg, key) - case "exp": - err = unpopulateTimeUnix(val, "Expires", &a.Expires) - delete(rawMsg, key) - case "nbf": - err = unpopulateTimeUnix(val, "NotBefore", &a.NotBefore) - delete(rawMsg, key) - case "updated": - err = unpopulateTimeUnix(val, "Updated", &a.Updated) - 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 CheckMhsmNameAvailabilityParameters. func (c CheckMhsmNameAvailabilityParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -297,11 +250,11 @@ func (d *DeletedManagedHsmListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DeletedManagedHsmProperties. func (d DeletedManagedHsmProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "deletionDate", d.DeletionDate) + populateDateTimeRFC3339(objectMap, "deletionDate", d.DeletionDate) populate(objectMap, "location", d.Location) populate(objectMap, "mhsmId", d.MhsmID) populate(objectMap, "purgeProtectionEnabled", d.PurgeProtectionEnabled) - populateTimeRFC3339(objectMap, "scheduledPurgeDate", d.ScheduledPurgeDate) + populateDateTimeRFC3339(objectMap, "scheduledPurgeDate", d.ScheduledPurgeDate) populate(objectMap, "tags", d.Tags) return json.Marshal(objectMap) } @@ -316,7 +269,7 @@ func (d *DeletedManagedHsmProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "deletionDate": - err = unpopulateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) + err = unpopulateDateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &d.Location) @@ -328,7 +281,7 @@ func (d *DeletedManagedHsmProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "PurgeProtectionEnabled", &d.PurgeProtectionEnabled) delete(rawMsg, key) case "scheduledPurgeDate": - err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) + err = unpopulateDateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &d.Tags) @@ -414,10 +367,10 @@ func (d *DeletedVaultListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DeletedVaultProperties. func (d DeletedVaultProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "deletionDate", d.DeletionDate) + populateDateTimeRFC3339(objectMap, "deletionDate", d.DeletionDate) populate(objectMap, "location", d.Location) populate(objectMap, "purgeProtectionEnabled", d.PurgeProtectionEnabled) - populateTimeRFC3339(objectMap, "scheduledPurgeDate", d.ScheduledPurgeDate) + populateDateTimeRFC3339(objectMap, "scheduledPurgeDate", d.ScheduledPurgeDate) populate(objectMap, "tags", d.Tags) populate(objectMap, "vaultId", d.VaultID) return json.Marshal(objectMap) @@ -433,7 +386,7 @@ func (d *DeletedVaultProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "deletionDate": - err = unpopulateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) + err = unpopulateDateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &d.Location) @@ -442,7 +395,7 @@ func (d *DeletedVaultProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "PurgeProtectionEnabled", &d.PurgeProtectionEnabled) delete(rawMsg, key) case "scheduledPurgeDate": - err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) + err = unpopulateDateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &d.Tags) @@ -493,41 +446,6 @@ func (d *DimensionProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Error. -func (e Error) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", e.Code) - populate(objectMap, "innererror", e.InnerError) - populate(objectMap, "message", e.Message) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Error. -func (e *Error) UnmarshalJSON(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 "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) - case "innererror": - err = unpopulate(val, "InnerError", &e.InnerError) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &e.Message) - 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 IPRule. func (i IPRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -778,7 +696,9 @@ func (k *KeyProperties) UnmarshalJSON(data []byte) error { func (k KeyReleasePolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "contentType", k.ContentType) - populateByteArray(objectMap, "data", k.Data, runtime.Base64URLFormat) + populateByteArray(objectMap, "data", k.Data, func() any { + return runtime.EncodeByteArray(k.Data, runtime.Base64URLFormat) + }) return json.Marshal(objectMap) } @@ -795,7 +715,9 @@ func (k *KeyReleasePolicy) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ContentType", &k.ContentType) delete(rawMsg, key) case "data": - err = runtime.DecodeByteArray(string(val), &k.Data, runtime.Base64URLFormat) + if val != nil && string(val) != "null" { + err = runtime.DecodeByteArray(string(val), &k.Data, runtime.Base64URLFormat) + } delete(rawMsg, key) } if err != nil { @@ -1039,6 +961,7 @@ func (m MHSMPrivateEndpointConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "etag", m.Etag) 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) @@ -1064,6 +987,9 @@ func (m *MHSMPrivateEndpointConnection) UnmarshalJSON(data []byte) error { 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) @@ -1198,6 +1124,7 @@ func (m *MHSMPrivateEndpointConnectionsListResult) UnmarshalJSON(data []byte) er func (m MHSMPrivateLinkResource) 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) @@ -1220,6 +1147,9 @@ func (m *MHSMPrivateLinkResource) UnmarshalJSON(data []byte) error { 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) @@ -1439,6 +1369,7 @@ func (m *ManagedHSMSecurityDomainProperties) UnmarshalJSON(data []byte) error { func (m ManagedHsm) 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) @@ -1461,6 +1392,9 @@ func (m *ManagedHsm) UnmarshalJSON(data []byte) error { 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) @@ -1517,33 +1451,6 @@ func (m *ManagedHsmAction) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedHsmError. -func (m ManagedHsmError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", m.Error) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmError. -func (m *ManagedHsmError) UnmarshalJSON(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 "error": - err = unpopulate(val, "Error", &m.Error) - 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 ManagedHsmKey. func (m ManagedHsmKey) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1763,7 +1670,9 @@ func (m *ManagedHsmKeyProperties) UnmarshalJSON(data []byte) error { func (m ManagedHsmKeyReleasePolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "contentType", m.ContentType) - populateByteArray(objectMap, "data", m.Data, runtime.Base64URLFormat) + populateByteArray(objectMap, "data", m.Data, func() any { + return runtime.EncodeByteArray(m.Data, runtime.Base64URLFormat) + }) return json.Marshal(objectMap) } @@ -1780,7 +1689,9 @@ func (m *ManagedHsmKeyReleasePolicy) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ContentType", &m.ContentType) delete(rawMsg, key) case "data": - err = runtime.DecodeByteArray(string(val), &m.Data, runtime.Base64URLFormat) + if val != nil && string(val) != "null" { + err = runtime.DecodeByteArray(string(val), &m.Data, runtime.Base64URLFormat) + } delete(rawMsg, key) } if err != nil { @@ -1900,7 +1811,7 @@ func (m ManagedHsmProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "provisioningState", m.ProvisioningState) populate(objectMap, "publicNetworkAccess", m.PublicNetworkAccess) populate(objectMap, "regions", m.Regions) - populateTimeRFC3339(objectMap, "scheduledPurgeDate", m.ScheduledPurgeDate) + populateDateTimeRFC3339(objectMap, "scheduledPurgeDate", m.ScheduledPurgeDate) populate(objectMap, "securityDomainProperties", m.SecurityDomainProperties) populate(objectMap, "softDeleteRetentionInDays", m.SoftDeleteRetentionInDays) populate(objectMap, "statusMessage", m.StatusMessage) @@ -1948,7 +1859,7 @@ func (m *ManagedHsmProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Regions", &m.Regions) delete(rawMsg, key) case "scheduledPurgeDate": - err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &m.ScheduledPurgeDate) + err = unpopulateDateTimeRFC3339(val, "ScheduledPurgeDate", &m.ScheduledPurgeDate) delete(rawMsg, key) case "securityDomainProperties": err = unpopulate(val, "SecurityDomainProperties", &m.SecurityDomainProperties) @@ -1970,57 +1881,6 @@ func (m *ManagedHsmProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedHsmResource. -func (m ManagedHsmResource) 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, "sku", m.SKU) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmResource. -func (m *ManagedHsmResource) UnmarshalJSON(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 "sku": - err = unpopulate(val, "SKU", &m.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) - 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 ManagedHsmRotationPolicy. func (m ManagedHsmRotationPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2117,6 +1977,45 @@ func (m *ManagedHsmTrigger) UnmarshalJSON(data []byte) error { 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 MetricSpecification. func (m MetricSpecification) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2725,45 +2624,6 @@ func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ProxyResourceWithoutSystemData. -func (p ProxyResourceWithoutSystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResourceWithoutSystemData. -func (p *ProxyResourceWithoutSystemData) UnmarshalJSON(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 "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", p, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type Resource. func (r Resource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3198,10 +3058,10 @@ func (s *ServiceSpecification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -3217,7 +3077,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -3226,7 +3086,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) @@ -3273,6 +3133,37 @@ func (t *Trigger) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. +func (u UserAssignedIdentity) 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 UserAssignedIdentity. +func (u *UserAssignedIdentity) UnmarshalJSON(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 Vault. func (v Vault) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3729,18 +3620,18 @@ func populate(m map[string]any, k string, v any) { } } -func populateByteArray(m map[string]any, k string, b []byte, f runtime.Base64Encoding) { +func populateByteArray[T any](m map[string]any, k string, b []T, convert func() any) { if azcore.IsNullValue(b) { m[k] = nil } else if len(b) == 0 { return } else { - m[k] = runtime.EncodeByteArray(b, f) + m[k] = convert() } } 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/keyvault/armkeyvault/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/operations_client.go index 3b7216f1..0ff8f69c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/operations_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -28,7 +24,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -40,7 +36,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Key Vault Rest API operations. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-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]{ @@ -48,37 +44,32 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } 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) { +func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *OperationsClientListOptions) (*policy.Request, error) { urlPath := "/providers/Microsoft.KeyVault/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", "2023-02-01") + reqQP.Set("api-version", "2024-11-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/keyvault/armkeyvault/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/options.go new file mode 100644 index 00000000..f228a112 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/options.go @@ -0,0 +1,280 @@ +// 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 armkeyvault + +// KeysClientCreateIfNotExistOptions contains the optional parameters for the KeysClient.CreateIfNotExist method. +type KeysClientCreateIfNotExistOptions struct { + // placeholder for future optional parameters +} + +// KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. +type KeysClientGetOptions struct { + // placeholder for future optional parameters +} + +// KeysClientGetVersionOptions contains the optional parameters for the KeysClient.GetVersion method. +type KeysClientGetVersionOptions struct { + // placeholder for future optional parameters +} + +// KeysClientListOptions contains the optional parameters for the KeysClient.NewListPager method. +type KeysClientListOptions struct { + // placeholder for future optional parameters +} + +// KeysClientListVersionsOptions contains the optional parameters for the KeysClient.NewListVersionsPager method. +type KeysClientListVersionsOptions struct { + // placeholder for future optional parameters +} + +// MHSMPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.BeginDelete +// method. +type MHSMPrivateEndpointConnectionsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// MHSMPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Get +// method. +type MHSMPrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.NewListByResourcePager +// method. +type MHSMPrivateEndpointConnectionsClientListByResourceOptions struct { + // placeholder for future optional parameters +} + +// MHSMPrivateEndpointConnectionsClientPutOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Put +// method. +type MHSMPrivateEndpointConnectionsClientPutOptions struct { + // placeholder for future optional parameters +} + +// MHSMPrivateLinkResourcesClientListByMHSMResourceOptions contains the optional parameters for the MHSMPrivateLinkResourcesClient.ListByMHSMResource +// method. +type MHSMPrivateLinkResourcesClientListByMHSMResourceOptions struct { + // placeholder for future optional parameters +} + +// MHSMRegionsClientListByResourceOptions contains the optional parameters for the MHSMRegionsClient.NewListByResourcePager +// method. +type MHSMRegionsClientListByResourceOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientCreateIfNotExistOptions contains the optional parameters for the ManagedHsmKeysClient.CreateIfNotExist +// method. +type ManagedHsmKeysClientCreateIfNotExistOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientGetOptions contains the optional parameters for the ManagedHsmKeysClient.Get method. +type ManagedHsmKeysClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientGetVersionOptions contains the optional parameters for the ManagedHsmKeysClient.GetVersion method. +type ManagedHsmKeysClientGetVersionOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientListOptions contains the optional parameters for the ManagedHsmKeysClient.NewListPager method. +type ManagedHsmKeysClientListOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientListVersionsOptions contains the optional parameters for the ManagedHsmKeysClient.NewListVersionsPager +// method. +type ManagedHsmKeysClientListVersionsOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginCreateOrUpdate +// method. +type ManagedHsmsClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ManagedHsmsClientBeginDeleteOptions contains the optional parameters for the ManagedHsmsClient.BeginDelete method. +type ManagedHsmsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ManagedHsmsClientBeginPurgeDeletedOptions contains the optional parameters for the ManagedHsmsClient.BeginPurgeDeleted +// method. +type ManagedHsmsClientBeginPurgeDeletedOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ManagedHsmsClientBeginUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginUpdate method. +type ManagedHsmsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ManagedHsmsClientCheckMhsmNameAvailabilityOptions contains the optional parameters for the ManagedHsmsClient.CheckMhsmNameAvailability +// method. +type ManagedHsmsClientCheckMhsmNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmsClientGetDeletedOptions contains the optional parameters for the ManagedHsmsClient.GetDeleted method. +type ManagedHsmsClientGetDeletedOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmsClientGetOptions contains the optional parameters for the ManagedHsmsClient.Get method. +type ManagedHsmsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.NewListByResourceGroupPager +// method. +type ManagedHsmsClientListByResourceGroupOptions struct { + // Maximum number of results to return. + Top *int32 +} + +// ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.NewListBySubscriptionPager +// method. +type ManagedHsmsClientListBySubscriptionOptions struct { + // Maximum number of results to return. + Top *int32 +} + +// ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.NewListDeletedPager method. +type ManagedHsmsClientListDeletedOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete +// method. +type PrivateEndpointConnectionsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +type PrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByResourcePager +// method. +type PrivateEndpointConnectionsClientListByResourceOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put +// method. +type PrivateEndpointConnectionsClientPutOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListByVaultOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByVault +// method. +type PrivateLinkResourcesClientListByVaultOptions struct { + // placeholder for future optional parameters +} + +// SecretsClientCreateOrUpdateOptions contains the optional parameters for the SecretsClient.CreateOrUpdate method. +type SecretsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. +type SecretsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method. +type SecretsClientListOptions struct { + // Maximum number of results to return. + Top *int32 +} + +// SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method. +type SecretsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the VaultsClient.BeginCreateOrUpdate method. +type VaultsClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VaultsClientBeginPurgeDeletedOptions contains the optional parameters for the VaultsClient.BeginPurgeDeleted method. +type VaultsClientBeginPurgeDeletedOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VaultsClientCheckNameAvailabilityOptions contains the optional parameters for the VaultsClient.CheckNameAvailability method. +type VaultsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientDeleteOptions contains the optional parameters for the VaultsClient.Delete method. +type VaultsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientGetDeletedOptions contains the optional parameters for the VaultsClient.GetDeleted method. +type VaultsClientGetDeletedOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientGetOptions contains the optional parameters for the VaultsClient.Get method. +type VaultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.NewListByResourceGroupPager +// method. +type VaultsClientListByResourceGroupOptions struct { + // Maximum number of results to return. + Top *int32 +} + +// VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.NewListBySubscriptionPager +// method. +type VaultsClientListBySubscriptionOptions struct { + // Maximum number of results to return. + Top *int32 +} + +// VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.NewListDeletedPager method. +type VaultsClientListDeletedOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientListOptions contains the optional parameters for the VaultsClient.NewListPager method. +type VaultsClientListOptions struct { + // Maximum number of results to return. + Top *int32 +} + +// VaultsClientUpdateAccessPolicyOptions contains the optional parameters for the VaultsClient.UpdateAccessPolicy method. +type VaultsClientUpdateAccessPolicyOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientUpdateOptions contains the optional parameters for the VaultsClient.Update method. +type VaultsClientUpdateOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go index 5d48db74..4a20d3d6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -35,7 +31,7 @@ type PrivateEndpointConnectionsClient struct { // - 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+".PrivateEndpointConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,7 +45,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // BeginDelete - Deletes the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the key vault. // - vaultName - The name of the key vault. // - privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. @@ -61,33 +57,44 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, vaultName 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, vaultName, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. -func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*policy.Request, error) { +func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, _ *PrivateEndpointConnectionsClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -110,7 +117,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -119,29 +126,36 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the key vault. // - vaultName - The name of the key vault. // - privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. // - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get // method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, vaultName 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, vaultName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { +func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, _ *PrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -164,7 +178,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +196,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListByResourcePager - The List operation gets information about the private endpoint connections associated with the // vault. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the key vault. // - vaultName - The name of the key vault. // - options - PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByResourcePager @@ -193,30 +207,25 @@ func (client *PrivateEndpointConnectionsClient) NewListByResourcePager(resourceG return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsClientListByResourceResponse) (PrivateEndpointConnectionsClientListByResourceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceCreateRequest(ctx, resourceGroupName, vaultName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointConnectionsClient.NewListByResourcePager") + 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.listByResourceCreateRequest(ctx, resourceGroupName, vaultName, options) + }, nil) if err != nil { return PrivateEndpointConnectionsClientListByResourceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateEndpointConnectionsClientListByResourceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientListByResourceResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listByResourceCreateRequest creates the ListByResource request. -func (client *PrivateEndpointConnectionsClient) listByResourceCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *PrivateEndpointConnectionsClientListByResourceOptions) (*policy.Request, error) { +func (client *PrivateEndpointConnectionsClient) listByResourceCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, _ *PrivateEndpointConnectionsClientListByResourceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -235,7 +244,7 @@ func (client *PrivateEndpointConnectionsClient) listByResourceCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -253,7 +262,7 @@ func (client *PrivateEndpointConnectionsClient) listByResourceHandleResponse(res // Put - Updates the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the key vault. // - vaultName - The name of the key vault. // - privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. @@ -261,22 +270,29 @@ func (client *PrivateEndpointConnectionsClient) listByResourceHandleResponse(res // - options - PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put // method. func (client *PrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientPutOptions) (PrivateEndpointConnectionsClientPutResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.Put" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.putCreateRequest(ctx, resourceGroupName, vaultName, privateEndpointConnectionName, properties, options) if err != nil { return PrivateEndpointConnectionsClientPutResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientPutResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientPutResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientPutResponse{}, err } - return client.putHandleResponse(resp) + resp, err := client.putHandleResponse(httpResp) + return resp, err } // putCreateRequest creates the Put request. -func (client *PrivateEndpointConnectionsClient) putCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientPutOptions) (*policy.Request, error) { +func (client *PrivateEndpointConnectionsClient) putCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, _ *PrivateEndpointConnectionsClientPutOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -299,15 +315,21 @@ func (client *PrivateEndpointConnectionsClient) putCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } // putHandleResponse handles the Put response. func (client *PrivateEndpointConnectionsClient) putHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientPutResponse, error) { result := PrivateEndpointConnectionsClientPutResponse{} + if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { + result.AzureAsyncOperation = &val + } if val := resp.Header.Get("Retry-After"); val != "" { retryAfter32, err := strconv.ParseInt(val, 10, 32) retryAfter := int32(retryAfter32) @@ -316,9 +338,6 @@ func (client *PrivateEndpointConnectionsClient) putHandleResponse(resp *http.Res } result.RetryAfter = &retryAfter } - if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { - result.AzureAsyncOperation = &val - } if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { return PrivateEndpointConnectionsClientPutResponse{}, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go index 731c8aa5..75314222 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -34,7 +30,7 @@ type PrivateLinkResourcesClient struct { // - 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+".PrivateLinkResourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,28 +44,35 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // ListByVault - Gets the private link resources supported for the key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - Name of the resource group that contains the key vault. // - vaultName - The name of the key vault. // - options - PrivateLinkResourcesClientListByVaultOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByVault // method. func (client *PrivateLinkResourcesClient) ListByVault(ctx context.Context, resourceGroupName string, vaultName string, options *PrivateLinkResourcesClientListByVaultOptions) (PrivateLinkResourcesClientListByVaultResponse, error) { + var err error + const operationName = "PrivateLinkResourcesClient.ListByVault" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByVaultCreateRequest(ctx, resourceGroupName, vaultName, options) if err != nil { return PrivateLinkResourcesClientListByVaultResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientListByVaultResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientListByVaultResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientListByVaultResponse{}, err } - return client.listByVaultHandleResponse(resp) + resp, err := client.listByVaultHandleResponse(httpResp) + return resp, err } // listByVaultCreateRequest creates the ListByVault request. -func (client *PrivateLinkResourcesClient) listByVaultCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *PrivateLinkResourcesClientListByVaultOptions) (*policy.Request, error) { +func (client *PrivateLinkResourcesClient) listByVaultCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, _ *PrivateLinkResourcesClientListByVaultOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateLinkResources" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -88,7 +91,7 @@ func (client *PrivateLinkResourcesClient) listByVaultCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-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/keyvault/armkeyvault/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/responses.go similarity index 84% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/response_types.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/responses.go index a1fd185c..c7c03803 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/responses.go @@ -1,57 +1,63 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault // KeysClientCreateIfNotExistResponse contains the response from method KeysClient.CreateIfNotExist. type KeysClientCreateIfNotExistResponse struct { + // The key resource. Key } // KeysClientGetResponse contains the response from method KeysClient.Get. type KeysClientGetResponse struct { + // The key resource. Key } // KeysClientGetVersionResponse contains the response from method KeysClient.GetVersion. type KeysClientGetVersionResponse struct { + // The key resource. Key } // KeysClientListResponse contains the response from method KeysClient.NewListPager. type KeysClientListResponse struct { + // The page of keys. KeyListResult } // KeysClientListVersionsResponse contains the response from method KeysClient.NewListVersionsPager. type KeysClientListVersionsResponse struct { + // The page of keys. KeyListResult } // MHSMPrivateEndpointConnectionsClientDeleteResponse contains the response from method MHSMPrivateEndpointConnectionsClient.BeginDelete. type MHSMPrivateEndpointConnectionsClientDeleteResponse struct { + // Private endpoint connection resource. MHSMPrivateEndpointConnection } // MHSMPrivateEndpointConnectionsClientGetResponse contains the response from method MHSMPrivateEndpointConnectionsClient.Get. type MHSMPrivateEndpointConnectionsClientGetResponse struct { + // Private endpoint connection resource. MHSMPrivateEndpointConnection } // MHSMPrivateEndpointConnectionsClientListByResourceResponse contains the response from method MHSMPrivateEndpointConnectionsClient.NewListByResourcePager. type MHSMPrivateEndpointConnectionsClientListByResourceResponse struct { + // List of private endpoint connections associated with a managed HSM Pools MHSMPrivateEndpointConnectionsListResult } // MHSMPrivateEndpointConnectionsClientPutResponse contains the response from method MHSMPrivateEndpointConnectionsClient.Put. type MHSMPrivateEndpointConnectionsClientPutResponse struct { + // Private endpoint connection resource. MHSMPrivateEndpointConnection + // AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response. AzureAsyncOperation *string @@ -61,46 +67,55 @@ type MHSMPrivateEndpointConnectionsClientPutResponse struct { // MHSMPrivateLinkResourcesClientListByMHSMResourceResponse contains the response from method MHSMPrivateLinkResourcesClient.ListByMHSMResource. type MHSMPrivateLinkResourcesClientListByMHSMResourceResponse struct { + // A list of private link resources MHSMPrivateLinkResourceListResult } // MHSMRegionsClientListByResourceResponse contains the response from method MHSMRegionsClient.NewListByResourcePager. type MHSMRegionsClientListByResourceResponse struct { + // List of regions associated with a managed HSM Pools MHSMRegionsListResult } // ManagedHsmKeysClientCreateIfNotExistResponse contains the response from method ManagedHsmKeysClient.CreateIfNotExist. type ManagedHsmKeysClientCreateIfNotExistResponse struct { + // The key resource. ManagedHsmKey } // ManagedHsmKeysClientGetResponse contains the response from method ManagedHsmKeysClient.Get. type ManagedHsmKeysClientGetResponse struct { + // The key resource. ManagedHsmKey } // ManagedHsmKeysClientGetVersionResponse contains the response from method ManagedHsmKeysClient.GetVersion. type ManagedHsmKeysClientGetVersionResponse struct { + // The key resource. ManagedHsmKey } // ManagedHsmKeysClientListResponse contains the response from method ManagedHsmKeysClient.NewListPager. type ManagedHsmKeysClientListResponse struct { + // The page of keys. ManagedHsmKeyListResult } // ManagedHsmKeysClientListVersionsResponse contains the response from method ManagedHsmKeysClient.NewListVersionsPager. type ManagedHsmKeysClientListVersionsResponse struct { + // The page of keys. ManagedHsmKeyListResult } // ManagedHsmsClientCheckMhsmNameAvailabilityResponse contains the response from method ManagedHsmsClient.CheckMhsmNameAvailability. type ManagedHsmsClientCheckMhsmNameAvailabilityResponse struct { + // The CheckMhsmNameAvailability operation response. CheckMhsmNameAvailabilityResult } // ManagedHsmsClientCreateOrUpdateResponse contains the response from method ManagedHsmsClient.BeginCreateOrUpdate. type ManagedHsmsClientCreateOrUpdateResponse struct { + // Resource information with extended details. ManagedHsm } @@ -116,21 +131,25 @@ type ManagedHsmsClientGetDeletedResponse struct { // ManagedHsmsClientGetResponse contains the response from method ManagedHsmsClient.Get. type ManagedHsmsClientGetResponse struct { + // Resource information with extended details. ManagedHsm } // ManagedHsmsClientListByResourceGroupResponse contains the response from method ManagedHsmsClient.NewListByResourceGroupPager. type ManagedHsmsClientListByResourceGroupResponse struct { + // List of managed HSM Pools ManagedHsmListResult } // ManagedHsmsClientListBySubscriptionResponse contains the response from method ManagedHsmsClient.NewListBySubscriptionPager. type ManagedHsmsClientListBySubscriptionResponse struct { + // List of managed HSM Pools ManagedHsmListResult } // ManagedHsmsClientListDeletedResponse contains the response from method ManagedHsmsClient.NewListDeletedPager. type ManagedHsmsClientListDeletedResponse struct { + // List of deleted managed HSM Pools DeletedManagedHsmListResult } @@ -141,32 +160,40 @@ type ManagedHsmsClientPurgeDeletedResponse struct { // ManagedHsmsClientUpdateResponse contains the response from method ManagedHsmsClient.BeginUpdate. type ManagedHsmsClientUpdateResponse struct { + // Resource information with extended details. ManagedHsm } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list Storage operations. It contains a list of operations and a URL link to get the next set of + // results. OperationListResult } // PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete. type PrivateEndpointConnectionsClientDeleteResponse struct { + // Private endpoint connection resource. PrivateEndpointConnection } // PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. type PrivateEndpointConnectionsClientGetResponse struct { + // Private endpoint connection resource. PrivateEndpointConnection } // PrivateEndpointConnectionsClientListByResourceResponse contains the response from method PrivateEndpointConnectionsClient.NewListByResourcePager. type PrivateEndpointConnectionsClientListByResourceResponse struct { + // List of private endpoint connections. PrivateEndpointConnectionListResult } // PrivateEndpointConnectionsClientPutResponse contains the response from method PrivateEndpointConnectionsClient.Put. type PrivateEndpointConnectionsClientPutResponse struct { + // Private endpoint connection resource. PrivateEndpointConnection + // AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response. AzureAsyncOperation *string @@ -176,36 +203,43 @@ type PrivateEndpointConnectionsClientPutResponse struct { // PrivateLinkResourcesClientListByVaultResponse contains the response from method PrivateLinkResourcesClient.ListByVault. type PrivateLinkResourcesClientListByVaultResponse struct { + // A list of private link resources PrivateLinkResourceListResult } // SecretsClientCreateOrUpdateResponse contains the response from method SecretsClient.CreateOrUpdate. type SecretsClientCreateOrUpdateResponse struct { + // Resource information with extended details. Secret } // SecretsClientGetResponse contains the response from method SecretsClient.Get. type SecretsClientGetResponse struct { + // Resource information with extended details. Secret } // SecretsClientListResponse contains the response from method SecretsClient.NewListPager. type SecretsClientListResponse struct { + // List of secrets SecretListResult } // SecretsClientUpdateResponse contains the response from method SecretsClient.Update. type SecretsClientUpdateResponse struct { + // Resource information with extended details. Secret } // VaultsClientCheckNameAvailabilityResponse contains the response from method VaultsClient.CheckNameAvailability. type VaultsClientCheckNameAvailabilityResponse struct { + // The CheckNameAvailability operation response. CheckNameAvailabilityResult } // VaultsClientCreateOrUpdateResponse contains the response from method VaultsClient.BeginCreateOrUpdate. type VaultsClientCreateOrUpdateResponse struct { + // Resource information with extended details. Vault } @@ -216,31 +250,37 @@ type VaultsClientDeleteResponse struct { // VaultsClientGetDeletedResponse contains the response from method VaultsClient.GetDeleted. type VaultsClientGetDeletedResponse struct { + // Deleted vault information with extended details. DeletedVault } // VaultsClientGetResponse contains the response from method VaultsClient.Get. type VaultsClientGetResponse struct { + // Resource information with extended details. Vault } // VaultsClientListByResourceGroupResponse contains the response from method VaultsClient.NewListByResourceGroupPager. type VaultsClientListByResourceGroupResponse struct { + // List of vaults VaultListResult } // VaultsClientListBySubscriptionResponse contains the response from method VaultsClient.NewListBySubscriptionPager. type VaultsClientListBySubscriptionResponse struct { + // List of vaults VaultListResult } // VaultsClientListDeletedResponse contains the response from method VaultsClient.NewListDeletedPager. type VaultsClientListDeletedResponse struct { + // List of vaults DeletedVaultListResult } // VaultsClientListResponse contains the response from method VaultsClient.NewListPager. type VaultsClientListResponse struct { + // List of vault resources. ResourceListResult } @@ -251,10 +291,12 @@ type VaultsClientPurgeDeletedResponse struct { // VaultsClientUpdateAccessPolicyResponse contains the response from method VaultsClient.UpdateAccessPolicy. type VaultsClientUpdateAccessPolicyResponse struct { + // Parameters for updating the access policy in a vault VaultAccessPolicyParameters } // VaultsClientUpdateResponse contains the response from method VaultsClient.Update. type VaultsClientUpdateResponse struct { + // Resource information with extended details. Vault } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go index cf43971e..44928ce0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -35,7 +31,7 @@ type SecretsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecretsClient, error) { - cl, err := arm.NewClient(moduleName+".SecretsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -51,7 +47,7 @@ func NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, // with vault secrets. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - Name of the vault // - secretName - Name of the secret. The value you provide may be copied globally for the purpose of running the service. The @@ -59,22 +55,29 @@ func NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - Parameters to create or update the secret // - options - SecretsClientCreateOrUpdateOptions contains the optional parameters for the SecretsClient.CreateOrUpdate method. func (client *SecretsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, secretName string, parameters SecretCreateOrUpdateParameters, options *SecretsClientCreateOrUpdateOptions) (SecretsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SecretsClient.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, vaultName, secretName, parameters, options) if err != nil { return SecretsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SecretsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SecretsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *SecretsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, secretName string, parameters SecretCreateOrUpdateParameters, options *SecretsClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *SecretsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, secretName string, parameters SecretCreateOrUpdateParameters, _ *SecretsClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -97,10 +100,13 @@ func (client *SecretsClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -116,28 +122,35 @@ func (client *SecretsClient) createOrUpdateHandleResponse(resp *http.Response) ( // REST service for interaction with vault secrets. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - The name of the vault. // - secretName - The name of the secret. // - options - SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. func (client *SecretsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, secretName string, options *SecretsClientGetOptions) (SecretsClientGetResponse, error) { + var err error + const operationName = "SecretsClient.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, vaultName, secretName, options) if err != nil { return SecretsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecretsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecretsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *SecretsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, secretName string, options *SecretsClientGetOptions) (*policy.Request, error) { +func (client *SecretsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, secretName string, _ *SecretsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -160,7 +173,7 @@ func (client *SecretsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -179,7 +192,7 @@ func (client *SecretsClient) getHandleResponse(resp *http.Response) (SecretsClie // use in ARM deployments. Users should use the data-plane REST service for interaction with // vault secrets. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - The name of the vault. // - options - SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method. @@ -189,25 +202,20 @@ func (client *SecretsClient) NewListPager(resourceGroupName string, vaultName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SecretsClientListResponse) (SecretsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, vaultName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SecretsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecretsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, vaultName, options) + }, nil) if err != nil { return SecretsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecretsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -234,7 +242,7 @@ func (client *SecretsClient) listCreateRequest(ctx context.Context, resourceGrou if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -253,29 +261,36 @@ func (client *SecretsClient) listHandleResponse(resp *http.Response) (SecretsCli // Users should use the data-plane REST service for interaction with vault secrets. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - Name of the vault // - secretName - Name of the secret // - parameters - Parameters to patch the secret // - options - SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method. func (client *SecretsClient) Update(ctx context.Context, resourceGroupName string, vaultName string, secretName string, parameters SecretPatchParameters, options *SecretsClientUpdateOptions) (SecretsClientUpdateResponse, error) { + var err error + const operationName = "SecretsClient.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, vaultName, secretName, parameters, options) if err != nil { return SecretsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SecretsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SecretsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *SecretsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, secretName string, parameters SecretPatchParameters, options *SecretsClientUpdateOptions) (*policy.Request, error) { +func (client *SecretsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, secretName string, parameters SecretPatchParameters, _ *SecretsClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -298,10 +313,13 @@ func (client *SecretsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go index 6b109751..7a3e938b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -19,50 +15,77 @@ import ( "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 ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + 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 + `"` ) -// 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+)*"*$`) - -type timeRFC3339 time.Time +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON +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 *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + if len(data) == 0 { + return nil + } + 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 *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +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) { @@ -71,14 +94,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go index 56980588..522f81fa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -14,7 +10,6 @@ import ( "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "reflect" - "strings" "time" ) @@ -50,7 +45,7 @@ func populateTimeUnix(m map[string]any, k string, t *time.Time) { } func unpopulateTimeUnix(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 timeUnix diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go index b087a90a..45d07aa9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armkeyvault @@ -35,7 +31,7 @@ type VaultsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVaultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VaultsClient, error) { - cl, err := arm.NewClient(moduleName+".VaultsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,27 +45,34 @@ func NewVaultsClient(subscriptionID string, credential azcore.TokenCredential, o // CheckNameAvailability - Checks that the vault name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - vaultName - The name of the vault. // - options - VaultsClientCheckNameAvailabilityOptions contains the optional parameters for the VaultsClient.CheckNameAvailability // method. func (client *VaultsClient) CheckNameAvailability(ctx context.Context, vaultName VaultCheckNameAvailabilityParameters, options *VaultsClientCheckNameAvailabilityOptions) (VaultsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "VaultsClient.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, vaultName, options) if err != nil { return VaultsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VaultsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VaultsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. -func (client *VaultsClient) checkNameAvailabilityCreateRequest(ctx context.Context, vaultName VaultCheckNameAvailabilityParameters, options *VaultsClientCheckNameAvailabilityOptions) (*policy.Request, error) { +func (client *VaultsClient) checkNameAvailabilityCreateRequest(ctx context.Context, vaultName VaultCheckNameAvailabilityParameters, _ *VaultsClientCheckNameAvailabilityOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkNameAvailability" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -80,10 +83,13 @@ func (client *VaultsClient) checkNameAvailabilityCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vaultName) + if err := runtime.MarshalAsJSON(req, vaultName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -98,7 +104,7 @@ func (client *VaultsClient) checkNameAvailabilityHandleResponse(resp *http.Respo // BeginCreateOrUpdate - Create or update a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the Resource Group to which the server belongs. // - vaultName - Name of the vault // - parameters - Parameters to create or update the vault @@ -110,33 +116,44 @@ func (client *VaultsClient) BeginCreateOrUpdate(ctx context.Context, resourceGro if err != nil { return nil, err } - return runtime.NewPoller[VaultsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VaultsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VaultsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VaultsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create or update a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 func (client *VaultsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultCreateOrUpdateParameters, options *VaultsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VaultsClient.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, vaultName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VaultsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultCreateOrUpdateParameters, options *VaultsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *VaultsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultCreateOrUpdateParameters, _ *VaultsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -155,36 +172,45 @@ func (client *VaultsClient) createOrUpdateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Delete - Deletes the specified Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - The name of the vault to delete // - options - VaultsClientDeleteOptions contains the optional parameters for the VaultsClient.Delete method. func (client *VaultsClient) Delete(ctx context.Context, resourceGroupName string, vaultName string, options *VaultsClientDeleteOptions) (VaultsClientDeleteResponse, error) { + var err error + const operationName = "VaultsClient.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, vaultName, options) if err != nil { return VaultsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return VaultsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return VaultsClientDeleteResponse{}, err } return VaultsClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *VaultsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *VaultsClientDeleteOptions) (*policy.Request, error) { +func (client *VaultsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, _ *VaultsClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -203,7 +229,7 @@ func (client *VaultsClient) deleteCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -212,27 +238,34 @@ func (client *VaultsClient) deleteCreateRequest(ctx context.Context, resourceGro // Get - Gets the specified Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - The name of the vault. // - options - VaultsClientGetOptions contains the optional parameters for the VaultsClient.Get method. func (client *VaultsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, options *VaultsClientGetOptions) (VaultsClientGetResponse, error) { + var err error + const operationName = "VaultsClient.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, vaultName, options) if err != nil { return VaultsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VaultsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VaultsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *VaultsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *VaultsClientGetOptions) (*policy.Request, error) { +func (client *VaultsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, _ *VaultsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -251,7 +284,7 @@ func (client *VaultsClient) getCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -269,27 +302,34 @@ func (client *VaultsClient) getHandleResponse(resp *http.Response) (VaultsClient // GetDeleted - Gets the deleted Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - vaultName - The name of the vault. // - location - The location of the deleted vault. // - options - VaultsClientGetDeletedOptions contains the optional parameters for the VaultsClient.GetDeleted method. func (client *VaultsClient) GetDeleted(ctx context.Context, vaultName string, location string, options *VaultsClientGetDeletedOptions) (VaultsClientGetDeletedResponse, error) { + var err error + const operationName = "VaultsClient.GetDeleted" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDeletedCreateRequest(ctx, vaultName, location, options) if err != nil { return VaultsClientGetDeletedResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientGetDeletedResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VaultsClientGetDeletedResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VaultsClientGetDeletedResponse{}, err } - return client.getDeletedHandleResponse(resp) + resp, err := client.getDeletedHandleResponse(httpResp) + return resp, err } // getDeletedCreateRequest creates the GetDeleted request. -func (client *VaultsClient) getDeletedCreateRequest(ctx context.Context, vaultName string, location string, options *VaultsClientGetDeletedOptions) (*policy.Request, error) { +func (client *VaultsClient) getDeletedCreateRequest(ctx context.Context, vaultName string, location string, _ *VaultsClientGetDeletedOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}" if vaultName == "" { return nil, errors.New("parameter vaultName cannot be empty") @@ -308,7 +348,7 @@ func (client *VaultsClient) getDeletedCreateRequest(ctx context.Context, vaultNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -325,7 +365,7 @@ func (client *VaultsClient) getDeletedHandleResponse(resp *http.Response) (Vault // NewListPager - The List operation gets information about the vaults associated with the subscription. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - options - VaultsClientListOptions contains the optional parameters for the VaultsClient.NewListPager method. func (client *VaultsClient) NewListPager(options *VaultsClientListOptions) *runtime.Pager[VaultsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VaultsClientListResponse]{ @@ -333,25 +373,20 @@ func (client *VaultsClient) NewListPager(options *VaultsClientListOptions) *runt return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *VaultsClientListResponse) (VaultsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VaultsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VaultsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 VaultsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VaultsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -389,7 +424,7 @@ func (client *VaultsClient) listHandleResponse(resp *http.Response) (VaultsClien // NewListByResourceGroupPager - The List operation gets information about the vaults associated with the subscription and // within the specified resource group. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - options - VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.NewListByResourceGroupPager // method. @@ -399,25 +434,20 @@ func (client *VaultsClient) NewListByResourceGroupPager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *VaultsClientListByResourceGroupResponse) (VaultsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VaultsClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VaultsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 VaultsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VaultsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -440,7 +470,7 @@ func (client *VaultsClient) listByResourceGroupCreateRequest(ctx context.Context if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -457,7 +487,7 @@ func (client *VaultsClient) listByResourceGroupHandleResponse(resp *http.Respons // NewListBySubscriptionPager - The List operation gets information about the vaults associated with the subscription. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - options - VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.NewListBySubscriptionPager // method. func (client *VaultsClient) NewListBySubscriptionPager(options *VaultsClientListBySubscriptionOptions) *runtime.Pager[VaultsClientListBySubscriptionResponse] { @@ -466,25 +496,20 @@ func (client *VaultsClient) NewListBySubscriptionPager(options *VaultsClientList return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *VaultsClientListBySubscriptionResponse) (VaultsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VaultsClient.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 VaultsClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VaultsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VaultsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -503,7 +528,7 @@ func (client *VaultsClient) listBySubscriptionCreateRequest(ctx context.Context, if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -520,7 +545,7 @@ func (client *VaultsClient) listBySubscriptionHandleResponse(resp *http.Response // NewListDeletedPager - Gets information about the deleted vaults in a subscription. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - options - VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.NewListDeletedPager method. func (client *VaultsClient) NewListDeletedPager(options *VaultsClientListDeletedOptions) *runtime.Pager[VaultsClientListDeletedResponse] { return runtime.NewPager(runtime.PagingHandler[VaultsClientListDeletedResponse]{ @@ -528,30 +553,25 @@ func (client *VaultsClient) NewListDeletedPager(options *VaultsClientListDeleted return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *VaultsClientListDeletedResponse) (VaultsClientListDeletedResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listDeletedCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VaultsClient.NewListDeletedPager") + 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.listDeletedCreateRequest(ctx, options) + }, nil) if err != nil { return VaultsClientListDeletedResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VaultsClientListDeletedResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VaultsClientListDeletedResponse{}, runtime.NewResponseError(resp) - } return client.listDeletedHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listDeletedCreateRequest creates the ListDeleted request. -func (client *VaultsClient) listDeletedCreateRequest(ctx context.Context, options *VaultsClientListDeletedOptions) (*policy.Request, error) { +func (client *VaultsClient) listDeletedCreateRequest(ctx context.Context, _ *VaultsClientListDeletedOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedVaults" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -562,7 +582,7 @@ func (client *VaultsClient) listDeletedCreateRequest(ctx context.Context, option return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -580,7 +600,7 @@ func (client *VaultsClient) listDeletedHandleResponse(resp *http.Response) (Vaul // BeginPurgeDeleted - Permanently deletes the specified vault. aka Purges the deleted Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - vaultName - The name of the soft-deleted vault. // - location - The location of the soft-deleted vault. // - options - VaultsClientBeginPurgeDeletedOptions contains the optional parameters for the VaultsClient.BeginPurgeDeleted @@ -591,33 +611,44 @@ func (client *VaultsClient) BeginPurgeDeleted(ctx context.Context, vaultName str if err != nil { return nil, err } - return runtime.NewPoller[VaultsClientPurgeDeletedResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VaultsClientPurgeDeletedResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[VaultsClientPurgeDeletedResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VaultsClientPurgeDeletedResponse]{ + Tracer: client.internal.Tracer(), + }) } } // PurgeDeleted - Permanently deletes the specified vault. aka Purges the deleted Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 func (client *VaultsClient) purgeDeleted(ctx context.Context, vaultName string, location string, options *VaultsClientBeginPurgeDeletedOptions) (*http.Response, error) { + var err error + const operationName = "VaultsClient.BeginPurgeDeleted" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.purgeDeletedCreateRequest(ctx, vaultName, location, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // purgeDeletedCreateRequest creates the PurgeDeleted request. -func (client *VaultsClient) purgeDeletedCreateRequest(ctx context.Context, vaultName string, location string, options *VaultsClientBeginPurgeDeletedOptions) (*policy.Request, error) { +func (client *VaultsClient) purgeDeletedCreateRequest(ctx context.Context, vaultName string, location string, _ *VaultsClientBeginPurgeDeletedOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge" if vaultName == "" { return nil, errors.New("parameter vaultName cannot be empty") @@ -636,7 +667,7 @@ func (client *VaultsClient) purgeDeletedCreateRequest(ctx context.Context, vault return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -645,28 +676,35 @@ func (client *VaultsClient) purgeDeletedCreateRequest(ctx context.Context, vault // Update - Update a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the Resource Group to which the server belongs. // - vaultName - Name of the vault // - parameters - Parameters to patch the vault // - options - VaultsClientUpdateOptions contains the optional parameters for the VaultsClient.Update method. func (client *VaultsClient) Update(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultPatchParameters, options *VaultsClientUpdateOptions) (VaultsClientUpdateResponse, error) { + var err error + const operationName = "VaultsClient.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, vaultName, parameters, options) if err != nil { return VaultsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return VaultsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return VaultsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *VaultsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultPatchParameters, options *VaultsClientUpdateOptions) (*policy.Request, error) { +func (client *VaultsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultPatchParameters, _ *VaultsClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -685,10 +723,13 @@ func (client *VaultsClient) updateCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -703,7 +744,7 @@ func (client *VaultsClient) updateHandleResponse(resp *http.Response) (VaultsCli // UpdateAccessPolicy - Update access policies in a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - Name of the vault // - operationKind - Name of the operation @@ -711,22 +752,29 @@ func (client *VaultsClient) updateHandleResponse(resp *http.Response) (VaultsCli // - options - VaultsClientUpdateAccessPolicyOptions contains the optional parameters for the VaultsClient.UpdateAccessPolicy // method. func (client *VaultsClient) UpdateAccessPolicy(ctx context.Context, resourceGroupName string, vaultName string, operationKind AccessPolicyUpdateKind, parameters VaultAccessPolicyParameters, options *VaultsClientUpdateAccessPolicyOptions) (VaultsClientUpdateAccessPolicyResponse, error) { + var err error + const operationName = "VaultsClient.UpdateAccessPolicy" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateAccessPolicyCreateRequest(ctx, resourceGroupName, vaultName, operationKind, parameters, options) if err != nil { return VaultsClientUpdateAccessPolicyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientUpdateAccessPolicyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return VaultsClientUpdateAccessPolicyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return VaultsClientUpdateAccessPolicyResponse{}, err } - return client.updateAccessPolicyHandleResponse(resp) + resp, err := client.updateAccessPolicyHandleResponse(httpResp) + return resp, err } // updateAccessPolicyCreateRequest creates the UpdateAccessPolicy request. -func (client *VaultsClient) updateAccessPolicyCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, operationKind AccessPolicyUpdateKind, parameters VaultAccessPolicyParameters, options *VaultsClientUpdateAccessPolicyOptions) (*policy.Request, error) { +func (client *VaultsClient) updateAccessPolicyCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, operationKind AccessPolicyUpdateKind, parameters VaultAccessPolicyParameters, _ *VaultsClientUpdateAccessPolicyOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/accessPolicies/{operationKind}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -749,10 +797,13 @@ func (client *VaultsClient) updateAccessPolicyCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateAccessPolicyHandleResponse handles the UpdateAccessPolicy response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/CHANGELOG.md index bc149a64..31eb5df5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/CHANGELOG.md @@ -1,5 +1,11 @@ # 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/README.md index f92af31b..e972acef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewWorkflowsClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/assets.json new file mode 100644 index 00000000..c9e3987c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/logic/armlogic", + "Tag": "go/resourcemanager/logic/armlogic_dcd9a8859d" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/autorest.md index 83fd4837..9b1a958f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/autorest.md @@ -8,5 +8,5 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logic/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logic/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 +module-version: 1.2.0 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/client_factory.go index c3778600..58eca001 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -28,7 +27,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,137 +37,164 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewWorkflowsClient() *WorkflowsClient { - subClient, _ := NewWorkflowsClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationAccountAgreementsClient creates a new instance of IntegrationAccountAgreementsClient. +func (c *ClientFactory) NewIntegrationAccountAgreementsClient() *IntegrationAccountAgreementsClient { + subClient, _ := NewIntegrationAccountAgreementsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowVersionsClient() *WorkflowVersionsClient { - subClient, _ := NewWorkflowVersionsClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationAccountAssembliesClient creates a new instance of IntegrationAccountAssembliesClient. +func (c *ClientFactory) NewIntegrationAccountAssembliesClient() *IntegrationAccountAssembliesClient { + subClient, _ := NewIntegrationAccountAssembliesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowTriggersClient() *WorkflowTriggersClient { - subClient, _ := NewWorkflowTriggersClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationAccountBatchConfigurationsClient creates a new instance of IntegrationAccountBatchConfigurationsClient. +func (c *ClientFactory) NewIntegrationAccountBatchConfigurationsClient() *IntegrationAccountBatchConfigurationsClient { + subClient, _ := NewIntegrationAccountBatchConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowVersionTriggersClient() *WorkflowVersionTriggersClient { - subClient, _ := NewWorkflowVersionTriggersClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationAccountCertificatesClient creates a new instance of IntegrationAccountCertificatesClient. +func (c *ClientFactory) NewIntegrationAccountCertificatesClient() *IntegrationAccountCertificatesClient { + subClient, _ := NewIntegrationAccountCertificatesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowTriggerHistoriesClient() *WorkflowTriggerHistoriesClient { - subClient, _ := NewWorkflowTriggerHistoriesClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationAccountMapsClient creates a new instance of IntegrationAccountMapsClient. +func (c *ClientFactory) NewIntegrationAccountMapsClient() *IntegrationAccountMapsClient { + subClient, _ := NewIntegrationAccountMapsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowRunsClient() *WorkflowRunsClient { - subClient, _ := NewWorkflowRunsClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationAccountPartnersClient creates a new instance of IntegrationAccountPartnersClient. +func (c *ClientFactory) NewIntegrationAccountPartnersClient() *IntegrationAccountPartnersClient { + subClient, _ := NewIntegrationAccountPartnersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowRunActionsClient() *WorkflowRunActionsClient { - subClient, _ := NewWorkflowRunActionsClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationAccountSchemasClient creates a new instance of IntegrationAccountSchemasClient. +func (c *ClientFactory) NewIntegrationAccountSchemasClient() *IntegrationAccountSchemasClient { + subClient, _ := NewIntegrationAccountSchemasClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowRunActionRepetitionsClient() *WorkflowRunActionRepetitionsClient { - subClient, _ := NewWorkflowRunActionRepetitionsClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationAccountSessionsClient creates a new instance of IntegrationAccountSessionsClient. +func (c *ClientFactory) NewIntegrationAccountSessionsClient() *IntegrationAccountSessionsClient { + subClient, _ := NewIntegrationAccountSessionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowRunActionRepetitionsRequestHistoriesClient() *WorkflowRunActionRepetitionsRequestHistoriesClient { - subClient, _ := NewWorkflowRunActionRepetitionsRequestHistoriesClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationAccountsClient creates a new instance of IntegrationAccountsClient. +func (c *ClientFactory) NewIntegrationAccountsClient() *IntegrationAccountsClient { + subClient, _ := NewIntegrationAccountsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowRunActionRequestHistoriesClient() *WorkflowRunActionRequestHistoriesClient { - subClient, _ := NewWorkflowRunActionRequestHistoriesClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationServiceEnvironmentManagedAPIOperationsClient creates a new instance of IntegrationServiceEnvironmentManagedAPIOperationsClient. +func (c *ClientFactory) NewIntegrationServiceEnvironmentManagedAPIOperationsClient() *IntegrationServiceEnvironmentManagedAPIOperationsClient { + subClient, _ := NewIntegrationServiceEnvironmentManagedAPIOperationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowRunActionScopeRepetitionsClient() *WorkflowRunActionScopeRepetitionsClient { - subClient, _ := NewWorkflowRunActionScopeRepetitionsClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationServiceEnvironmentManagedApisClient creates a new instance of IntegrationServiceEnvironmentManagedApisClient. +func (c *ClientFactory) NewIntegrationServiceEnvironmentManagedApisClient() *IntegrationServiceEnvironmentManagedApisClient { + subClient, _ := NewIntegrationServiceEnvironmentManagedApisClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowRunOperationsClient() *WorkflowRunOperationsClient { - subClient, _ := NewWorkflowRunOperationsClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationServiceEnvironmentNetworkHealthClient creates a new instance of IntegrationServiceEnvironmentNetworkHealthClient. +func (c *ClientFactory) NewIntegrationServiceEnvironmentNetworkHealthClient() *IntegrationServiceEnvironmentNetworkHealthClient { + subClient, _ := NewIntegrationServiceEnvironmentNetworkHealthClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationAccountsClient() *IntegrationAccountsClient { - subClient, _ := NewIntegrationAccountsClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationServiceEnvironmentSKUsClient creates a new instance of IntegrationServiceEnvironmentSKUsClient. +func (c *ClientFactory) NewIntegrationServiceEnvironmentSKUsClient() *IntegrationServiceEnvironmentSKUsClient { + subClient, _ := NewIntegrationServiceEnvironmentSKUsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationAccountAssembliesClient() *IntegrationAccountAssembliesClient { - subClient, _ := NewIntegrationAccountAssembliesClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationServiceEnvironmentsClient creates a new instance of IntegrationServiceEnvironmentsClient. +func (c *ClientFactory) NewIntegrationServiceEnvironmentsClient() *IntegrationServiceEnvironmentsClient { + subClient, _ := NewIntegrationServiceEnvironmentsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationAccountBatchConfigurationsClient() *IntegrationAccountBatchConfigurationsClient { - subClient, _ := NewIntegrationAccountBatchConfigurationsClient(c.subscriptionID, c.credential, c.options) +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationAccountSchemasClient() *IntegrationAccountSchemasClient { - subClient, _ := NewIntegrationAccountSchemasClient(c.subscriptionID, c.credential, c.options) +// NewWorkflowRunActionRepetitionsClient creates a new instance of WorkflowRunActionRepetitionsClient. +func (c *ClientFactory) NewWorkflowRunActionRepetitionsClient() *WorkflowRunActionRepetitionsClient { + subClient, _ := NewWorkflowRunActionRepetitionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationAccountMapsClient() *IntegrationAccountMapsClient { - subClient, _ := NewIntegrationAccountMapsClient(c.subscriptionID, c.credential, c.options) +// NewWorkflowRunActionRepetitionsRequestHistoriesClient creates a new instance of WorkflowRunActionRepetitionsRequestHistoriesClient. +func (c *ClientFactory) NewWorkflowRunActionRepetitionsRequestHistoriesClient() *WorkflowRunActionRepetitionsRequestHistoriesClient { + subClient, _ := NewWorkflowRunActionRepetitionsRequestHistoriesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationAccountPartnersClient() *IntegrationAccountPartnersClient { - subClient, _ := NewIntegrationAccountPartnersClient(c.subscriptionID, c.credential, c.options) +// NewWorkflowRunActionRequestHistoriesClient creates a new instance of WorkflowRunActionRequestHistoriesClient. +func (c *ClientFactory) NewWorkflowRunActionRequestHistoriesClient() *WorkflowRunActionRequestHistoriesClient { + subClient, _ := NewWorkflowRunActionRequestHistoriesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationAccountAgreementsClient() *IntegrationAccountAgreementsClient { - subClient, _ := NewIntegrationAccountAgreementsClient(c.subscriptionID, c.credential, c.options) +// NewWorkflowRunActionScopeRepetitionsClient creates a new instance of WorkflowRunActionScopeRepetitionsClient. +func (c *ClientFactory) NewWorkflowRunActionScopeRepetitionsClient() *WorkflowRunActionScopeRepetitionsClient { + subClient, _ := NewWorkflowRunActionScopeRepetitionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationAccountCertificatesClient() *IntegrationAccountCertificatesClient { - subClient, _ := NewIntegrationAccountCertificatesClient(c.subscriptionID, c.credential, c.options) +// NewWorkflowRunActionsClient creates a new instance of WorkflowRunActionsClient. +func (c *ClientFactory) NewWorkflowRunActionsClient() *WorkflowRunActionsClient { + subClient, _ := NewWorkflowRunActionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationAccountSessionsClient() *IntegrationAccountSessionsClient { - subClient, _ := NewIntegrationAccountSessionsClient(c.subscriptionID, c.credential, c.options) +// NewWorkflowRunOperationsClient creates a new instance of WorkflowRunOperationsClient. +func (c *ClientFactory) NewWorkflowRunOperationsClient() *WorkflowRunOperationsClient { + subClient, _ := NewWorkflowRunOperationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationServiceEnvironmentsClient() *IntegrationServiceEnvironmentsClient { - subClient, _ := NewIntegrationServiceEnvironmentsClient(c.subscriptionID, c.credential, c.options) +// NewWorkflowRunsClient creates a new instance of WorkflowRunsClient. +func (c *ClientFactory) NewWorkflowRunsClient() *WorkflowRunsClient { + subClient, _ := NewWorkflowRunsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationServiceEnvironmentSKUsClient() *IntegrationServiceEnvironmentSKUsClient { - subClient, _ := NewIntegrationServiceEnvironmentSKUsClient(c.subscriptionID, c.credential, c.options) +// NewWorkflowTriggerHistoriesClient creates a new instance of WorkflowTriggerHistoriesClient. +func (c *ClientFactory) NewWorkflowTriggerHistoriesClient() *WorkflowTriggerHistoriesClient { + subClient, _ := NewWorkflowTriggerHistoriesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationServiceEnvironmentNetworkHealthClient() *IntegrationServiceEnvironmentNetworkHealthClient { - subClient, _ := NewIntegrationServiceEnvironmentNetworkHealthClient(c.subscriptionID, c.credential, c.options) +// NewWorkflowTriggersClient creates a new instance of WorkflowTriggersClient. +func (c *ClientFactory) NewWorkflowTriggersClient() *WorkflowTriggersClient { + subClient, _ := NewWorkflowTriggersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationServiceEnvironmentManagedApisClient() *IntegrationServiceEnvironmentManagedApisClient { - subClient, _ := NewIntegrationServiceEnvironmentManagedApisClient(c.subscriptionID, c.credential, c.options) +// NewWorkflowVersionTriggersClient creates a new instance of WorkflowVersionTriggersClient. +func (c *ClientFactory) NewWorkflowVersionTriggersClient() *WorkflowVersionTriggersClient { + subClient, _ := NewWorkflowVersionTriggersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationServiceEnvironmentManagedAPIOperationsClient() *IntegrationServiceEnvironmentManagedAPIOperationsClient { - subClient, _ := NewIntegrationServiceEnvironmentManagedAPIOperationsClient(c.subscriptionID, c.credential, c.options) +// NewWorkflowVersionsClient creates a new instance of WorkflowVersionsClient. +func (c *ClientFactory) NewWorkflowVersionsClient() *WorkflowVersionsClient { + subClient, _ := NewWorkflowVersionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +// NewWorkflowsClient creates a new instance of WorkflowsClient. +func (c *ClientFactory) NewWorkflowsClient() *WorkflowsClient { + subClient, _ := NewWorkflowsClient(c.subscriptionID, c.credential, c.options) return subClient } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/constants.go index a4322b22..569db13f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic const ( - moduleName = "armlogic" - moduleVersion = "v1.1.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic" + moduleVersion = "v1.2.0" ) // APIDeploymentParameterVisibility - The Api deployment parameter visibility. @@ -73,19 +72,19 @@ func PossibleAPITypeValues() []APIType { type AgreementType string const ( - AgreementTypeNotSpecified AgreementType = "NotSpecified" AgreementTypeAS2 AgreementType = "AS2" - AgreementTypeX12 AgreementType = "X12" AgreementTypeEdifact AgreementType = "Edifact" + AgreementTypeNotSpecified AgreementType = "NotSpecified" + AgreementTypeX12 AgreementType = "X12" ) // PossibleAgreementTypeValues returns the possible values for the AgreementType const type. func PossibleAgreementTypeValues() []AgreementType { return []AgreementType{ - AgreementTypeNotSpecified, AgreementTypeAS2, - AgreementTypeX12, AgreementTypeEdifact, + AgreementTypeNotSpecified, + AgreementTypeX12, } } @@ -113,50 +112,50 @@ func PossibleAzureAsyncOperationStateValues() []AzureAsyncOperationState { type DayOfWeek string const ( - DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekFriday DayOfWeek = "Friday" DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekSaturday DayOfWeek = "Saturday" + DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekThursday DayOfWeek = "Thursday" DayOfWeekTuesday DayOfWeek = "Tuesday" DayOfWeekWednesday DayOfWeek = "Wednesday" - DayOfWeekThursday DayOfWeek = "Thursday" - DayOfWeekFriday DayOfWeek = "Friday" - DayOfWeekSaturday DayOfWeek = "Saturday" ) // PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type. func PossibleDayOfWeekValues() []DayOfWeek { return []DayOfWeek{ - DayOfWeekSunday, + DayOfWeekFriday, DayOfWeekMonday, + DayOfWeekSaturday, + DayOfWeekSunday, + DayOfWeekThursday, DayOfWeekTuesday, DayOfWeekWednesday, - DayOfWeekThursday, - DayOfWeekFriday, - DayOfWeekSaturday, } } type DaysOfWeek string const ( - DaysOfWeekSunday DaysOfWeek = "Sunday" + DaysOfWeekFriday DaysOfWeek = "Friday" DaysOfWeekMonday DaysOfWeek = "Monday" + DaysOfWeekSaturday DaysOfWeek = "Saturday" + DaysOfWeekSunday DaysOfWeek = "Sunday" + DaysOfWeekThursday DaysOfWeek = "Thursday" DaysOfWeekTuesday DaysOfWeek = "Tuesday" DaysOfWeekWednesday DaysOfWeek = "Wednesday" - DaysOfWeekThursday DaysOfWeek = "Thursday" - DaysOfWeekFriday DaysOfWeek = "Friday" - DaysOfWeekSaturday DaysOfWeek = "Saturday" ) // PossibleDaysOfWeekValues returns the possible values for the DaysOfWeek const type. func PossibleDaysOfWeekValues() []DaysOfWeek { return []DaysOfWeek{ - DaysOfWeekSunday, + DaysOfWeekFriday, DaysOfWeekMonday, + DaysOfWeekSaturday, + DaysOfWeekSunday, + DaysOfWeekThursday, DaysOfWeekTuesday, DaysOfWeekWednesday, - DaysOfWeekThursday, - DaysOfWeekFriday, - DaysOfWeekSaturday, } } @@ -206,17 +205,17 @@ func PossibleEdifactCharacterSetValues() []EdifactCharacterSet { type EdifactDecimalIndicator string const ( - EdifactDecimalIndicatorNotSpecified EdifactDecimalIndicator = "NotSpecified" EdifactDecimalIndicatorComma EdifactDecimalIndicator = "Comma" EdifactDecimalIndicatorDecimal EdifactDecimalIndicator = "Decimal" + EdifactDecimalIndicatorNotSpecified EdifactDecimalIndicator = "NotSpecified" ) // PossibleEdifactDecimalIndicatorValues returns the possible values for the EdifactDecimalIndicator const type. func PossibleEdifactDecimalIndicatorValues() []EdifactDecimalIndicator { return []EdifactDecimalIndicator{ - EdifactDecimalIndicatorNotSpecified, EdifactDecimalIndicatorComma, EdifactDecimalIndicatorDecimal, + EdifactDecimalIndicatorNotSpecified, } } @@ -270,23 +269,23 @@ func PossibleErrorResponseCodeValues() []ErrorResponseCode { type EventLevel string const ( - EventLevelLogAlways EventLevel = "LogAlways" EventLevelCritical EventLevel = "Critical" EventLevelError EventLevel = "Error" - EventLevelWarning EventLevel = "Warning" EventLevelInformational EventLevel = "Informational" + EventLevelLogAlways EventLevel = "LogAlways" EventLevelVerbose EventLevel = "Verbose" + EventLevelWarning EventLevel = "Warning" ) // PossibleEventLevelValues returns the possible values for the EventLevel const type. func PossibleEventLevelValues() []EventLevel { return []EventLevel{ - EventLevelLogAlways, EventLevelCritical, EventLevelError, - EventLevelWarning, EventLevelInformational, + EventLevelLogAlways, EventLevelVerbose, + EventLevelWarning, } } @@ -678,21 +677,21 @@ func PossibleSchemaTypeValues() []SchemaType { type SegmentTerminatorSuffix string const ( - SegmentTerminatorSuffixNotSpecified SegmentTerminatorSuffix = "NotSpecified" - SegmentTerminatorSuffixNone SegmentTerminatorSuffix = "None" SegmentTerminatorSuffixCR SegmentTerminatorSuffix = "CR" - SegmentTerminatorSuffixLF SegmentTerminatorSuffix = "LF" SegmentTerminatorSuffixCRLF SegmentTerminatorSuffix = "CRLF" + SegmentTerminatorSuffixLF SegmentTerminatorSuffix = "LF" + SegmentTerminatorSuffixNone SegmentTerminatorSuffix = "None" + SegmentTerminatorSuffixNotSpecified SegmentTerminatorSuffix = "NotSpecified" ) // PossibleSegmentTerminatorSuffixValues returns the possible values for the SegmentTerminatorSuffix const type. func PossibleSegmentTerminatorSuffixValues() []SegmentTerminatorSuffix { return []SegmentTerminatorSuffix{ - SegmentTerminatorSuffixNotSpecified, - SegmentTerminatorSuffixNone, SegmentTerminatorSuffixCR, - SegmentTerminatorSuffixLF, SegmentTerminatorSuffixCRLF, + SegmentTerminatorSuffixLF, + SegmentTerminatorSuffixNone, + SegmentTerminatorSuffixNotSpecified, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountagreements_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountagreements_client.go index 7b6f3cf2..4300c786 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountagreements_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountagreements_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type IntegrationAccountAgreementsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationAccountAgreementsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationAccountAgreementsClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationAccountAgreementsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewIntegrationAccountAgreementsClient(subscriptionID string, credential azc // - options - IntegrationAccountAgreementsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountAgreementsClient.CreateOrUpdate // method. func (client *IntegrationAccountAgreementsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, agreement IntegrationAccountAgreement, options *IntegrationAccountAgreementsClientCreateOrUpdateOptions) (IntegrationAccountAgreementsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IntegrationAccountAgreementsClient.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, integrationAccountName, agreementName, agreement, options) if err != nil { return IntegrationAccountAgreementsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountAgreementsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return IntegrationAccountAgreementsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountAgreementsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *IntegrationAccountAgreementsClient) createOrUpdateCreateRequest(ct reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, agreement) + if err := runtime.MarshalAsJSON(req, agreement); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,16 +128,22 @@ func (client *IntegrationAccountAgreementsClient) createOrUpdateHandleResponse(r // - options - IntegrationAccountAgreementsClientDeleteOptions contains the optional parameters for the IntegrationAccountAgreementsClient.Delete // method. func (client *IntegrationAccountAgreementsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, options *IntegrationAccountAgreementsClientDeleteOptions) (IntegrationAccountAgreementsClientDeleteResponse, error) { + var err error + const operationName = "IntegrationAccountAgreementsClient.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, integrationAccountName, agreementName, options) if err != nil { return IntegrationAccountAgreementsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountAgreementsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IntegrationAccountAgreementsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountAgreementsClientDeleteResponse{}, err } return IntegrationAccountAgreementsClientDeleteResponse{}, nil } @@ -173,18 +188,25 @@ func (client *IntegrationAccountAgreementsClient) deleteCreateRequest(ctx contex // - options - IntegrationAccountAgreementsClientGetOptions contains the optional parameters for the IntegrationAccountAgreementsClient.Get // method. func (client *IntegrationAccountAgreementsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, options *IntegrationAccountAgreementsClientGetOptions) (IntegrationAccountAgreementsClientGetResponse, error) { + var err error + const operationName = "IntegrationAccountAgreementsClient.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, integrationAccountName, agreementName, options) if err != nil { return IntegrationAccountAgreementsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountAgreementsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountAgreementsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountAgreementsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -239,25 +261,20 @@ func (client *IntegrationAccountAgreementsClient) NewListPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationAccountAgreementsClientListResponse) (IntegrationAccountAgreementsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, integrationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IntegrationAccountAgreementsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationAccountAgreementsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, integrationAccountName, options) + }, nil) if err != nil { return IntegrationAccountAgreementsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountAgreementsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -312,18 +329,25 @@ func (client *IntegrationAccountAgreementsClient) listHandleResponse(resp *http. // - options - IntegrationAccountAgreementsClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountAgreementsClient.ListContentCallbackURL // method. func (client *IntegrationAccountAgreementsClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, listContentCallbackURL GetCallbackURLParameters, options *IntegrationAccountAgreementsClientListContentCallbackURLOptions) (IntegrationAccountAgreementsClientListContentCallbackURLResponse, error) { + var err error + const operationName = "IntegrationAccountAgreementsClient.ListContentCallbackURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listContentCallbackURLCreateRequest(ctx, resourceGroupName, integrationAccountName, agreementName, listContentCallbackURL, options) if err != nil { return IntegrationAccountAgreementsClientListContentCallbackURLResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountAgreementsClientListContentCallbackURLResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountAgreementsClientListContentCallbackURLResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountAgreementsClientListContentCallbackURLResponse{}, err } - return client.listContentCallbackURLHandleResponse(resp) + resp, err := client.listContentCallbackURLHandleResponse(httpResp) + return resp, err } // listContentCallbackURLCreateRequest creates the ListContentCallbackURL request. @@ -353,7 +377,10 @@ func (client *IntegrationAccountAgreementsClient) listContentCallbackURLCreateRe reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, listContentCallbackURL) + if err := runtime.MarshalAsJSON(req, listContentCallbackURL); err != nil { + return nil, err + } + return req, nil } // listContentCallbackURLHandleResponse handles the ListContentCallbackURL response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountassemblies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountassemblies_client.go index ab084301..20a398f4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountassemblies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountassemblies_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -33,7 +32,7 @@ type IntegrationAccountAssembliesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationAccountAssembliesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationAccountAssembliesClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationAccountAssembliesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewIntegrationAccountAssembliesClient(subscriptionID string, credential azc // - options - IntegrationAccountAssembliesClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountAssembliesClient.CreateOrUpdate // method. func (client *IntegrationAccountAssembliesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string, assemblyArtifact AssemblyDefinition, options *IntegrationAccountAssembliesClientCreateOrUpdateOptions) (IntegrationAccountAssembliesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IntegrationAccountAssembliesClient.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, integrationAccountName, assemblyArtifactName, assemblyArtifact, options) if err != nil { return IntegrationAccountAssembliesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountAssembliesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return IntegrationAccountAssembliesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountAssembliesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *IntegrationAccountAssembliesClient) createOrUpdateCreateRequest(ct reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, assemblyArtifact) + if err := runtime.MarshalAsJSON(req, assemblyArtifact); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *IntegrationAccountAssembliesClient) createOrUpdateHandleResponse(r // - options - IntegrationAccountAssembliesClientDeleteOptions contains the optional parameters for the IntegrationAccountAssembliesClient.Delete // method. func (client *IntegrationAccountAssembliesClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string, options *IntegrationAccountAssembliesClientDeleteOptions) (IntegrationAccountAssembliesClientDeleteResponse, error) { + var err error + const operationName = "IntegrationAccountAssembliesClient.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, integrationAccountName, assemblyArtifactName, options) if err != nil { return IntegrationAccountAssembliesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountAssembliesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IntegrationAccountAssembliesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountAssembliesClientDeleteResponse{}, err } return IntegrationAccountAssembliesClientDeleteResponse{}, nil } @@ -172,18 +187,25 @@ func (client *IntegrationAccountAssembliesClient) deleteCreateRequest(ctx contex // - options - IntegrationAccountAssembliesClientGetOptions contains the optional parameters for the IntegrationAccountAssembliesClient.Get // method. func (client *IntegrationAccountAssembliesClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string, options *IntegrationAccountAssembliesClientGetOptions) (IntegrationAccountAssembliesClientGetResponse, error) { + var err error + const operationName = "IntegrationAccountAssembliesClient.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, integrationAccountName, assemblyArtifactName, options) if err != nil { return IntegrationAccountAssembliesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountAssembliesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountAssembliesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountAssembliesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -238,6 +260,7 @@ func (client *IntegrationAccountAssembliesClient) NewListPager(resourceGroupName return false }, Fetcher: func(ctx context.Context, page *IntegrationAccountAssembliesClientListResponse) (IntegrationAccountAssembliesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationAccountAssembliesClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, integrationAccountName, options) if err != nil { return IntegrationAccountAssembliesClientListResponse{}, err @@ -251,6 +274,7 @@ func (client *IntegrationAccountAssembliesClient) NewListPager(resourceGroupName } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -299,18 +323,25 @@ func (client *IntegrationAccountAssembliesClient) listHandleResponse(resp *http. // - options - IntegrationAccountAssembliesClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountAssembliesClient.ListContentCallbackURL // method. func (client *IntegrationAccountAssembliesClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string, options *IntegrationAccountAssembliesClientListContentCallbackURLOptions) (IntegrationAccountAssembliesClientListContentCallbackURLResponse, error) { + var err error + const operationName = "IntegrationAccountAssembliesClient.ListContentCallbackURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listContentCallbackURLCreateRequest(ctx, resourceGroupName, integrationAccountName, assemblyArtifactName, options) if err != nil { return IntegrationAccountAssembliesClientListContentCallbackURLResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountAssembliesClientListContentCallbackURLResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountAssembliesClientListContentCallbackURLResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountAssembliesClientListContentCallbackURLResponse{}, err } - return client.listContentCallbackURLHandleResponse(resp) + resp, err := client.listContentCallbackURLHandleResponse(httpResp) + return resp, err } // listContentCallbackURLCreateRequest creates the ListContentCallbackURL request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountbatchconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountbatchconfigurations_client.go index c3e5af4e..2bd97f6c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountbatchconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountbatchconfigurations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -33,7 +32,7 @@ type IntegrationAccountBatchConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationAccountBatchConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationAccountBatchConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationAccountBatchConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewIntegrationAccountBatchConfigurationsClient(subscriptionID string, crede // - options - IntegrationAccountBatchConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountBatchConfigurationsClient.CreateOrUpdate // method. func (client *IntegrationAccountBatchConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string, batchConfiguration BatchConfiguration, options *IntegrationAccountBatchConfigurationsClientCreateOrUpdateOptions) (IntegrationAccountBatchConfigurationsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IntegrationAccountBatchConfigurationsClient.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, integrationAccountName, batchConfigurationName, batchConfiguration, options) if err != nil { return IntegrationAccountBatchConfigurationsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountBatchConfigurationsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return IntegrationAccountBatchConfigurationsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountBatchConfigurationsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *IntegrationAccountBatchConfigurationsClient) createOrUpdateCreateR reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, batchConfiguration) + if err := runtime.MarshalAsJSON(req, batchConfiguration); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *IntegrationAccountBatchConfigurationsClient) createOrUpdateHandleR // - options - IntegrationAccountBatchConfigurationsClientDeleteOptions contains the optional parameters for the IntegrationAccountBatchConfigurationsClient.Delete // method. func (client *IntegrationAccountBatchConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string, options *IntegrationAccountBatchConfigurationsClientDeleteOptions) (IntegrationAccountBatchConfigurationsClientDeleteResponse, error) { + var err error + const operationName = "IntegrationAccountBatchConfigurationsClient.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, integrationAccountName, batchConfigurationName, options) if err != nil { return IntegrationAccountBatchConfigurationsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountBatchConfigurationsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IntegrationAccountBatchConfigurationsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountBatchConfigurationsClientDeleteResponse{}, err } return IntegrationAccountBatchConfigurationsClientDeleteResponse{}, nil } @@ -172,18 +187,25 @@ func (client *IntegrationAccountBatchConfigurationsClient) deleteCreateRequest(c // - options - IntegrationAccountBatchConfigurationsClientGetOptions contains the optional parameters for the IntegrationAccountBatchConfigurationsClient.Get // method. func (client *IntegrationAccountBatchConfigurationsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string, options *IntegrationAccountBatchConfigurationsClientGetOptions) (IntegrationAccountBatchConfigurationsClientGetResponse, error) { + var err error + const operationName = "IntegrationAccountBatchConfigurationsClient.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, integrationAccountName, batchConfigurationName, options) if err != nil { return IntegrationAccountBatchConfigurationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountBatchConfigurationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountBatchConfigurationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountBatchConfigurationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -238,6 +260,7 @@ func (client *IntegrationAccountBatchConfigurationsClient) NewListPager(resource return false }, Fetcher: func(ctx context.Context, page *IntegrationAccountBatchConfigurationsClientListResponse) (IntegrationAccountBatchConfigurationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationAccountBatchConfigurationsClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, integrationAccountName, options) if err != nil { return IntegrationAccountBatchConfigurationsClientListResponse{}, err @@ -251,6 +274,7 @@ func (client *IntegrationAccountBatchConfigurationsClient) NewListPager(resource } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountcertificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountcertificates_client.go index e28f98f4..9819ac02 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountcertificates_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountcertificates_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type IntegrationAccountCertificatesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationAccountCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationAccountCertificatesClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationAccountCertificatesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewIntegrationAccountCertificatesClient(subscriptionID string, credential a // - options - IntegrationAccountCertificatesClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountCertificatesClient.CreateOrUpdate // method. func (client *IntegrationAccountCertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string, certificate IntegrationAccountCertificate, options *IntegrationAccountCertificatesClientCreateOrUpdateOptions) (IntegrationAccountCertificatesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IntegrationAccountCertificatesClient.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, integrationAccountName, certificateName, certificate, options) if err != nil { return IntegrationAccountCertificatesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountCertificatesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return IntegrationAccountCertificatesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountCertificatesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *IntegrationAccountCertificatesClient) createOrUpdateCreateRequest( reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificate) + if err := runtime.MarshalAsJSON(req, certificate); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,16 +128,22 @@ func (client *IntegrationAccountCertificatesClient) createOrUpdateHandleResponse // - options - IntegrationAccountCertificatesClientDeleteOptions contains the optional parameters for the IntegrationAccountCertificatesClient.Delete // method. func (client *IntegrationAccountCertificatesClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string, options *IntegrationAccountCertificatesClientDeleteOptions) (IntegrationAccountCertificatesClientDeleteResponse, error) { + var err error + const operationName = "IntegrationAccountCertificatesClient.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, integrationAccountName, certificateName, options) if err != nil { return IntegrationAccountCertificatesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountCertificatesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IntegrationAccountCertificatesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountCertificatesClientDeleteResponse{}, err } return IntegrationAccountCertificatesClientDeleteResponse{}, nil } @@ -173,18 +188,25 @@ func (client *IntegrationAccountCertificatesClient) deleteCreateRequest(ctx cont // - options - IntegrationAccountCertificatesClientGetOptions contains the optional parameters for the IntegrationAccountCertificatesClient.Get // method. func (client *IntegrationAccountCertificatesClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string, options *IntegrationAccountCertificatesClientGetOptions) (IntegrationAccountCertificatesClientGetResponse, error) { + var err error + const operationName = "IntegrationAccountCertificatesClient.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, integrationAccountName, certificateName, options) if err != nil { return IntegrationAccountCertificatesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountCertificatesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountCertificatesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountCertificatesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -239,25 +261,20 @@ func (client *IntegrationAccountCertificatesClient) NewListPager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationAccountCertificatesClientListResponse) (IntegrationAccountCertificatesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, integrationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationAccountCertificatesClient.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, integrationAccountName, options) + }, nil) if err != nil { return IntegrationAccountCertificatesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IntegrationAccountCertificatesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountCertificatesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountmaps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountmaps_client.go index f34de6c0..e0bc3461 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountmaps_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountmaps_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type IntegrationAccountMapsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationAccountMapsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationAccountMapsClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationAccountMapsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,18 +57,25 @@ func NewIntegrationAccountMapsClient(subscriptionID string, credential azcore.To // - options - IntegrationAccountMapsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountMapsClient.CreateOrUpdate // method. func (client *IntegrationAccountMapsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, mapParam IntegrationAccountMap, options *IntegrationAccountMapsClientCreateOrUpdateOptions) (IntegrationAccountMapsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IntegrationAccountMapsClient.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, integrationAccountName, mapName, mapParam, options) if err != nil { return IntegrationAccountMapsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountMapsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return IntegrationAccountMapsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountMapsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -99,7 +105,10 @@ func (client *IntegrationAccountMapsClient) createOrUpdateCreateRequest(ctx cont reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, mapParam) + if err := runtime.MarshalAsJSON(req, mapParam); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -121,16 +130,22 @@ func (client *IntegrationAccountMapsClient) createOrUpdateHandleResponse(resp *h // - options - IntegrationAccountMapsClientDeleteOptions contains the optional parameters for the IntegrationAccountMapsClient.Delete // method. func (client *IntegrationAccountMapsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, options *IntegrationAccountMapsClientDeleteOptions) (IntegrationAccountMapsClientDeleteResponse, error) { + var err error + const operationName = "IntegrationAccountMapsClient.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, integrationAccountName, mapName, options) if err != nil { return IntegrationAccountMapsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountMapsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IntegrationAccountMapsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountMapsClientDeleteResponse{}, err } return IntegrationAccountMapsClientDeleteResponse{}, nil } @@ -175,18 +190,25 @@ func (client *IntegrationAccountMapsClient) deleteCreateRequest(ctx context.Cont // - options - IntegrationAccountMapsClientGetOptions contains the optional parameters for the IntegrationAccountMapsClient.Get // method. func (client *IntegrationAccountMapsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, options *IntegrationAccountMapsClientGetOptions) (IntegrationAccountMapsClientGetResponse, error) { + var err error + const operationName = "IntegrationAccountMapsClient.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, integrationAccountName, mapName, options) if err != nil { return IntegrationAccountMapsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountMapsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountMapsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountMapsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -241,25 +263,20 @@ func (client *IntegrationAccountMapsClient) NewListPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationAccountMapsClientListResponse) (IntegrationAccountMapsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, integrationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IntegrationAccountMapsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationAccountMapsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, integrationAccountName, options) + }, nil) if err != nil { return IntegrationAccountMapsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountMapsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -314,18 +331,25 @@ func (client *IntegrationAccountMapsClient) listHandleResponse(resp *http.Respon // - options - IntegrationAccountMapsClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountMapsClient.ListContentCallbackURL // method. func (client *IntegrationAccountMapsClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, listContentCallbackURL GetCallbackURLParameters, options *IntegrationAccountMapsClientListContentCallbackURLOptions) (IntegrationAccountMapsClientListContentCallbackURLResponse, error) { + var err error + const operationName = "IntegrationAccountMapsClient.ListContentCallbackURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listContentCallbackURLCreateRequest(ctx, resourceGroupName, integrationAccountName, mapName, listContentCallbackURL, options) if err != nil { return IntegrationAccountMapsClientListContentCallbackURLResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountMapsClientListContentCallbackURLResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountMapsClientListContentCallbackURLResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountMapsClientListContentCallbackURLResponse{}, err } - return client.listContentCallbackURLHandleResponse(resp) + resp, err := client.listContentCallbackURLHandleResponse(httpResp) + return resp, err } // listContentCallbackURLCreateRequest creates the ListContentCallbackURL request. @@ -355,7 +379,10 @@ func (client *IntegrationAccountMapsClient) listContentCallbackURLCreateRequest( reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, listContentCallbackURL) + if err := runtime.MarshalAsJSON(req, listContentCallbackURL); err != nil { + return nil, err + } + return req, nil } // listContentCallbackURLHandleResponse handles the ListContentCallbackURL response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountpartners_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountpartners_client.go index 6e731d63..00f2145d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountpartners_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountpartners_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type IntegrationAccountPartnersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationAccountPartnersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationAccountPartnersClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationAccountPartnersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewIntegrationAccountPartnersClient(subscriptionID string, credential azcor // - options - IntegrationAccountPartnersClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountPartnersClient.CreateOrUpdate // method. func (client *IntegrationAccountPartnersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, partner IntegrationAccountPartner, options *IntegrationAccountPartnersClientCreateOrUpdateOptions) (IntegrationAccountPartnersClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IntegrationAccountPartnersClient.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, integrationAccountName, partnerName, partner, options) if err != nil { return IntegrationAccountPartnersClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountPartnersClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return IntegrationAccountPartnersClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountPartnersClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *IntegrationAccountPartnersClient) createOrUpdateCreateRequest(ctx reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, partner) + if err := runtime.MarshalAsJSON(req, partner); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,16 +128,22 @@ func (client *IntegrationAccountPartnersClient) createOrUpdateHandleResponse(res // - options - IntegrationAccountPartnersClientDeleteOptions contains the optional parameters for the IntegrationAccountPartnersClient.Delete // method. func (client *IntegrationAccountPartnersClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, options *IntegrationAccountPartnersClientDeleteOptions) (IntegrationAccountPartnersClientDeleteResponse, error) { + var err error + const operationName = "IntegrationAccountPartnersClient.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, integrationAccountName, partnerName, options) if err != nil { return IntegrationAccountPartnersClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountPartnersClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IntegrationAccountPartnersClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountPartnersClientDeleteResponse{}, err } return IntegrationAccountPartnersClientDeleteResponse{}, nil } @@ -173,18 +188,25 @@ func (client *IntegrationAccountPartnersClient) deleteCreateRequest(ctx context. // - options - IntegrationAccountPartnersClientGetOptions contains the optional parameters for the IntegrationAccountPartnersClient.Get // method. func (client *IntegrationAccountPartnersClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, options *IntegrationAccountPartnersClientGetOptions) (IntegrationAccountPartnersClientGetResponse, error) { + var err error + const operationName = "IntegrationAccountPartnersClient.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, integrationAccountName, partnerName, options) if err != nil { return IntegrationAccountPartnersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountPartnersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountPartnersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountPartnersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -239,25 +261,20 @@ func (client *IntegrationAccountPartnersClient) NewListPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationAccountPartnersClientListResponse) (IntegrationAccountPartnersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, integrationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IntegrationAccountPartnersClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationAccountPartnersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, integrationAccountName, options) + }, nil) if err != nil { return IntegrationAccountPartnersClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountPartnersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -312,18 +329,25 @@ func (client *IntegrationAccountPartnersClient) listHandleResponse(resp *http.Re // - options - IntegrationAccountPartnersClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountPartnersClient.ListContentCallbackURL // method. func (client *IntegrationAccountPartnersClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, listContentCallbackURL GetCallbackURLParameters, options *IntegrationAccountPartnersClientListContentCallbackURLOptions) (IntegrationAccountPartnersClientListContentCallbackURLResponse, error) { + var err error + const operationName = "IntegrationAccountPartnersClient.ListContentCallbackURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listContentCallbackURLCreateRequest(ctx, resourceGroupName, integrationAccountName, partnerName, listContentCallbackURL, options) if err != nil { return IntegrationAccountPartnersClientListContentCallbackURLResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountPartnersClientListContentCallbackURLResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountPartnersClientListContentCallbackURLResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountPartnersClientListContentCallbackURLResponse{}, err } - return client.listContentCallbackURLHandleResponse(resp) + resp, err := client.listContentCallbackURLHandleResponse(httpResp) + return resp, err } // listContentCallbackURLCreateRequest creates the ListContentCallbackURL request. @@ -353,7 +377,10 @@ func (client *IntegrationAccountPartnersClient) listContentCallbackURLCreateRequ reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, listContentCallbackURL) + if err := runtime.MarshalAsJSON(req, listContentCallbackURL); err != nil { + return nil, err + } + return req, nil } // listContentCallbackURLHandleResponse handles the ListContentCallbackURL response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccounts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccounts_client.go index 30b0fe12..9f81ed3a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccounts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccounts_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type IntegrationAccountsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationAccountsClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationAccountsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewIntegrationAccountsClient(subscriptionID string, credential azcore.Token // - options - IntegrationAccountsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountsClient.CreateOrUpdate // method. func (client *IntegrationAccountsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, integrationAccount IntegrationAccount, options *IntegrationAccountsClientCreateOrUpdateOptions) (IntegrationAccountsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IntegrationAccountsClient.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, integrationAccountName, integrationAccount, options) if err != nil { return IntegrationAccountsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return IntegrationAccountsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -92,7 +98,10 @@ func (client *IntegrationAccountsClient) createOrUpdateCreateRequest(ctx context reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, integrationAccount) + if err := runtime.MarshalAsJSON(req, integrationAccount); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -113,16 +122,22 @@ func (client *IntegrationAccountsClient) createOrUpdateHandleResponse(resp *http // - options - IntegrationAccountsClientDeleteOptions contains the optional parameters for the IntegrationAccountsClient.Delete // method. func (client *IntegrationAccountsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, options *IntegrationAccountsClientDeleteOptions) (IntegrationAccountsClientDeleteResponse, error) { + var err error + const operationName = "IntegrationAccountsClient.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, integrationAccountName, options) if err != nil { return IntegrationAccountsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IntegrationAccountsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountsClientDeleteResponse{}, err } return IntegrationAccountsClientDeleteResponse{}, nil } @@ -161,18 +176,25 @@ func (client *IntegrationAccountsClient) deleteCreateRequest(ctx context.Context // - integrationAccountName - The integration account name. // - options - IntegrationAccountsClientGetOptions contains the optional parameters for the IntegrationAccountsClient.Get method. func (client *IntegrationAccountsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, options *IntegrationAccountsClientGetOptions) (IntegrationAccountsClientGetResponse, error) { + var err error + const operationName = "IntegrationAccountsClient.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, integrationAccountName, options) if err != nil { return IntegrationAccountsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -222,25 +244,20 @@ func (client *IntegrationAccountsClient) NewListByResourceGroupPager(resourceGro return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationAccountsClientListByResourceGroupResponse) (IntegrationAccountsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationAccountsClient.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 IntegrationAccountsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IntegrationAccountsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -289,25 +306,20 @@ func (client *IntegrationAccountsClient) NewListBySubscriptionPager(options *Int return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationAccountsClientListBySubscriptionResponse) (IntegrationAccountsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationAccountsClient.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 IntegrationAccountsClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IntegrationAccountsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -351,18 +363,25 @@ func (client *IntegrationAccountsClient) listBySubscriptionHandleResponse(resp * // - options - IntegrationAccountsClientListCallbackURLOptions contains the optional parameters for the IntegrationAccountsClient.ListCallbackURL // method. func (client *IntegrationAccountsClient) ListCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, parameters GetCallbackURLParameters, options *IntegrationAccountsClientListCallbackURLOptions) (IntegrationAccountsClientListCallbackURLResponse, error) { + var err error + const operationName = "IntegrationAccountsClient.ListCallbackURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCallbackURLCreateRequest(ctx, resourceGroupName, integrationAccountName, parameters, options) if err != nil { return IntegrationAccountsClientListCallbackURLResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountsClientListCallbackURLResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountsClientListCallbackURLResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountsClientListCallbackURLResponse{}, err } - return client.listCallbackURLHandleResponse(resp) + resp, err := client.listCallbackURLHandleResponse(httpResp) + return resp, err } // listCallbackURLCreateRequest creates the ListCallbackURL request. @@ -388,7 +407,10 @@ func (client *IntegrationAccountsClient) listCallbackURLCreateRequest(ctx contex reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // listCallbackURLHandleResponse handles the ListCallbackURL response. @@ -414,6 +436,7 @@ func (client *IntegrationAccountsClient) NewListKeyVaultKeysPager(resourceGroupN return false }, Fetcher: func(ctx context.Context, page *IntegrationAccountsClientListKeyVaultKeysResponse) (IntegrationAccountsClientListKeyVaultKeysResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationAccountsClient.NewListKeyVaultKeysPager") req, err := client.listKeyVaultKeysCreateRequest(ctx, resourceGroupName, integrationAccountName, listKeyVaultKeys, options) if err != nil { return IntegrationAccountsClientListKeyVaultKeysResponse{}, err @@ -427,6 +450,7 @@ func (client *IntegrationAccountsClient) NewListKeyVaultKeysPager(resourceGroupN } return client.listKeyVaultKeysHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -453,7 +477,10 @@ func (client *IntegrationAccountsClient) listKeyVaultKeysCreateRequest(ctx conte reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, listKeyVaultKeys) + if err := runtime.MarshalAsJSON(req, listKeyVaultKeys); err != nil { + return nil, err + } + return req, nil } // listKeyVaultKeysHandleResponse handles the ListKeyVaultKeys response. @@ -475,16 +502,22 @@ func (client *IntegrationAccountsClient) listKeyVaultKeysHandleResponse(resp *ht // - options - IntegrationAccountsClientLogTrackingEventsOptions contains the optional parameters for the IntegrationAccountsClient.LogTrackingEvents // method. func (client *IntegrationAccountsClient) LogTrackingEvents(ctx context.Context, resourceGroupName string, integrationAccountName string, logTrackingEvents TrackingEventsDefinition, options *IntegrationAccountsClientLogTrackingEventsOptions) (IntegrationAccountsClientLogTrackingEventsResponse, error) { + var err error + const operationName = "IntegrationAccountsClient.LogTrackingEvents" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.logTrackingEventsCreateRequest(ctx, resourceGroupName, integrationAccountName, logTrackingEvents, options) if err != nil { return IntegrationAccountsClientLogTrackingEventsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountsClientLogTrackingEventsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountsClientLogTrackingEventsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountsClientLogTrackingEventsResponse{}, err } return IntegrationAccountsClientLogTrackingEventsResponse{}, nil } @@ -512,7 +545,10 @@ func (client *IntegrationAccountsClient) logTrackingEventsCreateRequest(ctx cont reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, logTrackingEvents) + if err := runtime.MarshalAsJSON(req, logTrackingEvents); err != nil { + return nil, err + } + return req, nil } // RegenerateAccessKey - Regenerates the integration account access key. @@ -525,18 +561,25 @@ func (client *IntegrationAccountsClient) logTrackingEventsCreateRequest(ctx cont // - options - IntegrationAccountsClientRegenerateAccessKeyOptions contains the optional parameters for the IntegrationAccountsClient.RegenerateAccessKey // method. func (client *IntegrationAccountsClient) RegenerateAccessKey(ctx context.Context, resourceGroupName string, integrationAccountName string, regenerateAccessKey RegenerateActionParameter, options *IntegrationAccountsClientRegenerateAccessKeyOptions) (IntegrationAccountsClientRegenerateAccessKeyResponse, error) { + var err error + const operationName = "IntegrationAccountsClient.RegenerateAccessKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regenerateAccessKeyCreateRequest(ctx, resourceGroupName, integrationAccountName, regenerateAccessKey, options) if err != nil { return IntegrationAccountsClientRegenerateAccessKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountsClientRegenerateAccessKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountsClientRegenerateAccessKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountsClientRegenerateAccessKeyResponse{}, err } - return client.regenerateAccessKeyHandleResponse(resp) + resp, err := client.regenerateAccessKeyHandleResponse(httpResp) + return resp, err } // regenerateAccessKeyCreateRequest creates the RegenerateAccessKey request. @@ -562,7 +605,10 @@ func (client *IntegrationAccountsClient) regenerateAccessKeyCreateRequest(ctx co reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, regenerateAccessKey) + if err := runtime.MarshalAsJSON(req, regenerateAccessKey); err != nil { + return nil, err + } + return req, nil } // regenerateAccessKeyHandleResponse handles the RegenerateAccessKey response. @@ -584,18 +630,25 @@ func (client *IntegrationAccountsClient) regenerateAccessKeyHandleResponse(resp // - options - IntegrationAccountsClientUpdateOptions contains the optional parameters for the IntegrationAccountsClient.Update // method. func (client *IntegrationAccountsClient) Update(ctx context.Context, resourceGroupName string, integrationAccountName string, integrationAccount IntegrationAccount, options *IntegrationAccountsClientUpdateOptions) (IntegrationAccountsClientUpdateResponse, error) { + var err error + const operationName = "IntegrationAccountsClient.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, integrationAccountName, integrationAccount, options) if err != nil { return IntegrationAccountsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -621,7 +674,10 @@ func (client *IntegrationAccountsClient) updateCreateRequest(ctx context.Context reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, integrationAccount) + if err := runtime.MarshalAsJSON(req, integrationAccount); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountschemas_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountschemas_client.go index ecb8bd26..49a7d003 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountschemas_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountschemas_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type IntegrationAccountSchemasClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationAccountSchemasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationAccountSchemasClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationAccountSchemasClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewIntegrationAccountSchemasClient(subscriptionID string, credential azcore // - options - IntegrationAccountSchemasClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountSchemasClient.CreateOrUpdate // method. func (client *IntegrationAccountSchemasClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, schema IntegrationAccountSchema, options *IntegrationAccountSchemasClientCreateOrUpdateOptions) (IntegrationAccountSchemasClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IntegrationAccountSchemasClient.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, integrationAccountName, schemaName, schema, options) if err != nil { return IntegrationAccountSchemasClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountSchemasClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return IntegrationAccountSchemasClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountSchemasClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *IntegrationAccountSchemasClient) createOrUpdateCreateRequest(ctx c reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, schema) + if err := runtime.MarshalAsJSON(req, schema); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,16 +128,22 @@ func (client *IntegrationAccountSchemasClient) createOrUpdateHandleResponse(resp // - options - IntegrationAccountSchemasClientDeleteOptions contains the optional parameters for the IntegrationAccountSchemasClient.Delete // method. func (client *IntegrationAccountSchemasClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, options *IntegrationAccountSchemasClientDeleteOptions) (IntegrationAccountSchemasClientDeleteResponse, error) { + var err error + const operationName = "IntegrationAccountSchemasClient.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, integrationAccountName, schemaName, options) if err != nil { return IntegrationAccountSchemasClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountSchemasClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IntegrationAccountSchemasClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountSchemasClientDeleteResponse{}, err } return IntegrationAccountSchemasClientDeleteResponse{}, nil } @@ -173,18 +188,25 @@ func (client *IntegrationAccountSchemasClient) deleteCreateRequest(ctx context.C // - options - IntegrationAccountSchemasClientGetOptions contains the optional parameters for the IntegrationAccountSchemasClient.Get // method. func (client *IntegrationAccountSchemasClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, options *IntegrationAccountSchemasClientGetOptions) (IntegrationAccountSchemasClientGetResponse, error) { + var err error + const operationName = "IntegrationAccountSchemasClient.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, integrationAccountName, schemaName, options) if err != nil { return IntegrationAccountSchemasClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountSchemasClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountSchemasClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountSchemasClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -239,25 +261,20 @@ func (client *IntegrationAccountSchemasClient) NewListPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationAccountSchemasClientListResponse) (IntegrationAccountSchemasClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, integrationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IntegrationAccountSchemasClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationAccountSchemasClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, integrationAccountName, options) + }, nil) if err != nil { return IntegrationAccountSchemasClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountSchemasClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -312,18 +329,25 @@ func (client *IntegrationAccountSchemasClient) listHandleResponse(resp *http.Res // - options - IntegrationAccountSchemasClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountSchemasClient.ListContentCallbackURL // method. func (client *IntegrationAccountSchemasClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, listContentCallbackURL GetCallbackURLParameters, options *IntegrationAccountSchemasClientListContentCallbackURLOptions) (IntegrationAccountSchemasClientListContentCallbackURLResponse, error) { + var err error + const operationName = "IntegrationAccountSchemasClient.ListContentCallbackURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listContentCallbackURLCreateRequest(ctx, resourceGroupName, integrationAccountName, schemaName, listContentCallbackURL, options) if err != nil { return IntegrationAccountSchemasClientListContentCallbackURLResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountSchemasClientListContentCallbackURLResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountSchemasClientListContentCallbackURLResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountSchemasClientListContentCallbackURLResponse{}, err } - return client.listContentCallbackURLHandleResponse(resp) + resp, err := client.listContentCallbackURLHandleResponse(httpResp) + return resp, err } // listContentCallbackURLCreateRequest creates the ListContentCallbackURL request. @@ -353,7 +377,10 @@ func (client *IntegrationAccountSchemasClient) listContentCallbackURLCreateReque reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, listContentCallbackURL) + if err := runtime.MarshalAsJSON(req, listContentCallbackURL); err != nil { + return nil, err + } + return req, nil } // listContentCallbackURLHandleResponse handles the ListContentCallbackURL response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountsessions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountsessions_client.go index 681a1f13..6e848cb8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountsessions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationaccountsessions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type IntegrationAccountSessionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationAccountSessionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationAccountSessionsClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationAccountSessionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewIntegrationAccountSessionsClient(subscriptionID string, credential azcor // - options - IntegrationAccountSessionsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountSessionsClient.CreateOrUpdate // method. func (client *IntegrationAccountSessionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string, session IntegrationAccountSession, options *IntegrationAccountSessionsClientCreateOrUpdateOptions) (IntegrationAccountSessionsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IntegrationAccountSessionsClient.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, integrationAccountName, sessionName, session, options) if err != nil { return IntegrationAccountSessionsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountSessionsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return IntegrationAccountSessionsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountSessionsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *IntegrationAccountSessionsClient) createOrUpdateCreateRequest(ctx reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, session) + if err := runtime.MarshalAsJSON(req, session); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,16 +128,22 @@ func (client *IntegrationAccountSessionsClient) createOrUpdateHandleResponse(res // - options - IntegrationAccountSessionsClientDeleteOptions contains the optional parameters for the IntegrationAccountSessionsClient.Delete // method. func (client *IntegrationAccountSessionsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string, options *IntegrationAccountSessionsClientDeleteOptions) (IntegrationAccountSessionsClientDeleteResponse, error) { + var err error + const operationName = "IntegrationAccountSessionsClient.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, integrationAccountName, sessionName, options) if err != nil { return IntegrationAccountSessionsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountSessionsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IntegrationAccountSessionsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountSessionsClientDeleteResponse{}, err } return IntegrationAccountSessionsClientDeleteResponse{}, nil } @@ -173,18 +188,25 @@ func (client *IntegrationAccountSessionsClient) deleteCreateRequest(ctx context. // - options - IntegrationAccountSessionsClientGetOptions contains the optional parameters for the IntegrationAccountSessionsClient.Get // method. func (client *IntegrationAccountSessionsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string, options *IntegrationAccountSessionsClientGetOptions) (IntegrationAccountSessionsClientGetResponse, error) { + var err error + const operationName = "IntegrationAccountSessionsClient.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, integrationAccountName, sessionName, options) if err != nil { return IntegrationAccountSessionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationAccountSessionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountSessionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationAccountSessionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -239,25 +261,20 @@ func (client *IntegrationAccountSessionsClient) NewListPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationAccountSessionsClientListResponse) (IntegrationAccountSessionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, integrationAccountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationAccountSessionsClient.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, integrationAccountName, options) + }, nil) if err != nil { return IntegrationAccountSessionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IntegrationAccountSessionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationAccountSessionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentmanagedapioperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentmanagedapioperations_client.go index d9903c70..b15972f3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentmanagedapioperations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentmanagedapioperations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -33,7 +32,7 @@ type IntegrationServiceEnvironmentManagedAPIOperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationServiceEnvironmentManagedAPIOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationServiceEnvironmentManagedAPIOperationsClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationServiceEnvironmentManagedAPIOperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,25 +57,20 @@ func (client *IntegrationServiceEnvironmentManagedAPIOperationsClient) NewListPa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationServiceEnvironmentManagedAPIOperationsClientListResponse) (IntegrationServiceEnvironmentManagedAPIOperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroup, integrationServiceEnvironmentName, apiName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationServiceEnvironmentManagedAPIOperationsClient.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, resourceGroup, integrationServiceEnvironmentName, apiName, options) + }, nil) if err != nil { return IntegrationServiceEnvironmentManagedAPIOperationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IntegrationServiceEnvironmentManagedAPIOperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationServiceEnvironmentManagedAPIOperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentmanagedapis_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentmanagedapis_client.go index 5f5059af..3e2a02e4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentmanagedapis_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentmanagedapis_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -33,7 +32,7 @@ type IntegrationServiceEnvironmentManagedApisClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationServiceEnvironmentManagedApisClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationServiceEnvironmentManagedApisClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationServiceEnvironmentManagedApisClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,9 +58,14 @@ func (client *IntegrationServiceEnvironmentManagedApisClient) BeginDelete(ctx co if err != nil { return nil, err } - return runtime.NewPoller[IntegrationServiceEnvironmentManagedApisClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IntegrationServiceEnvironmentManagedApisClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IntegrationServiceEnvironmentManagedApisClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IntegrationServiceEnvironmentManagedApisClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -70,18 +74,24 @@ func (client *IntegrationServiceEnvironmentManagedApisClient) BeginDelete(ctx co // // Generated from API version 2019-05-01 func (client *IntegrationServiceEnvironmentManagedApisClient) deleteOperation(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, apiName string, options *IntegrationServiceEnvironmentManagedApisClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "IntegrationServiceEnvironmentManagedApisClient.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, resourceGroup, integrationServiceEnvironmentName, apiName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -124,18 +134,25 @@ func (client *IntegrationServiceEnvironmentManagedApisClient) deleteCreateReques // - options - IntegrationServiceEnvironmentManagedApisClientGetOptions contains the optional parameters for the IntegrationServiceEnvironmentManagedApisClient.Get // method. func (client *IntegrationServiceEnvironmentManagedApisClient) Get(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, apiName string, options *IntegrationServiceEnvironmentManagedApisClientGetOptions) (IntegrationServiceEnvironmentManagedApisClientGetResponse, error) { + var err error + const operationName = "IntegrationServiceEnvironmentManagedApisClient.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, resourceGroup, integrationServiceEnvironmentName, apiName, options) if err != nil { return IntegrationServiceEnvironmentManagedApisClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationServiceEnvironmentManagedApisClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationServiceEnvironmentManagedApisClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationServiceEnvironmentManagedApisClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -190,25 +207,20 @@ func (client *IntegrationServiceEnvironmentManagedApisClient) NewListPager(resou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationServiceEnvironmentManagedApisClientListResponse) (IntegrationServiceEnvironmentManagedApisClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroup, integrationServiceEnvironmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IntegrationServiceEnvironmentManagedApisClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationServiceEnvironmentManagedApisClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroup, integrationServiceEnvironmentName, options) + }, nil) if err != nil { return IntegrationServiceEnvironmentManagedApisClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationServiceEnvironmentManagedApisClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -263,9 +275,14 @@ func (client *IntegrationServiceEnvironmentManagedApisClient) BeginPut(ctx conte if err != nil { return nil, err } - return runtime.NewPoller[IntegrationServiceEnvironmentManagedApisClientPutResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IntegrationServiceEnvironmentManagedApisClientPutResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IntegrationServiceEnvironmentManagedApisClientPutResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IntegrationServiceEnvironmentManagedApisClientPutResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -274,18 +291,24 @@ func (client *IntegrationServiceEnvironmentManagedApisClient) BeginPut(ctx conte // // Generated from API version 2019-05-01 func (client *IntegrationServiceEnvironmentManagedApisClient) put(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, apiName string, integrationServiceEnvironmentManagedAPI IntegrationServiceEnvironmentManagedAPI, options *IntegrationServiceEnvironmentManagedApisClientBeginPutOptions) (*http.Response, error) { + var err error + const operationName = "IntegrationServiceEnvironmentManagedApisClient.BeginPut" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.putCreateRequest(ctx, resourceGroup, integrationServiceEnvironmentName, apiName, integrationServiceEnvironmentManagedAPI, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // putCreateRequest creates the Put request. @@ -315,5 +338,8 @@ func (client *IntegrationServiceEnvironmentManagedApisClient) putCreateRequest(c reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, integrationServiceEnvironmentManagedAPI) + if err := runtime.MarshalAsJSON(req, integrationServiceEnvironmentManagedAPI); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentnetworkhealth_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentnetworkhealth_client.go index 20908410..00e6e633 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentnetworkhealth_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentnetworkhealth_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -33,7 +32,7 @@ type IntegrationServiceEnvironmentNetworkHealthClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationServiceEnvironmentNetworkHealthClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationServiceEnvironmentNetworkHealthClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationServiceEnvironmentNetworkHealthClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewIntegrationServiceEnvironmentNetworkHealthClient(subscriptionID string, // - options - IntegrationServiceEnvironmentNetworkHealthClientGetOptions contains the optional parameters for the IntegrationServiceEnvironmentNetworkHealthClient.Get // method. func (client *IntegrationServiceEnvironmentNetworkHealthClient) Get(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, options *IntegrationServiceEnvironmentNetworkHealthClientGetOptions) (IntegrationServiceEnvironmentNetworkHealthClientGetResponse, error) { + var err error + const operationName = "IntegrationServiceEnvironmentNetworkHealthClient.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, resourceGroup, integrationServiceEnvironmentName, options) if err != nil { return IntegrationServiceEnvironmentNetworkHealthClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationServiceEnvironmentNetworkHealthClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationServiceEnvironmentNetworkHealthClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationServiceEnvironmentNetworkHealthClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironments_client.go index e97e9bc9..ce8d2b22 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironments_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type IntegrationServiceEnvironmentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationServiceEnvironmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationServiceEnvironmentsClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationServiceEnvironmentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *IntegrationServiceEnvironmentsClient) BeginCreateOrUpdate(ctx cont if err != nil { return nil, err } - return runtime.NewPoller[IntegrationServiceEnvironmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IntegrationServiceEnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IntegrationServiceEnvironmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IntegrationServiceEnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *IntegrationServiceEnvironmentsClient) BeginCreateOrUpdate(ctx cont // // Generated from API version 2019-05-01 func (client *IntegrationServiceEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, integrationServiceEnvironment IntegrationServiceEnvironment, options *IntegrationServiceEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "IntegrationServiceEnvironmentsClient.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, resourceGroup, integrationServiceEnvironmentName, integrationServiceEnvironment, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -108,7 +118,10 @@ func (client *IntegrationServiceEnvironmentsClient) createOrUpdateCreateRequest( reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, integrationServiceEnvironment) + if err := runtime.MarshalAsJSON(req, integrationServiceEnvironment); err != nil { + return nil, err + } + return req, nil } // Delete - Deletes an integration service environment. @@ -120,16 +133,22 @@ func (client *IntegrationServiceEnvironmentsClient) createOrUpdateCreateRequest( // - options - IntegrationServiceEnvironmentsClientDeleteOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.Delete // method. func (client *IntegrationServiceEnvironmentsClient) Delete(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, options *IntegrationServiceEnvironmentsClientDeleteOptions) (IntegrationServiceEnvironmentsClientDeleteResponse, error) { + var err error + const operationName = "IntegrationServiceEnvironmentsClient.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, resourceGroup, integrationServiceEnvironmentName, options) if err != nil { return IntegrationServiceEnvironmentsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationServiceEnvironmentsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IntegrationServiceEnvironmentsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IntegrationServiceEnvironmentsClientDeleteResponse{}, err } return IntegrationServiceEnvironmentsClientDeleteResponse{}, nil } @@ -169,18 +188,25 @@ func (client *IntegrationServiceEnvironmentsClient) deleteCreateRequest(ctx cont // - options - IntegrationServiceEnvironmentsClientGetOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.Get // method. func (client *IntegrationServiceEnvironmentsClient) Get(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, options *IntegrationServiceEnvironmentsClientGetOptions) (IntegrationServiceEnvironmentsClientGetResponse, error) { + var err error + const operationName = "IntegrationServiceEnvironmentsClient.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, resourceGroup, integrationServiceEnvironmentName, options) if err != nil { return IntegrationServiceEnvironmentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationServiceEnvironmentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationServiceEnvironmentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationServiceEnvironmentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -230,25 +256,20 @@ func (client *IntegrationServiceEnvironmentsClient) NewListByResourceGroupPager( return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationServiceEnvironmentsClientListByResourceGroupResponse) (IntegrationServiceEnvironmentsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroup, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationServiceEnvironmentsClient.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, resourceGroup, options) + }, nil) if err != nil { return IntegrationServiceEnvironmentsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IntegrationServiceEnvironmentsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationServiceEnvironmentsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -297,25 +318,20 @@ func (client *IntegrationServiceEnvironmentsClient) NewListBySubscriptionPager(o return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationServiceEnvironmentsClientListBySubscriptionResponse) (IntegrationServiceEnvironmentsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationServiceEnvironmentsClient.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 IntegrationServiceEnvironmentsClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IntegrationServiceEnvironmentsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationServiceEnvironmentsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -358,16 +374,22 @@ func (client *IntegrationServiceEnvironmentsClient) listBySubscriptionHandleResp // - options - IntegrationServiceEnvironmentsClientRestartOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.Restart // method. func (client *IntegrationServiceEnvironmentsClient) Restart(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, options *IntegrationServiceEnvironmentsClientRestartOptions) (IntegrationServiceEnvironmentsClientRestartResponse, error) { + var err error + const operationName = "IntegrationServiceEnvironmentsClient.Restart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restartCreateRequest(ctx, resourceGroup, integrationServiceEnvironmentName, options) if err != nil { return IntegrationServiceEnvironmentsClientRestartResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationServiceEnvironmentsClientRestartResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationServiceEnvironmentsClientRestartResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationServiceEnvironmentsClientRestartResponse{}, err } return IntegrationServiceEnvironmentsClientRestartResponse{}, nil } @@ -413,9 +435,14 @@ func (client *IntegrationServiceEnvironmentsClient) BeginUpdate(ctx context.Cont if err != nil { return nil, err } - return runtime.NewPoller[IntegrationServiceEnvironmentsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IntegrationServiceEnvironmentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IntegrationServiceEnvironmentsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IntegrationServiceEnvironmentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -424,18 +451,24 @@ func (client *IntegrationServiceEnvironmentsClient) BeginUpdate(ctx context.Cont // // Generated from API version 2019-05-01 func (client *IntegrationServiceEnvironmentsClient) update(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, integrationServiceEnvironment IntegrationServiceEnvironment, options *IntegrationServiceEnvironmentsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "IntegrationServiceEnvironmentsClient.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, resourceGroup, integrationServiceEnvironmentName, integrationServiceEnvironment, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -461,5 +494,8 @@ func (client *IntegrationServiceEnvironmentsClient) updateCreateRequest(ctx cont reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, integrationServiceEnvironment) + if err := runtime.MarshalAsJSON(req, integrationServiceEnvironment); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentskus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentskus_client.go index fba23ce6..5275cd89 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentskus_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/integrationserviceenvironmentskus_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -33,7 +32,7 @@ type IntegrationServiceEnvironmentSKUsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationServiceEnvironmentSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationServiceEnvironmentSKUsClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationServiceEnvironmentSKUsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,25 +56,20 @@ func (client *IntegrationServiceEnvironmentSKUsClient) NewListPager(resourceGrou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationServiceEnvironmentSKUsClientListResponse) (IntegrationServiceEnvironmentSKUsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroup, integrationServiceEnvironmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationServiceEnvironmentSKUsClient.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, resourceGroup, integrationServiceEnvironmentName, options) + }, nil) if err != nil { return IntegrationServiceEnvironmentSKUsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IntegrationServiceEnvironmentSKUsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationServiceEnvironmentSKUsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/models.go index 08aa85ae..811e46e5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -1384,93 +1383,6 @@ type IntegrationAccountAgreementProperties struct { CreatedTime *time.Time } -// IntegrationAccountAgreementsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountAgreementsClient.CreateOrUpdate -// method. -type IntegrationAccountAgreementsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountAgreementsClientDeleteOptions contains the optional parameters for the IntegrationAccountAgreementsClient.Delete -// method. -type IntegrationAccountAgreementsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountAgreementsClientGetOptions contains the optional parameters for the IntegrationAccountAgreementsClient.Get -// method. -type IntegrationAccountAgreementsClientGetOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountAgreementsClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountAgreementsClient.ListContentCallbackURL -// method. -type IntegrationAccountAgreementsClientListContentCallbackURLOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountAgreementsClientListOptions contains the optional parameters for the IntegrationAccountAgreementsClient.NewListPager -// method. -type IntegrationAccountAgreementsClientListOptions struct { - // The filter to apply on the operation. Options for filters include: AgreementType. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - -// IntegrationAccountAssembliesClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountAssembliesClient.CreateOrUpdate -// method. -type IntegrationAccountAssembliesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountAssembliesClientDeleteOptions contains the optional parameters for the IntegrationAccountAssembliesClient.Delete -// method. -type IntegrationAccountAssembliesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountAssembliesClientGetOptions contains the optional parameters for the IntegrationAccountAssembliesClient.Get -// method. -type IntegrationAccountAssembliesClientGetOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountAssembliesClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountAssembliesClient.ListContentCallbackURL -// method. -type IntegrationAccountAssembliesClientListContentCallbackURLOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountAssembliesClientListOptions contains the optional parameters for the IntegrationAccountAssembliesClient.NewListPager -// method. -type IntegrationAccountAssembliesClientListOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountBatchConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountBatchConfigurationsClient.CreateOrUpdate -// method. -type IntegrationAccountBatchConfigurationsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountBatchConfigurationsClientDeleteOptions contains the optional parameters for the IntegrationAccountBatchConfigurationsClient.Delete -// method. -type IntegrationAccountBatchConfigurationsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountBatchConfigurationsClientGetOptions contains the optional parameters for the IntegrationAccountBatchConfigurationsClient.Get -// method. -type IntegrationAccountBatchConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountBatchConfigurationsClientListOptions contains the optional parameters for the IntegrationAccountBatchConfigurationsClient.NewListPager -// method. -type IntegrationAccountBatchConfigurationsClientListOptions struct { - // placeholder for future optional parameters -} - // IntegrationAccountCertificate - The integration account certificate. type IntegrationAccountCertificate struct { // REQUIRED; The integration account certificate properties. @@ -1519,31 +1431,6 @@ type IntegrationAccountCertificateProperties struct { CreatedTime *time.Time } -// IntegrationAccountCertificatesClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountCertificatesClient.CreateOrUpdate -// method. -type IntegrationAccountCertificatesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountCertificatesClientDeleteOptions contains the optional parameters for the IntegrationAccountCertificatesClient.Delete -// method. -type IntegrationAccountCertificatesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountCertificatesClientGetOptions contains the optional parameters for the IntegrationAccountCertificatesClient.Get -// method. -type IntegrationAccountCertificatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountCertificatesClientListOptions contains the optional parameters for the IntegrationAccountCertificatesClient.NewListPager -// method. -type IntegrationAccountCertificatesClientListOptions struct { - // The number of items to be included in the result. - Top *int32 -} - // IntegrationAccountListResult - The list of integration accounts. type IntegrationAccountListResult struct { // The URL to get the next set of results. @@ -1622,38 +1509,6 @@ type IntegrationAccountMapPropertiesParametersSchema struct { Ref *string } -// IntegrationAccountMapsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountMapsClient.CreateOrUpdate -// method. -type IntegrationAccountMapsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountMapsClientDeleteOptions contains the optional parameters for the IntegrationAccountMapsClient.Delete -// method. -type IntegrationAccountMapsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountMapsClientGetOptions contains the optional parameters for the IntegrationAccountMapsClient.Get method. -type IntegrationAccountMapsClientGetOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountMapsClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountMapsClient.ListContentCallbackURL -// method. -type IntegrationAccountMapsClientListContentCallbackURLOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountMapsClientListOptions contains the optional parameters for the IntegrationAccountMapsClient.NewListPager -// method. -type IntegrationAccountMapsClientListOptions struct { - // The filter to apply on the operation. Options for filters include: MapType. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - // IntegrationAccountPartner - The integration account partner. type IntegrationAccountPartner struct { // REQUIRED; The integration account partner properties. @@ -1708,39 +1563,6 @@ type IntegrationAccountPartnerProperties struct { CreatedTime *time.Time } -// IntegrationAccountPartnersClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountPartnersClient.CreateOrUpdate -// method. -type IntegrationAccountPartnersClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountPartnersClientDeleteOptions contains the optional parameters for the IntegrationAccountPartnersClient.Delete -// method. -type IntegrationAccountPartnersClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountPartnersClientGetOptions contains the optional parameters for the IntegrationAccountPartnersClient.Get -// method. -type IntegrationAccountPartnersClientGetOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountPartnersClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountPartnersClient.ListContentCallbackURL -// method. -type IntegrationAccountPartnersClientListContentCallbackURLOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountPartnersClientListOptions contains the optional parameters for the IntegrationAccountPartnersClient.NewListPager -// method. -type IntegrationAccountPartnersClientListOptions struct { - // The filter to apply on the operation. Options for filters include: PartnerType. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - // IntegrationAccountProperties - The integration account properties. type IntegrationAccountProperties struct { // The integration service environment. @@ -1825,39 +1647,6 @@ type IntegrationAccountSchemaProperties struct { CreatedTime *time.Time } -// IntegrationAccountSchemasClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountSchemasClient.CreateOrUpdate -// method. -type IntegrationAccountSchemasClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountSchemasClientDeleteOptions contains the optional parameters for the IntegrationAccountSchemasClient.Delete -// method. -type IntegrationAccountSchemasClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountSchemasClientGetOptions contains the optional parameters for the IntegrationAccountSchemasClient.Get -// method. -type IntegrationAccountSchemasClientGetOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountSchemasClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountSchemasClient.ListContentCallbackURL -// method. -type IntegrationAccountSchemasClientListContentCallbackURLOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountSchemasClientListOptions contains the optional parameters for the IntegrationAccountSchemasClient.NewListPager -// method. -type IntegrationAccountSchemasClientListOptions struct { - // The filter to apply on the operation. Options for filters include: SchemaType. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - // IntegrationAccountSession - The integration account session. type IntegrationAccountSession struct { // REQUIRED; The integration account session properties. @@ -1906,92 +1695,6 @@ type IntegrationAccountSessionProperties struct { CreatedTime *time.Time } -// IntegrationAccountSessionsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountSessionsClient.CreateOrUpdate -// method. -type IntegrationAccountSessionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountSessionsClientDeleteOptions contains the optional parameters for the IntegrationAccountSessionsClient.Delete -// method. -type IntegrationAccountSessionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountSessionsClientGetOptions contains the optional parameters for the IntegrationAccountSessionsClient.Get -// method. -type IntegrationAccountSessionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountSessionsClientListOptions contains the optional parameters for the IntegrationAccountSessionsClient.NewListPager -// method. -type IntegrationAccountSessionsClientListOptions struct { - // The filter to apply on the operation. Options for filters include: ChangedTime. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - -// IntegrationAccountsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountsClient.CreateOrUpdate -// method. -type IntegrationAccountsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountsClientDeleteOptions contains the optional parameters for the IntegrationAccountsClient.Delete method. -type IntegrationAccountsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountsClientGetOptions contains the optional parameters for the IntegrationAccountsClient.Get method. -type IntegrationAccountsClientGetOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountsClientListByResourceGroupOptions contains the optional parameters for the IntegrationAccountsClient.NewListByResourceGroupPager -// method. -type IntegrationAccountsClientListByResourceGroupOptions struct { - // The number of items to be included in the result. - Top *int32 -} - -// IntegrationAccountsClientListBySubscriptionOptions contains the optional parameters for the IntegrationAccountsClient.NewListBySubscriptionPager -// method. -type IntegrationAccountsClientListBySubscriptionOptions struct { - // The number of items to be included in the result. - Top *int32 -} - -// IntegrationAccountsClientListCallbackURLOptions contains the optional parameters for the IntegrationAccountsClient.ListCallbackURL -// method. -type IntegrationAccountsClientListCallbackURLOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountsClientListKeyVaultKeysOptions contains the optional parameters for the IntegrationAccountsClient.NewListKeyVaultKeysPager -// method. -type IntegrationAccountsClientListKeyVaultKeysOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountsClientLogTrackingEventsOptions contains the optional parameters for the IntegrationAccountsClient.LogTrackingEvents -// method. -type IntegrationAccountsClientLogTrackingEventsOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountsClientRegenerateAccessKeyOptions contains the optional parameters for the IntegrationAccountsClient.RegenerateAccessKey -// method. -type IntegrationAccountsClientRegenerateAccessKeyOptions struct { - // placeholder for future optional parameters -} - -// IntegrationAccountsClientUpdateOptions contains the optional parameters for the IntegrationAccountsClient.Update method. -type IntegrationAccountsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // IntegrationServiceEnvironmenEncryptionConfiguration - The encryption configuration for the integration service environment. type IntegrationServiceEnvironmenEncryptionConfiguration struct { // The encryption key reference. @@ -2087,12 +1790,6 @@ type IntegrationServiceEnvironmentManagedAPIListResult struct { Value []*IntegrationServiceEnvironmentManagedAPI } -// IntegrationServiceEnvironmentManagedAPIOperationsClientListOptions contains the optional parameters for the IntegrationServiceEnvironmentManagedAPIOperationsClient.NewListPager -// method. -type IntegrationServiceEnvironmentManagedAPIOperationsClientListOptions struct { - // placeholder for future optional parameters -} - // IntegrationServiceEnvironmentManagedAPIProperties - The integration service environment managed api properties. type IntegrationServiceEnvironmentManagedAPIProperties struct { // The integration service environment managed api deployment parameters. @@ -2138,32 +1835,6 @@ type IntegrationServiceEnvironmentManagedAPIProperties struct { RuntimeUrls []*string } -// IntegrationServiceEnvironmentManagedApisClientBeginDeleteOptions contains the optional parameters for the IntegrationServiceEnvironmentManagedApisClient.BeginDelete -// method. -type IntegrationServiceEnvironmentManagedApisClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IntegrationServiceEnvironmentManagedApisClientBeginPutOptions contains the optional parameters for the IntegrationServiceEnvironmentManagedApisClient.BeginPut -// method. -type IntegrationServiceEnvironmentManagedApisClientBeginPutOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IntegrationServiceEnvironmentManagedApisClientGetOptions contains the optional parameters for the IntegrationServiceEnvironmentManagedApisClient.Get -// method. -type IntegrationServiceEnvironmentManagedApisClientGetOptions struct { - // placeholder for future optional parameters -} - -// IntegrationServiceEnvironmentManagedApisClientListOptions contains the optional parameters for the IntegrationServiceEnvironmentManagedApisClient.NewListPager -// method. -type IntegrationServiceEnvironmentManagedApisClientListOptions struct { - // placeholder for future optional parameters -} - // IntegrationServiceEnvironmentNetworkDependency - The azure async operation resource. type IntegrationServiceEnvironmentNetworkDependency struct { // The network dependency category type. @@ -2197,12 +1868,6 @@ type IntegrationServiceEnvironmentNetworkEndpoint struct { Ports []*string } -// IntegrationServiceEnvironmentNetworkHealthClientGetOptions contains the optional parameters for the IntegrationServiceEnvironmentNetworkHealthClient.Get -// method. -type IntegrationServiceEnvironmentNetworkHealthClientGetOptions struct { - // placeholder for future optional parameters -} - // IntegrationServiceEnvironmentProperties - The integration service environment properties. type IntegrationServiceEnvironmentProperties struct { // The encryption configuration. @@ -2278,12 +1943,6 @@ type IntegrationServiceEnvironmentSKUList struct { Value []*IntegrationServiceEnvironmentSKUDefinition } -// IntegrationServiceEnvironmentSKUsClientListOptions contains the optional parameters for the IntegrationServiceEnvironmentSKUsClient.NewListPager -// method. -type IntegrationServiceEnvironmentSKUsClientListOptions struct { - // placeholder for future optional parameters -} - // IntegrationServiceEnvironmentSubnetNetworkHealth - The integration service environment subnet network health. type IntegrationServiceEnvironmentSubnetNetworkHealth struct { // REQUIRED; The integration service environment network health state. @@ -2296,52 +1955,6 @@ type IntegrationServiceEnvironmentSubnetNetworkHealth struct { OutboundNetworkHealth *IntegrationServiceEnvironmentNetworkDependencyHealth } -// IntegrationServiceEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.BeginCreateOrUpdate -// method. -type IntegrationServiceEnvironmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IntegrationServiceEnvironmentsClientBeginUpdateOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.BeginUpdate -// method. -type IntegrationServiceEnvironmentsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IntegrationServiceEnvironmentsClientDeleteOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.Delete -// method. -type IntegrationServiceEnvironmentsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IntegrationServiceEnvironmentsClientGetOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.Get -// method. -type IntegrationServiceEnvironmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// IntegrationServiceEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.NewListByResourceGroupPager -// method. -type IntegrationServiceEnvironmentsClientListByResourceGroupOptions struct { - // The number of items to be included in the result. - Top *int32 -} - -// IntegrationServiceEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.NewListBySubscriptionPager -// method. -type IntegrationServiceEnvironmentsClientListBySubscriptionOptions struct { - // The number of items to be included in the result. - Top *int32 -} - -// IntegrationServiceEnvironmentsClientRestartOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.Restart -// method. -type IntegrationServiceEnvironmentsClientRestartOptions struct { - // placeholder for future optional parameters -} - // JSONSchema - The JSON schema. type JSONSchema struct { // The JSON content. @@ -2614,11 +2227,6 @@ type OperationResultProperties struct { Status *WorkflowStatus } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // PartnerContent - The integration account partner content. type PartnerContent struct { // The B2B partner content. @@ -3363,79 +2971,6 @@ type WorkflowRunActionRepetitionProperties struct { TrackingID *string } -// WorkflowRunActionRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.Get -// method. -type WorkflowRunActionRepetitionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionRepetitionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager -// method. -type WorkflowRunActionRepetitionsClientListExpressionTracesOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.NewListPager -// method. -type WorkflowRunActionRepetitionsClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.Get -// method. -type WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionRepetitionsRequestHistoriesClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager -// method. -type WorkflowRunActionRepetitionsRequestHistoriesClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionRequestHistoriesClientGetOptions contains the optional parameters for the WorkflowRunActionRequestHistoriesClient.Get -// method. -type WorkflowRunActionRequestHistoriesClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionRequestHistoriesClientListOptions contains the optional parameters for the WorkflowRunActionRequestHistoriesClient.NewListPager -// method. -type WorkflowRunActionRequestHistoriesClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionScopeRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.Get -// method. -type WorkflowRunActionScopeRepetitionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionScopeRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.NewListPager -// method. -type WorkflowRunActionScopeRepetitionsClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionsClientGetOptions contains the optional parameters for the WorkflowRunActionsClient.Get method. -type WorkflowRunActionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionsClient.NewListExpressionTracesPager -// method. -type WorkflowRunActionsClientListExpressionTracesOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionsClientListOptions contains the optional parameters for the WorkflowRunActionsClient.NewListPager method. -type WorkflowRunActionsClientListOptions struct { - // The filter to apply on the operation. Options for filters include: Status. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - // WorkflowRunFilter - The workflow run filter. type WorkflowRunFilter struct { // The status of workflow run. @@ -3451,11 +2986,6 @@ type WorkflowRunListResult struct { Value []*WorkflowRun } -// WorkflowRunOperationsClientGetOptions contains the optional parameters for the WorkflowRunOperationsClient.Get method. -type WorkflowRunOperationsClientGetOptions struct { - // placeholder for future optional parameters -} - // WorkflowRunProperties - The workflow run properties. type WorkflowRunProperties struct { // The run correlation. @@ -3540,24 +3070,6 @@ type WorkflowRunTrigger struct { TrackingID *string } -// WorkflowRunsClientCancelOptions contains the optional parameters for the WorkflowRunsClient.Cancel method. -type WorkflowRunsClientCancelOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunsClientGetOptions contains the optional parameters for the WorkflowRunsClient.Get method. -type WorkflowRunsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunsClientListOptions contains the optional parameters for the WorkflowRunsClient.NewListPager method. -type WorkflowRunsClientListOptions struct { - // The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - // WorkflowTrigger - The workflow trigger. type WorkflowTrigger struct { // The workflow trigger properties. @@ -3600,26 +3112,6 @@ type WorkflowTriggerFilter struct { State *WorkflowState } -// WorkflowTriggerHistoriesClientGetOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.Get method. -type WorkflowTriggerHistoriesClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowTriggerHistoriesClientListOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.NewListPager -// method. -type WorkflowTriggerHistoriesClientListOptions struct { - // The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - -// WorkflowTriggerHistoriesClientResubmitOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.Resubmit -// method. -type WorkflowTriggerHistoriesClientResubmitOptions struct { - // placeholder for future optional parameters -} - // WorkflowTriggerHistory - The workflow trigger history. type WorkflowTriggerHistory struct { // Gets the workflow trigger history properties. @@ -3785,46 +3277,6 @@ type WorkflowTriggerReference struct { Type *string } -// WorkflowTriggersClientGetOptions contains the optional parameters for the WorkflowTriggersClient.Get method. -type WorkflowTriggersClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowTriggersClientGetSchemaJSONOptions contains the optional parameters for the WorkflowTriggersClient.GetSchemaJSON -// method. -type WorkflowTriggersClientGetSchemaJSONOptions struct { - // placeholder for future optional parameters -} - -// WorkflowTriggersClientListCallbackURLOptions contains the optional parameters for the WorkflowTriggersClient.ListCallbackURL -// method. -type WorkflowTriggersClientListCallbackURLOptions struct { - // placeholder for future optional parameters -} - -// WorkflowTriggersClientListOptions contains the optional parameters for the WorkflowTriggersClient.NewListPager method. -type WorkflowTriggersClientListOptions struct { - // The filter to apply on the operation. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - -// WorkflowTriggersClientResetOptions contains the optional parameters for the WorkflowTriggersClient.Reset method. -type WorkflowTriggersClientResetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowTriggersClientRunOptions contains the optional parameters for the WorkflowTriggersClient.Run method. -type WorkflowTriggersClientRunOptions struct { - // placeholder for future optional parameters -} - -// WorkflowTriggersClientSetStateOptions contains the optional parameters for the WorkflowTriggersClient.SetState method. -type WorkflowTriggersClientSetStateOptions struct { - // placeholder for future optional parameters -} - // WorkflowVersion - The workflow version. type WorkflowVersion struct { // The resource location. @@ -3894,111 +3346,6 @@ type WorkflowVersionProperties struct { Version *string } -// WorkflowVersionTriggersClientListCallbackURLOptions contains the optional parameters for the WorkflowVersionTriggersClient.ListCallbackURL -// method. -type WorkflowVersionTriggersClientListCallbackURLOptions struct { - // The callback URL parameters. - Parameters *GetCallbackURLParameters -} - -// WorkflowVersionsClientGetOptions contains the optional parameters for the WorkflowVersionsClient.Get method. -type WorkflowVersionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowVersionsClientListOptions contains the optional parameters for the WorkflowVersionsClient.NewListPager method. -type WorkflowVersionsClientListOptions struct { - // The number of items to be included in the result. - Top *int32 -} - -// WorkflowsClientBeginMoveOptions contains the optional parameters for the WorkflowsClient.BeginMove method. -type WorkflowsClientBeginMoveOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkflowsClientCreateOrUpdateOptions contains the optional parameters for the WorkflowsClient.CreateOrUpdate method. -type WorkflowsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WorkflowsClientDeleteOptions contains the optional parameters for the WorkflowsClient.Delete method. -type WorkflowsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// WorkflowsClientDisableOptions contains the optional parameters for the WorkflowsClient.Disable method. -type WorkflowsClientDisableOptions struct { - // placeholder for future optional parameters -} - -// WorkflowsClientEnableOptions contains the optional parameters for the WorkflowsClient.Enable method. -type WorkflowsClientEnableOptions struct { - // placeholder for future optional parameters -} - -// WorkflowsClientGenerateUpgradedDefinitionOptions contains the optional parameters for the WorkflowsClient.GenerateUpgradedDefinition -// method. -type WorkflowsClientGenerateUpgradedDefinitionOptions struct { - // placeholder for future optional parameters -} - -// WorkflowsClientGetOptions contains the optional parameters for the WorkflowsClient.Get method. -type WorkflowsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowsClientListByResourceGroupOptions contains the optional parameters for the WorkflowsClient.NewListByResourceGroupPager -// method. -type WorkflowsClientListByResourceGroupOptions struct { - // The filter to apply on the operation. Options for filters include: State, Trigger, and ReferencedResourceId. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - -// WorkflowsClientListBySubscriptionOptions contains the optional parameters for the WorkflowsClient.NewListBySubscriptionPager -// method. -type WorkflowsClientListBySubscriptionOptions struct { - // The filter to apply on the operation. Options for filters include: State, Trigger, and ReferencedResourceId. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - -// WorkflowsClientListCallbackURLOptions contains the optional parameters for the WorkflowsClient.ListCallbackURL method. -type WorkflowsClientListCallbackURLOptions struct { - // placeholder for future optional parameters -} - -// WorkflowsClientListSwaggerOptions contains the optional parameters for the WorkflowsClient.ListSwagger method. -type WorkflowsClientListSwaggerOptions struct { - // placeholder for future optional parameters -} - -// WorkflowsClientRegenerateAccessKeyOptions contains the optional parameters for the WorkflowsClient.RegenerateAccessKey -// method. -type WorkflowsClientRegenerateAccessKeyOptions struct { - // placeholder for future optional parameters -} - -// WorkflowsClientUpdateOptions contains the optional parameters for the WorkflowsClient.Update method. -type WorkflowsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// WorkflowsClientValidateByLocationOptions contains the optional parameters for the WorkflowsClient.ValidateByLocation method. -type WorkflowsClientValidateByLocationOptions struct { - // placeholder for future optional parameters -} - -// WorkflowsClientValidateByResourceGroupOptions contains the optional parameters for the WorkflowsClient.ValidateByResourceGroup -// method. -type WorkflowsClientValidateByResourceGroupOptions struct { - // placeholder for future optional parameters -} - // WsdlService - The WSDL service. type WsdlService struct { // The list of endpoints' qualified names. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/models_serde.go index b459c038..d048fb6b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -1103,11 +1102,11 @@ func (a *AgreementContent) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ArtifactContentPropertiesDefinition. func (a ArtifactContentPropertiesDefinition) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "changedTime", a.ChangedTime) + populateDateTimeRFC3339(objectMap, "changedTime", a.ChangedTime) populateAny(objectMap, "content", a.Content) populate(objectMap, "contentLink", a.ContentLink) populate(objectMap, "contentType", a.ContentType) - populateTimeRFC3339(objectMap, "createdTime", a.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", a.CreatedTime) populateAny(objectMap, "metadata", a.Metadata) return json.Marshal(objectMap) } @@ -1122,7 +1121,7 @@ func (a *ArtifactContentPropertiesDefinition) UnmarshalJSON(data []byte) error { var err error switch key { case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &a.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &a.ChangedTime) delete(rawMsg, key) case "content": err = unpopulate(val, "Content", &a.Content) @@ -1134,7 +1133,7 @@ func (a *ArtifactContentPropertiesDefinition) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ContentType", &a.ContentType) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &a.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &a.CreatedTime) delete(rawMsg, key) case "metadata": err = unpopulate(val, "Metadata", &a.Metadata) @@ -1150,8 +1149,8 @@ func (a *ArtifactContentPropertiesDefinition) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ArtifactProperties. func (a ArtifactProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "changedTime", a.ChangedTime) - populateTimeRFC3339(objectMap, "createdTime", a.CreatedTime) + populateDateTimeRFC3339(objectMap, "changedTime", a.ChangedTime) + populateDateTimeRFC3339(objectMap, "createdTime", a.CreatedTime) populateAny(objectMap, "metadata", a.Metadata) return json.Marshal(objectMap) } @@ -1166,10 +1165,10 @@ func (a *ArtifactProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &a.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &a.ChangedTime) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &a.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &a.CreatedTime) delete(rawMsg, key) case "metadata": err = unpopulate(val, "Metadata", &a.Metadata) @@ -1263,11 +1262,11 @@ func (a AssemblyProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "assemblyName", a.AssemblyName) populate(objectMap, "assemblyPublicKeyToken", a.AssemblyPublicKeyToken) populate(objectMap, "assemblyVersion", a.AssemblyVersion) - populateTimeRFC3339(objectMap, "changedTime", a.ChangedTime) + populateDateTimeRFC3339(objectMap, "changedTime", a.ChangedTime) populateAny(objectMap, "content", a.Content) populate(objectMap, "contentLink", a.ContentLink) populate(objectMap, "contentType", a.ContentType) - populateTimeRFC3339(objectMap, "createdTime", a.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", a.CreatedTime) populateAny(objectMap, "metadata", a.Metadata) return json.Marshal(objectMap) } @@ -1294,7 +1293,7 @@ func (a *AssemblyProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AssemblyVersion", &a.AssemblyVersion) delete(rawMsg, key) case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &a.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &a.ChangedTime) delete(rawMsg, key) case "content": err = unpopulate(val, "Content", &a.Content) @@ -1306,7 +1305,7 @@ func (a *AssemblyProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ContentType", &a.ContentType) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &a.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &a.CreatedTime) delete(rawMsg, key) case "metadata": err = unpopulate(val, "Metadata", &a.Metadata) @@ -1459,8 +1458,8 @@ func (b *BatchConfigurationCollection) UnmarshalJSON(data []byte) error { func (b BatchConfigurationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "batchGroupName", b.BatchGroupName) - populateTimeRFC3339(objectMap, "changedTime", b.ChangedTime) - populateTimeRFC3339(objectMap, "createdTime", b.CreatedTime) + populateDateTimeRFC3339(objectMap, "changedTime", b.ChangedTime) + populateDateTimeRFC3339(objectMap, "createdTime", b.CreatedTime) populateAny(objectMap, "metadata", b.Metadata) populate(objectMap, "releaseCriteria", b.ReleaseCriteria) return json.Marshal(objectMap) @@ -1479,10 +1478,10 @@ func (b *BatchConfigurationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "BatchGroupName", &b.BatchGroupName) delete(rawMsg, key) case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &b.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &b.ChangedTime) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &b.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &b.CreatedTime) delete(rawMsg, key) case "metadata": err = unpopulate(val, "Metadata", &b.Metadata) @@ -2958,7 +2957,7 @@ func (g *GenerateUpgradedDefinitionParameters) UnmarshalJSON(data []byte) error func (g GetCallbackURLParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "keyType", g.KeyType) - populateTimeRFC3339(objectMap, "notAfter", g.NotAfter) + populateDateTimeRFC3339(objectMap, "notAfter", g.NotAfter) return json.Marshal(objectMap) } @@ -2975,7 +2974,7 @@ func (g *GetCallbackURLParameters) UnmarshalJSON(data []byte) error { err = unpopulate(val, "KeyType", &g.KeyType) delete(rawMsg, key) case "notAfter": - err = unpopulateTimeRFC3339(val, "NotAfter", &g.NotAfter) + err = unpopulateDateTimeRFC3339(val, "NotAfter", &g.NotAfter) delete(rawMsg, key) } if err != nil { @@ -3199,9 +3198,9 @@ func (i *IntegrationAccountAgreementListResult) UnmarshalJSON(data []byte) error func (i IntegrationAccountAgreementProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "agreementType", i.AgreementType) - populateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) + populateDateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) populate(objectMap, "content", i.Content) - populateTimeRFC3339(objectMap, "createdTime", i.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", i.CreatedTime) populate(objectMap, "guestIdentity", i.GuestIdentity) populate(objectMap, "guestPartner", i.GuestPartner) populate(objectMap, "hostIdentity", i.HostIdentity) @@ -3223,13 +3222,13 @@ func (i *IntegrationAccountAgreementProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "AgreementType", &i.AgreementType) delete(rawMsg, key) case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) delete(rawMsg, key) case "content": err = unpopulate(val, "Content", &i.Content) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &i.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &i.CreatedTime) delete(rawMsg, key) case "guestIdentity": err = unpopulate(val, "GuestIdentity", &i.GuestIdentity) @@ -3335,8 +3334,8 @@ func (i *IntegrationAccountCertificateListResult) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type IntegrationAccountCertificateProperties. func (i IntegrationAccountCertificateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) - populateTimeRFC3339(objectMap, "createdTime", i.CreatedTime) + populateDateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) + populateDateTimeRFC3339(objectMap, "createdTime", i.CreatedTime) populate(objectMap, "key", i.Key) populateAny(objectMap, "metadata", i.Metadata) populate(objectMap, "publicCertificate", i.PublicCertificate) @@ -3353,10 +3352,10 @@ func (i *IntegrationAccountCertificateProperties) UnmarshalJSON(data []byte) err var err error switch key { case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &i.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &i.CreatedTime) delete(rawMsg, key) case "key": err = unpopulate(val, "Key", &i.Key) @@ -3514,11 +3513,11 @@ func (i *IntegrationAccountMapListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IntegrationAccountMapProperties. func (i IntegrationAccountMapProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) + populateDateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) populate(objectMap, "content", i.Content) populate(objectMap, "contentLink", i.ContentLink) populate(objectMap, "contentType", i.ContentType) - populateTimeRFC3339(objectMap, "createdTime", i.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", i.CreatedTime) populate(objectMap, "mapType", i.MapType) populateAny(objectMap, "metadata", i.Metadata) populate(objectMap, "parametersSchema", i.ParametersSchema) @@ -3535,7 +3534,7 @@ func (i *IntegrationAccountMapProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) delete(rawMsg, key) case "content": err = unpopulate(val, "Content", &i.Content) @@ -3547,7 +3546,7 @@ func (i *IntegrationAccountMapProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ContentType", &i.ContentType) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &i.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &i.CreatedTime) delete(rawMsg, key) case "mapType": err = unpopulate(val, "MapType", &i.MapType) @@ -3701,9 +3700,9 @@ func (i *IntegrationAccountPartnerListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IntegrationAccountPartnerProperties. func (i IntegrationAccountPartnerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) + populateDateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) populate(objectMap, "content", i.Content) - populateTimeRFC3339(objectMap, "createdTime", i.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", i.CreatedTime) populateAny(objectMap, "metadata", i.Metadata) populate(objectMap, "partnerType", i.PartnerType) return json.Marshal(objectMap) @@ -3719,13 +3718,13 @@ func (i *IntegrationAccountPartnerProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) delete(rawMsg, key) case "content": err = unpopulate(val, "Content", &i.Content) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &i.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &i.CreatedTime) delete(rawMsg, key) case "metadata": err = unpopulate(val, "Metadata", &i.Metadata) @@ -3907,11 +3906,11 @@ func (i *IntegrationAccountSchemaListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IntegrationAccountSchemaProperties. func (i IntegrationAccountSchemaProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) + populateDateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) populate(objectMap, "content", i.Content) populate(objectMap, "contentLink", i.ContentLink) populate(objectMap, "contentType", i.ContentType) - populateTimeRFC3339(objectMap, "createdTime", i.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", i.CreatedTime) populate(objectMap, "documentName", i.DocumentName) populate(objectMap, "fileName", i.FileName) populateAny(objectMap, "metadata", i.Metadata) @@ -3930,7 +3929,7 @@ func (i *IntegrationAccountSchemaProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) delete(rawMsg, key) case "content": err = unpopulate(val, "Content", &i.Content) @@ -3942,7 +3941,7 @@ func (i *IntegrationAccountSchemaProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ContentType", &i.ContentType) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &i.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &i.CreatedTime) delete(rawMsg, key) case "documentName": err = unpopulate(val, "DocumentName", &i.DocumentName) @@ -4017,7 +4016,7 @@ func (i *IntegrationAccountSession) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IntegrationAccountSessionFilter. func (i IntegrationAccountSessionFilter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) + populateDateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) return json.Marshal(objectMap) } @@ -4031,7 +4030,7 @@ func (i *IntegrationAccountSessionFilter) UnmarshalJSON(data []byte) error { var err error switch key { case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) delete(rawMsg, key) } if err != nil { @@ -4075,9 +4074,9 @@ func (i *IntegrationAccountSessionListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IntegrationAccountSessionProperties. func (i IntegrationAccountSessionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) + populateDateTimeRFC3339(objectMap, "changedTime", i.ChangedTime) populateAny(objectMap, "content", i.Content) - populateTimeRFC3339(objectMap, "createdTime", i.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", i.CreatedTime) return json.Marshal(objectMap) } @@ -4091,13 +4090,13 @@ func (i *IntegrationAccountSessionProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &i.ChangedTime) delete(rawMsg, key) case "content": err = unpopulate(val, "Content", &i.Content) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &i.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &i.CreatedTime) delete(rawMsg, key) } if err != nil { @@ -5435,7 +5434,7 @@ func (o OperationResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", o.Code) populate(objectMap, "correlation", o.Correlation) - populateTimeRFC3339(objectMap, "endTime", o.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", o.EndTime) populateAny(objectMap, "error", o.Error) populateAny(objectMap, "inputs", o.Inputs) populate(objectMap, "inputsLink", o.InputsLink) @@ -5443,7 +5442,7 @@ func (o OperationResult) MarshalJSON() ([]byte, error) { populateAny(objectMap, "outputs", o.Outputs) populate(objectMap, "outputsLink", o.OutputsLink) populate(objectMap, "retryHistory", o.RetryHistory) - populateTimeRFC3339(objectMap, "startTime", o.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) populate(objectMap, "status", o.Status) populateAny(objectMap, "trackedProperties", o.TrackedProperties) populate(objectMap, "trackingId", o.TrackingID) @@ -5466,7 +5465,7 @@ func (o *OperationResult) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Correlation", &o.Correlation) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &o.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &o.Error) @@ -5490,7 +5489,7 @@ func (o *OperationResult) UnmarshalJSON(data []byte) error { err = unpopulate(val, "RetryHistory", &o.RetryHistory) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &o.Status) @@ -5514,9 +5513,9 @@ func (o OperationResultProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", o.Code) populate(objectMap, "correlation", o.Correlation) - populateTimeRFC3339(objectMap, "endTime", o.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", o.EndTime) populateAny(objectMap, "error", o.Error) - populateTimeRFC3339(objectMap, "startTime", o.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) populate(objectMap, "status", o.Status) return json.Marshal(objectMap) } @@ -5537,13 +5536,13 @@ func (o *OperationResultProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Correlation", &o.Correlation) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &o.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &o.Error) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &o.Status) @@ -5831,10 +5830,10 @@ func (r *RequestHistoryListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RequestHistoryProperties. func (r RequestHistoryProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", r.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", r.EndTime) populate(objectMap, "request", r.Request) populate(objectMap, "response", r.Response) - populateTimeRFC3339(objectMap, "startTime", r.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", r.StartTime) return json.Marshal(objectMap) } @@ -5848,7 +5847,7 @@ func (r *RequestHistoryProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &r.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &r.EndTime) delete(rawMsg, key) case "request": err = unpopulate(val, "Request", &r.Request) @@ -5857,7 +5856,7 @@ func (r *RequestHistoryProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Response", &r.Response) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &r.StartTime) delete(rawMsg, key) } if err != nil { @@ -5985,10 +5984,10 @@ func (r RetryHistory) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "clientRequestId", r.ClientRequestID) populate(objectMap, "code", r.Code) - populateTimeRFC3339(objectMap, "endTime", r.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", r.EndTime) populate(objectMap, "error", r.Error) populate(objectMap, "serviceRequestId", r.ServiceRequestID) - populateTimeRFC3339(objectMap, "startTime", r.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", r.StartTime) return json.Marshal(objectMap) } @@ -6008,7 +6007,7 @@ func (r *RetryHistory) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Code", &r.Code) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &r.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &r.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &r.Error) @@ -6017,7 +6016,7 @@ func (r *RetryHistory) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ServiceRequestID", &r.ServiceRequestID) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &r.StartTime) delete(rawMsg, key) } if err != nil { @@ -6645,7 +6644,7 @@ func (t TrackingEvent) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "error", t.Error) populate(objectMap, "eventLevel", t.EventLevel) - populateTimeRFC3339(objectMap, "eventTime", t.EventTime) + populateDateTimeRFC3339(objectMap, "eventTime", t.EventTime) populateAny(objectMap, "record", t.Record) populate(objectMap, "recordType", t.RecordType) return json.Marshal(objectMap) @@ -6667,7 +6666,7 @@ func (t *TrackingEvent) UnmarshalJSON(data []byte) error { err = unpopulate(val, "EventLevel", &t.EventLevel) delete(rawMsg, key) case "eventTime": - err = unpopulateTimeRFC3339(val, "EventTime", &t.EventTime) + err = unpopulateDateTimeRFC3339(val, "EventTime", &t.EventTime) delete(rawMsg, key) case "record": err = unpopulate(val, "Record", &t.Record) @@ -6976,8 +6975,8 @@ func (w WorkflowProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "accessControl", w.AccessControl) populate(objectMap, "accessEndpoint", w.AccessEndpoint) - populateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) - populateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) + populateDateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) + populateDateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) populateAny(objectMap, "definition", w.Definition) populate(objectMap, "endpointsConfiguration", w.EndpointsConfiguration) populate(objectMap, "integrationAccount", w.IntegrationAccount) @@ -7006,10 +7005,10 @@ func (w *WorkflowProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AccessEndpoint", &w.AccessEndpoint) delete(rawMsg, key) case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) delete(rawMsg, key) case "definition": err = unpopulate(val, "Definition", &w.Definition) @@ -7222,12 +7221,12 @@ func (w WorkflowRunActionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", w.Code) populate(objectMap, "correlation", w.Correlation) - populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) populateAny(objectMap, "error", w.Error) populate(objectMap, "inputsLink", w.InputsLink) populate(objectMap, "outputsLink", w.OutputsLink) populate(objectMap, "retryHistory", w.RetryHistory) - populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) populate(objectMap, "status", w.Status) populateAny(objectMap, "trackedProperties", w.TrackedProperties) populate(objectMap, "trackingId", w.TrackingID) @@ -7250,7 +7249,7 @@ func (w *WorkflowRunActionProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Correlation", &w.Correlation) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &w.Error) @@ -7265,7 +7264,7 @@ func (w *WorkflowRunActionProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "RetryHistory", &w.RetryHistory) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &w.Status) @@ -7367,7 +7366,7 @@ func (w WorkflowRunActionRepetitionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", w.Code) populate(objectMap, "correlation", w.Correlation) - populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) populateAny(objectMap, "error", w.Error) populateAny(objectMap, "inputs", w.Inputs) populate(objectMap, "inputsLink", w.InputsLink) @@ -7376,7 +7375,7 @@ func (w WorkflowRunActionRepetitionProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "outputsLink", w.OutputsLink) populate(objectMap, "repetitionIndexes", w.RepetitionIndexes) populate(objectMap, "retryHistory", w.RetryHistory) - populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) populate(objectMap, "status", w.Status) populateAny(objectMap, "trackedProperties", w.TrackedProperties) populate(objectMap, "trackingId", w.TrackingID) @@ -7399,7 +7398,7 @@ func (w *WorkflowRunActionRepetitionProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "Correlation", &w.Correlation) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &w.Error) @@ -7426,7 +7425,7 @@ func (w *WorkflowRunActionRepetitionProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "RetryHistory", &w.RetryHistory) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &w.Status) @@ -7509,14 +7508,14 @@ func (w WorkflowRunProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "code", w.Code) populate(objectMap, "correlation", w.Correlation) populate(objectMap, "correlationId", w.CorrelationID) - populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) populateAny(objectMap, "error", w.Error) populate(objectMap, "outputs", w.Outputs) populate(objectMap, "response", w.Response) - populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) populate(objectMap, "status", w.Status) populate(objectMap, "trigger", w.Trigger) - populateTimeRFC3339(objectMap, "waitEndTime", w.WaitEndTime) + populateDateTimeRFC3339(objectMap, "waitEndTime", w.WaitEndTime) populate(objectMap, "workflow", w.Workflow) return json.Marshal(objectMap) } @@ -7540,7 +7539,7 @@ func (w *WorkflowRunProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CorrelationID", &w.CorrelationID) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &w.Error) @@ -7552,7 +7551,7 @@ func (w *WorkflowRunProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Response", &w.Response) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &w.Status) @@ -7561,7 +7560,7 @@ func (w *WorkflowRunProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Trigger", &w.Trigger) delete(rawMsg, key) case "waitEndTime": - err = unpopulateTimeRFC3339(val, "WaitEndTime", &w.WaitEndTime) + err = unpopulateDateTimeRFC3339(val, "WaitEndTime", &w.WaitEndTime) delete(rawMsg, key) case "workflow": err = unpopulate(val, "Workflow", &w.Workflow) @@ -7579,15 +7578,15 @@ func (w WorkflowRunTrigger) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", w.Code) populate(objectMap, "correlation", w.Correlation) - populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) populateAny(objectMap, "error", w.Error) populateAny(objectMap, "inputs", w.Inputs) populate(objectMap, "inputsLink", w.InputsLink) populate(objectMap, "name", w.Name) populateAny(objectMap, "outputs", w.Outputs) populate(objectMap, "outputsLink", w.OutputsLink) - populateTimeRFC3339(objectMap, "scheduledTime", w.ScheduledTime) - populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populateDateTimeRFC3339(objectMap, "scheduledTime", w.ScheduledTime) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) populate(objectMap, "status", w.Status) populateAny(objectMap, "trackedProperties", w.TrackedProperties) populate(objectMap, "trackingId", w.TrackingID) @@ -7610,7 +7609,7 @@ func (w *WorkflowRunTrigger) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Correlation", &w.Correlation) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &w.Error) @@ -7631,10 +7630,10 @@ func (w *WorkflowRunTrigger) UnmarshalJSON(data []byte) error { err = unpopulate(val, "OutputsLink", &w.OutputsLink) delete(rawMsg, key) case "scheduledTime": - err = unpopulateTimeRFC3339(val, "ScheduledTime", &w.ScheduledTime) + err = unpopulateDateTimeRFC3339(val, "ScheduledTime", &w.ScheduledTime) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &w.Status) @@ -7868,14 +7867,14 @@ func (w WorkflowTriggerHistoryProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", w.Code) populate(objectMap, "correlation", w.Correlation) - populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) populateAny(objectMap, "error", w.Error) populate(objectMap, "fired", w.Fired) populate(objectMap, "inputsLink", w.InputsLink) populate(objectMap, "outputsLink", w.OutputsLink) populate(objectMap, "run", w.Run) - populateTimeRFC3339(objectMap, "scheduledTime", w.ScheduledTime) - populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populateDateTimeRFC3339(objectMap, "scheduledTime", w.ScheduledTime) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) populate(objectMap, "status", w.Status) populate(objectMap, "trackingId", w.TrackingID) return json.Marshal(objectMap) @@ -7897,7 +7896,7 @@ func (w *WorkflowTriggerHistoryProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Correlation", &w.Correlation) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &w.Error) @@ -7915,10 +7914,10 @@ func (w *WorkflowTriggerHistoryProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Run", &w.Run) delete(rawMsg, key) case "scheduledTime": - err = unpopulateTimeRFC3339(val, "ScheduledTime", &w.ScheduledTime) + err = unpopulateDateTimeRFC3339(val, "ScheduledTime", &w.ScheduledTime) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &w.Status) @@ -8011,10 +8010,10 @@ func (w *WorkflowTriggerListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerProperties. func (w WorkflowTriggerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) - populateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) - populateTimeRFC3339(objectMap, "lastExecutionTime", w.LastExecutionTime) - populateTimeRFC3339(objectMap, "nextExecutionTime", w.NextExecutionTime) + populateDateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) + populateDateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) + populateDateTimeRFC3339(objectMap, "lastExecutionTime", w.LastExecutionTime) + populateDateTimeRFC3339(objectMap, "nextExecutionTime", w.NextExecutionTime) populate(objectMap, "provisioningState", w.ProvisioningState) populate(objectMap, "recurrence", w.Recurrence) populate(objectMap, "state", w.State) @@ -8033,16 +8032,16 @@ func (w *WorkflowTriggerProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) delete(rawMsg, key) case "lastExecutionTime": - err = unpopulateTimeRFC3339(val, "LastExecutionTime", &w.LastExecutionTime) + err = unpopulateDateTimeRFC3339(val, "LastExecutionTime", &w.LastExecutionTime) delete(rawMsg, key) case "nextExecutionTime": - err = unpopulateTimeRFC3339(val, "NextExecutionTime", &w.NextExecutionTime) + err = unpopulateDateTimeRFC3339(val, "NextExecutionTime", &w.NextExecutionTime) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) @@ -8240,8 +8239,8 @@ func (w WorkflowVersionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "accessControl", w.AccessControl) populate(objectMap, "accessEndpoint", w.AccessEndpoint) - populateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) - populateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) + populateDateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) + populateDateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) populateAny(objectMap, "definition", w.Definition) populate(objectMap, "endpointsConfiguration", w.EndpointsConfiguration) populate(objectMap, "integrationAccount", w.IntegrationAccount) @@ -8269,10 +8268,10 @@ func (w *WorkflowVersionProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AccessEndpoint", &w.AccessEndpoint) delete(rawMsg, key) case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) delete(rawMsg, key) case "definition": err = unpopulate(val, "Definition", &w.Definition) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/operations_client.go index eb8649ad..5335e657 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,20 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/options.go new file mode 100644 index 00000000..3a263e2a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/options.go @@ -0,0 +1,672 @@ +//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 armlogic + +// IntegrationAccountAgreementsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountAgreementsClient.CreateOrUpdate +// method. +type IntegrationAccountAgreementsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountAgreementsClientDeleteOptions contains the optional parameters for the IntegrationAccountAgreementsClient.Delete +// method. +type IntegrationAccountAgreementsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountAgreementsClientGetOptions contains the optional parameters for the IntegrationAccountAgreementsClient.Get +// method. +type IntegrationAccountAgreementsClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountAgreementsClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountAgreementsClient.ListContentCallbackURL +// method. +type IntegrationAccountAgreementsClientListContentCallbackURLOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountAgreementsClientListOptions contains the optional parameters for the IntegrationAccountAgreementsClient.NewListPager +// method. +type IntegrationAccountAgreementsClientListOptions struct { + // The filter to apply on the operation. Options for filters include: AgreementType. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// IntegrationAccountAssembliesClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountAssembliesClient.CreateOrUpdate +// method. +type IntegrationAccountAssembliesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountAssembliesClientDeleteOptions contains the optional parameters for the IntegrationAccountAssembliesClient.Delete +// method. +type IntegrationAccountAssembliesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountAssembliesClientGetOptions contains the optional parameters for the IntegrationAccountAssembliesClient.Get +// method. +type IntegrationAccountAssembliesClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountAssembliesClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountAssembliesClient.ListContentCallbackURL +// method. +type IntegrationAccountAssembliesClientListContentCallbackURLOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountAssembliesClientListOptions contains the optional parameters for the IntegrationAccountAssembliesClient.NewListPager +// method. +type IntegrationAccountAssembliesClientListOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountBatchConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountBatchConfigurationsClient.CreateOrUpdate +// method. +type IntegrationAccountBatchConfigurationsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountBatchConfigurationsClientDeleteOptions contains the optional parameters for the IntegrationAccountBatchConfigurationsClient.Delete +// method. +type IntegrationAccountBatchConfigurationsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountBatchConfigurationsClientGetOptions contains the optional parameters for the IntegrationAccountBatchConfigurationsClient.Get +// method. +type IntegrationAccountBatchConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountBatchConfigurationsClientListOptions contains the optional parameters for the IntegrationAccountBatchConfigurationsClient.NewListPager +// method. +type IntegrationAccountBatchConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountCertificatesClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountCertificatesClient.CreateOrUpdate +// method. +type IntegrationAccountCertificatesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountCertificatesClientDeleteOptions contains the optional parameters for the IntegrationAccountCertificatesClient.Delete +// method. +type IntegrationAccountCertificatesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountCertificatesClientGetOptions contains the optional parameters for the IntegrationAccountCertificatesClient.Get +// method. +type IntegrationAccountCertificatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountCertificatesClientListOptions contains the optional parameters for the IntegrationAccountCertificatesClient.NewListPager +// method. +type IntegrationAccountCertificatesClientListOptions struct { + // The number of items to be included in the result. + Top *int32 +} + +// IntegrationAccountMapsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountMapsClient.CreateOrUpdate +// method. +type IntegrationAccountMapsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountMapsClientDeleteOptions contains the optional parameters for the IntegrationAccountMapsClient.Delete +// method. +type IntegrationAccountMapsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountMapsClientGetOptions contains the optional parameters for the IntegrationAccountMapsClient.Get method. +type IntegrationAccountMapsClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountMapsClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountMapsClient.ListContentCallbackURL +// method. +type IntegrationAccountMapsClientListContentCallbackURLOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountMapsClientListOptions contains the optional parameters for the IntegrationAccountMapsClient.NewListPager +// method. +type IntegrationAccountMapsClientListOptions struct { + // The filter to apply on the operation. Options for filters include: MapType. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// IntegrationAccountPartnersClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountPartnersClient.CreateOrUpdate +// method. +type IntegrationAccountPartnersClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountPartnersClientDeleteOptions contains the optional parameters for the IntegrationAccountPartnersClient.Delete +// method. +type IntegrationAccountPartnersClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountPartnersClientGetOptions contains the optional parameters for the IntegrationAccountPartnersClient.Get +// method. +type IntegrationAccountPartnersClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountPartnersClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountPartnersClient.ListContentCallbackURL +// method. +type IntegrationAccountPartnersClientListContentCallbackURLOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountPartnersClientListOptions contains the optional parameters for the IntegrationAccountPartnersClient.NewListPager +// method. +type IntegrationAccountPartnersClientListOptions struct { + // The filter to apply on the operation. Options for filters include: PartnerType. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// IntegrationAccountSchemasClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountSchemasClient.CreateOrUpdate +// method. +type IntegrationAccountSchemasClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountSchemasClientDeleteOptions contains the optional parameters for the IntegrationAccountSchemasClient.Delete +// method. +type IntegrationAccountSchemasClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountSchemasClientGetOptions contains the optional parameters for the IntegrationAccountSchemasClient.Get +// method. +type IntegrationAccountSchemasClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountSchemasClientListContentCallbackURLOptions contains the optional parameters for the IntegrationAccountSchemasClient.ListContentCallbackURL +// method. +type IntegrationAccountSchemasClientListContentCallbackURLOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountSchemasClientListOptions contains the optional parameters for the IntegrationAccountSchemasClient.NewListPager +// method. +type IntegrationAccountSchemasClientListOptions struct { + // The filter to apply on the operation. Options for filters include: SchemaType. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// IntegrationAccountSessionsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountSessionsClient.CreateOrUpdate +// method. +type IntegrationAccountSessionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountSessionsClientDeleteOptions contains the optional parameters for the IntegrationAccountSessionsClient.Delete +// method. +type IntegrationAccountSessionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountSessionsClientGetOptions contains the optional parameters for the IntegrationAccountSessionsClient.Get +// method. +type IntegrationAccountSessionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountSessionsClientListOptions contains the optional parameters for the IntegrationAccountSessionsClient.NewListPager +// method. +type IntegrationAccountSessionsClientListOptions struct { + // The filter to apply on the operation. Options for filters include: ChangedTime. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// IntegrationAccountsClientCreateOrUpdateOptions contains the optional parameters for the IntegrationAccountsClient.CreateOrUpdate +// method. +type IntegrationAccountsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountsClientDeleteOptions contains the optional parameters for the IntegrationAccountsClient.Delete method. +type IntegrationAccountsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountsClientGetOptions contains the optional parameters for the IntegrationAccountsClient.Get method. +type IntegrationAccountsClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountsClientListByResourceGroupOptions contains the optional parameters for the IntegrationAccountsClient.NewListByResourceGroupPager +// method. +type IntegrationAccountsClientListByResourceGroupOptions struct { + // The number of items to be included in the result. + Top *int32 +} + +// IntegrationAccountsClientListBySubscriptionOptions contains the optional parameters for the IntegrationAccountsClient.NewListBySubscriptionPager +// method. +type IntegrationAccountsClientListBySubscriptionOptions struct { + // The number of items to be included in the result. + Top *int32 +} + +// IntegrationAccountsClientListCallbackURLOptions contains the optional parameters for the IntegrationAccountsClient.ListCallbackURL +// method. +type IntegrationAccountsClientListCallbackURLOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountsClientListKeyVaultKeysOptions contains the optional parameters for the IntegrationAccountsClient.NewListKeyVaultKeysPager +// method. +type IntegrationAccountsClientListKeyVaultKeysOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountsClientLogTrackingEventsOptions contains the optional parameters for the IntegrationAccountsClient.LogTrackingEvents +// method. +type IntegrationAccountsClientLogTrackingEventsOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountsClientRegenerateAccessKeyOptions contains the optional parameters for the IntegrationAccountsClient.RegenerateAccessKey +// method. +type IntegrationAccountsClientRegenerateAccessKeyOptions struct { + // placeholder for future optional parameters +} + +// IntegrationAccountsClientUpdateOptions contains the optional parameters for the IntegrationAccountsClient.Update method. +type IntegrationAccountsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// IntegrationServiceEnvironmentManagedAPIOperationsClientListOptions contains the optional parameters for the IntegrationServiceEnvironmentManagedAPIOperationsClient.NewListPager +// method. +type IntegrationServiceEnvironmentManagedAPIOperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// IntegrationServiceEnvironmentManagedApisClientBeginDeleteOptions contains the optional parameters for the IntegrationServiceEnvironmentManagedApisClient.BeginDelete +// method. +type IntegrationServiceEnvironmentManagedApisClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IntegrationServiceEnvironmentManagedApisClientBeginPutOptions contains the optional parameters for the IntegrationServiceEnvironmentManagedApisClient.BeginPut +// method. +type IntegrationServiceEnvironmentManagedApisClientBeginPutOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IntegrationServiceEnvironmentManagedApisClientGetOptions contains the optional parameters for the IntegrationServiceEnvironmentManagedApisClient.Get +// method. +type IntegrationServiceEnvironmentManagedApisClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationServiceEnvironmentManagedApisClientListOptions contains the optional parameters for the IntegrationServiceEnvironmentManagedApisClient.NewListPager +// method. +type IntegrationServiceEnvironmentManagedApisClientListOptions struct { + // placeholder for future optional parameters +} + +// IntegrationServiceEnvironmentNetworkHealthClientGetOptions contains the optional parameters for the IntegrationServiceEnvironmentNetworkHealthClient.Get +// method. +type IntegrationServiceEnvironmentNetworkHealthClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationServiceEnvironmentSKUsClientListOptions contains the optional parameters for the IntegrationServiceEnvironmentSKUsClient.NewListPager +// method. +type IntegrationServiceEnvironmentSKUsClientListOptions struct { + // placeholder for future optional parameters +} + +// IntegrationServiceEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.BeginCreateOrUpdate +// method. +type IntegrationServiceEnvironmentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IntegrationServiceEnvironmentsClientBeginUpdateOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.BeginUpdate +// method. +type IntegrationServiceEnvironmentsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IntegrationServiceEnvironmentsClientDeleteOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.Delete +// method. +type IntegrationServiceEnvironmentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IntegrationServiceEnvironmentsClientGetOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.Get +// method. +type IntegrationServiceEnvironmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationServiceEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.NewListByResourceGroupPager +// method. +type IntegrationServiceEnvironmentsClientListByResourceGroupOptions struct { + // The number of items to be included in the result. + Top *int32 +} + +// IntegrationServiceEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.NewListBySubscriptionPager +// method. +type IntegrationServiceEnvironmentsClientListBySubscriptionOptions struct { + // The number of items to be included in the result. + Top *int32 +} + +// IntegrationServiceEnvironmentsClientRestartOptions contains the optional parameters for the IntegrationServiceEnvironmentsClient.Restart +// method. +type IntegrationServiceEnvironmentsClientRestartOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.Get +// method. +type WorkflowRunActionRepetitionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager +// method. +type WorkflowRunActionRepetitionsClientListExpressionTracesOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.NewListPager +// method. +type WorkflowRunActionRepetitionsClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.Get +// method. +type WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsRequestHistoriesClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager +// method. +type WorkflowRunActionRepetitionsRequestHistoriesClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRequestHistoriesClientGetOptions contains the optional parameters for the WorkflowRunActionRequestHistoriesClient.Get +// method. +type WorkflowRunActionRequestHistoriesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRequestHistoriesClientListOptions contains the optional parameters for the WorkflowRunActionRequestHistoriesClient.NewListPager +// method. +type WorkflowRunActionRequestHistoriesClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionScopeRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.Get +// method. +type WorkflowRunActionScopeRepetitionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionScopeRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.NewListPager +// method. +type WorkflowRunActionScopeRepetitionsClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionsClientGetOptions contains the optional parameters for the WorkflowRunActionsClient.Get method. +type WorkflowRunActionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionsClient.NewListExpressionTracesPager +// method. +type WorkflowRunActionsClientListExpressionTracesOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionsClientListOptions contains the optional parameters for the WorkflowRunActionsClient.NewListPager method. +type WorkflowRunActionsClientListOptions struct { + // The filter to apply on the operation. Options for filters include: Status. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowRunOperationsClientGetOptions contains the optional parameters for the WorkflowRunOperationsClient.Get method. +type WorkflowRunOperationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunsClientCancelOptions contains the optional parameters for the WorkflowRunsClient.Cancel method. +type WorkflowRunsClientCancelOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunsClientGetOptions contains the optional parameters for the WorkflowRunsClient.Get method. +type WorkflowRunsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunsClientListOptions contains the optional parameters for the WorkflowRunsClient.NewListPager method. +type WorkflowRunsClientListOptions struct { + // The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowTriggerHistoriesClientGetOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.Get method. +type WorkflowTriggerHistoriesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggerHistoriesClientListOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.NewListPager +// method. +type WorkflowTriggerHistoriesClientListOptions struct { + // The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowTriggerHistoriesClientResubmitOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.Resubmit +// method. +type WorkflowTriggerHistoriesClientResubmitOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggersClientGetOptions contains the optional parameters for the WorkflowTriggersClient.Get method. +type WorkflowTriggersClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggersClientGetSchemaJSONOptions contains the optional parameters for the WorkflowTriggersClient.GetSchemaJSON +// method. +type WorkflowTriggersClientGetSchemaJSONOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggersClientListCallbackURLOptions contains the optional parameters for the WorkflowTriggersClient.ListCallbackURL +// method. +type WorkflowTriggersClientListCallbackURLOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggersClientListOptions contains the optional parameters for the WorkflowTriggersClient.NewListPager method. +type WorkflowTriggersClientListOptions struct { + // The filter to apply on the operation. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowTriggersClientResetOptions contains the optional parameters for the WorkflowTriggersClient.Reset method. +type WorkflowTriggersClientResetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggersClientRunOptions contains the optional parameters for the WorkflowTriggersClient.Run method. +type WorkflowTriggersClientRunOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggersClientSetStateOptions contains the optional parameters for the WorkflowTriggersClient.SetState method. +type WorkflowTriggersClientSetStateOptions struct { + // placeholder for future optional parameters +} + +// WorkflowVersionTriggersClientListCallbackURLOptions contains the optional parameters for the WorkflowVersionTriggersClient.ListCallbackURL +// method. +type WorkflowVersionTriggersClientListCallbackURLOptions struct { + // The callback URL parameters. + Parameters *GetCallbackURLParameters +} + +// WorkflowVersionsClientGetOptions contains the optional parameters for the WorkflowVersionsClient.Get method. +type WorkflowVersionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowVersionsClientListOptions contains the optional parameters for the WorkflowVersionsClient.NewListPager method. +type WorkflowVersionsClientListOptions struct { + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowsClientBeginMoveOptions contains the optional parameters for the WorkflowsClient.BeginMove method. +type WorkflowsClientBeginMoveOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkflowsClientCreateOrUpdateOptions contains the optional parameters for the WorkflowsClient.CreateOrUpdate method. +type WorkflowsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkflowsClientDeleteOptions contains the optional parameters for the WorkflowsClient.Delete method. +type WorkflowsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkflowsClientDisableOptions contains the optional parameters for the WorkflowsClient.Disable method. +type WorkflowsClientDisableOptions struct { + // placeholder for future optional parameters +} + +// WorkflowsClientEnableOptions contains the optional parameters for the WorkflowsClient.Enable method. +type WorkflowsClientEnableOptions struct { + // placeholder for future optional parameters +} + +// WorkflowsClientGenerateUpgradedDefinitionOptions contains the optional parameters for the WorkflowsClient.GenerateUpgradedDefinition +// method. +type WorkflowsClientGenerateUpgradedDefinitionOptions struct { + // placeholder for future optional parameters +} + +// WorkflowsClientGetOptions contains the optional parameters for the WorkflowsClient.Get method. +type WorkflowsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowsClientListByResourceGroupOptions contains the optional parameters for the WorkflowsClient.NewListByResourceGroupPager +// method. +type WorkflowsClientListByResourceGroupOptions struct { + // The filter to apply on the operation. Options for filters include: State, Trigger, and ReferencedResourceId. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowsClientListBySubscriptionOptions contains the optional parameters for the WorkflowsClient.NewListBySubscriptionPager +// method. +type WorkflowsClientListBySubscriptionOptions struct { + // The filter to apply on the operation. Options for filters include: State, Trigger, and ReferencedResourceId. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowsClientListCallbackURLOptions contains the optional parameters for the WorkflowsClient.ListCallbackURL method. +type WorkflowsClientListCallbackURLOptions struct { + // placeholder for future optional parameters +} + +// WorkflowsClientListSwaggerOptions contains the optional parameters for the WorkflowsClient.ListSwagger method. +type WorkflowsClientListSwaggerOptions struct { + // placeholder for future optional parameters +} + +// WorkflowsClientRegenerateAccessKeyOptions contains the optional parameters for the WorkflowsClient.RegenerateAccessKey +// method. +type WorkflowsClientRegenerateAccessKeyOptions struct { + // placeholder for future optional parameters +} + +// WorkflowsClientUpdateOptions contains the optional parameters for the WorkflowsClient.Update method. +type WorkflowsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkflowsClientValidateByLocationOptions contains the optional parameters for the WorkflowsClient.ValidateByLocation method. +type WorkflowsClientValidateByLocationOptions struct { + // placeholder for future optional parameters +} + +// WorkflowsClientValidateByResourceGroupOptions contains the optional parameters for the WorkflowsClient.ValidateByResourceGroup +// method. +type WorkflowsClientValidateByResourceGroupOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/response_types.go index 7fe0c60f..b615dc9c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/response_types.go @@ -3,14 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic // IntegrationAccountAgreementsClientCreateOrUpdateResponse contains the response from method IntegrationAccountAgreementsClient.CreateOrUpdate. type IntegrationAccountAgreementsClientCreateOrUpdateResponse struct { + // The integration account agreement. IntegrationAccountAgreement } @@ -21,21 +21,25 @@ type IntegrationAccountAgreementsClientDeleteResponse struct { // IntegrationAccountAgreementsClientGetResponse contains the response from method IntegrationAccountAgreementsClient.Get. type IntegrationAccountAgreementsClientGetResponse struct { + // The integration account agreement. IntegrationAccountAgreement } // IntegrationAccountAgreementsClientListContentCallbackURLResponse contains the response from method IntegrationAccountAgreementsClient.ListContentCallbackURL. type IntegrationAccountAgreementsClientListContentCallbackURLResponse struct { + // The workflow trigger callback URL. WorkflowTriggerCallbackURL } // IntegrationAccountAgreementsClientListResponse contains the response from method IntegrationAccountAgreementsClient.NewListPager. type IntegrationAccountAgreementsClientListResponse struct { + // The list of integration account agreements. IntegrationAccountAgreementListResult } // IntegrationAccountAssembliesClientCreateOrUpdateResponse contains the response from method IntegrationAccountAssembliesClient.CreateOrUpdate. type IntegrationAccountAssembliesClientCreateOrUpdateResponse struct { + // The assembly definition. AssemblyDefinition } @@ -46,21 +50,25 @@ type IntegrationAccountAssembliesClientDeleteResponse struct { // IntegrationAccountAssembliesClientGetResponse contains the response from method IntegrationAccountAssembliesClient.Get. type IntegrationAccountAssembliesClientGetResponse struct { + // The assembly definition. AssemblyDefinition } // IntegrationAccountAssembliesClientListContentCallbackURLResponse contains the response from method IntegrationAccountAssembliesClient.ListContentCallbackURL. type IntegrationAccountAssembliesClientListContentCallbackURLResponse struct { + // The workflow trigger callback URL. WorkflowTriggerCallbackURL } // IntegrationAccountAssembliesClientListResponse contains the response from method IntegrationAccountAssembliesClient.NewListPager. type IntegrationAccountAssembliesClientListResponse struct { + // A collection of assembly definitions. AssemblyCollection } // IntegrationAccountBatchConfigurationsClientCreateOrUpdateResponse contains the response from method IntegrationAccountBatchConfigurationsClient.CreateOrUpdate. type IntegrationAccountBatchConfigurationsClientCreateOrUpdateResponse struct { + // The batch configuration resource definition. BatchConfiguration } @@ -71,16 +79,19 @@ type IntegrationAccountBatchConfigurationsClientDeleteResponse struct { // IntegrationAccountBatchConfigurationsClientGetResponse contains the response from method IntegrationAccountBatchConfigurationsClient.Get. type IntegrationAccountBatchConfigurationsClientGetResponse struct { + // The batch configuration resource definition. BatchConfiguration } // IntegrationAccountBatchConfigurationsClientListResponse contains the response from method IntegrationAccountBatchConfigurationsClient.NewListPager. type IntegrationAccountBatchConfigurationsClientListResponse struct { + // A collection of batch configurations. BatchConfigurationCollection } // IntegrationAccountCertificatesClientCreateOrUpdateResponse contains the response from method IntegrationAccountCertificatesClient.CreateOrUpdate. type IntegrationAccountCertificatesClientCreateOrUpdateResponse struct { + // The integration account certificate. IntegrationAccountCertificate } @@ -91,16 +102,19 @@ type IntegrationAccountCertificatesClientDeleteResponse struct { // IntegrationAccountCertificatesClientGetResponse contains the response from method IntegrationAccountCertificatesClient.Get. type IntegrationAccountCertificatesClientGetResponse struct { + // The integration account certificate. IntegrationAccountCertificate } // IntegrationAccountCertificatesClientListResponse contains the response from method IntegrationAccountCertificatesClient.NewListPager. type IntegrationAccountCertificatesClientListResponse struct { + // The list of integration account certificates. IntegrationAccountCertificateListResult } // IntegrationAccountMapsClientCreateOrUpdateResponse contains the response from method IntegrationAccountMapsClient.CreateOrUpdate. type IntegrationAccountMapsClientCreateOrUpdateResponse struct { + // The integration account map. IntegrationAccountMap } @@ -111,21 +125,25 @@ type IntegrationAccountMapsClientDeleteResponse struct { // IntegrationAccountMapsClientGetResponse contains the response from method IntegrationAccountMapsClient.Get. type IntegrationAccountMapsClientGetResponse struct { + // The integration account map. IntegrationAccountMap } // IntegrationAccountMapsClientListContentCallbackURLResponse contains the response from method IntegrationAccountMapsClient.ListContentCallbackURL. type IntegrationAccountMapsClientListContentCallbackURLResponse struct { + // The workflow trigger callback URL. WorkflowTriggerCallbackURL } // IntegrationAccountMapsClientListResponse contains the response from method IntegrationAccountMapsClient.NewListPager. type IntegrationAccountMapsClientListResponse struct { + // The list of integration account maps. IntegrationAccountMapListResult } // IntegrationAccountPartnersClientCreateOrUpdateResponse contains the response from method IntegrationAccountPartnersClient.CreateOrUpdate. type IntegrationAccountPartnersClientCreateOrUpdateResponse struct { + // The integration account partner. IntegrationAccountPartner } @@ -136,21 +154,25 @@ type IntegrationAccountPartnersClientDeleteResponse struct { // IntegrationAccountPartnersClientGetResponse contains the response from method IntegrationAccountPartnersClient.Get. type IntegrationAccountPartnersClientGetResponse struct { + // The integration account partner. IntegrationAccountPartner } // IntegrationAccountPartnersClientListContentCallbackURLResponse contains the response from method IntegrationAccountPartnersClient.ListContentCallbackURL. type IntegrationAccountPartnersClientListContentCallbackURLResponse struct { + // The workflow trigger callback URL. WorkflowTriggerCallbackURL } // IntegrationAccountPartnersClientListResponse contains the response from method IntegrationAccountPartnersClient.NewListPager. type IntegrationAccountPartnersClientListResponse struct { + // The list of integration account partners. IntegrationAccountPartnerListResult } // IntegrationAccountSchemasClientCreateOrUpdateResponse contains the response from method IntegrationAccountSchemasClient.CreateOrUpdate. type IntegrationAccountSchemasClientCreateOrUpdateResponse struct { + // The integration account schema. IntegrationAccountSchema } @@ -161,21 +183,25 @@ type IntegrationAccountSchemasClientDeleteResponse struct { // IntegrationAccountSchemasClientGetResponse contains the response from method IntegrationAccountSchemasClient.Get. type IntegrationAccountSchemasClientGetResponse struct { + // The integration account schema. IntegrationAccountSchema } // IntegrationAccountSchemasClientListContentCallbackURLResponse contains the response from method IntegrationAccountSchemasClient.ListContentCallbackURL. type IntegrationAccountSchemasClientListContentCallbackURLResponse struct { + // The workflow trigger callback URL. WorkflowTriggerCallbackURL } // IntegrationAccountSchemasClientListResponse contains the response from method IntegrationAccountSchemasClient.NewListPager. type IntegrationAccountSchemasClientListResponse struct { + // The list of integration account schemas. IntegrationAccountSchemaListResult } // IntegrationAccountSessionsClientCreateOrUpdateResponse contains the response from method IntegrationAccountSessionsClient.CreateOrUpdate. type IntegrationAccountSessionsClientCreateOrUpdateResponse struct { + // The integration account session. IntegrationAccountSession } @@ -186,16 +212,19 @@ type IntegrationAccountSessionsClientDeleteResponse struct { // IntegrationAccountSessionsClientGetResponse contains the response from method IntegrationAccountSessionsClient.Get. type IntegrationAccountSessionsClientGetResponse struct { + // The integration account session. IntegrationAccountSession } // IntegrationAccountSessionsClientListResponse contains the response from method IntegrationAccountSessionsClient.NewListPager. type IntegrationAccountSessionsClientListResponse struct { + // The list of integration account sessions. IntegrationAccountSessionListResult } // IntegrationAccountsClientCreateOrUpdateResponse contains the response from method IntegrationAccountsClient.CreateOrUpdate. type IntegrationAccountsClientCreateOrUpdateResponse struct { + // The integration account. IntegrationAccount } @@ -206,26 +235,31 @@ type IntegrationAccountsClientDeleteResponse struct { // IntegrationAccountsClientGetResponse contains the response from method IntegrationAccountsClient.Get. type IntegrationAccountsClientGetResponse struct { + // The integration account. IntegrationAccount } // IntegrationAccountsClientListByResourceGroupResponse contains the response from method IntegrationAccountsClient.NewListByResourceGroupPager. type IntegrationAccountsClientListByResourceGroupResponse struct { + // The list of integration accounts. IntegrationAccountListResult } // IntegrationAccountsClientListBySubscriptionResponse contains the response from method IntegrationAccountsClient.NewListBySubscriptionPager. type IntegrationAccountsClientListBySubscriptionResponse struct { + // The list of integration accounts. IntegrationAccountListResult } // IntegrationAccountsClientListCallbackURLResponse contains the response from method IntegrationAccountsClient.ListCallbackURL. type IntegrationAccountsClientListCallbackURLResponse struct { + // The callback url. CallbackURL } // IntegrationAccountsClientListKeyVaultKeysResponse contains the response from method IntegrationAccountsClient.NewListKeyVaultKeysPager. type IntegrationAccountsClientListKeyVaultKeysResponse struct { + // Collection of key vault keys. KeyVaultKeyCollection } @@ -236,16 +270,19 @@ type IntegrationAccountsClientLogTrackingEventsResponse struct { // IntegrationAccountsClientRegenerateAccessKeyResponse contains the response from method IntegrationAccountsClient.RegenerateAccessKey. type IntegrationAccountsClientRegenerateAccessKeyResponse struct { + // The integration account. IntegrationAccount } // IntegrationAccountsClientUpdateResponse contains the response from method IntegrationAccountsClient.Update. type IntegrationAccountsClientUpdateResponse struct { + // The integration account. IntegrationAccount } // IntegrationServiceEnvironmentManagedAPIOperationsClientListResponse contains the response from method IntegrationServiceEnvironmentManagedAPIOperationsClient.NewListPager. type IntegrationServiceEnvironmentManagedAPIOperationsClientListResponse struct { + // The list of managed API operations. APIOperationListResult } @@ -256,16 +293,19 @@ type IntegrationServiceEnvironmentManagedApisClientDeleteResponse struct { // IntegrationServiceEnvironmentManagedApisClientGetResponse contains the response from method IntegrationServiceEnvironmentManagedApisClient.Get. type IntegrationServiceEnvironmentManagedApisClientGetResponse struct { + // The integration service environment managed api. IntegrationServiceEnvironmentManagedAPI } // IntegrationServiceEnvironmentManagedApisClientListResponse contains the response from method IntegrationServiceEnvironmentManagedApisClient.NewListPager. type IntegrationServiceEnvironmentManagedApisClientListResponse struct { + // The list of integration service environment managed APIs. IntegrationServiceEnvironmentManagedAPIListResult } // IntegrationServiceEnvironmentManagedApisClientPutResponse contains the response from method IntegrationServiceEnvironmentManagedApisClient.BeginPut. type IntegrationServiceEnvironmentManagedApisClientPutResponse struct { + // The integration service environment managed api. IntegrationServiceEnvironmentManagedAPI } @@ -277,11 +317,13 @@ type IntegrationServiceEnvironmentNetworkHealthClientGetResponse struct { // IntegrationServiceEnvironmentSKUsClientListResponse contains the response from method IntegrationServiceEnvironmentSKUsClient.NewListPager. type IntegrationServiceEnvironmentSKUsClientListResponse struct { + // The list of integration service environment skus. IntegrationServiceEnvironmentSKUList } // IntegrationServiceEnvironmentsClientCreateOrUpdateResponse contains the response from method IntegrationServiceEnvironmentsClient.BeginCreateOrUpdate. type IntegrationServiceEnvironmentsClientCreateOrUpdateResponse struct { + // The integration service environment. IntegrationServiceEnvironment } @@ -292,16 +334,19 @@ type IntegrationServiceEnvironmentsClientDeleteResponse struct { // IntegrationServiceEnvironmentsClientGetResponse contains the response from method IntegrationServiceEnvironmentsClient.Get. type IntegrationServiceEnvironmentsClientGetResponse struct { + // The integration service environment. IntegrationServiceEnvironment } // IntegrationServiceEnvironmentsClientListByResourceGroupResponse contains the response from method IntegrationServiceEnvironmentsClient.NewListByResourceGroupPager. type IntegrationServiceEnvironmentsClientListByResourceGroupResponse struct { + // The list of integration service environments. IntegrationServiceEnvironmentListResult } // IntegrationServiceEnvironmentsClientListBySubscriptionResponse contains the response from method IntegrationServiceEnvironmentsClient.NewListBySubscriptionPager. type IntegrationServiceEnvironmentsClientListBySubscriptionResponse struct { + // The list of integration service environments. IntegrationServiceEnvironmentListResult } @@ -312,76 +357,92 @@ type IntegrationServiceEnvironmentsClientRestartResponse struct { // IntegrationServiceEnvironmentsClientUpdateResponse contains the response from method IntegrationServiceEnvironmentsClient.BeginUpdate. type IntegrationServiceEnvironmentsClientUpdateResponse struct { + // The integration service environment. IntegrationServiceEnvironment } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list Logic operations. It contains a list of operations and a URL link to get the next set of + // results. OperationListResult } // WorkflowRunActionRepetitionsClientGetResponse contains the response from method WorkflowRunActionRepetitionsClient.Get. type WorkflowRunActionRepetitionsClientGetResponse struct { + // The workflow run action repetition definition. WorkflowRunActionRepetitionDefinition } // WorkflowRunActionRepetitionsClientListExpressionTracesResponse contains the response from method WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager. type WorkflowRunActionRepetitionsClientListExpressionTracesResponse struct { + // The expression traces. ExpressionTraces } // WorkflowRunActionRepetitionsClientListResponse contains the response from method WorkflowRunActionRepetitionsClient.NewListPager. type WorkflowRunActionRepetitionsClientListResponse struct { + // A collection of workflow run action repetitions. WorkflowRunActionRepetitionDefinitionCollection } // WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse contains the response from method WorkflowRunActionRepetitionsRequestHistoriesClient.Get. type WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse struct { + // The request history. RequestHistory } // WorkflowRunActionRepetitionsRequestHistoriesClientListResponse contains the response from method WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager. type WorkflowRunActionRepetitionsRequestHistoriesClientListResponse struct { + // The list of workflow request histories. RequestHistoryListResult } // WorkflowRunActionRequestHistoriesClientGetResponse contains the response from method WorkflowRunActionRequestHistoriesClient.Get. type WorkflowRunActionRequestHistoriesClientGetResponse struct { + // The request history. RequestHistory } // WorkflowRunActionRequestHistoriesClientListResponse contains the response from method WorkflowRunActionRequestHistoriesClient.NewListPager. type WorkflowRunActionRequestHistoriesClientListResponse struct { + // The list of workflow request histories. RequestHistoryListResult } // WorkflowRunActionScopeRepetitionsClientGetResponse contains the response from method WorkflowRunActionScopeRepetitionsClient.Get. type WorkflowRunActionScopeRepetitionsClientGetResponse struct { + // The workflow run action repetition definition. WorkflowRunActionRepetitionDefinition } // WorkflowRunActionScopeRepetitionsClientListResponse contains the response from method WorkflowRunActionScopeRepetitionsClient.NewListPager. type WorkflowRunActionScopeRepetitionsClientListResponse struct { + // A collection of workflow run action repetitions. WorkflowRunActionRepetitionDefinitionCollection } // WorkflowRunActionsClientGetResponse contains the response from method WorkflowRunActionsClient.Get. type WorkflowRunActionsClientGetResponse struct { + // The workflow run action. WorkflowRunAction } // WorkflowRunActionsClientListExpressionTracesResponse contains the response from method WorkflowRunActionsClient.NewListExpressionTracesPager. type WorkflowRunActionsClientListExpressionTracesResponse struct { + // The expression traces. ExpressionTraces } // WorkflowRunActionsClientListResponse contains the response from method WorkflowRunActionsClient.NewListPager. type WorkflowRunActionsClientListResponse struct { + // The list of workflow run actions. WorkflowRunActionListResult } // WorkflowRunOperationsClientGetResponse contains the response from method WorkflowRunOperationsClient.Get. type WorkflowRunOperationsClientGetResponse struct { + // The workflow run. WorkflowRun } @@ -392,21 +453,25 @@ type WorkflowRunsClientCancelResponse struct { // WorkflowRunsClientGetResponse contains the response from method WorkflowRunsClient.Get. type WorkflowRunsClientGetResponse struct { + // The workflow run. WorkflowRun } // WorkflowRunsClientListResponse contains the response from method WorkflowRunsClient.NewListPager. type WorkflowRunsClientListResponse struct { + // The list of workflow runs. WorkflowRunListResult } // WorkflowTriggerHistoriesClientGetResponse contains the response from method WorkflowTriggerHistoriesClient.Get. type WorkflowTriggerHistoriesClientGetResponse struct { + // The workflow trigger history. WorkflowTriggerHistory } // WorkflowTriggerHistoriesClientListResponse contains the response from method WorkflowTriggerHistoriesClient.NewListPager. type WorkflowTriggerHistoriesClientListResponse struct { + // The list of workflow trigger histories. WorkflowTriggerHistoryListResult } @@ -417,21 +482,25 @@ type WorkflowTriggerHistoriesClientResubmitResponse struct { // WorkflowTriggersClientGetResponse contains the response from method WorkflowTriggersClient.Get. type WorkflowTriggersClientGetResponse struct { + // The workflow trigger. WorkflowTrigger } // WorkflowTriggersClientGetSchemaJSONResponse contains the response from method WorkflowTriggersClient.GetSchemaJSON. type WorkflowTriggersClientGetSchemaJSONResponse struct { + // The JSON schema. JSONSchema } // WorkflowTriggersClientListCallbackURLResponse contains the response from method WorkflowTriggersClient.ListCallbackURL. type WorkflowTriggersClientListCallbackURLResponse struct { + // The workflow trigger callback URL. WorkflowTriggerCallbackURL } // WorkflowTriggersClientListResponse contains the response from method WorkflowTriggersClient.NewListPager. type WorkflowTriggersClientListResponse struct { + // The list of workflow triggers. WorkflowTriggerListResult } @@ -452,21 +521,25 @@ type WorkflowTriggersClientSetStateResponse struct { // WorkflowVersionTriggersClientListCallbackURLResponse contains the response from method WorkflowVersionTriggersClient.ListCallbackURL. type WorkflowVersionTriggersClientListCallbackURLResponse struct { + // The workflow trigger callback URL. WorkflowTriggerCallbackURL } // WorkflowVersionsClientGetResponse contains the response from method WorkflowVersionsClient.Get. type WorkflowVersionsClientGetResponse struct { + // The workflow version. WorkflowVersion } // WorkflowVersionsClientListResponse contains the response from method WorkflowVersionsClient.NewListPager. type WorkflowVersionsClientListResponse struct { + // The list of workflow versions. WorkflowVersionListResult } // WorkflowsClientCreateOrUpdateResponse contains the response from method WorkflowsClient.CreateOrUpdate. type WorkflowsClientCreateOrUpdateResponse struct { + // The workflow type. Workflow } @@ -493,21 +566,25 @@ type WorkflowsClientGenerateUpgradedDefinitionResponse struct { // WorkflowsClientGetResponse contains the response from method WorkflowsClient.Get. type WorkflowsClientGetResponse struct { + // The workflow type. Workflow } // WorkflowsClientListByResourceGroupResponse contains the response from method WorkflowsClient.NewListByResourceGroupPager. type WorkflowsClientListByResourceGroupResponse struct { + // The list of workflows. WorkflowListResult } // WorkflowsClientListBySubscriptionResponse contains the response from method WorkflowsClient.NewListBySubscriptionPager. type WorkflowsClientListBySubscriptionResponse struct { + // The list of workflows. WorkflowListResult } // WorkflowsClientListCallbackURLResponse contains the response from method WorkflowsClient.ListCallbackURL. type WorkflowsClientListCallbackURLResponse struct { + // The workflow trigger callback URL. WorkflowTriggerCallbackURL } @@ -529,6 +606,7 @@ type WorkflowsClientRegenerateAccessKeyResponse struct { // WorkflowsClientUpdateResponse contains the response from method WorkflowsClient.Update. type WorkflowsClientUpdateResponse struct { + // The workflow type. Workflow } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/time_rfc3339.go index 653e808e..37e23461 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionrepetitions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionrepetitions_client.go index 5abdb3c5..e8087b2c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionrepetitions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionrepetitions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -33,7 +32,7 @@ type WorkflowRunActionRepetitionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowRunActionRepetitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionRepetitionsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowRunActionRepetitionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewWorkflowRunActionRepetitionsClient(subscriptionID string, credential azc // - options - WorkflowRunActionRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.Get // method. func (client *WorkflowRunActionRepetitionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionRepetitionsClientGetOptions) (WorkflowRunActionRepetitionsClientGetResponse, error) { + var err error + const operationName = "WorkflowRunActionRepetitionsClient.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, workflowName, runName, actionName, repetitionName, options) if err != nil { return WorkflowRunActionRepetitionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunActionRepetitionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionRepetitionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunActionRepetitionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -132,6 +138,7 @@ func (client *WorkflowRunActionRepetitionsClient) NewListPager(resourceGroupName return false }, Fetcher: func(ctx context.Context, page *WorkflowRunActionRepetitionsClientListResponse) (WorkflowRunActionRepetitionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionRepetitionsClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, workflowName, runName, actionName, options) if err != nil { return WorkflowRunActionRepetitionsClientListResponse{}, err @@ -145,6 +152,7 @@ func (client *WorkflowRunActionRepetitionsClient) NewListPager(resourceGroupName } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -207,6 +215,7 @@ func (client *WorkflowRunActionRepetitionsClient) NewListExpressionTracesPager(r return false }, Fetcher: func(ctx context.Context, page *WorkflowRunActionRepetitionsClientListExpressionTracesResponse) (WorkflowRunActionRepetitionsClientListExpressionTracesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager") req, err := client.listExpressionTracesCreateRequest(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName, options) if err != nil { return WorkflowRunActionRepetitionsClientListExpressionTracesResponse{}, err @@ -220,6 +229,7 @@ func (client *WorkflowRunActionRepetitionsClient) NewListExpressionTracesPager(r } return client.listExpressionTracesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionrepetitionsrequesthistories_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionrepetitionsrequesthistories_client.go index 8f7cdcbf..28baee55 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionrepetitionsrequesthistories_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionrepetitionsrequesthistories_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -33,7 +32,7 @@ type WorkflowRunActionRepetitionsRequestHistoriesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionRepetitionsRequestHistoriesClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowRunActionRepetitionsRequestHistoriesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,18 +56,25 @@ func NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string // - options - WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.Get // method. func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string, options *WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions) (WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse, error) { + var err error + const operationName = "WorkflowRunActionRepetitionsRequestHistoriesClient.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, workflowName, runName, actionName, repetitionName, requestHistoryName, options) if err != nil { return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -138,25 +144,20 @@ func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) NewListPager(r return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowRunActionRepetitionsRequestHistoriesClientListResponse) (WorkflowRunActionRepetitionsRequestHistoriesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionRepetitionsRequestHistoriesClient.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, workflowName, runName, actionName, repetitionName, options) + }, nil) if err != nil { return WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionrequesthistories_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionrequesthistories_client.go index f9e55224..3dc11a96 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionrequesthistories_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionrequesthistories_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -33,7 +32,7 @@ type WorkflowRunActionRequestHistoriesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowRunActionRequestHistoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionRequestHistoriesClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowRunActionRequestHistoriesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewWorkflowRunActionRequestHistoriesClient(subscriptionID string, credentia // - options - WorkflowRunActionRequestHistoriesClientGetOptions contains the optional parameters for the WorkflowRunActionRequestHistoriesClient.Get // method. func (client *WorkflowRunActionRequestHistoriesClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, requestHistoryName string, options *WorkflowRunActionRequestHistoriesClientGetOptions) (WorkflowRunActionRequestHistoriesClientGetResponse, error) { + var err error + const operationName = "WorkflowRunActionRequestHistoriesClient.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, workflowName, runName, actionName, requestHistoryName, options) if err != nil { return WorkflowRunActionRequestHistoriesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunActionRequestHistoriesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionRequestHistoriesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunActionRequestHistoriesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -132,25 +138,20 @@ func (client *WorkflowRunActionRequestHistoriesClient) NewListPager(resourceGrou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowRunActionRequestHistoriesClientListResponse) (WorkflowRunActionRequestHistoriesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workflowName, runName, actionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionRequestHistoriesClient.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, workflowName, runName, actionName, options) + }, nil) if err != nil { return WorkflowRunActionRequestHistoriesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowRunActionRequestHistoriesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionRequestHistoriesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactions_client.go index c312a940..b90e43f4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type WorkflowRunActionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowRunActionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowRunActionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewWorkflowRunActionsClient(subscriptionID string, credential azcore.TokenC // - actionName - The workflow action name. // - options - WorkflowRunActionsClientGetOptions contains the optional parameters for the WorkflowRunActionsClient.Get method. func (client *WorkflowRunActionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, options *WorkflowRunActionsClientGetOptions) (WorkflowRunActionsClientGetResponse, error) { + var err error + const operationName = "WorkflowRunActionsClient.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, workflowName, runName, actionName, options) if err != nil { return WorkflowRunActionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunActionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunActionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -126,25 +132,20 @@ func (client *WorkflowRunActionsClient) NewListPager(resourceGroupName string, w return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowRunActionsClientListResponse) (WorkflowRunActionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workflowName, runName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionsClient.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, workflowName, runName, options) + }, nil) if err != nil { return WorkflowRunActionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowRunActionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -208,6 +209,7 @@ func (client *WorkflowRunActionsClient) NewListExpressionTracesPager(resourceGro return false }, Fetcher: func(ctx context.Context, page *WorkflowRunActionsClientListExpressionTracesResponse) (WorkflowRunActionsClientListExpressionTracesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionsClient.NewListExpressionTracesPager") req, err := client.listExpressionTracesCreateRequest(ctx, resourceGroupName, workflowName, runName, actionName, options) if err != nil { return WorkflowRunActionsClientListExpressionTracesResponse{}, err @@ -221,6 +223,7 @@ func (client *WorkflowRunActionsClient) NewListExpressionTracesPager(resourceGro } return client.listExpressionTracesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionscoperepetitions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionscoperepetitions_client.go index 6db05f3a..9d1066a7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionscoperepetitions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunactionscoperepetitions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -33,7 +32,7 @@ type WorkflowRunActionScopeRepetitionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowRunActionScopeRepetitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionScopeRepetitionsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowRunActionScopeRepetitionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewWorkflowRunActionScopeRepetitionsClient(subscriptionID string, credentia // - options - WorkflowRunActionScopeRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.Get // method. func (client *WorkflowRunActionScopeRepetitionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionScopeRepetitionsClientGetOptions) (WorkflowRunActionScopeRepetitionsClientGetResponse, error) { + var err error + const operationName = "WorkflowRunActionScopeRepetitionsClient.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, workflowName, runName, actionName, repetitionName, options) if err != nil { return WorkflowRunActionScopeRepetitionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunActionScopeRepetitionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionScopeRepetitionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunActionScopeRepetitionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -132,6 +138,7 @@ func (client *WorkflowRunActionScopeRepetitionsClient) NewListPager(resourceGrou return false }, Fetcher: func(ctx context.Context, page *WorkflowRunActionScopeRepetitionsClientListResponse) (WorkflowRunActionScopeRepetitionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionScopeRepetitionsClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, workflowName, runName, actionName, options) if err != nil { return WorkflowRunActionScopeRepetitionsClientListResponse{}, err @@ -145,6 +152,7 @@ func (client *WorkflowRunActionScopeRepetitionsClient) NewListPager(resourceGrou } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunoperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunoperations_client.go index e14540a4..9a392e1d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunoperations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowrunoperations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -33,7 +32,7 @@ type WorkflowRunOperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowRunOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunOperationsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowRunOperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewWorkflowRunOperationsClient(subscriptionID string, credential azcore.Tok // - options - WorkflowRunOperationsClientGetOptions contains the optional parameters for the WorkflowRunOperationsClient.Get // method. func (client *WorkflowRunOperationsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, operationID string, options *WorkflowRunOperationsClientGetOptions) (WorkflowRunOperationsClientGetResponse, error) { + var err error + const operationName = "WorkflowRunOperationsClient.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, workflowName, runName, operationID, options) if err != nil { return WorkflowRunOperationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunOperationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunOperationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunOperationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowruns_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowruns_client.go index 323dd5a1..c5b39459 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowruns_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowruns_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type WorkflowRunsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowRunsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowRunsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,16 +53,22 @@ func NewWorkflowRunsClient(subscriptionID string, credential azcore.TokenCredent // - runName - The workflow run name. // - options - WorkflowRunsClientCancelOptions contains the optional parameters for the WorkflowRunsClient.Cancel method. func (client *WorkflowRunsClient) Cancel(ctx context.Context, resourceGroupName string, workflowName string, runName string, options *WorkflowRunsClientCancelOptions) (WorkflowRunsClientCancelResponse, error) { + var err error + const operationName = "WorkflowRunsClient.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, workflowName, runName, options) if err != nil { return WorkflowRunsClientCancelResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunsClientCancelResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunsClientCancelResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunsClientCancelResponse{}, err } return WorkflowRunsClientCancelResponse{}, nil } @@ -107,18 +112,25 @@ func (client *WorkflowRunsClient) cancelCreateRequest(ctx context.Context, resou // - runName - The workflow run name. // - options - WorkflowRunsClientGetOptions contains the optional parameters for the WorkflowRunsClient.Get method. func (client *WorkflowRunsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, options *WorkflowRunsClientGetOptions) (WorkflowRunsClientGetResponse, error) { + var err error + const operationName = "WorkflowRunsClient.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, workflowName, runName, options) if err != nil { return WorkflowRunsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -172,25 +184,20 @@ func (client *WorkflowRunsClient) NewListPager(resourceGroupName string, workflo return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowRunsClientListResponse) (WorkflowRunsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workflowName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WorkflowRunsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, workflowName, options) + }, nil) if err != nil { return WorkflowRunsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflows_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflows_client.go index 2b35dd2a..8478039e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflows_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflows_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type WorkflowsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewWorkflowsClient(subscriptionID string, credential azcore.TokenCredential // - options - WorkflowsClientCreateOrUpdateOptions contains the optional parameters for the WorkflowsClient.CreateOrUpdate // method. func (client *WorkflowsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workflowName string, workflow Workflow, options *WorkflowsClientCreateOrUpdateOptions) (WorkflowsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkflowsClient.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, workflowName, workflow, options) if err != nil { return WorkflowsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WorkflowsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -92,7 +98,10 @@ func (client *WorkflowsClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workflow) + if err := runtime.MarshalAsJSON(req, workflow); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,16 +121,22 @@ func (client *WorkflowsClient) createOrUpdateHandleResponse(resp *http.Response) // - workflowName - The workflow name. // - options - WorkflowsClientDeleteOptions contains the optional parameters for the WorkflowsClient.Delete method. func (client *WorkflowsClient) Delete(ctx context.Context, resourceGroupName string, workflowName string, options *WorkflowsClientDeleteOptions) (WorkflowsClientDeleteResponse, error) { + var err error + const operationName = "WorkflowsClient.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, workflowName, options) if err != nil { return WorkflowsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WorkflowsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientDeleteResponse{}, err } return WorkflowsClientDeleteResponse{}, nil } @@ -160,16 +175,22 @@ func (client *WorkflowsClient) deleteCreateRequest(ctx context.Context, resource // - workflowName - The workflow name. // - options - WorkflowsClientDisableOptions contains the optional parameters for the WorkflowsClient.Disable method. func (client *WorkflowsClient) Disable(ctx context.Context, resourceGroupName string, workflowName string, options *WorkflowsClientDisableOptions) (WorkflowsClientDisableResponse, error) { + var err error + const operationName = "WorkflowsClient.Disable" + 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, workflowName, options) if err != nil { return WorkflowsClientDisableResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientDisableResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientDisableResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientDisableResponse{}, err } return WorkflowsClientDisableResponse{}, nil } @@ -208,16 +229,22 @@ func (client *WorkflowsClient) disableCreateRequest(ctx context.Context, resourc // - workflowName - The workflow name. // - options - WorkflowsClientEnableOptions contains the optional parameters for the WorkflowsClient.Enable method. func (client *WorkflowsClient) Enable(ctx context.Context, resourceGroupName string, workflowName string, options *WorkflowsClientEnableOptions) (WorkflowsClientEnableResponse, error) { + var err error + const operationName = "WorkflowsClient.Enable" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.enableCreateRequest(ctx, resourceGroupName, workflowName, options) if err != nil { return WorkflowsClientEnableResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientEnableResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientEnableResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientEnableResponse{}, err } return WorkflowsClientEnableResponse{}, nil } @@ -258,18 +285,25 @@ func (client *WorkflowsClient) enableCreateRequest(ctx context.Context, resource // - options - WorkflowsClientGenerateUpgradedDefinitionOptions contains the optional parameters for the WorkflowsClient.GenerateUpgradedDefinition // method. func (client *WorkflowsClient) GenerateUpgradedDefinition(ctx context.Context, resourceGroupName string, workflowName string, parameters GenerateUpgradedDefinitionParameters, options *WorkflowsClientGenerateUpgradedDefinitionOptions) (WorkflowsClientGenerateUpgradedDefinitionResponse, error) { + var err error + const operationName = "WorkflowsClient.GenerateUpgradedDefinition" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.generateUpgradedDefinitionCreateRequest(ctx, resourceGroupName, workflowName, parameters, options) if err != nil { return WorkflowsClientGenerateUpgradedDefinitionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientGenerateUpgradedDefinitionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientGenerateUpgradedDefinitionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientGenerateUpgradedDefinitionResponse{}, err } - return client.generateUpgradedDefinitionHandleResponse(resp) + resp, err := client.generateUpgradedDefinitionHandleResponse(httpResp) + return resp, err } // generateUpgradedDefinitionCreateRequest creates the GenerateUpgradedDefinition request. @@ -295,7 +329,10 @@ func (client *WorkflowsClient) generateUpgradedDefinitionCreateRequest(ctx conte reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // generateUpgradedDefinitionHandleResponse handles the GenerateUpgradedDefinition response. @@ -315,18 +352,25 @@ func (client *WorkflowsClient) generateUpgradedDefinitionHandleResponse(resp *ht // - workflowName - The workflow name. // - options - WorkflowsClientGetOptions contains the optional parameters for the WorkflowsClient.Get method. func (client *WorkflowsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, options *WorkflowsClientGetOptions) (WorkflowsClientGetResponse, error) { + var err error + const operationName = "WorkflowsClient.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, workflowName, options) if err != nil { return WorkflowsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -376,25 +420,20 @@ func (client *WorkflowsClient) NewListByResourceGroupPager(resourceGroupName str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowsClientListByResourceGroupResponse) (WorkflowsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowsClient.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 WorkflowsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -446,25 +485,20 @@ func (client *WorkflowsClient) NewListBySubscriptionPager(options *WorkflowsClie return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowsClientListBySubscriptionResponse) (WorkflowsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowsClient.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 WorkflowsClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -511,18 +545,25 @@ func (client *WorkflowsClient) listBySubscriptionHandleResponse(resp *http.Respo // - options - WorkflowsClientListCallbackURLOptions contains the optional parameters for the WorkflowsClient.ListCallbackURL // method. func (client *WorkflowsClient) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, listCallbackURL GetCallbackURLParameters, options *WorkflowsClientListCallbackURLOptions) (WorkflowsClientListCallbackURLResponse, error) { + var err error + const operationName = "WorkflowsClient.ListCallbackURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCallbackURLCreateRequest(ctx, resourceGroupName, workflowName, listCallbackURL, options) if err != nil { return WorkflowsClientListCallbackURLResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientListCallbackURLResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientListCallbackURLResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientListCallbackURLResponse{}, err } - return client.listCallbackURLHandleResponse(resp) + resp, err := client.listCallbackURLHandleResponse(httpResp) + return resp, err } // listCallbackURLCreateRequest creates the ListCallbackURL request. @@ -548,7 +589,10 @@ func (client *WorkflowsClient) listCallbackURLCreateRequest(ctx context.Context, reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, listCallbackURL) + if err := runtime.MarshalAsJSON(req, listCallbackURL); err != nil { + return nil, err + } + return req, nil } // listCallbackURLHandleResponse handles the ListCallbackURL response. @@ -568,18 +612,25 @@ func (client *WorkflowsClient) listCallbackURLHandleResponse(resp *http.Response // - workflowName - The workflow name. // - options - WorkflowsClientListSwaggerOptions contains the optional parameters for the WorkflowsClient.ListSwagger method. func (client *WorkflowsClient) ListSwagger(ctx context.Context, resourceGroupName string, workflowName string, options *WorkflowsClientListSwaggerOptions) (WorkflowsClientListSwaggerResponse, error) { + var err error + const operationName = "WorkflowsClient.ListSwagger" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSwaggerCreateRequest(ctx, resourceGroupName, workflowName, options) if err != nil { return WorkflowsClientListSwaggerResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientListSwaggerResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientListSwaggerResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientListSwaggerResponse{}, err } - return client.listSwaggerHandleResponse(resp) + resp, err := client.listSwaggerHandleResponse(httpResp) + return resp, err } // listSwaggerCreateRequest creates the ListSwagger request. @@ -631,9 +682,14 @@ func (client *WorkflowsClient) BeginMove(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[WorkflowsClientMoveResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkflowsClientMoveResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkflowsClientMoveResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkflowsClientMoveResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -642,18 +698,24 @@ func (client *WorkflowsClient) BeginMove(ctx context.Context, resourceGroupName // // Generated from API version 2019-05-01 func (client *WorkflowsClient) move(ctx context.Context, resourceGroupName string, workflowName string, move WorkflowReference, options *WorkflowsClientBeginMoveOptions) (*http.Response, error) { + var err error + const operationName = "WorkflowsClient.BeginMove" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.moveCreateRequest(ctx, resourceGroupName, workflowName, move, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // moveCreateRequest creates the Move request. @@ -679,7 +741,10 @@ func (client *WorkflowsClient) moveCreateRequest(ctx context.Context, resourceGr reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, move) + if err := runtime.MarshalAsJSON(req, move); err != nil { + return nil, err + } + return req, nil } // RegenerateAccessKey - Regenerates the callback URL access key for request triggers. @@ -692,16 +757,22 @@ func (client *WorkflowsClient) moveCreateRequest(ctx context.Context, resourceGr // - options - WorkflowsClientRegenerateAccessKeyOptions contains the optional parameters for the WorkflowsClient.RegenerateAccessKey // method. func (client *WorkflowsClient) RegenerateAccessKey(ctx context.Context, resourceGroupName string, workflowName string, keyType RegenerateActionParameter, options *WorkflowsClientRegenerateAccessKeyOptions) (WorkflowsClientRegenerateAccessKeyResponse, error) { + var err error + const operationName = "WorkflowsClient.RegenerateAccessKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regenerateAccessKeyCreateRequest(ctx, resourceGroupName, workflowName, keyType, options) if err != nil { return WorkflowsClientRegenerateAccessKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientRegenerateAccessKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientRegenerateAccessKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientRegenerateAccessKeyResponse{}, err } return WorkflowsClientRegenerateAccessKeyResponse{}, nil } @@ -729,7 +800,10 @@ func (client *WorkflowsClient) regenerateAccessKeyCreateRequest(ctx context.Cont reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, keyType) + if err := runtime.MarshalAsJSON(req, keyType); err != nil { + return nil, err + } + return req, nil } // Update - Updates a workflow. @@ -740,18 +814,25 @@ func (client *WorkflowsClient) regenerateAccessKeyCreateRequest(ctx context.Cont // - workflowName - The workflow name. // - options - WorkflowsClientUpdateOptions contains the optional parameters for the WorkflowsClient.Update method. func (client *WorkflowsClient) Update(ctx context.Context, resourceGroupName string, workflowName string, options *WorkflowsClientUpdateOptions) (WorkflowsClientUpdateResponse, error) { + var err error + const operationName = "WorkflowsClient.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, workflowName, options) if err != nil { return WorkflowsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -800,16 +881,22 @@ func (client *WorkflowsClient) updateHandleResponse(resp *http.Response) (Workfl // - options - WorkflowsClientValidateByLocationOptions contains the optional parameters for the WorkflowsClient.ValidateByLocation // method. func (client *WorkflowsClient) ValidateByLocation(ctx context.Context, resourceGroupName string, location string, workflowName string, validate Workflow, options *WorkflowsClientValidateByLocationOptions) (WorkflowsClientValidateByLocationResponse, error) { + var err error + const operationName = "WorkflowsClient.ValidateByLocation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.validateByLocationCreateRequest(ctx, resourceGroupName, location, workflowName, validate, options) if err != nil { return WorkflowsClientValidateByLocationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientValidateByLocationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientValidateByLocationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientValidateByLocationResponse{}, err } return WorkflowsClientValidateByLocationResponse{}, nil } @@ -841,7 +928,10 @@ func (client *WorkflowsClient) validateByLocationCreateRequest(ctx context.Conte reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, validate) + if err := runtime.MarshalAsJSON(req, validate); err != nil { + return nil, err + } + return req, nil } // ValidateByResourceGroup - Validates the workflow. @@ -854,16 +944,22 @@ func (client *WorkflowsClient) validateByLocationCreateRequest(ctx context.Conte // - options - WorkflowsClientValidateByResourceGroupOptions contains the optional parameters for the WorkflowsClient.ValidateByResourceGroup // method. func (client *WorkflowsClient) ValidateByResourceGroup(ctx context.Context, resourceGroupName string, workflowName string, validate Workflow, options *WorkflowsClientValidateByResourceGroupOptions) (WorkflowsClientValidateByResourceGroupResponse, error) { + var err error + const operationName = "WorkflowsClient.ValidateByResourceGroup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.validateByResourceGroupCreateRequest(ctx, resourceGroupName, workflowName, validate, options) if err != nil { return WorkflowsClientValidateByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientValidateByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientValidateByResourceGroupResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientValidateByResourceGroupResponse{}, err } return WorkflowsClientValidateByResourceGroupResponse{}, nil } @@ -891,5 +987,8 @@ func (client *WorkflowsClient) validateByResourceGroupCreateRequest(ctx context. reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, validate) + if err := runtime.MarshalAsJSON(req, validate); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowtriggerhistories_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowtriggerhistories_client.go index bf3a7ba3..63a4b214 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowtriggerhistories_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowtriggerhistories_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type WorkflowTriggerHistoriesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowTriggerHistoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowTriggerHistoriesClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowTriggerHistoriesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewWorkflowTriggerHistoriesClient(subscriptionID string, credential azcore. // - options - WorkflowTriggerHistoriesClientGetOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.Get // method. func (client *WorkflowTriggerHistoriesClient) Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientGetOptions) (WorkflowTriggerHistoriesClientGetResponse, error) { + var err error + const operationName = "WorkflowTriggerHistoriesClient.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, workflowName, triggerName, historyName, options) if err != nil { return WorkflowTriggerHistoriesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowTriggerHistoriesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggerHistoriesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggerHistoriesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -127,25 +133,20 @@ func (client *WorkflowTriggerHistoriesClient) NewListPager(resourceGroupName str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowTriggerHistoriesClientListResponse) (WorkflowTriggerHistoriesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workflowName, triggerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WorkflowTriggerHistoriesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowTriggerHistoriesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, workflowName, triggerName, options) + }, nil) if err != nil { return WorkflowTriggerHistoriesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggerHistoriesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -205,16 +206,22 @@ func (client *WorkflowTriggerHistoriesClient) listHandleResponse(resp *http.Resp // - options - WorkflowTriggerHistoriesClientResubmitOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.Resubmit // method. func (client *WorkflowTriggerHistoriesClient) Resubmit(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientResubmitOptions) (WorkflowTriggerHistoriesClientResubmitResponse, error) { + var err error + const operationName = "WorkflowTriggerHistoriesClient.Resubmit" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resubmitCreateRequest(ctx, resourceGroupName, workflowName, triggerName, historyName, options) if err != nil { return WorkflowTriggerHistoriesClientResubmitResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowTriggerHistoriesClientResubmitResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return WorkflowTriggerHistoriesClientResubmitResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggerHistoriesClientResubmitResponse{}, err } return WorkflowTriggerHistoriesClientResubmitResponse{}, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowtriggers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowtriggers_client.go index 2bc6eae7..5b5ec9a2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowtriggers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowtriggers_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type WorkflowTriggersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowTriggersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowTriggersClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowTriggersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewWorkflowTriggersClient(subscriptionID string, credential azcore.TokenCre // - triggerName - The workflow trigger name. // - options - WorkflowTriggersClientGetOptions contains the optional parameters for the WorkflowTriggersClient.Get method. func (client *WorkflowTriggersClient) Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, options *WorkflowTriggersClientGetOptions) (WorkflowTriggersClientGetResponse, error) { + var err error + const operationName = "WorkflowTriggersClient.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, workflowName, triggerName, options) if err != nil { return WorkflowTriggersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowTriggersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -117,18 +123,25 @@ func (client *WorkflowTriggersClient) getHandleResponse(resp *http.Response) (Wo // - options - WorkflowTriggersClientGetSchemaJSONOptions contains the optional parameters for the WorkflowTriggersClient.GetSchemaJSON // method. func (client *WorkflowTriggersClient) GetSchemaJSON(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, options *WorkflowTriggersClientGetSchemaJSONOptions) (WorkflowTriggersClientGetSchemaJSONResponse, error) { + var err error + const operationName = "WorkflowTriggersClient.GetSchemaJSON" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSchemaJSONCreateRequest(ctx, resourceGroupName, workflowName, triggerName, options) if err != nil { return WorkflowTriggersClientGetSchemaJSONResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowTriggersClientGetSchemaJSONResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggersClientGetSchemaJSONResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggersClientGetSchemaJSONResponse{}, err } - return client.getSchemaJSONHandleResponse(resp) + resp, err := client.getSchemaJSONHandleResponse(httpResp) + return resp, err } // getSchemaJSONCreateRequest creates the GetSchemaJSON request. @@ -183,25 +196,20 @@ func (client *WorkflowTriggersClient) NewListPager(resourceGroupName string, wor return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowTriggersClientListResponse) (WorkflowTriggersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workflowName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowTriggersClient.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, workflowName, options) + }, nil) if err != nil { return WorkflowTriggersClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowTriggersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -256,18 +264,25 @@ func (client *WorkflowTriggersClient) listHandleResponse(resp *http.Response) (W // - options - WorkflowTriggersClientListCallbackURLOptions contains the optional parameters for the WorkflowTriggersClient.ListCallbackURL // method. func (client *WorkflowTriggersClient) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, options *WorkflowTriggersClientListCallbackURLOptions) (WorkflowTriggersClientListCallbackURLResponse, error) { + var err error + const operationName = "WorkflowTriggersClient.ListCallbackURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCallbackURLCreateRequest(ctx, resourceGroupName, workflowName, triggerName, options) if err != nil { return WorkflowTriggersClientListCallbackURLResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowTriggersClientListCallbackURLResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggersClientListCallbackURLResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggersClientListCallbackURLResponse{}, err } - return client.listCallbackURLHandleResponse(resp) + resp, err := client.listCallbackURLHandleResponse(httpResp) + return resp, err } // listCallbackURLCreateRequest creates the ListCallbackURL request. @@ -318,16 +333,22 @@ func (client *WorkflowTriggersClient) listCallbackURLHandleResponse(resp *http.R // - triggerName - The workflow trigger name. // - options - WorkflowTriggersClientResetOptions contains the optional parameters for the WorkflowTriggersClient.Reset method. func (client *WorkflowTriggersClient) Reset(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, options *WorkflowTriggersClientResetOptions) (WorkflowTriggersClientResetResponse, error) { + var err error + const operationName = "WorkflowTriggersClient.Reset" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resetCreateRequest(ctx, resourceGroupName, workflowName, triggerName, options) if err != nil { return WorkflowTriggersClientResetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowTriggersClientResetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggersClientResetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggersClientResetResponse{}, err } return WorkflowTriggersClientResetResponse{}, nil } @@ -371,16 +392,22 @@ func (client *WorkflowTriggersClient) resetCreateRequest(ctx context.Context, re // - triggerName - The workflow trigger name. // - options - WorkflowTriggersClientRunOptions contains the optional parameters for the WorkflowTriggersClient.Run method. func (client *WorkflowTriggersClient) Run(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, options *WorkflowTriggersClientRunOptions) (WorkflowTriggersClientRunResponse, error) { + var err error + const operationName = "WorkflowTriggersClient.Run" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.runCreateRequest(ctx, resourceGroupName, workflowName, triggerName, options) if err != nil { return WorkflowTriggersClientRunResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowTriggersClientRunResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WorkflowTriggersClientRunResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggersClientRunResponse{}, err } return WorkflowTriggersClientRunResponse{}, nil } @@ -426,16 +453,22 @@ func (client *WorkflowTriggersClient) runCreateRequest(ctx context.Context, reso // - options - WorkflowTriggersClientSetStateOptions contains the optional parameters for the WorkflowTriggersClient.SetState // method. func (client *WorkflowTriggersClient) SetState(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, setState SetTriggerStateActionDefinition, options *WorkflowTriggersClientSetStateOptions) (WorkflowTriggersClientSetStateResponse, error) { + var err error + const operationName = "WorkflowTriggersClient.SetState" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.setStateCreateRequest(ctx, resourceGroupName, workflowName, triggerName, setState, options) if err != nil { return WorkflowTriggersClientSetStateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowTriggersClientSetStateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggersClientSetStateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggersClientSetStateResponse{}, err } return WorkflowTriggersClientSetStateResponse{}, nil } @@ -467,5 +500,8 @@ func (client *WorkflowTriggersClient) setStateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2019-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, setState) + if err := runtime.MarshalAsJSON(req, setState); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowversions_client.go index efd2463a..cfb9b5c2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowversions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowversions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -34,7 +33,7 @@ type WorkflowVersionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowVersionsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowVersionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewWorkflowVersionsClient(subscriptionID string, credential azcore.TokenCre // - versionID - The workflow versionId. // - options - WorkflowVersionsClientGetOptions contains the optional parameters for the WorkflowVersionsClient.Get method. func (client *WorkflowVersionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, versionID string, options *WorkflowVersionsClientGetOptions) (WorkflowVersionsClientGetResponse, error) { + var err error + const operationName = "WorkflowVersionsClient.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, workflowName, versionID, options) if err != nil { return WorkflowVersionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowVersionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowVersionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowVersionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -120,25 +126,20 @@ func (client *WorkflowVersionsClient) NewListPager(resourceGroupName string, wor return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowVersionsClientListResponse) (WorkflowVersionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workflowName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowVersionsClient.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, workflowName, options) + }, nil) if err != nil { return WorkflowVersionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowVersionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowVersionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowversiontriggers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowversiontriggers_client.go index fa867c2c..b50eed94 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowversiontriggers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic/workflowversiontriggers_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armlogic @@ -33,7 +32,7 @@ type WorkflowVersionTriggersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowVersionTriggersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowVersionTriggersClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowVersionTriggersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewWorkflowVersionTriggersClient(subscriptionID string, credential azcore.T // - options - WorkflowVersionTriggersClientListCallbackURLOptions contains the optional parameters for the WorkflowVersionTriggersClient.ListCallbackURL // method. func (client *WorkflowVersionTriggersClient) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, versionID string, triggerName string, options *WorkflowVersionTriggersClientListCallbackURLOptions) (WorkflowVersionTriggersClientListCallbackURLResponse, error) { + var err error + const operationName = "WorkflowVersionTriggersClient.ListCallbackURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCallbackURLCreateRequest(ctx, resourceGroupName, workflowName, versionID, triggerName, options) if err != nil { return WorkflowVersionTriggersClientListCallbackURLResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowVersionTriggersClientListCallbackURLResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowVersionTriggersClientListCallbackURLResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowVersionTriggersClientListCallbackURLResponse{}, err } - return client.listCallbackURLHandleResponse(resp) + resp, err := client.listCallbackURLHandleResponse(httpResp) + return resp, err } // listCallbackURLCreateRequest creates the ListCallbackURL request. @@ -101,7 +107,10 @@ func (client *WorkflowVersionTriggersClient) listCallbackURLCreateRequest(ctx co req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil } return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/CHANGELOG.md index 8e1fde83..db823f47 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/CHANGELOG.md @@ -1,5 +1,11 @@ # 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/README.md index dc751bbe..044d8f47 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewClustersClient() ``` +## 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 - [Data Source](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/operationalinsights/datasource) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/assets.json index 0665662c..74146a7c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/assets.json +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/operationalinsights/armoperationalinsights", - "Tag": "go/resourcemanager/operationalinsights/armoperationalinsights_e8cecf46c1" + "Tag": "go/resourcemanager/operationalinsights/armoperationalinsights_13213d36f9" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/autorest.md index 0cd354eb..4084e7f6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/autorest.md @@ -8,6 +8,6 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/operationalinsights/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/operationalinsights/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 +module-version: 1.2.0 tag: package-2021-06 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/availableservicetiers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/availableservicetiers_client.go index d2c516e6..bb866866 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/availableservicetiers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/availableservicetiers_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type AvailableServiceTiersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAvailableServiceTiersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableServiceTiersClient, error) { - cl, err := arm.NewClient(moduleName+".AvailableServiceTiersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewAvailableServiceTiersClient(subscriptionID string, credential azcore.Tok // - options - AvailableServiceTiersClientListByWorkspaceOptions contains the optional parameters for the AvailableServiceTiersClient.ListByWorkspace // method. func (client *AvailableServiceTiersClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, options *AvailableServiceTiersClientListByWorkspaceOptions) (AvailableServiceTiersClientListByWorkspaceResponse, error) { + var err error + const operationName = "AvailableServiceTiersClient.ListByWorkspace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return AvailableServiceTiersClientListByWorkspaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AvailableServiceTiersClientListByWorkspaceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailableServiceTiersClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AvailableServiceTiersClientListByWorkspaceResponse{}, err } - return client.listByWorkspaceHandleResponse(resp) + resp, err := client.listByWorkspaceHandleResponse(httpResp) + return resp, err } // listByWorkspaceCreateRequest creates the ListByWorkspace request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/client_factory.go index 8c6d9591..9331eafb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -28,7 +27,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,102 +37,122 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } +// NewAvailableServiceTiersClient creates a new instance of AvailableServiceTiersClient. +func (c *ClientFactory) NewAvailableServiceTiersClient() *AvailableServiceTiersClient { + subClient, _ := NewAvailableServiceTiersClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewClustersClient creates a new instance of ClustersClient. +func (c *ClientFactory) NewClustersClient() *ClustersClient { + subClient, _ := NewClustersClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDataExportsClient creates a new instance of DataExportsClient. func (c *ClientFactory) NewDataExportsClient() *DataExportsClient { subClient, _ := NewDataExportsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDataSourcesClient creates a new instance of DataSourcesClient. func (c *ClientFactory) NewDataSourcesClient() *DataSourcesClient { subClient, _ := NewDataSourcesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDeletedWorkspacesClient creates a new instance of DeletedWorkspacesClient. +func (c *ClientFactory) NewDeletedWorkspacesClient() *DeletedWorkspacesClient { + subClient, _ := NewDeletedWorkspacesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewGatewaysClient creates a new instance of GatewaysClient. +func (c *ClientFactory) NewGatewaysClient() *GatewaysClient { + subClient, _ := NewGatewaysClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewIntelligencePacksClient creates a new instance of IntelligencePacksClient. func (c *ClientFactory) NewIntelligencePacksClient() *IntelligencePacksClient { subClient, _ := NewIntelligencePacksClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewLinkedServicesClient creates a new instance of LinkedServicesClient. func (c *ClientFactory) NewLinkedServicesClient() *LinkedServicesClient { subClient, _ := NewLinkedServicesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewLinkedStorageAccountsClient creates a new instance of LinkedStorageAccountsClient. func (c *ClientFactory) NewLinkedStorageAccountsClient() *LinkedStorageAccountsClient { subClient, _ := NewLinkedStorageAccountsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewManagementGroupsClient creates a new instance of ManagementGroupsClient. func (c *ClientFactory) NewManagementGroupsClient() *ManagementGroupsClient { subClient, _ := NewManagementGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewOperationStatusesClient creates a new instance of OperationStatusesClient. func (c *ClientFactory) NewOperationStatusesClient() *OperationStatusesClient { subClient, _ := NewOperationStatusesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSharedKeysClient() *SharedKeysClient { - subClient, _ := NewSharedKeysClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewUsagesClient() *UsagesClient { - subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewStorageInsightConfigsClient() *StorageInsightConfigsClient { - subClient, _ := NewStorageInsightConfigsClient(c.subscriptionID, c.credential, c.options) +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } +// NewSavedSearchesClient creates a new instance of SavedSearchesClient. func (c *ClientFactory) NewSavedSearchesClient() *SavedSearchesClient { subClient, _ := NewSavedSearchesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewAvailableServiceTiersClient() *AvailableServiceTiersClient { - subClient, _ := NewAvailableServiceTiersClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewGatewaysClient() *GatewaysClient { - subClient, _ := NewGatewaysClient(c.subscriptionID, c.credential, c.options) - return subClient -} - +// NewSchemaClient creates a new instance of SchemaClient. func (c *ClientFactory) NewSchemaClient() *SchemaClient { subClient, _ := NewSchemaClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspacePurgeClient() *WorkspacePurgeClient { - subClient, _ := NewWorkspacePurgeClient(c.subscriptionID, c.credential, c.options) +// NewSharedKeysClient creates a new instance of SharedKeysClient. +func (c *ClientFactory) NewSharedKeysClient() *SharedKeysClient { + subClient, _ := NewSharedKeysClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewClustersClient() *ClustersClient { - subClient, _ := NewClustersClient(c.subscriptionID, c.credential, c.options) +// NewStorageInsightConfigsClient creates a new instance of StorageInsightConfigsClient. +func (c *ClientFactory) NewStorageInsightConfigsClient() *StorageInsightConfigsClient { + subClient, _ := NewStorageInsightConfigsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +// NewTablesClient creates a new instance of TablesClient. +func (c *ClientFactory) NewTablesClient() *TablesClient { + subClient, _ := NewTablesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewTablesClient() *TablesClient { - subClient, _ := NewTablesClient(c.subscriptionID, c.credential, c.options) +// NewUsagesClient creates a new instance of UsagesClient. +func (c *ClientFactory) NewUsagesClient() *UsagesClient { + subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspacesClient() *WorkspacesClient { - subClient, _ := NewWorkspacesClient(c.subscriptionID, c.credential, c.options) +// NewWorkspacePurgeClient creates a new instance of WorkspacePurgeClient. +func (c *ClientFactory) NewWorkspacePurgeClient() *WorkspacePurgeClient { + subClient, _ := NewWorkspacePurgeClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDeletedWorkspacesClient() *DeletedWorkspacesClient { - subClient, _ := NewDeletedWorkspacesClient(c.subscriptionID, c.credential, c.options) +// 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/operationalinsights/armoperationalinsights/clusters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/clusters_client.go index 7fbe2fb9..c23adf53 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/clusters_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/clusters_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type ClustersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClustersClient, error) { - cl, err := arm.NewClient(moduleName+".ClustersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,9 +58,14 @@ func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -70,18 +74,24 @@ func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceG // // Generated from API version 2021-06-01 func (client *ClustersClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.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, clusterName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -107,7 +117,10 @@ func (client *ClustersClient) createOrUpdateCreateRequest(ctx context.Context, r reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a cluster instance. @@ -123,9 +136,14 @@ func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -134,18 +152,24 @@ func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName // // Generated from API version 2021-06-01 func (client *ClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.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 } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -182,18 +206,25 @@ func (client *ClustersClient) deleteCreateRequest(ctx context.Context, resourceG // - clusterName - Name of the Log Analytics Cluster. // - options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (ClustersClientGetResponse, error) { + var err error + const operationName = "ClustersClient.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 ClustersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClustersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClustersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -241,25 +272,20 @@ func (client *ClustersClient) NewListPager(options *ClustersClientListOptions) * return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ClustersClientListResponse) (ClustersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ClustersClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 ClustersClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -302,25 +328,20 @@ func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ClustersClientListByResourceGroupResponse) (ClustersClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.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 ClustersClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClustersClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -369,9 +390,14 @@ func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -380,18 +406,24 @@ func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName // // Generated from API version 2021-06-01 func (client *ClustersClient) update(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterPatch, options *ClustersClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.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, clusterName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -417,5 +449,8 @@ func (client *ClustersClient) updateCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + 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/operationalinsights/armoperationalinsights/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/constants.go index a4dbf691..4fb7c188 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights const ( - moduleName = "armoperationalinsights" - moduleVersion = "v1.1.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" + moduleVersion = "v1.2.0" ) // BillingType - Configures whether billing will be only on the cluster or each workspace will be billed by its proportional @@ -37,18 +36,18 @@ type Capacity int64 const ( CapacityFiveHundred Capacity = 500 + CapacityFiveThousand Capacity = 5000 CapacityTenHundred Capacity = 1000 CapacityTwoThousand Capacity = 2000 - CapacityFiveThousand Capacity = 5000 ) // PossibleCapacityValues returns the possible values for the Capacity const type. func PossibleCapacityValues() []Capacity { return []Capacity{ CapacityFiveHundred, + CapacityFiveThousand, CapacityTenHundred, CapacityTwoThousand, - CapacityFiveThousand, } } @@ -56,27 +55,27 @@ func PossibleCapacityValues() []Capacity { type CapacityReservationLevel int32 const ( - CapacityReservationLevelOneHundred CapacityReservationLevel = 100 - CapacityReservationLevelTwoHundred CapacityReservationLevel = 200 - CapacityReservationLevelThreeHundred CapacityReservationLevel = 300 - CapacityReservationLevelFourHundred CapacityReservationLevel = 400 CapacityReservationLevelFiveHundred CapacityReservationLevel = 500 + CapacityReservationLevelFiveThousand CapacityReservationLevel = 5000 + CapacityReservationLevelFourHundred CapacityReservationLevel = 400 + CapacityReservationLevelOneHundred CapacityReservationLevel = 100 CapacityReservationLevelTenHundred CapacityReservationLevel = 1000 + CapacityReservationLevelThreeHundred CapacityReservationLevel = 300 + CapacityReservationLevelTwoHundred CapacityReservationLevel = 200 CapacityReservationLevelTwoThousand CapacityReservationLevel = 2000 - CapacityReservationLevelFiveThousand CapacityReservationLevel = 5000 ) // PossibleCapacityReservationLevelValues returns the possible values for the CapacityReservationLevel const type. func PossibleCapacityReservationLevelValues() []CapacityReservationLevel { return []CapacityReservationLevel{ - CapacityReservationLevelOneHundred, - CapacityReservationLevelTwoHundred, - CapacityReservationLevelThreeHundred, - CapacityReservationLevelFourHundred, CapacityReservationLevelFiveHundred, + CapacityReservationLevelFiveThousand, + CapacityReservationLevelFourHundred, + CapacityReservationLevelOneHundred, CapacityReservationLevelTenHundred, + CapacityReservationLevelThreeHundred, + CapacityReservationLevelTwoHundred, CapacityReservationLevelTwoThousand, - CapacityReservationLevelFiveThousand, } } @@ -232,19 +231,19 @@ func PossibleDataSourceKindValues() []DataSourceKind { type DataSourceType string const ( - DataSourceTypeCustomLogs DataSourceType = "CustomLogs" + DataSourceTypeAlerts DataSourceType = "Alerts" DataSourceTypeAzureWatson DataSourceType = "AzureWatson" + DataSourceTypeCustomLogs DataSourceType = "CustomLogs" DataSourceTypeQuery DataSourceType = "Query" - DataSourceTypeAlerts DataSourceType = "Alerts" ) // PossibleDataSourceTypeValues returns the possible values for the DataSourceType const type. func PossibleDataSourceTypeValues() []DataSourceType { return []DataSourceType{ - DataSourceTypeCustomLogs, + DataSourceTypeAlerts, DataSourceTypeAzureWatson, + DataSourceTypeCustomLogs, DataSourceTypeQuery, - DataSourceTypeAlerts, } } @@ -252,17 +251,17 @@ func PossibleDataSourceTypeValues() []DataSourceType { type IdentityType string const ( + IdentityTypeNone IdentityType = "None" IdentityTypeSystemAssigned IdentityType = "SystemAssigned" IdentityTypeUserAssigned IdentityType = "UserAssigned" - IdentityTypeNone IdentityType = "None" ) // PossibleIdentityTypeValues returns the possible values for the IdentityType const type. func PossibleIdentityTypeValues() []IdentityType { return []IdentityType{ + IdentityTypeNone, IdentityTypeSystemAssigned, IdentityTypeUserAssigned, - IdentityTypeNone, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/dataexports_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/dataexports_client.go index bf13d673..1c54624d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/dataexports_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/dataexports_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type DataExportsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDataExportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataExportsClient, error) { - cl, err := arm.NewClient(moduleName+".DataExportsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewDataExportsClient(subscriptionID string, credential azcore.TokenCredenti // - options - DataExportsClientCreateOrUpdateOptions contains the optional parameters for the DataExportsClient.CreateOrUpdate // method. func (client *DataExportsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, dataExportName string, parameters DataExport, options *DataExportsClientCreateOrUpdateOptions) (DataExportsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DataExportsClient.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, workspaceName, dataExportName, parameters, options) if err != nil { return DataExportsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataExportsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DataExportsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DataExportsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *DataExportsClient) createOrUpdateCreateRequest(ctx context.Context reqQP.Set("api-version", "2020-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *DataExportsClient) createOrUpdateHandleResponse(resp *http.Respons // - dataExportName - The data export rule name. // - options - DataExportsClientDeleteOptions contains the optional parameters for the DataExportsClient.Delete method. func (client *DataExportsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, dataExportName string, options *DataExportsClientDeleteOptions) (DataExportsClientDeleteResponse, error) { + var err error + const operationName = "DataExportsClient.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, workspaceName, dataExportName, options) if err != nil { return DataExportsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataExportsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNotFound) { - return DataExportsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNotFound) { + err = runtime.NewResponseError(httpResp) + return DataExportsClientDeleteResponse{}, err } return DataExportsClientDeleteResponse{}, nil } @@ -170,18 +185,25 @@ func (client *DataExportsClient) deleteCreateRequest(ctx context.Context, resour // - dataExportName - The data export rule name. // - options - DataExportsClientGetOptions contains the optional parameters for the DataExportsClient.Get method. func (client *DataExportsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, dataExportName string, options *DataExportsClientGetOptions) (DataExportsClientGetResponse, error) { + var err error + const operationName = "DataExportsClient.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, dataExportName, options) if err != nil { return DataExportsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataExportsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataExportsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataExportsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -236,6 +258,7 @@ func (client *DataExportsClient) NewListByWorkspacePager(resourceGroupName strin return false }, Fetcher: func(ctx context.Context, page *DataExportsClientListByWorkspaceResponse) (DataExportsClientListByWorkspaceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DataExportsClient.NewListByWorkspacePager") req, err := client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return DataExportsClientListByWorkspaceResponse{}, err @@ -249,6 +272,7 @@ func (client *DataExportsClient) NewListByWorkspacePager(resourceGroupName strin } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/datasources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/datasources_client.go index a68d653b..877f4bce 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/datasources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/datasources_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type DataSourcesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDataSourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataSourcesClient, error) { - cl, err := arm.NewClient(moduleName+".DataSourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewDataSourcesClient(subscriptionID string, credential azcore.TokenCredenti // - options - DataSourcesClientCreateOrUpdateOptions contains the optional parameters for the DataSourcesClient.CreateOrUpdate // method. func (client *DataSourcesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, dataSourceName string, parameters DataSource, options *DataSourcesClientCreateOrUpdateOptions) (DataSourcesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DataSourcesClient.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, workspaceName, dataSourceName, parameters, options) if err != nil { return DataSourcesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataSourcesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DataSourcesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DataSourcesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *DataSourcesClient) createOrUpdateCreateRequest(ctx context.Context reqQP.Set("api-version", "2020-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *DataSourcesClient) createOrUpdateHandleResponse(resp *http.Respons // - dataSourceName - Name of the datasource. // - options - DataSourcesClientDeleteOptions contains the optional parameters for the DataSourcesClient.Delete method. func (client *DataSourcesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, dataSourceName string, options *DataSourcesClientDeleteOptions) (DataSourcesClientDeleteResponse, error) { + var err error + const operationName = "DataSourcesClient.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, workspaceName, dataSourceName, options) if err != nil { return DataSourcesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataSourcesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DataSourcesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DataSourcesClientDeleteResponse{}, err } return DataSourcesClientDeleteResponse{}, nil } @@ -169,18 +184,25 @@ func (client *DataSourcesClient) deleteCreateRequest(ctx context.Context, resour // - dataSourceName - Name of the datasource // - options - DataSourcesClientGetOptions contains the optional parameters for the DataSourcesClient.Get method. func (client *DataSourcesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, dataSourceName string, options *DataSourcesClientGetOptions) (DataSourcesClientGetResponse, error) { + var err error + const operationName = "DataSourcesClient.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, dataSourceName, options) if err != nil { return DataSourcesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataSourcesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataSourcesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataSourcesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -236,25 +258,20 @@ func (client *DataSourcesClient) NewListByWorkspacePager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DataSourcesClientListByWorkspaceResponse) (DataSourcesClientListByWorkspaceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, filter, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DataSourcesClient.NewListByWorkspacePager") + 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.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, filter, options) + }, nil) if err != nil { return DataSourcesClientListByWorkspaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DataSourcesClientListByWorkspaceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataSourcesClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) - } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/deletedworkspaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/deletedworkspaces_client.go index a7e1b581..74425821 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/deletedworkspaces_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/deletedworkspaces_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type DeletedWorkspacesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDeletedWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedWorkspacesClient, error) { - cl, err := arm.NewClient(moduleName+".DeletedWorkspacesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,6 +54,7 @@ func (client *DeletedWorkspacesClient) NewListPager(options *DeletedWorkspacesCl return false }, Fetcher: func(ctx context.Context, page *DeletedWorkspacesClientListResponse) (DeletedWorkspacesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeletedWorkspacesClient.NewListPager") req, err := client.listCreateRequest(ctx, options) if err != nil { return DeletedWorkspacesClientListResponse{}, err @@ -68,6 +68,7 @@ func (client *DeletedWorkspacesClient) NewListPager(options *DeletedWorkspacesCl } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -110,6 +111,7 @@ func (client *DeletedWorkspacesClient) NewListByResourceGroupPager(resourceGroup return false }, Fetcher: func(ctx context.Context, page *DeletedWorkspacesClientListByResourceGroupResponse) (DeletedWorkspacesClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeletedWorkspacesClient.NewListByResourceGroupPager") req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) if err != nil { return DeletedWorkspacesClientListByResourceGroupResponse{}, err @@ -123,6 +125,7 @@ func (client *DeletedWorkspacesClient) NewListByResourceGroupPager(resourceGroup } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/gateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/gateways_client.go index 6ff460b5..c1e22956 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/gateways_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/gateways_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type GatewaysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewaysClient, error) { - cl, err := arm.NewClient(moduleName+".GatewaysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,16 +52,22 @@ func NewGatewaysClient(subscriptionID string, credential azcore.TokenCredential, // - gatewayID - The Log Analytics gateway Id. // - options - GatewaysClientDeleteOptions contains the optional parameters for the GatewaysClient.Delete method. func (client *GatewaysClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, gatewayID string, options *GatewaysClientDeleteOptions) (GatewaysClientDeleteResponse, error) { + var err error + const operationName = "GatewaysClient.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, workspaceName, gatewayID, options) if err != nil { return GatewaysClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GatewaysClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewaysClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewaysClientDeleteResponse{}, err } return GatewaysClientDeleteResponse{}, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/intelligencepacks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/intelligencepacks_client.go index d4db20af..dd5e5a1b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/intelligencepacks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/intelligencepacks_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type IntelligencePacksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntelligencePacksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntelligencePacksClient, error) { - cl, err := arm.NewClient(moduleName+".IntelligencePacksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,16 +53,22 @@ func NewIntelligencePacksClient(subscriptionID string, credential azcore.TokenCr // - options - IntelligencePacksClientDisableOptions contains the optional parameters for the IntelligencePacksClient.Disable // method. func (client *IntelligencePacksClient) Disable(ctx context.Context, resourceGroupName string, workspaceName string, intelligencePackName string, options *IntelligencePacksClientDisableOptions) (IntelligencePacksClientDisableResponse, error) { + var err error + const operationName = "IntelligencePacksClient.Disable" + 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, workspaceName, intelligencePackName, options) if err != nil { return IntelligencePacksClientDisableResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntelligencePacksClientDisableResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntelligencePacksClientDisableResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntelligencePacksClientDisableResponse{}, err } return IntelligencePacksClientDisableResponse{}, nil } @@ -107,16 +112,22 @@ func (client *IntelligencePacksClient) disableCreateRequest(ctx context.Context, // - options - IntelligencePacksClientEnableOptions contains the optional parameters for the IntelligencePacksClient.Enable // method. func (client *IntelligencePacksClient) Enable(ctx context.Context, resourceGroupName string, workspaceName string, intelligencePackName string, options *IntelligencePacksClientEnableOptions) (IntelligencePacksClientEnableResponse, error) { + var err error + const operationName = "IntelligencePacksClient.Enable" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.enableCreateRequest(ctx, resourceGroupName, workspaceName, intelligencePackName, options) if err != nil { return IntelligencePacksClientEnableResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntelligencePacksClientEnableResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntelligencePacksClientEnableResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntelligencePacksClientEnableResponse{}, err } return IntelligencePacksClientEnableResponse{}, nil } @@ -158,18 +169,25 @@ func (client *IntelligencePacksClient) enableCreateRequest(ctx context.Context, // - workspaceName - The name of the workspace. // - options - IntelligencePacksClientListOptions contains the optional parameters for the IntelligencePacksClient.List method. func (client *IntelligencePacksClient) List(ctx context.Context, resourceGroupName string, workspaceName string, options *IntelligencePacksClientListOptions) (IntelligencePacksClientListResponse, error) { + var err error + const operationName = "IntelligencePacksClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return IntelligencePacksClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntelligencePacksClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntelligencePacksClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntelligencePacksClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedservices_client.go index 5cdc2efc..a4f80f76 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedservices_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedservices_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type LinkedServicesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLinkedServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LinkedServicesClient, error) { - cl, err := arm.NewClient(moduleName+".LinkedServicesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *LinkedServicesClient) BeginCreateOrUpdate(ctx context.Context, res if err != nil { return nil, err } - return runtime.NewPoller[LinkedServicesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LinkedServicesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[LinkedServicesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LinkedServicesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *LinkedServicesClient) BeginCreateOrUpdate(ctx context.Context, res // // Generated from API version 2020-08-01 func (client *LinkedServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, linkedServiceName string, parameters LinkedService, options *LinkedServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "LinkedServicesClient.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, linkedServiceName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -112,7 +122,10 @@ func (client *LinkedServicesClient) createOrUpdateCreateRequest(ctx context.Cont reqQP.Set("api-version", "2020-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a linked service instance. @@ -130,9 +143,14 @@ func (client *LinkedServicesClient) BeginDelete(ctx context.Context, resourceGro if err != nil { return nil, err } - return runtime.NewPoller[LinkedServicesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LinkedServicesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[LinkedServicesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LinkedServicesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -141,18 +159,24 @@ func (client *LinkedServicesClient) BeginDelete(ctx context.Context, resourceGro // // Generated from API version 2020-08-01 func (client *LinkedServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, linkedServiceName string, options *LinkedServicesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "LinkedServicesClient.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, linkedServiceName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -194,18 +218,25 @@ func (client *LinkedServicesClient) deleteCreateRequest(ctx context.Context, res // - linkedServiceName - Name of the linked service. // - options - LinkedServicesClientGetOptions contains the optional parameters for the LinkedServicesClient.Get method. func (client *LinkedServicesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, linkedServiceName string, options *LinkedServicesClientGetOptions) (LinkedServicesClientGetResponse, error) { + var err error + const operationName = "LinkedServicesClient.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, linkedServiceName, options) if err != nil { return LinkedServicesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LinkedServicesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LinkedServicesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LinkedServicesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -260,6 +291,7 @@ func (client *LinkedServicesClient) NewListByWorkspacePager(resourceGroupName st return false }, Fetcher: func(ctx context.Context, page *LinkedServicesClientListByWorkspaceResponse) (LinkedServicesClientListByWorkspaceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LinkedServicesClient.NewListByWorkspacePager") req, err := client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return LinkedServicesClientListByWorkspaceResponse{}, err @@ -273,6 +305,7 @@ func (client *LinkedServicesClient) NewListByWorkspacePager(resourceGroupName st } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedstorageaccounts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedstorageaccounts_client.go index b836e3b4..409a53ec 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedstorageaccounts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedstorageaccounts_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type LinkedStorageAccountsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLinkedStorageAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LinkedStorageAccountsClient, error) { - cl, err := arm.NewClient(moduleName+".LinkedStorageAccountsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewLinkedStorageAccountsClient(subscriptionID string, credential azcore.Tok // - options - LinkedStorageAccountsClientCreateOrUpdateOptions contains the optional parameters for the LinkedStorageAccountsClient.CreateOrUpdate // method. func (client *LinkedStorageAccountsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, dataSourceType DataSourceType, parameters LinkedStorageAccountsResource, options *LinkedStorageAccountsClientCreateOrUpdateOptions) (LinkedStorageAccountsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "LinkedStorageAccountsClient.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, workspaceName, dataSourceType, parameters, options) if err != nil { return LinkedStorageAccountsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LinkedStorageAccountsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LinkedStorageAccountsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LinkedStorageAccountsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *LinkedStorageAccountsClient) createOrUpdateCreateRequest(ctx conte reqQP.Set("api-version", "2020-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,16 +128,22 @@ func (client *LinkedStorageAccountsClient) createOrUpdateHandleResponse(resp *ht // - options - LinkedStorageAccountsClientDeleteOptions contains the optional parameters for the LinkedStorageAccountsClient.Delete // method. func (client *LinkedStorageAccountsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, dataSourceType DataSourceType, options *LinkedStorageAccountsClientDeleteOptions) (LinkedStorageAccountsClientDeleteResponse, error) { + var err error + const operationName = "LinkedStorageAccountsClient.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, workspaceName, dataSourceType, options) if err != nil { return LinkedStorageAccountsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LinkedStorageAccountsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LinkedStorageAccountsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LinkedStorageAccountsClientDeleteResponse{}, err } return LinkedStorageAccountsClientDeleteResponse{}, nil } @@ -172,18 +187,25 @@ func (client *LinkedStorageAccountsClient) deleteCreateRequest(ctx context.Conte // - options - LinkedStorageAccountsClientGetOptions contains the optional parameters for the LinkedStorageAccountsClient.Get // method. func (client *LinkedStorageAccountsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, dataSourceType DataSourceType, options *LinkedStorageAccountsClientGetOptions) (LinkedStorageAccountsClientGetResponse, error) { + var err error + const operationName = "LinkedStorageAccountsClient.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, dataSourceType, options) if err != nil { return LinkedStorageAccountsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LinkedStorageAccountsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LinkedStorageAccountsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LinkedStorageAccountsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -239,6 +261,7 @@ func (client *LinkedStorageAccountsClient) NewListByWorkspacePager(resourceGroup return false }, Fetcher: func(ctx context.Context, page *LinkedStorageAccountsClientListByWorkspaceResponse) (LinkedStorageAccountsClientListByWorkspaceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LinkedStorageAccountsClient.NewListByWorkspacePager") req, err := client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return LinkedStorageAccountsClientListByWorkspaceResponse{}, err @@ -252,6 +275,7 @@ func (client *LinkedStorageAccountsClient) NewListByWorkspacePager(resourceGroup } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/managementgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/managementgroups_client.go index 98b5329c..9bac9d36 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/managementgroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/managementgroups_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type ManagementGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewManagementGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".ManagementGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,6 +56,7 @@ func (client *ManagementGroupsClient) NewListPager(resourceGroupName string, wor return false }, Fetcher: func(ctx context.Context, page *ManagementGroupsClientListResponse) (ManagementGroupsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagementGroupsClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return ManagementGroupsClientListResponse{}, err @@ -70,6 +70,7 @@ func (client *ManagementGroupsClient) NewListPager(resourceGroupName string, wor } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/models.go index 197a4942..d05f3ea3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -50,12 +49,6 @@ type AvailableServiceTier struct { ServiceTier *SKUNameEnum } -// AvailableServiceTiersClientListByWorkspaceOptions contains the optional parameters for the AvailableServiceTiersClient.ListByWorkspace -// method. -type AvailableServiceTiersClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - // AzureEntityResource - The resource model definition for an Azure Resource Manager resource with an etag. type AzureEntityResource struct { // READ-ONLY; Resource Etag. @@ -185,40 +178,6 @@ type ClusterSKU struct { Name *ClusterSKUNameEnum } -// ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method. -type ClustersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method. -type ClustersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method. -type ClustersClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. -type ClustersClientGetOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager -// method. -type ClustersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method. -type ClustersClientListOptions struct { - // placeholder for future optional parameters -} - // CoreSummary - The core summary of a search. type CoreSummary struct { // REQUIRED; The number of documents of a core summary. @@ -270,27 +229,6 @@ type DataExportProperties struct { LastModifiedDate *string } -// DataExportsClientCreateOrUpdateOptions contains the optional parameters for the DataExportsClient.CreateOrUpdate method. -type DataExportsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// DataExportsClientDeleteOptions contains the optional parameters for the DataExportsClient.Delete method. -type DataExportsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DataExportsClientGetOptions contains the optional parameters for the DataExportsClient.Get method. -type DataExportsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DataExportsClientListByWorkspaceOptions contains the optional parameters for the DataExportsClient.NewListByWorkspacePager -// method. -type DataExportsClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - // DataSource - Datasources under OMS Workspace. type DataSource struct { // REQUIRED; The kind of the DataSource. @@ -330,39 +268,6 @@ type DataSourceListResult struct { Value []*DataSource } -// DataSourcesClientCreateOrUpdateOptions contains the optional parameters for the DataSourcesClient.CreateOrUpdate method. -type DataSourcesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// DataSourcesClientDeleteOptions contains the optional parameters for the DataSourcesClient.Delete method. -type DataSourcesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DataSourcesClientGetOptions contains the optional parameters for the DataSourcesClient.Get method. -type DataSourcesClientGetOptions struct { - // placeholder for future optional parameters -} - -// DataSourcesClientListByWorkspaceOptions contains the optional parameters for the DataSourcesClient.NewListByWorkspacePager -// method. -type DataSourcesClientListByWorkspaceOptions struct { - // Starting point of the collection of data source instances. - Skiptoken *string -} - -// DeletedWorkspacesClientListByResourceGroupOptions contains the optional parameters for the DeletedWorkspacesClient.NewListByResourceGroupPager -// method. -type DeletedWorkspacesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// DeletedWorkspacesClientListOptions contains the optional parameters for the DeletedWorkspacesClient.NewListPager method. -type DeletedWorkspacesClientListOptions struct { - // placeholder for future optional parameters -} - // Destination properties. type Destination struct { // REQUIRED; The destination resource ID. This can be copied from the Properties entry of the destination resource in Azure. @@ -415,11 +320,6 @@ type ErrorResponse struct { Error *ErrorDetail } -// GatewaysClientDeleteOptions contains the optional parameters for the GatewaysClient.Delete method. -type GatewaysClientDeleteOptions struct { - // placeholder for future optional parameters -} - // Identity for the resource. type Identity struct { // REQUIRED; Type of managed service identity. @@ -449,21 +349,6 @@ type IntelligencePack struct { Name *string } -// IntelligencePacksClientDisableOptions contains the optional parameters for the IntelligencePacksClient.Disable method. -type IntelligencePacksClientDisableOptions struct { - // placeholder for future optional parameters -} - -// IntelligencePacksClientEnableOptions contains the optional parameters for the IntelligencePacksClient.Enable method. -type IntelligencePacksClientEnableOptions struct { - // placeholder for future optional parameters -} - -// IntelligencePacksClientListOptions contains the optional parameters for the IntelligencePacksClient.List method. -type IntelligencePacksClientListOptions struct { - // placeholder for future optional parameters -} - // KeyVaultProperties - The key vault properties. type KeyVaultProperties struct { // The name of the key associated with the Log Analytics cluster. @@ -517,52 +402,6 @@ type LinkedServiceProperties struct { WriteAccessResourceID *string } -// LinkedServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the LinkedServicesClient.BeginCreateOrUpdate -// method. -type LinkedServicesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LinkedServicesClientBeginDeleteOptions contains the optional parameters for the LinkedServicesClient.BeginDelete method. -type LinkedServicesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LinkedServicesClientGetOptions contains the optional parameters for the LinkedServicesClient.Get method. -type LinkedServicesClientGetOptions struct { - // placeholder for future optional parameters -} - -// LinkedServicesClientListByWorkspaceOptions contains the optional parameters for the LinkedServicesClient.NewListByWorkspacePager -// method. -type LinkedServicesClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - -// LinkedStorageAccountsClientCreateOrUpdateOptions contains the optional parameters for the LinkedStorageAccountsClient.CreateOrUpdate -// method. -type LinkedStorageAccountsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// LinkedStorageAccountsClientDeleteOptions contains the optional parameters for the LinkedStorageAccountsClient.Delete method. -type LinkedStorageAccountsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// LinkedStorageAccountsClientGetOptions contains the optional parameters for the LinkedStorageAccountsClient.Get method. -type LinkedStorageAccountsClientGetOptions struct { - // placeholder for future optional parameters -} - -// LinkedStorageAccountsClientListByWorkspaceOptions contains the optional parameters for the LinkedStorageAccountsClient.NewListByWorkspacePager -// method. -type LinkedStorageAccountsClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - // LinkedStorageAccountsListResult - The list linked storage accounts service operation response. type LinkedStorageAccountsListResult struct { // A list of linked storage accounts instances. @@ -626,11 +465,6 @@ type ManagementGroupProperties struct { Version *string } -// ManagementGroupsClientListOptions contains the optional parameters for the ManagementGroupsClient.NewListPager method. -type ManagementGroupsClientListOptions struct { - // placeholder for future optional parameters -} - // MetricName - The name of a metric. type MetricName struct { // The localized name of the metric. @@ -694,16 +528,6 @@ type OperationStatus struct { Status *string } -// OperationStatusesClientGetOptions contains the optional parameters for the OperationStatusesClient.Get method. -type OperationStatusesClientGetOptions struct { - // placeholder for future optional parameters -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkScopedResource - The private link scope resource reference. type PrivateLinkScopedResource struct { // The full resource Id of the private link scope resource. @@ -782,38 +606,12 @@ type SavedSearchProperties struct { Version *int64 } -// SavedSearchesClientCreateOrUpdateOptions contains the optional parameters for the SavedSearchesClient.CreateOrUpdate method. -type SavedSearchesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SavedSearchesClientDeleteOptions contains the optional parameters for the SavedSearchesClient.Delete method. -type SavedSearchesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SavedSearchesClientGetOptions contains the optional parameters for the SavedSearchesClient.Get method. -type SavedSearchesClientGetOptions struct { - // placeholder for future optional parameters -} - -// SavedSearchesClientListByWorkspaceOptions contains the optional parameters for the SavedSearchesClient.ListByWorkspace -// method. -type SavedSearchesClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - // SavedSearchesListResult - The saved search list operation response. type SavedSearchesListResult struct { // The array of result values. Value []*SavedSearch } -// SchemaClientGetOptions contains the optional parameters for the SchemaClient.Get method. -type SchemaClientGetOptions struct { - // placeholder for future optional parameters -} - // SearchGetSchemaResponse - The get schema operation response. type SearchGetSchemaResponse struct { // The metadata from search results. @@ -928,16 +726,6 @@ type SharedKeys struct { SecondarySharedKey *string } -// SharedKeysClientGetSharedKeysOptions contains the optional parameters for the SharedKeysClient.GetSharedKeys method. -type SharedKeysClientGetSharedKeysOptions struct { - // placeholder for future optional parameters -} - -// SharedKeysClientRegenerateOptions contains the optional parameters for the SharedKeysClient.Regenerate method. -type SharedKeysClientRegenerateOptions struct { - // placeholder for future optional parameters -} - // StorageAccount - Describes a storage account connection. type StorageAccount struct { // REQUIRED; The Azure Resource Manager ID of the storage account resource. @@ -968,28 +756,6 @@ type StorageInsight struct { Type *string } -// StorageInsightConfigsClientCreateOrUpdateOptions contains the optional parameters for the StorageInsightConfigsClient.CreateOrUpdate -// method. -type StorageInsightConfigsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// StorageInsightConfigsClientDeleteOptions contains the optional parameters for the StorageInsightConfigsClient.Delete method. -type StorageInsightConfigsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// StorageInsightConfigsClientGetOptions contains the optional parameters for the StorageInsightConfigsClient.Get method. -type StorageInsightConfigsClientGetOptions struct { - // placeholder for future optional parameters -} - -// StorageInsightConfigsClientListByWorkspaceOptions contains the optional parameters for the StorageInsightConfigsClient.NewListByWorkspacePager -// method. -type StorageInsightConfigsClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - // StorageInsightListResult - The list storage insights operation response. type StorageInsightListResult struct { // The link (url) to the next page of results. @@ -1045,21 +811,6 @@ type TableProperties struct { RetentionInDays *int32 } -// TablesClientGetOptions contains the optional parameters for the TablesClient.Get method. -type TablesClientGetOptions struct { - // placeholder for future optional parameters -} - -// TablesClientListByWorkspaceOptions contains the optional parameters for the TablesClient.NewListByWorkspacePager method. -type TablesClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - -// TablesClientUpdateOptions contains the optional parameters for the TablesClient.Update method. -type TablesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // TablesListResult - The list tables operation response. type TablesListResult struct { // A list of data tables. @@ -1115,11 +866,6 @@ type UsageMetric struct { Unit *string } -// UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. -type UsagesClientListOptions struct { - // placeholder for future optional parameters -} - // UserIdentityProperties - User assigned identity properties. type UserIdentityProperties struct { // READ-ONLY; The client id of user assigned identity. @@ -1290,17 +1036,6 @@ type WorkspacePurgeBodyFilters struct { Value any } -// WorkspacePurgeClientGetPurgeStatusOptions contains the optional parameters for the WorkspacePurgeClient.GetPurgeStatus -// method. -type WorkspacePurgeClientGetPurgeStatusOptions struct { - // placeholder for future optional parameters -} - -// WorkspacePurgeClientPurgeOptions contains the optional parameters for the WorkspacePurgeClient.Purge method. -type WorkspacePurgeClientPurgeOptions struct { - // placeholder for future optional parameters -} - // WorkspacePurgeResponse - Response containing operationId for a specific purge action. type WorkspacePurgeResponse struct { // REQUIRED; Id to use when querying for status for a particular purge operation. @@ -1324,39 +1059,3 @@ type WorkspaceSKU struct { // READ-ONLY; The last time when the sku was updated. LastSKUUpdate *string } - -// WorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.BeginCreateOrUpdate -// method. -type WorkspacesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. -type WorkspacesClientBeginDeleteOptions struct { - // Deletes the workspace without the recovery option. A workspace that was deleted with this flag cannot be recovered. - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. -type WorkspacesClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager -// method. -type WorkspacesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// WorkspacesClientListOptions contains the optional parameters for the WorkspacesClient.NewListPager method. -type WorkspacesClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method. -type WorkspacesClientUpdateOptions struct { - // placeholder for future optional parameters -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/models_serde.go index fa0e6adc..f84d09a8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -1187,8 +1186,8 @@ func (m *ManagementGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagementGroupProperties. func (m ManagementGroupProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "created", m.Created) - populateTimeRFC3339(objectMap, "dataReceived", m.DataReceived) + populateDateTimeRFC3339(objectMap, "created", m.Created) + populateDateTimeRFC3339(objectMap, "dataReceived", m.DataReceived) populate(objectMap, "id", m.ID) populate(objectMap, "isGateway", m.IsGateway) populate(objectMap, "name", m.Name) @@ -1208,10 +1207,10 @@ func (m *ManagementGroupProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "created": - err = unpopulateTimeRFC3339(val, "Created", &m.Created) + err = unpopulateDateTimeRFC3339(val, "Created", &m.Created) delete(rawMsg, key) case "dataReceived": - err = unpopulateTimeRFC3339(val, "DataReceived", &m.DataReceived) + err = unpopulateDateTimeRFC3339(val, "DataReceived", &m.DataReceived) delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &m.ID) @@ -1679,14 +1678,14 @@ func (s SearchMetadata) MarshalJSON() ([]byte, error) { populate(objectMap, "coreSummaries", s.CoreSummaries) populate(objectMap, "eTag", s.ETag) populate(objectMap, "id", s.ID) - populateTimeRFC3339(objectMap, "lastUpdated", s.LastUpdated) + populateDateTimeRFC3339(objectMap, "lastUpdated", s.LastUpdated) populate(objectMap, "max", s.Max) populate(objectMap, "requestTime", s.RequestTime) populate(objectMap, "resultType", s.ResultType) populate(objectMap, "schema", s.Schema) populate(objectMap, "requestId", s.SearchID) populate(objectMap, "sort", s.Sort) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) populate(objectMap, "status", s.Status) populate(objectMap, "sum", s.Sum) populate(objectMap, "top", s.Top) @@ -1719,7 +1718,7 @@ func (s *SearchMetadata) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) case "lastUpdated": - err = unpopulateTimeRFC3339(val, "LastUpdated", &s.LastUpdated) + err = unpopulateDateTimeRFC3339(val, "LastUpdated", &s.LastUpdated) delete(rawMsg, key) case "max": err = unpopulate(val, "Max", &s.Max) @@ -1740,7 +1739,7 @@ func (s *SearchMetadata) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Sort", &s.Sort) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &s.Status) @@ -2258,7 +2257,7 @@ func (u UsageMetric) MarshalJSON() ([]byte, error) { populate(objectMap, "currentValue", u.CurrentValue) populate(objectMap, "limit", u.Limit) populate(objectMap, "name", u.Name) - populateTimeRFC3339(objectMap, "nextResetTime", u.NextResetTime) + populateDateTimeRFC3339(objectMap, "nextResetTime", u.NextResetTime) populate(objectMap, "quotaPeriod", u.QuotaPeriod) populate(objectMap, "unit", u.Unit) return json.Marshal(objectMap) @@ -2283,7 +2282,7 @@ func (u *UsageMetric) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Name", &u.Name) delete(rawMsg, key) case "nextResetTime": - err = unpopulateTimeRFC3339(val, "NextResetTime", &u.NextResetTime) + err = unpopulateDateTimeRFC3339(val, "NextResetTime", &u.NextResetTime) delete(rawMsg, key) case "quotaPeriod": err = unpopulate(val, "QuotaPeriod", &u.QuotaPeriod) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/operations_client.go index cb1ed4ef..93d99aff 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,20 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/operationstatuses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/operationstatuses_client.go index 2ac08e5b..ad614a1a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/operationstatuses_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/operationstatuses_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type OperationStatusesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOperationStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusesClient, error) { - cl, err := arm.NewClient(moduleName+".OperationStatusesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -52,18 +51,25 @@ func NewOperationStatusesClient(subscriptionID string, credential azcore.TokenCr // - asyncOperationID - The operation Id. // - options - OperationStatusesClientGetOptions contains the optional parameters for the OperationStatusesClient.Get method. func (client *OperationStatusesClient) Get(ctx context.Context, location string, asyncOperationID string, options *OperationStatusesClientGetOptions) (OperationStatusesClientGetResponse, error) { + var err error + const operationName = "OperationStatusesClient.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, asyncOperationID, options) if err != nil { return OperationStatusesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OperationStatusesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationStatusesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OperationStatusesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/options.go new file mode 100644 index 00000000..07733ab1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/options.go @@ -0,0 +1,310 @@ +//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 armoperationalinsights + +// AvailableServiceTiersClientListByWorkspaceOptions contains the optional parameters for the AvailableServiceTiersClient.ListByWorkspace +// method. +type AvailableServiceTiersClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method. +type ClustersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method. +type ClustersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method. +type ClustersClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. +type ClustersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager +// method. +type ClustersClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method. +type ClustersClientListOptions struct { + // placeholder for future optional parameters +} + +// DataExportsClientCreateOrUpdateOptions contains the optional parameters for the DataExportsClient.CreateOrUpdate method. +type DataExportsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// DataExportsClientDeleteOptions contains the optional parameters for the DataExportsClient.Delete method. +type DataExportsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DataExportsClientGetOptions contains the optional parameters for the DataExportsClient.Get method. +type DataExportsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DataExportsClientListByWorkspaceOptions contains the optional parameters for the DataExportsClient.NewListByWorkspacePager +// method. +type DataExportsClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// DataSourcesClientCreateOrUpdateOptions contains the optional parameters for the DataSourcesClient.CreateOrUpdate method. +type DataSourcesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// DataSourcesClientDeleteOptions contains the optional parameters for the DataSourcesClient.Delete method. +type DataSourcesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DataSourcesClientGetOptions contains the optional parameters for the DataSourcesClient.Get method. +type DataSourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DataSourcesClientListByWorkspaceOptions contains the optional parameters for the DataSourcesClient.NewListByWorkspacePager +// method. +type DataSourcesClientListByWorkspaceOptions struct { + // Starting point of the collection of data source instances. + Skiptoken *string +} + +// DeletedWorkspacesClientListByResourceGroupOptions contains the optional parameters for the DeletedWorkspacesClient.NewListByResourceGroupPager +// method. +type DeletedWorkspacesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// DeletedWorkspacesClientListOptions contains the optional parameters for the DeletedWorkspacesClient.NewListPager method. +type DeletedWorkspacesClientListOptions struct { + // placeholder for future optional parameters +} + +// GatewaysClientDeleteOptions contains the optional parameters for the GatewaysClient.Delete method. +type GatewaysClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IntelligencePacksClientDisableOptions contains the optional parameters for the IntelligencePacksClient.Disable method. +type IntelligencePacksClientDisableOptions struct { + // placeholder for future optional parameters +} + +// IntelligencePacksClientEnableOptions contains the optional parameters for the IntelligencePacksClient.Enable method. +type IntelligencePacksClientEnableOptions struct { + // placeholder for future optional parameters +} + +// IntelligencePacksClientListOptions contains the optional parameters for the IntelligencePacksClient.List method. +type IntelligencePacksClientListOptions struct { + // placeholder for future optional parameters +} + +// LinkedServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the LinkedServicesClient.BeginCreateOrUpdate +// method. +type LinkedServicesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LinkedServicesClientBeginDeleteOptions contains the optional parameters for the LinkedServicesClient.BeginDelete method. +type LinkedServicesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LinkedServicesClientGetOptions contains the optional parameters for the LinkedServicesClient.Get method. +type LinkedServicesClientGetOptions struct { + // placeholder for future optional parameters +} + +// LinkedServicesClientListByWorkspaceOptions contains the optional parameters for the LinkedServicesClient.NewListByWorkspacePager +// method. +type LinkedServicesClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// LinkedStorageAccountsClientCreateOrUpdateOptions contains the optional parameters for the LinkedStorageAccountsClient.CreateOrUpdate +// method. +type LinkedStorageAccountsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// LinkedStorageAccountsClientDeleteOptions contains the optional parameters for the LinkedStorageAccountsClient.Delete method. +type LinkedStorageAccountsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// LinkedStorageAccountsClientGetOptions contains the optional parameters for the LinkedStorageAccountsClient.Get method. +type LinkedStorageAccountsClientGetOptions struct { + // placeholder for future optional parameters +} + +// LinkedStorageAccountsClientListByWorkspaceOptions contains the optional parameters for the LinkedStorageAccountsClient.NewListByWorkspacePager +// method. +type LinkedStorageAccountsClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// ManagementGroupsClientListOptions contains the optional parameters for the ManagementGroupsClient.NewListPager method. +type ManagementGroupsClientListOptions struct { + // placeholder for future optional parameters +} + +// OperationStatusesClientGetOptions contains the optional parameters for the OperationStatusesClient.Get method. +type OperationStatusesClientGetOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// SavedSearchesClientCreateOrUpdateOptions contains the optional parameters for the SavedSearchesClient.CreateOrUpdate method. +type SavedSearchesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SavedSearchesClientDeleteOptions contains the optional parameters for the SavedSearchesClient.Delete method. +type SavedSearchesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SavedSearchesClientGetOptions contains the optional parameters for the SavedSearchesClient.Get method. +type SavedSearchesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SavedSearchesClientListByWorkspaceOptions contains the optional parameters for the SavedSearchesClient.ListByWorkspace +// method. +type SavedSearchesClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// SchemaClientGetOptions contains the optional parameters for the SchemaClient.Get method. +type SchemaClientGetOptions struct { + // placeholder for future optional parameters +} + +// SharedKeysClientGetSharedKeysOptions contains the optional parameters for the SharedKeysClient.GetSharedKeys method. +type SharedKeysClientGetSharedKeysOptions struct { + // placeholder for future optional parameters +} + +// SharedKeysClientRegenerateOptions contains the optional parameters for the SharedKeysClient.Regenerate method. +type SharedKeysClientRegenerateOptions struct { + // placeholder for future optional parameters +} + +// StorageInsightConfigsClientCreateOrUpdateOptions contains the optional parameters for the StorageInsightConfigsClient.CreateOrUpdate +// method. +type StorageInsightConfigsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// StorageInsightConfigsClientDeleteOptions contains the optional parameters for the StorageInsightConfigsClient.Delete method. +type StorageInsightConfigsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// StorageInsightConfigsClientGetOptions contains the optional parameters for the StorageInsightConfigsClient.Get method. +type StorageInsightConfigsClientGetOptions struct { + // placeholder for future optional parameters +} + +// StorageInsightConfigsClientListByWorkspaceOptions contains the optional parameters for the StorageInsightConfigsClient.NewListByWorkspacePager +// method. +type StorageInsightConfigsClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// TablesClientGetOptions contains the optional parameters for the TablesClient.Get method. +type TablesClientGetOptions struct { + // placeholder for future optional parameters +} + +// TablesClientListByWorkspaceOptions contains the optional parameters for the TablesClient.NewListByWorkspacePager method. +type TablesClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// TablesClientUpdateOptions contains the optional parameters for the TablesClient.Update method. +type TablesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. +type UsagesClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkspacePurgeClientGetPurgeStatusOptions contains the optional parameters for the WorkspacePurgeClient.GetPurgeStatus +// method. +type WorkspacePurgeClientGetPurgeStatusOptions struct { + // placeholder for future optional parameters +} + +// WorkspacePurgeClientPurgeOptions contains the optional parameters for the WorkspacePurgeClient.Purge method. +type WorkspacePurgeClientPurgeOptions struct { + // placeholder for future optional parameters +} + +// WorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.BeginCreateOrUpdate +// method. +type WorkspacesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. +type WorkspacesClientBeginDeleteOptions struct { + // Deletes the workspace without the recovery option. A workspace that was deleted with this flag cannot be recovered. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. +type WorkspacesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager +// method. +type WorkspacesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// WorkspacesClientListOptions contains the optional parameters for the WorkspacesClient.NewListPager method. +type WorkspacesClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method. +type WorkspacesClientUpdateOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/response_types.go index aa810f37..830dc223 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/response_types.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -17,6 +16,7 @@ type AvailableServiceTiersClientListByWorkspaceResponse struct { // ClustersClientCreateOrUpdateResponse contains the response from method ClustersClient.BeginCreateOrUpdate. type ClustersClientCreateOrUpdateResponse struct { + // The top level Log Analytics cluster resource container. Cluster } @@ -27,26 +27,31 @@ type ClustersClientDeleteResponse struct { // ClustersClientGetResponse contains the response from method ClustersClient.Get. type ClustersClientGetResponse struct { + // The top level Log Analytics cluster resource container. Cluster } // ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.NewListByResourceGroupPager. type ClustersClientListByResourceGroupResponse struct { + // The list clusters operation response. ClusterListResult } // ClustersClientListResponse contains the response from method ClustersClient.NewListPager. type ClustersClientListResponse struct { + // The list clusters operation response. ClusterListResult } // ClustersClientUpdateResponse contains the response from method ClustersClient.BeginUpdate. type ClustersClientUpdateResponse struct { + // The top level Log Analytics cluster resource container. Cluster } // DataExportsClientCreateOrUpdateResponse contains the response from method DataExportsClient.CreateOrUpdate. type DataExportsClientCreateOrUpdateResponse struct { + // The top level data export resource container. DataExport } @@ -57,16 +62,19 @@ type DataExportsClientDeleteResponse struct { // DataExportsClientGetResponse contains the response from method DataExportsClient.Get. type DataExportsClientGetResponse struct { + // The top level data export resource container. DataExport } // DataExportsClientListByWorkspaceResponse contains the response from method DataExportsClient.NewListByWorkspacePager. type DataExportsClientListByWorkspaceResponse struct { + // Result of the request to list data exports. DataExportListResult } // DataSourcesClientCreateOrUpdateResponse contains the response from method DataSourcesClient.CreateOrUpdate. type DataSourcesClientCreateOrUpdateResponse struct { + // Datasources under OMS Workspace. DataSource } @@ -77,21 +85,25 @@ type DataSourcesClientDeleteResponse struct { // DataSourcesClientGetResponse contains the response from method DataSourcesClient.Get. type DataSourcesClientGetResponse struct { + // Datasources under OMS Workspace. DataSource } // DataSourcesClientListByWorkspaceResponse contains the response from method DataSourcesClient.NewListByWorkspacePager. type DataSourcesClientListByWorkspaceResponse struct { + // The list data source by workspace operation response. DataSourceListResult } // DeletedWorkspacesClientListByResourceGroupResponse contains the response from method DeletedWorkspacesClient.NewListByResourceGroupPager. type DeletedWorkspacesClientListByResourceGroupResponse struct { + // The list workspaces operation response. WorkspaceListResult } // DeletedWorkspacesClientListResponse contains the response from method DeletedWorkspacesClient.NewListPager. type DeletedWorkspacesClientListResponse struct { + // The list workspaces operation response. WorkspaceListResult } @@ -118,26 +130,31 @@ type IntelligencePacksClientListResponse struct { // LinkedServicesClientCreateOrUpdateResponse contains the response from method LinkedServicesClient.BeginCreateOrUpdate. type LinkedServicesClientCreateOrUpdateResponse struct { + // The top level Linked service resource container. LinkedService } // LinkedServicesClientDeleteResponse contains the response from method LinkedServicesClient.BeginDelete. type LinkedServicesClientDeleteResponse struct { + // The top level Linked service resource container. LinkedService } // LinkedServicesClientGetResponse contains the response from method LinkedServicesClient.Get. type LinkedServicesClientGetResponse struct { + // The top level Linked service resource container. LinkedService } // LinkedServicesClientListByWorkspaceResponse contains the response from method LinkedServicesClient.NewListByWorkspacePager. type LinkedServicesClientListByWorkspaceResponse struct { + // The list linked service operation response. LinkedServiceListResult } // LinkedStorageAccountsClientCreateOrUpdateResponse contains the response from method LinkedStorageAccountsClient.CreateOrUpdate. type LinkedStorageAccountsClientCreateOrUpdateResponse struct { + // Linked storage accounts top level resource container. LinkedStorageAccountsResource } @@ -148,31 +165,37 @@ type LinkedStorageAccountsClientDeleteResponse struct { // LinkedStorageAccountsClientGetResponse contains the response from method LinkedStorageAccountsClient.Get. type LinkedStorageAccountsClientGetResponse struct { + // Linked storage accounts top level resource container. LinkedStorageAccountsResource } // LinkedStorageAccountsClientListByWorkspaceResponse contains the response from method LinkedStorageAccountsClient.NewListByWorkspacePager. type LinkedStorageAccountsClientListByWorkspaceResponse struct { + // The list linked storage accounts service operation response. LinkedStorageAccountsListResult } // ManagementGroupsClientListResponse contains the response from method ManagementGroupsClient.NewListPager. type ManagementGroupsClientListResponse struct { + // The list workspace management groups operation response. WorkspaceListManagementGroupsResult } // OperationStatusesClientGetResponse contains the response from method OperationStatusesClient.Get. type OperationStatusesClientGetResponse struct { + // The status of operation. OperationStatus } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list solution operations. OperationListResult } // SavedSearchesClientCreateOrUpdateResponse contains the response from method SavedSearchesClient.CreateOrUpdate. type SavedSearchesClientCreateOrUpdateResponse struct { + // Value object for saved search results. SavedSearch } @@ -183,31 +206,37 @@ type SavedSearchesClientDeleteResponse struct { // SavedSearchesClientGetResponse contains the response from method SavedSearchesClient.Get. type SavedSearchesClientGetResponse struct { + // Value object for saved search results. SavedSearch } // SavedSearchesClientListByWorkspaceResponse contains the response from method SavedSearchesClient.ListByWorkspace. type SavedSearchesClientListByWorkspaceResponse struct { + // The saved search list operation response. SavedSearchesListResult } // SchemaClientGetResponse contains the response from method SchemaClient.Get. type SchemaClientGetResponse struct { + // The get schema operation response. SearchGetSchemaResponse } // SharedKeysClientGetSharedKeysResponse contains the response from method SharedKeysClient.GetSharedKeys. type SharedKeysClientGetSharedKeysResponse struct { + // The shared keys for a workspace. SharedKeys } // SharedKeysClientRegenerateResponse contains the response from method SharedKeysClient.Regenerate. type SharedKeysClientRegenerateResponse struct { + // The shared keys for a workspace. SharedKeys } // StorageInsightConfigsClientCreateOrUpdateResponse contains the response from method StorageInsightConfigsClient.CreateOrUpdate. type StorageInsightConfigsClientCreateOrUpdateResponse struct { + // The top level storage insight resource container. StorageInsight } @@ -218,48 +247,58 @@ type StorageInsightConfigsClientDeleteResponse struct { // StorageInsightConfigsClientGetResponse contains the response from method StorageInsightConfigsClient.Get. type StorageInsightConfigsClientGetResponse struct { + // The top level storage insight resource container. StorageInsight } // StorageInsightConfigsClientListByWorkspaceResponse contains the response from method StorageInsightConfigsClient.NewListByWorkspacePager. type StorageInsightConfigsClientListByWorkspaceResponse struct { + // The list storage insights operation response. StorageInsightListResult } // TablesClientGetResponse contains the response from method TablesClient.Get. type TablesClientGetResponse struct { + // Workspace data table definition. Table } // TablesClientListByWorkspaceResponse contains the response from method TablesClient.NewListByWorkspacePager. type TablesClientListByWorkspaceResponse struct { + // The list tables operation response. TablesListResult } // TablesClientUpdateResponse contains the response from method TablesClient.Update. type TablesClientUpdateResponse struct { + // Workspace data table definition. Table } // UsagesClientListResponse contains the response from method UsagesClient.NewListPager. type UsagesClientListResponse struct { + // The list workspace usages operation response. WorkspaceListUsagesResult } // WorkspacePurgeClientGetPurgeStatusResponse contains the response from method WorkspacePurgeClient.GetPurgeStatus. type WorkspacePurgeClientGetPurgeStatusResponse struct { + // Response containing status for a specific purge operation. WorkspacePurgeStatusResponse } // WorkspacePurgeClientPurgeResponse contains the response from method WorkspacePurgeClient.Purge. type WorkspacePurgeClientPurgeResponse struct { + // Response containing operationId for a specific purge action. WorkspacePurgeResponse + // XMSStatusLocation contains the information returned from the x-ms-status-location header response. XMSStatusLocation *string } // WorkspacesClientCreateOrUpdateResponse contains the response from method WorkspacesClient.BeginCreateOrUpdate. type WorkspacesClientCreateOrUpdateResponse struct { + // The top level Workspace resource container. Workspace } @@ -270,20 +309,24 @@ type WorkspacesClientDeleteResponse struct { // WorkspacesClientGetResponse contains the response from method WorkspacesClient.Get. type WorkspacesClientGetResponse struct { + // The top level Workspace resource container. Workspace } // WorkspacesClientListByResourceGroupResponse contains the response from method WorkspacesClient.NewListByResourceGroupPager. type WorkspacesClientListByResourceGroupResponse struct { + // The list workspaces operation response. WorkspaceListResult } // WorkspacesClientListResponse contains the response from method WorkspacesClient.NewListPager. type WorkspacesClientListResponse struct { + // The list workspaces operation response. WorkspaceListResult } // WorkspacesClientUpdateResponse contains the response from method WorkspacesClient.Update. type WorkspacesClientUpdateResponse struct { + // The top level Workspace resource container. Workspace } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/savedsearches_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/savedsearches_client.go index ed09022c..cb66ee14 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/savedsearches_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/savedsearches_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type SavedSearchesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSavedSearchesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SavedSearchesClient, error) { - cl, err := arm.NewClient(moduleName+".SavedSearchesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewSavedSearchesClient(subscriptionID string, credential azcore.TokenCreden // - options - SavedSearchesClientCreateOrUpdateOptions contains the optional parameters for the SavedSearchesClient.CreateOrUpdate // method. func (client *SavedSearchesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, savedSearchID string, parameters SavedSearch, options *SavedSearchesClientCreateOrUpdateOptions) (SavedSearchesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SavedSearchesClient.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, workspaceName, savedSearchID, parameters, options) if err != nil { return SavedSearchesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SavedSearchesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SavedSearchesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SavedSearchesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *SavedSearchesClient) createOrUpdateCreateRequest(ctx context.Conte reqQP.Set("api-version", "2020-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *SavedSearchesClient) createOrUpdateHandleResponse(resp *http.Respo // - savedSearchID - The id of the saved search. // - options - SavedSearchesClientDeleteOptions contains the optional parameters for the SavedSearchesClient.Delete method. func (client *SavedSearchesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, savedSearchID string, options *SavedSearchesClientDeleteOptions) (SavedSearchesClientDeleteResponse, error) { + var err error + const operationName = "SavedSearchesClient.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, workspaceName, savedSearchID, options) if err != nil { return SavedSearchesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SavedSearchesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SavedSearchesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SavedSearchesClientDeleteResponse{}, err } return SavedSearchesClientDeleteResponse{}, nil } @@ -169,18 +184,25 @@ func (client *SavedSearchesClient) deleteCreateRequest(ctx context.Context, reso // - savedSearchID - The id of the saved search. // - options - SavedSearchesClientGetOptions contains the optional parameters for the SavedSearchesClient.Get method. func (client *SavedSearchesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, savedSearchID string, options *SavedSearchesClientGetOptions) (SavedSearchesClientGetResponse, error) { + var err error + const operationName = "SavedSearchesClient.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, savedSearchID, options) if err != nil { return SavedSearchesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SavedSearchesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SavedSearchesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SavedSearchesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -231,18 +253,25 @@ func (client *SavedSearchesClient) getHandleResponse(resp *http.Response) (Saved // - options - SavedSearchesClientListByWorkspaceOptions contains the optional parameters for the SavedSearchesClient.ListByWorkspace // method. func (client *SavedSearchesClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, options *SavedSearchesClientListByWorkspaceOptions) (SavedSearchesClientListByWorkspaceResponse, error) { + var err error + const operationName = "SavedSearchesClient.ListByWorkspace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return SavedSearchesClientListByWorkspaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SavedSearchesClientListByWorkspaceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SavedSearchesClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SavedSearchesClientListByWorkspaceResponse{}, err } - return client.listByWorkspaceHandleResponse(resp) + resp, err := client.listByWorkspaceHandleResponse(httpResp) + return resp, err } // listByWorkspaceCreateRequest creates the ListByWorkspace request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/schema_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/schema_client.go index 6f066cf5..a3f117e0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/schema_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/schema_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type SchemaClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSchemaClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SchemaClient, error) { - cl, err := arm.NewClient(moduleName+".SchemaClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -52,18 +51,25 @@ func NewSchemaClient(subscriptionID string, credential azcore.TokenCredential, o // - workspaceName - The name of the workspace. // - options - SchemaClientGetOptions contains the optional parameters for the SchemaClient.Get method. func (client *SchemaClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *SchemaClientGetOptions) (SchemaClientGetResponse, error) { + var err error + const operationName = "SchemaClient.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, options) if err != nil { return SchemaClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SchemaClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SchemaClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SchemaClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/sharedkeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/sharedkeys_client.go index 10777c30..7df3e6ec 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/sharedkeys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/sharedkeys_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type SharedKeysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSharedKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharedKeysClient, error) { - cl, err := arm.NewClient(moduleName+".SharedKeysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewSharedKeysClient(subscriptionID string, credential azcore.TokenCredentia // - options - SharedKeysClientGetSharedKeysOptions contains the optional parameters for the SharedKeysClient.GetSharedKeys // method. func (client *SharedKeysClient) GetSharedKeys(ctx context.Context, resourceGroupName string, workspaceName string, options *SharedKeysClientGetSharedKeysOptions) (SharedKeysClientGetSharedKeysResponse, error) { + var err error + const operationName = "SharedKeysClient.GetSharedKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSharedKeysCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return SharedKeysClientGetSharedKeysResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SharedKeysClientGetSharedKeysResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SharedKeysClientGetSharedKeysResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SharedKeysClientGetSharedKeysResponse{}, err } - return client.getSharedKeysHandleResponse(resp) + resp, err := client.getSharedKeysHandleResponse(httpResp) + return resp, err } // getSharedKeysCreateRequest creates the GetSharedKeys request. @@ -111,18 +117,25 @@ func (client *SharedKeysClient) getSharedKeysHandleResponse(resp *http.Response) // - workspaceName - The name of the workspace. // - options - SharedKeysClientRegenerateOptions contains the optional parameters for the SharedKeysClient.Regenerate method. func (client *SharedKeysClient) Regenerate(ctx context.Context, resourceGroupName string, workspaceName string, options *SharedKeysClientRegenerateOptions) (SharedKeysClientRegenerateResponse, error) { + var err error + const operationName = "SharedKeysClient.Regenerate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regenerateCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return SharedKeysClientRegenerateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SharedKeysClientRegenerateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SharedKeysClientRegenerateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SharedKeysClientRegenerateResponse{}, err } - return client.regenerateHandleResponse(resp) + resp, err := client.regenerateHandleResponse(httpResp) + return resp, err } // regenerateCreateRequest creates the Regenerate request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/storageinsightconfigs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/storageinsightconfigs_client.go index 6b54f9f1..4d4b414c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/storageinsightconfigs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/storageinsightconfigs_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type StorageInsightConfigsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewStorageInsightConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageInsightConfigsClient, error) { - cl, err := arm.NewClient(moduleName+".StorageInsightConfigsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewStorageInsightConfigsClient(subscriptionID string, credential azcore.Tok // - options - StorageInsightConfigsClientCreateOrUpdateOptions contains the optional parameters for the StorageInsightConfigsClient.CreateOrUpdate // method. func (client *StorageInsightConfigsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, storageInsightName string, parameters StorageInsight, options *StorageInsightConfigsClientCreateOrUpdateOptions) (StorageInsightConfigsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "StorageInsightConfigsClient.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, workspaceName, storageInsightName, parameters, options) if err != nil { return StorageInsightConfigsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StorageInsightConfigsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return StorageInsightConfigsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return StorageInsightConfigsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *StorageInsightConfigsClient) createOrUpdateCreateRequest(ctx conte reqQP.Set("api-version", "2020-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *StorageInsightConfigsClient) createOrUpdateHandleResponse(resp *ht // - options - StorageInsightConfigsClientDeleteOptions contains the optional parameters for the StorageInsightConfigsClient.Delete // method. func (client *StorageInsightConfigsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, storageInsightName string, options *StorageInsightConfigsClientDeleteOptions) (StorageInsightConfigsClientDeleteResponse, error) { + var err error + const operationName = "StorageInsightConfigsClient.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, workspaceName, storageInsightName, options) if err != nil { return StorageInsightConfigsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StorageInsightConfigsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return StorageInsightConfigsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StorageInsightConfigsClientDeleteResponse{}, err } return StorageInsightConfigsClientDeleteResponse{}, nil } @@ -171,18 +186,25 @@ func (client *StorageInsightConfigsClient) deleteCreateRequest(ctx context.Conte // - options - StorageInsightConfigsClientGetOptions contains the optional parameters for the StorageInsightConfigsClient.Get // method. func (client *StorageInsightConfigsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, storageInsightName string, options *StorageInsightConfigsClientGetOptions) (StorageInsightConfigsClientGetResponse, error) { + var err error + const operationName = "StorageInsightConfigsClient.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, storageInsightName, options) if err != nil { return StorageInsightConfigsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StorageInsightConfigsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StorageInsightConfigsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StorageInsightConfigsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -237,25 +259,20 @@ func (client *StorageInsightConfigsClient) NewListByWorkspacePager(resourceGroup return page.ODataNextLink != nil && len(*page.ODataNextLink) > 0 }, Fetcher: func(ctx context.Context, page *StorageInsightConfigsClientListByWorkspaceResponse) (StorageInsightConfigsClientListByWorkspaceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.ODataNextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StorageInsightConfigsClient.NewListByWorkspacePager") + nextLink := "" + if page != nil { + nextLink = *page.ODataNextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) if err != nil { return StorageInsightConfigsClientListByWorkspaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return StorageInsightConfigsClientListByWorkspaceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StorageInsightConfigsClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) - } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/tables_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/tables_client.go index a80d1926..258777ef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/tables_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/tables_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type TablesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TablesClient, error) { - cl, err := arm.NewClient(moduleName+".TablesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewTablesClient(subscriptionID string, credential azcore.TokenCredential, o // - tableName - The name of the table. // - options - TablesClientGetOptions contains the optional parameters for the TablesClient.Get method. func (client *TablesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, tableName string, options *TablesClientGetOptions) (TablesClientGetResponse, error) { + var err error + const operationName = "TablesClient.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, tableName, options) if err != nil { return TablesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TablesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TablesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TablesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -119,6 +125,7 @@ func (client *TablesClient) NewListByWorkspacePager(resourceGroupName string, wo return false }, Fetcher: func(ctx context.Context, page *TablesClientListByWorkspaceResponse) (TablesClientListByWorkspaceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TablesClient.NewListByWorkspacePager") req, err := client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return TablesClientListByWorkspaceResponse{}, err @@ -132,6 +139,7 @@ func (client *TablesClient) NewListByWorkspacePager(resourceGroupName string, wo } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -180,18 +188,25 @@ func (client *TablesClient) listByWorkspaceHandleResponse(resp *http.Response) ( // - parameters - The parameters required to update table properties. // - options - TablesClientUpdateOptions contains the optional parameters for the TablesClient.Update method. func (client *TablesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, tableName string, parameters Table, options *TablesClientUpdateOptions) (TablesClientUpdateResponse, error) { + var err error + const operationName = "TablesClient.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, workspaceName, tableName, parameters, options) if err != nil { return TablesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TablesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TablesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TablesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -221,7 +236,10 @@ func (client *TablesClient) updateCreateRequest(ctx context.Context, resourceGro reqQP.Set("api-version", "2020-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/time_rfc3339.go index 2beb25a7..e5446c3d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/usages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/usages_client.go index 2b802246..b3c6ab1f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/usages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/usages_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type UsagesClient struct { // - 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+".UsagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,6 +55,7 @@ func (client *UsagesClient) NewListPager(resourceGroupName string, workspaceName return false }, Fetcher: func(ctx context.Context, page *UsagesClientListResponse) (UsagesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UsagesClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return UsagesClientListResponse{}, err @@ -69,6 +69,7 @@ func (client *UsagesClient) NewListPager(resourceGroupName string, workspaceName } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/workspacepurge_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/workspacepurge_client.go index a47c0389..173bcc5f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/workspacepurge_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/workspacepurge_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -33,7 +32,7 @@ type WorkspacePurgeClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspacePurgeClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacePurgeClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspacePurgeClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewWorkspacePurgeClient(subscriptionID string, credential azcore.TokenCrede // - options - WorkspacePurgeClientGetPurgeStatusOptions contains the optional parameters for the WorkspacePurgeClient.GetPurgeStatus // method. func (client *WorkspacePurgeClient) GetPurgeStatus(ctx context.Context, resourceGroupName string, workspaceName string, purgeID string, options *WorkspacePurgeClientGetPurgeStatusOptions) (WorkspacePurgeClientGetPurgeStatusResponse, error) { + var err error + const operationName = "WorkspacePurgeClient.GetPurgeStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPurgeStatusCreateRequest(ctx, resourceGroupName, workspaceName, purgeID, options) if err != nil { return WorkspacePurgeClientGetPurgeStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspacePurgeClientGetPurgeStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspacePurgeClientGetPurgeStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspacePurgeClientGetPurgeStatusResponse{}, err } - return client.getPurgeStatusHandleResponse(resp) + resp, err := client.getPurgeStatusHandleResponse(httpResp) + return resp, err } // getPurgeStatusCreateRequest creates the GetPurgeStatus request. @@ -120,18 +126,25 @@ func (client *WorkspacePurgeClient) getPurgeStatusHandleResponse(resp *http.Resp // - body - Describes the body of a request to purge data in a single table of an Log Analytics Workspace // - options - WorkspacePurgeClientPurgeOptions contains the optional parameters for the WorkspacePurgeClient.Purge method. func (client *WorkspacePurgeClient) Purge(ctx context.Context, resourceGroupName string, workspaceName string, body WorkspacePurgeBody, options *WorkspacePurgeClientPurgeOptions) (WorkspacePurgeClientPurgeResponse, error) { + var err error + const operationName = "WorkspacePurgeClient.Purge" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.purgeCreateRequest(ctx, resourceGroupName, workspaceName, body, options) if err != nil { return WorkspacePurgeClientPurgeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspacePurgeClientPurgeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return WorkspacePurgeClientPurgeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WorkspacePurgeClientPurgeResponse{}, err } - return client.purgeHandleResponse(resp) + resp, err := client.purgeHandleResponse(httpResp) + return resp, err } // purgeCreateRequest creates the Purge request. @@ -157,7 +170,10 @@ func (client *WorkspacePurgeClient) purgeCreateRequest(ctx context.Context, reso reqQP.Set("api-version", "2020-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil } // purgeHandleResponse handles the Purge response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/workspaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/workspaces_client.go index 5fc1bd62..a8a42139 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/workspaces_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/workspaces_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armoperationalinsights @@ -34,7 +33,7 @@ type WorkspacesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacesClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspacesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller[WorkspacesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspacesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspacesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspacesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourc // // Generated from API version 2021-06-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" + 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, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -108,7 +118,10 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, @@ -126,9 +139,14 @@ func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller[WorkspacesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspacesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspacesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspacesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -139,18 +157,24 @@ func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupNa // // Generated from API version 2021-06-01 func (client *WorkspacesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "WorkspacesClient.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, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -190,18 +214,25 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc // - workspaceName - The name of the workspace. // - options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. func (client *WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (WorkspacesClientGetResponse, error) { + var err error + const operationName = "WorkspacesClient.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, options) if err != nil { return WorkspacesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspacesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspacesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspacesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -249,6 +280,7 @@ func (client *WorkspacesClient) NewListPager(options *WorkspacesClientListOption return false }, Fetcher: func(ctx context.Context, page *WorkspacesClientListResponse) (WorkspacesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspacesClient.NewListPager") req, err := client.listCreateRequest(ctx, options) if err != nil { return WorkspacesClientListResponse{}, err @@ -262,6 +294,7 @@ func (client *WorkspacesClient) NewListPager(options *WorkspacesClientListOption } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -304,6 +337,7 @@ func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName st return false }, Fetcher: func(ctx context.Context, page *WorkspacesClientListByResourceGroupResponse) (WorkspacesClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspacesClient.NewListByResourceGroupPager") req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) if err != nil { return WorkspacesClientListByResourceGroupResponse{}, err @@ -317,6 +351,7 @@ func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName st } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -360,18 +395,25 @@ func (client *WorkspacesClient) listByResourceGroupHandleResponse(resp *http.Res // - parameters - The parameters required to patch a workspace. // - options - WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method. func (client *WorkspacesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspacePatch, options *WorkspacesClientUpdateOptions) (WorkspacesClientUpdateResponse, error) { + var err error + const operationName = "WorkspacesClient.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, workspaceName, parameters, options) if err != nil { return WorkspacesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspacesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspacesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspacesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -397,7 +439,10 @@ func (client *WorkspacesClient) updateCreateRequest(ctx context.Context, resourc reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/CHANGELOG.md index 887cde9f..dc5b35b5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +## 1.1.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. +- New field `TrustedRanges` in struct `NetworkProfile` + + ## 1.0.0 (2023-07-14) ### Other Changes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/autorest.md index 2725d4b3..acd206fd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/paloaltonetworks/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/paloaltonetworks/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/paloaltonetworks/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/paloaltonetworks/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.0.0 -tag: package-2022-08-29 +module-version: 1.1.0 +tag: package-2023-09-01 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectglobalrulestack_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectglobalrulestack_client.go index d5f2ac89..be9a2720 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectglobalrulestack_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectglobalrulestack_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -31,7 +30,7 @@ type CertificateObjectGlobalRulestackClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCertificateObjectGlobalRulestackClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateObjectGlobalRulestackClient, error) { - cl, err := arm.NewClient(moduleName+".CertificateObjectGlobalRulestackClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -44,7 +43,7 @@ func NewCertificateObjectGlobalRulestackClient(credential azcore.TokenCredential // BeginCreateOrUpdate - Create a CertificateObjectGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - name - certificate name // - resource - Resource create parameters. @@ -56,31 +55,41 @@ func (client *CertificateObjectGlobalRulestackClient) BeginCreateOrUpdate(ctx co if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificateObjectGlobalRulestackClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificateObjectGlobalRulestackClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[CertificateObjectGlobalRulestackClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CertificateObjectGlobalRulestackClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create a CertificateObjectGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *CertificateObjectGlobalRulestackClient) createOrUpdate(ctx context.Context, globalRulestackName string, name string, resource CertificateObjectGlobalRulestackResource, options *CertificateObjectGlobalRulestackClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CertificateObjectGlobalRulestackClient.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, globalRulestackName, name, resource, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -99,16 +108,19 @@ func (client *CertificateObjectGlobalRulestackClient) createOrUpdateCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a CertificateObjectGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - name - certificate name // - options - CertificateObjectGlobalRulestackClientBeginDeleteOptions contains the optional parameters for the CertificateObjectGlobalRulestackClient.BeginDelete @@ -119,31 +131,41 @@ func (client *CertificateObjectGlobalRulestackClient) BeginDelete(ctx context.Co if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificateObjectGlobalRulestackClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificateObjectGlobalRulestackClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[CertificateObjectGlobalRulestackClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CertificateObjectGlobalRulestackClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete a CertificateObjectGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *CertificateObjectGlobalRulestackClient) deleteOperation(ctx context.Context, globalRulestackName string, name string, options *CertificateObjectGlobalRulestackClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "CertificateObjectGlobalRulestackClient.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, globalRulestackName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -162,7 +184,7 @@ func (client *CertificateObjectGlobalRulestackClient) deleteCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -171,24 +193,31 @@ func (client *CertificateObjectGlobalRulestackClient) deleteCreateRequest(ctx co // Get - Get a CertificateObjectGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - name - certificate name // - options - CertificateObjectGlobalRulestackClientGetOptions contains the optional parameters for the CertificateObjectGlobalRulestackClient.Get // method. func (client *CertificateObjectGlobalRulestackClient) Get(ctx context.Context, globalRulestackName string, name string, options *CertificateObjectGlobalRulestackClientGetOptions) (CertificateObjectGlobalRulestackClientGetResponse, error) { + var err error + const operationName = "CertificateObjectGlobalRulestackClient.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, globalRulestackName, name, options) if err != nil { return CertificateObjectGlobalRulestackClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateObjectGlobalRulestackClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateObjectGlobalRulestackClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateObjectGlobalRulestackClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -207,7 +236,7 @@ func (client *CertificateObjectGlobalRulestackClient) getCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -224,7 +253,7 @@ func (client *CertificateObjectGlobalRulestackClient) getHandleResponse(resp *ht // NewListPager - List CertificateObjectGlobalRulestackResource resources by Tenant // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - CertificateObjectGlobalRulestackClientListOptions contains the optional parameters for the CertificateObjectGlobalRulestackClient.NewListPager // method. @@ -234,25 +263,20 @@ func (client *CertificateObjectGlobalRulestackClient) NewListPager(globalRulesta return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CertificateObjectGlobalRulestackClientListResponse) (CertificateObjectGlobalRulestackClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, globalRulestackName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificateObjectGlobalRulestackClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateObjectGlobalRulestackClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, globalRulestackName, options) + }, nil) if err != nil { return CertificateObjectGlobalRulestackClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateObjectGlobalRulestackClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -268,7 +292,7 @@ func (client *CertificateObjectGlobalRulestackClient) listCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-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/paloaltonetworksngfw/armpanngfw/certificateobjectlocalrulestack_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectlocalrulestack_client.go index ac6a57f3..e6adbfa2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectlocalrulestack_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectlocalrulestack_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -33,7 +32,7 @@ type CertificateObjectLocalRulestackClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCertificateObjectLocalRulestackClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateObjectLocalRulestackClient, error) { - cl, err := arm.NewClient(moduleName+".CertificateObjectLocalRulestackClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewCertificateObjectLocalRulestackClient(subscriptionID string, credential // BeginCreateOrUpdate - Create a CertificateObjectLocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - name - certificate name @@ -60,31 +59,41 @@ func (client *CertificateObjectLocalRulestackClient) BeginCreateOrUpdate(ctx con if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificateObjectLocalRulestackClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificateObjectLocalRulestackClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[CertificateObjectLocalRulestackClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CertificateObjectLocalRulestackClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create a CertificateObjectLocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *CertificateObjectLocalRulestackClient) createOrUpdate(ctx context.Context, resourceGroupName string, localRulestackName string, name string, resource CertificateObjectLocalRulestackResource, options *CertificateObjectLocalRulestackClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CertificateObjectLocalRulestackClient.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, localRulestackName, name, resource, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -111,16 +120,19 @@ func (client *CertificateObjectLocalRulestackClient) createOrUpdateCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a CertificateObjectLocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - name - certificate name @@ -132,31 +144,41 @@ func (client *CertificateObjectLocalRulestackClient) BeginDelete(ctx context.Con if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificateObjectLocalRulestackClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificateObjectLocalRulestackClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[CertificateObjectLocalRulestackClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CertificateObjectLocalRulestackClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete a CertificateObjectLocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *CertificateObjectLocalRulestackClient) deleteOperation(ctx context.Context, resourceGroupName string, localRulestackName string, name string, options *CertificateObjectLocalRulestackClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "CertificateObjectLocalRulestackClient.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, localRulestackName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -183,7 +205,7 @@ func (client *CertificateObjectLocalRulestackClient) deleteCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -192,25 +214,32 @@ func (client *CertificateObjectLocalRulestackClient) deleteCreateRequest(ctx con // Get - Get a CertificateObjectLocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - name - certificate name // - options - CertificateObjectLocalRulestackClientGetOptions contains the optional parameters for the CertificateObjectLocalRulestackClient.Get // method. func (client *CertificateObjectLocalRulestackClient) Get(ctx context.Context, resourceGroupName string, localRulestackName string, name string, options *CertificateObjectLocalRulestackClientGetOptions) (CertificateObjectLocalRulestackClientGetResponse, error) { + var err error + const operationName = "CertificateObjectLocalRulestackClient.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, localRulestackName, name, options) if err != nil { return CertificateObjectLocalRulestackClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateObjectLocalRulestackClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateObjectLocalRulestackClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateObjectLocalRulestackClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -237,7 +266,7 @@ func (client *CertificateObjectLocalRulestackClient) getCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,7 +283,7 @@ func (client *CertificateObjectLocalRulestackClient) getHandleResponse(resp *htt // NewListByLocalRulestacksPager - List CertificateObjectLocalRulestackResource resources by LocalRulestacks // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - CertificateObjectLocalRulestackClientListByLocalRulestacksOptions contains the optional parameters for the CertificateObjectLocalRulestackClient.NewListByLocalRulestacksPager @@ -265,25 +294,20 @@ func (client *CertificateObjectLocalRulestackClient) NewListByLocalRulestacksPag return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CertificateObjectLocalRulestackClientListByLocalRulestacksResponse) (CertificateObjectLocalRulestackClientListByLocalRulestacksResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByLocalRulestacksCreateRequest(ctx, resourceGroupName, localRulestackName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificateObjectLocalRulestackClientListByLocalRulestacksResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateObjectLocalRulestackClient.NewListByLocalRulestacksPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByLocalRulestacksCreateRequest(ctx, resourceGroupName, localRulestackName, options) + }, nil) if err != nil { return CertificateObjectLocalRulestackClientListByLocalRulestacksResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateObjectLocalRulestackClientListByLocalRulestacksResponse{}, runtime.NewResponseError(resp) - } return client.listByLocalRulestacksHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -307,7 +331,7 @@ func (client *CertificateObjectLocalRulestackClient) listByLocalRulestacksCreate return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-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/paloaltonetworksngfw/armpanngfw/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/client_factory.go index f6fe0e83..b318901f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -28,7 +27,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,71 +37,85 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewGlobalRulestackClient() *GlobalRulestackClient { - subClient, _ := NewGlobalRulestackClient(c.credential, c.options) +// NewCertificateObjectGlobalRulestackClient creates a new instance of CertificateObjectGlobalRulestackClient. +func (c *ClientFactory) NewCertificateObjectGlobalRulestackClient() *CertificateObjectGlobalRulestackClient { + subClient, _ := NewCertificateObjectGlobalRulestackClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewCertificateObjectGlobalRulestackClient() *CertificateObjectGlobalRulestackClient { - subClient, _ := NewCertificateObjectGlobalRulestackClient(c.credential, c.options) +// NewCertificateObjectLocalRulestackClient creates a new instance of CertificateObjectLocalRulestackClient. +func (c *ClientFactory) NewCertificateObjectLocalRulestackClient() *CertificateObjectLocalRulestackClient { + subClient, _ := NewCertificateObjectLocalRulestackClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewFqdnListGlobalRulestackClient() *FqdnListGlobalRulestackClient { - subClient, _ := NewFqdnListGlobalRulestackClient(c.credential, c.options) +// NewFirewallStatusClient creates a new instance of FirewallStatusClient. +func (c *ClientFactory) NewFirewallStatusClient() *FirewallStatusClient { + subClient, _ := NewFirewallStatusClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPostRulesClient() *PostRulesClient { - subClient, _ := NewPostRulesClient(c.credential, c.options) +// NewFirewallsClient creates a new instance of FirewallsClient. +func (c *ClientFactory) NewFirewallsClient() *FirewallsClient { + subClient, _ := NewFirewallsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrefixListGlobalRulestackClient() *PrefixListGlobalRulestackClient { - subClient, _ := NewPrefixListGlobalRulestackClient(c.credential, c.options) +// NewFqdnListGlobalRulestackClient creates a new instance of FqdnListGlobalRulestackClient. +func (c *ClientFactory) NewFqdnListGlobalRulestackClient() *FqdnListGlobalRulestackClient { + subClient, _ := NewFqdnListGlobalRulestackClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewPreRulesClient() *PreRulesClient { - subClient, _ := NewPreRulesClient(c.credential, c.options) +// NewFqdnListLocalRulestackClient creates a new instance of FqdnListLocalRulestackClient. +func (c *ClientFactory) NewFqdnListLocalRulestackClient() *FqdnListLocalRulestackClient { + subClient, _ := NewFqdnListLocalRulestackClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +// NewGlobalRulestackClient creates a new instance of GlobalRulestackClient. +func (c *ClientFactory) NewGlobalRulestackClient() *GlobalRulestackClient { + subClient, _ := NewGlobalRulestackClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewFirewallsClient() *FirewallsClient { - subClient, _ := NewFirewallsClient(c.subscriptionID, c.credential, c.options) +// NewLocalRulesClient creates a new instance of LocalRulesClient. +func (c *ClientFactory) NewLocalRulesClient() *LocalRulesClient { + subClient, _ := NewLocalRulesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewLocalRulestacksClient creates a new instance of LocalRulestacksClient. func (c *ClientFactory) NewLocalRulestacksClient() *LocalRulestacksClient { subClient, _ := NewLocalRulestacksClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewFirewallStatusClient() *FirewallStatusClient { - subClient, _ := NewFirewallStatusClient(c.subscriptionID, c.credential, c.options) +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewCertificateObjectLocalRulestackClient() *CertificateObjectLocalRulestackClient { - subClient, _ := NewCertificateObjectLocalRulestackClient(c.subscriptionID, c.credential, c.options) +// NewPostRulesClient creates a new instance of PostRulesClient. +func (c *ClientFactory) NewPostRulesClient() *PostRulesClient { + subClient, _ := NewPostRulesClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewFqdnListLocalRulestackClient() *FqdnListLocalRulestackClient { - subClient, _ := NewFqdnListLocalRulestackClient(c.subscriptionID, c.credential, c.options) +// NewPreRulesClient creates a new instance of PreRulesClient. +func (c *ClientFactory) NewPreRulesClient() *PreRulesClient { + subClient, _ := NewPreRulesClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewLocalRulesClient() *LocalRulesClient { - subClient, _ := NewLocalRulesClient(c.subscriptionID, c.credential, c.options) +// NewPrefixListGlobalRulestackClient creates a new instance of PrefixListGlobalRulestackClient. +func (c *ClientFactory) NewPrefixListGlobalRulestackClient() *PrefixListGlobalRulestackClient { + subClient, _ := NewPrefixListGlobalRulestackClient(c.credential, c.options) return subClient } +// NewPrefixListLocalRulestackClient creates a new instance of PrefixListLocalRulestackClient. func (c *ClientFactory) NewPrefixListLocalRulestackClient() *PrefixListLocalRulestackClient { subClient, _ := NewPrefixListLocalRulestackClient(c.subscriptionID, c.credential, c.options) return subClient diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/constants.go index 1df73b4d..4fcb28b3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw const ( - moduleName = "armpanngfw" - moduleVersion = "v1.0.0" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" + moduleVersion = "v1.1.0" ) type ActionEnum string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewalls_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewalls_client.go index 2621a405..687fb905 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewalls_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewalls_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -33,7 +32,7 @@ type FirewallsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFirewallsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallsClient, error) { - cl, err := arm.NewClient(moduleName+".FirewallsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewFirewallsClient(subscriptionID string, credential azcore.TokenCredential // BeginCreateOrUpdate - Create a FirewallResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - firewallName - Firewall resource name // - resource - Resource create parameters. @@ -59,31 +58,41 @@ func (client *FirewallsClient) BeginCreateOrUpdate(ctx context.Context, resource if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FirewallsClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FirewallsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[FirewallsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FirewallsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create a FirewallResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *FirewallsClient) createOrUpdate(ctx context.Context, resourceGroupName string, firewallName string, resource FirewallResource, options *FirewallsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FirewallsClient.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, firewallName, resource, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -106,16 +115,19 @@ func (client *FirewallsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a FirewallResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - firewallName - Firewall resource name // - options - FirewallsClientBeginDeleteOptions contains the optional parameters for the FirewallsClient.BeginDelete method. @@ -125,31 +137,41 @@ func (client *FirewallsClient) BeginDelete(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FirewallsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FirewallsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[FirewallsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FirewallsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete a FirewallResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *FirewallsClient) deleteOperation(ctx context.Context, resourceGroupName string, firewallName string, options *FirewallsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "FirewallsClient.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, firewallName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -172,7 +194,7 @@ func (client *FirewallsClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -181,23 +203,30 @@ func (client *FirewallsClient) deleteCreateRequest(ctx context.Context, resource // Get - Get a FirewallResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - firewallName - Firewall resource name // - options - FirewallsClientGetOptions contains the optional parameters for the FirewallsClient.Get method. func (client *FirewallsClient) Get(ctx context.Context, resourceGroupName string, firewallName string, options *FirewallsClientGetOptions) (FirewallsClientGetResponse, error) { + var err error + const operationName = "FirewallsClient.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, firewallName, options) if err != nil { return FirewallsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FirewallsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -220,7 +249,7 @@ func (client *FirewallsClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,24 +267,31 @@ func (client *FirewallsClient) getHandleResponse(resp *http.Response) (Firewalls // GetGlobalRulestack - Get Global Rulestack associated with the Firewall // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - firewallName - Firewall resource name // - options - FirewallsClientGetGlobalRulestackOptions contains the optional parameters for the FirewallsClient.GetGlobalRulestack // method. func (client *FirewallsClient) GetGlobalRulestack(ctx context.Context, resourceGroupName string, firewallName string, options *FirewallsClientGetGlobalRulestackOptions) (FirewallsClientGetGlobalRulestackResponse, error) { + var err error + const operationName = "FirewallsClient.GetGlobalRulestack" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getGlobalRulestackCreateRequest(ctx, resourceGroupName, firewallName, options) if err != nil { return FirewallsClientGetGlobalRulestackResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FirewallsClientGetGlobalRulestackResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallsClientGetGlobalRulestackResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallsClientGetGlobalRulestackResponse{}, err } - return client.getGlobalRulestackHandleResponse(resp) + resp, err := client.getGlobalRulestackHandleResponse(httpResp) + return resp, err } // getGlobalRulestackCreateRequest creates the GetGlobalRulestack request. @@ -278,7 +314,7 @@ func (client *FirewallsClient) getGlobalRulestackCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -296,23 +332,30 @@ func (client *FirewallsClient) getGlobalRulestackHandleResponse(resp *http.Respo // GetLogProfile - Log Profile for Firewall // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - firewallName - Firewall resource name // - options - FirewallsClientGetLogProfileOptions contains the optional parameters for the FirewallsClient.GetLogProfile method. func (client *FirewallsClient) GetLogProfile(ctx context.Context, resourceGroupName string, firewallName string, options *FirewallsClientGetLogProfileOptions) (FirewallsClientGetLogProfileResponse, error) { + var err error + const operationName = "FirewallsClient.GetLogProfile" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getLogProfileCreateRequest(ctx, resourceGroupName, firewallName, options) if err != nil { return FirewallsClientGetLogProfileResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FirewallsClientGetLogProfileResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallsClientGetLogProfileResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallsClientGetLogProfileResponse{}, err } - return client.getLogProfileHandleResponse(resp) + resp, err := client.getLogProfileHandleResponse(httpResp) + return resp, err } // getLogProfileCreateRequest creates the GetLogProfile request. @@ -335,7 +378,7 @@ func (client *FirewallsClient) getLogProfileCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -353,24 +396,31 @@ func (client *FirewallsClient) getLogProfileHandleResponse(resp *http.Response) // GetSupportInfo - support info for firewall. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - firewallName - Firewall resource name // - options - FirewallsClientGetSupportInfoOptions contains the optional parameters for the FirewallsClient.GetSupportInfo // method. func (client *FirewallsClient) GetSupportInfo(ctx context.Context, resourceGroupName string, firewallName string, options *FirewallsClientGetSupportInfoOptions) (FirewallsClientGetSupportInfoResponse, error) { + var err error + const operationName = "FirewallsClient.GetSupportInfo" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSupportInfoCreateRequest(ctx, resourceGroupName, firewallName, options) if err != nil { return FirewallsClientGetSupportInfoResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FirewallsClientGetSupportInfoResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallsClientGetSupportInfoResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallsClientGetSupportInfoResponse{}, err } - return client.getSupportInfoHandleResponse(resp) + resp, err := client.getSupportInfoHandleResponse(httpResp) + return resp, err } // getSupportInfoCreateRequest creates the GetSupportInfo request. @@ -393,7 +443,7 @@ func (client *FirewallsClient) getSupportInfoCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.Email != nil { reqQP.Set("email", *options.Email) } @@ -413,7 +463,7 @@ func (client *FirewallsClient) getSupportInfoHandleResponse(resp *http.Response) // NewListByResourceGroupPager - List FirewallResource resources by resource group // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - FirewallsClientListByResourceGroupOptions contains the optional parameters for the FirewallsClient.NewListByResourceGroupPager // method. @@ -423,25 +473,20 @@ func (client *FirewallsClient) NewListByResourceGroupPager(resourceGroupName str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *FirewallsClientListByResourceGroupResponse) (FirewallsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FirewallsClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FirewallsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 FirewallsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -461,7 +506,7 @@ func (client *FirewallsClient) listByResourceGroupCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -478,7 +523,7 @@ func (client *FirewallsClient) listByResourceGroupHandleResponse(resp *http.Resp // NewListBySubscriptionPager - List FirewallResource resources by subscription ID // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - options - FirewallsClientListBySubscriptionOptions contains the optional parameters for the FirewallsClient.NewListBySubscriptionPager // method. func (client *FirewallsClient) NewListBySubscriptionPager(options *FirewallsClientListBySubscriptionOptions) *runtime.Pager[FirewallsClientListBySubscriptionResponse] { @@ -487,25 +532,20 @@ func (client *FirewallsClient) NewListBySubscriptionPager(options *FirewallsClie return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *FirewallsClientListBySubscriptionResponse) (FirewallsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FirewallsClient.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 FirewallsClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return FirewallsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -521,7 +561,7 @@ func (client *FirewallsClient) listBySubscriptionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -539,22 +579,28 @@ func (client *FirewallsClient) listBySubscriptionHandleResponse(resp *http.Respo // SaveLogProfile - Log Profile for Firewall // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - firewallName - Firewall resource name // - options - FirewallsClientSaveLogProfileOptions contains the optional parameters for the FirewallsClient.SaveLogProfile // method. func (client *FirewallsClient) SaveLogProfile(ctx context.Context, resourceGroupName string, firewallName string, options *FirewallsClientSaveLogProfileOptions) (FirewallsClientSaveLogProfileResponse, error) { + var err error + const operationName = "FirewallsClient.SaveLogProfile" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.saveLogProfileCreateRequest(ctx, resourceGroupName, firewallName, options) if err != nil { return FirewallsClientSaveLogProfileResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FirewallsClientSaveLogProfileResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return FirewallsClientSaveLogProfileResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return FirewallsClientSaveLogProfileResponse{}, err } return FirewallsClientSaveLogProfileResponse{}, nil } @@ -579,11 +625,14 @@ func (client *FirewallsClient) saveLogProfileCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.LogSettings != nil { - return req, runtime.MarshalAsJSON(req, *options.LogSettings) + if err := runtime.MarshalAsJSON(req, *options.LogSettings); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -591,24 +640,31 @@ func (client *FirewallsClient) saveLogProfileCreateRequest(ctx context.Context, // Update - Update a FirewallResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - firewallName - Firewall resource name // - properties - The resource properties to be updated. // - options - FirewallsClientUpdateOptions contains the optional parameters for the FirewallsClient.Update method. func (client *FirewallsClient) Update(ctx context.Context, resourceGroupName string, firewallName string, properties FirewallResourceUpdate, options *FirewallsClientUpdateOptions) (FirewallsClientUpdateResponse, error) { + var err error + const operationName = "FirewallsClient.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, firewallName, properties, options) if err != nil { return FirewallsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FirewallsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -631,10 +687,13 @@ func (client *FirewallsClient) updateCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewallstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewallstatus_client.go index f272d104..3281d6b0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewallstatus_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewallstatus_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -33,7 +32,7 @@ type FirewallStatusClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFirewallStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallStatusClient, error) { - cl, err := arm.NewClient(moduleName+".FirewallStatusClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,23 +46,30 @@ func NewFirewallStatusClient(subscriptionID string, credential azcore.TokenCrede // Get - Get a FirewallStatusResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - firewallName - Firewall resource name // - options - FirewallStatusClientGetOptions contains the optional parameters for the FirewallStatusClient.Get method. func (client *FirewallStatusClient) Get(ctx context.Context, resourceGroupName string, firewallName string, options *FirewallStatusClientGetOptions) (FirewallStatusClientGetResponse, error) { + var err error + const operationName = "FirewallStatusClient.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, firewallName, options) if err != nil { return FirewallStatusClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FirewallStatusClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallStatusClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallStatusClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -86,7 +92,7 @@ func (client *FirewallStatusClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -103,7 +109,7 @@ func (client *FirewallStatusClient) getHandleResponse(resp *http.Response) (Fire // NewListByFirewallsPager - List FirewallStatusResource resources by Firewalls // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - firewallName - Firewall resource name // - options - FirewallStatusClientListByFirewallsOptions contains the optional parameters for the FirewallStatusClient.NewListByFirewallsPager @@ -114,25 +120,20 @@ func (client *FirewallStatusClient) NewListByFirewallsPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *FirewallStatusClientListByFirewallsResponse) (FirewallStatusClientListByFirewallsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByFirewallsCreateRequest(ctx, resourceGroupName, firewallName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FirewallStatusClient.NewListByFirewallsPager") + 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.listByFirewallsCreateRequest(ctx, resourceGroupName, firewallName, options) + }, nil) if err != nil { return FirewallStatusClientListByFirewallsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return FirewallStatusClientListByFirewallsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallStatusClientListByFirewallsResponse{}, runtime.NewResponseError(resp) - } return client.listByFirewallsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -156,7 +157,7 @@ func (client *FirewallStatusClient) listByFirewallsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-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/paloaltonetworksngfw/armpanngfw/fqdnlistglobalrulestack_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistglobalrulestack_client.go index 96a1f7e7..74a0a0ec 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistglobalrulestack_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistglobalrulestack_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -31,7 +30,7 @@ type FqdnListGlobalRulestackClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFqdnListGlobalRulestackClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*FqdnListGlobalRulestackClient, error) { - cl, err := arm.NewClient(moduleName+".FqdnListGlobalRulestackClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -44,7 +43,7 @@ func NewFqdnListGlobalRulestackClient(credential azcore.TokenCredential, options // BeginCreateOrUpdate - Create a FqdnListGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - name - fqdn list name // - resource - Resource create parameters. @@ -56,31 +55,41 @@ func (client *FqdnListGlobalRulestackClient) BeginCreateOrUpdate(ctx context.Con if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FqdnListGlobalRulestackClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FqdnListGlobalRulestackClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[FqdnListGlobalRulestackClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FqdnListGlobalRulestackClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create a FqdnListGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *FqdnListGlobalRulestackClient) createOrUpdate(ctx context.Context, globalRulestackName string, name string, resource FqdnListGlobalRulestackResource, options *FqdnListGlobalRulestackClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FqdnListGlobalRulestackClient.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, globalRulestackName, name, resource, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -99,16 +108,19 @@ func (client *FqdnListGlobalRulestackClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a FqdnListGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - name - fqdn list name // - options - FqdnListGlobalRulestackClientBeginDeleteOptions contains the optional parameters for the FqdnListGlobalRulestackClient.BeginDelete @@ -119,31 +131,41 @@ func (client *FqdnListGlobalRulestackClient) BeginDelete(ctx context.Context, gl if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FqdnListGlobalRulestackClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FqdnListGlobalRulestackClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[FqdnListGlobalRulestackClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FqdnListGlobalRulestackClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete a FqdnListGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *FqdnListGlobalRulestackClient) deleteOperation(ctx context.Context, globalRulestackName string, name string, options *FqdnListGlobalRulestackClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "FqdnListGlobalRulestackClient.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, globalRulestackName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -162,7 +184,7 @@ func (client *FqdnListGlobalRulestackClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -171,24 +193,31 @@ func (client *FqdnListGlobalRulestackClient) deleteCreateRequest(ctx context.Con // Get - Get a FqdnListGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - name - fqdn list name // - options - FqdnListGlobalRulestackClientGetOptions contains the optional parameters for the FqdnListGlobalRulestackClient.Get // method. func (client *FqdnListGlobalRulestackClient) Get(ctx context.Context, globalRulestackName string, name string, options *FqdnListGlobalRulestackClientGetOptions) (FqdnListGlobalRulestackClientGetResponse, error) { + var err error + const operationName = "FqdnListGlobalRulestackClient.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, globalRulestackName, name, options) if err != nil { return FqdnListGlobalRulestackClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FqdnListGlobalRulestackClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FqdnListGlobalRulestackClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FqdnListGlobalRulestackClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -207,7 +236,7 @@ func (client *FqdnListGlobalRulestackClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -224,7 +253,7 @@ func (client *FqdnListGlobalRulestackClient) getHandleResponse(resp *http.Respon // NewListPager - List FqdnListGlobalRulestackResource resources by Tenant // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - FqdnListGlobalRulestackClientListOptions contains the optional parameters for the FqdnListGlobalRulestackClient.NewListPager // method. @@ -234,25 +263,20 @@ func (client *FqdnListGlobalRulestackClient) NewListPager(globalRulestackName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *FqdnListGlobalRulestackClientListResponse) (FqdnListGlobalRulestackClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, globalRulestackName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FqdnListGlobalRulestackClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FqdnListGlobalRulestackClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, globalRulestackName, options) + }, nil) if err != nil { return FqdnListGlobalRulestackClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FqdnListGlobalRulestackClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -268,7 +292,7 @@ func (client *FqdnListGlobalRulestackClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-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/paloaltonetworksngfw/armpanngfw/fqdnlistlocalrulestack_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistlocalrulestack_client.go index d1fe4f15..b0cfe4de 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistlocalrulestack_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistlocalrulestack_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -33,7 +32,7 @@ type FqdnListLocalRulestackClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFqdnListLocalRulestackClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FqdnListLocalRulestackClient, error) { - cl, err := arm.NewClient(moduleName+".FqdnListLocalRulestackClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewFqdnListLocalRulestackClient(subscriptionID string, credential azcore.To // BeginCreateOrUpdate - Create a FqdnListLocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - name - fqdn list name @@ -60,31 +59,41 @@ func (client *FqdnListLocalRulestackClient) BeginCreateOrUpdate(ctx context.Cont if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FqdnListLocalRulestackClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FqdnListLocalRulestackClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[FqdnListLocalRulestackClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FqdnListLocalRulestackClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create a FqdnListLocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *FqdnListLocalRulestackClient) createOrUpdate(ctx context.Context, resourceGroupName string, localRulestackName string, name string, resource FqdnListLocalRulestackResource, options *FqdnListLocalRulestackClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FqdnListLocalRulestackClient.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, localRulestackName, name, resource, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -111,16 +120,19 @@ func (client *FqdnListLocalRulestackClient) createOrUpdateCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a FqdnListLocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - name - fqdn list name @@ -132,31 +144,41 @@ func (client *FqdnListLocalRulestackClient) BeginDelete(ctx context.Context, res if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FqdnListLocalRulestackClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FqdnListLocalRulestackClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[FqdnListLocalRulestackClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FqdnListLocalRulestackClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete a FqdnListLocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *FqdnListLocalRulestackClient) deleteOperation(ctx context.Context, resourceGroupName string, localRulestackName string, name string, options *FqdnListLocalRulestackClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "FqdnListLocalRulestackClient.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, localRulestackName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -183,7 +205,7 @@ func (client *FqdnListLocalRulestackClient) deleteCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -192,25 +214,32 @@ func (client *FqdnListLocalRulestackClient) deleteCreateRequest(ctx context.Cont // Get - Get a FqdnListLocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - name - fqdn list name // - options - FqdnListLocalRulestackClientGetOptions contains the optional parameters for the FqdnListLocalRulestackClient.Get // method. func (client *FqdnListLocalRulestackClient) Get(ctx context.Context, resourceGroupName string, localRulestackName string, name string, options *FqdnListLocalRulestackClientGetOptions) (FqdnListLocalRulestackClientGetResponse, error) { + var err error + const operationName = "FqdnListLocalRulestackClient.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, localRulestackName, name, options) if err != nil { return FqdnListLocalRulestackClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FqdnListLocalRulestackClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FqdnListLocalRulestackClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FqdnListLocalRulestackClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -237,7 +266,7 @@ func (client *FqdnListLocalRulestackClient) getCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,7 +283,7 @@ func (client *FqdnListLocalRulestackClient) getHandleResponse(resp *http.Respons // NewListByLocalRulestacksPager - List FqdnListLocalRulestackResource resources by LocalRulestacks // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - FqdnListLocalRulestackClientListByLocalRulestacksOptions contains the optional parameters for the FqdnListLocalRulestackClient.NewListByLocalRulestacksPager @@ -265,25 +294,20 @@ func (client *FqdnListLocalRulestackClient) NewListByLocalRulestacksPager(resour return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *FqdnListLocalRulestackClientListByLocalRulestacksResponse) (FqdnListLocalRulestackClientListByLocalRulestacksResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByLocalRulestacksCreateRequest(ctx, resourceGroupName, localRulestackName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FqdnListLocalRulestackClientListByLocalRulestacksResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FqdnListLocalRulestackClient.NewListByLocalRulestacksPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByLocalRulestacksCreateRequest(ctx, resourceGroupName, localRulestackName, options) + }, nil) if err != nil { return FqdnListLocalRulestackClientListByLocalRulestacksResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FqdnListLocalRulestackClientListByLocalRulestacksResponse{}, runtime.NewResponseError(resp) - } return client.listByLocalRulestacksHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -307,7 +331,7 @@ func (client *FqdnListLocalRulestackClient) listByLocalRulestacksCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-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/paloaltonetworksngfw/armpanngfw/globalrulestack_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/globalrulestack_client.go index e2071d0f..554373b6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/globalrulestack_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/globalrulestack_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -32,7 +31,7 @@ type GlobalRulestackClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGlobalRulestackClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GlobalRulestackClient, error) { - cl, err := arm.NewClient(moduleName+".GlobalRulestackClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -45,7 +44,7 @@ func NewGlobalRulestackClient(credential azcore.TokenCredential, options *arm.Cl // BeginCommit - Commit rulestack configuration // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - GlobalRulestackClientBeginCommitOptions contains the optional parameters for the GlobalRulestackClient.BeginCommit // method. @@ -55,31 +54,41 @@ func (client *GlobalRulestackClient) BeginCommit(ctx context.Context, globalRule if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GlobalRulestackClientCommitResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GlobalRulestackClientCommitResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GlobalRulestackClientCommitResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GlobalRulestackClientCommitResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Commit - Commit rulestack configuration // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *GlobalRulestackClient) commit(ctx context.Context, globalRulestackName string, options *GlobalRulestackClientBeginCommitOptions) (*http.Response, error) { + var err error + const operationName = "GlobalRulestackClient.BeginCommit" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.commitCreateRequest(ctx, globalRulestackName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // commitCreateRequest creates the Commit request. @@ -94,7 +103,7 @@ func (client *GlobalRulestackClient) commitCreateRequest(ctx context.Context, gl return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -103,7 +112,7 @@ func (client *GlobalRulestackClient) commitCreateRequest(ctx context.Context, gl // BeginCreateOrUpdate - Create a GlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - resource - Resource create parameters. // - options - GlobalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the GlobalRulestackClient.BeginCreateOrUpdate @@ -114,31 +123,41 @@ func (client *GlobalRulestackClient) BeginCreateOrUpdate(ctx context.Context, gl if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GlobalRulestackClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GlobalRulestackClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GlobalRulestackClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GlobalRulestackClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create a GlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *GlobalRulestackClient) createOrUpdate(ctx context.Context, globalRulestackName string, resource GlobalRulestackResource, options *GlobalRulestackClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "GlobalRulestackClient.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, globalRulestackName, resource, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -153,16 +172,19 @@ func (client *GlobalRulestackClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a GlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - GlobalRulestackClientBeginDeleteOptions contains the optional parameters for the GlobalRulestackClient.BeginDelete // method. @@ -172,31 +194,41 @@ func (client *GlobalRulestackClient) BeginDelete(ctx context.Context, globalRule if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GlobalRulestackClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GlobalRulestackClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GlobalRulestackClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GlobalRulestackClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete a GlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *GlobalRulestackClient) deleteOperation(ctx context.Context, globalRulestackName string, options *GlobalRulestackClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "GlobalRulestackClient.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, globalRulestackName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -211,7 +243,7 @@ func (client *GlobalRulestackClient) deleteCreateRequest(ctx context.Context, gl return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -220,22 +252,29 @@ func (client *GlobalRulestackClient) deleteCreateRequest(ctx context.Context, gl // Get - Get a GlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - GlobalRulestackClientGetOptions contains the optional parameters for the GlobalRulestackClient.Get method. func (client *GlobalRulestackClient) Get(ctx context.Context, globalRulestackName string, options *GlobalRulestackClientGetOptions) (GlobalRulestackClientGetResponse, error) { + var err error + const operationName = "GlobalRulestackClient.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, globalRulestackName, options) if err != nil { return GlobalRulestackClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalRulestackClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalRulestackClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalRulestackClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -250,7 +289,7 @@ func (client *GlobalRulestackClient) getCreateRequest(ctx context.Context, globa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -268,23 +307,30 @@ func (client *GlobalRulestackClient) getHandleResponse(resp *http.Response) (Glo // GetChangeLog - Get changelog // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - GlobalRulestackClientGetChangeLogOptions contains the optional parameters for the GlobalRulestackClient.GetChangeLog // method. func (client *GlobalRulestackClient) GetChangeLog(ctx context.Context, globalRulestackName string, options *GlobalRulestackClientGetChangeLogOptions) (GlobalRulestackClientGetChangeLogResponse, error) { + var err error + const operationName = "GlobalRulestackClient.GetChangeLog" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getChangeLogCreateRequest(ctx, globalRulestackName, options) if err != nil { return GlobalRulestackClientGetChangeLogResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalRulestackClientGetChangeLogResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalRulestackClientGetChangeLogResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalRulestackClientGetChangeLogResponse{}, err } - return client.getChangeLogHandleResponse(resp) + resp, err := client.getChangeLogHandleResponse(httpResp) + return resp, err } // getChangeLogCreateRequest creates the GetChangeLog request. @@ -299,7 +345,7 @@ func (client *GlobalRulestackClient) getChangeLogCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -316,7 +362,7 @@ func (client *GlobalRulestackClient) getChangeLogHandleResponse(resp *http.Respo // NewListPager - List GlobalRulestackResource resources by Tenant // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - options - GlobalRulestackClientListOptions contains the optional parameters for the GlobalRulestackClient.NewListPager // method. func (client *GlobalRulestackClient) NewListPager(options *GlobalRulestackClientListOptions) *runtime.Pager[GlobalRulestackClientListResponse] { @@ -325,25 +371,20 @@ func (client *GlobalRulestackClient) NewListPager(options *GlobalRulestackClient return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *GlobalRulestackClientListResponse) (GlobalRulestackClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GlobalRulestackClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GlobalRulestackClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 GlobalRulestackClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalRulestackClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -355,7 +396,7 @@ func (client *GlobalRulestackClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -373,23 +414,30 @@ func (client *GlobalRulestackClient) listHandleResponse(resp *http.Response) (Gl // ListAdvancedSecurityObjects - Get the list of advanced security objects // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - GlobalRulestackClientListAdvancedSecurityObjectsOptions contains the optional parameters for the GlobalRulestackClient.ListAdvancedSecurityObjects // method. func (client *GlobalRulestackClient) ListAdvancedSecurityObjects(ctx context.Context, globalRulestackName string, typeParam AdvSecurityObjectTypeEnum, options *GlobalRulestackClientListAdvancedSecurityObjectsOptions) (GlobalRulestackClientListAdvancedSecurityObjectsResponse, error) { + var err error + const operationName = "GlobalRulestackClient.ListAdvancedSecurityObjects" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listAdvancedSecurityObjectsCreateRequest(ctx, globalRulestackName, typeParam, options) if err != nil { return GlobalRulestackClientListAdvancedSecurityObjectsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalRulestackClientListAdvancedSecurityObjectsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalRulestackClientListAdvancedSecurityObjectsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalRulestackClientListAdvancedSecurityObjectsResponse{}, err } - return client.listAdvancedSecurityObjectsHandleResponse(resp) + resp, err := client.listAdvancedSecurityObjectsHandleResponse(httpResp) + return resp, err } // listAdvancedSecurityObjectsCreateRequest creates the ListAdvancedSecurityObjects request. @@ -404,7 +452,7 @@ func (client *GlobalRulestackClient) listAdvancedSecurityObjectsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.Skip != nil { reqQP.Set("skip", *options.Skip) } @@ -429,23 +477,30 @@ func (client *GlobalRulestackClient) listAdvancedSecurityObjectsHandleResponse(r // ListAppIDs - List of AppIds for GlobalRulestack ApiVersion // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - GlobalRulestackClientListAppIDsOptions contains the optional parameters for the GlobalRulestackClient.ListAppIDs // method. func (client *GlobalRulestackClient) ListAppIDs(ctx context.Context, globalRulestackName string, options *GlobalRulestackClientListAppIDsOptions) (GlobalRulestackClientListAppIDsResponse, error) { + var err error + const operationName = "GlobalRulestackClient.ListAppIDs" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listAppIDsCreateRequest(ctx, globalRulestackName, options) if err != nil { return GlobalRulestackClientListAppIDsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalRulestackClientListAppIDsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalRulestackClientListAppIDsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalRulestackClientListAppIDsResponse{}, err } - return client.listAppIDsHandleResponse(resp) + resp, err := client.listAppIDsHandleResponse(httpResp) + return resp, err } // listAppIDsCreateRequest creates the ListAppIDs request. @@ -460,7 +515,7 @@ func (client *GlobalRulestackClient) listAppIDsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.AppIDVersion != nil { reqQP.Set("appIdVersion", *options.AppIDVersion) } @@ -490,23 +545,30 @@ func (client *GlobalRulestackClient) listAppIDsHandleResponse(resp *http.Respons // ListCountries - List of countries for Rulestack // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - GlobalRulestackClientListCountriesOptions contains the optional parameters for the GlobalRulestackClient.ListCountries // method. func (client *GlobalRulestackClient) ListCountries(ctx context.Context, globalRulestackName string, options *GlobalRulestackClientListCountriesOptions) (GlobalRulestackClientListCountriesResponse, error) { + var err error + const operationName = "GlobalRulestackClient.ListCountries" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCountriesCreateRequest(ctx, globalRulestackName, options) if err != nil { return GlobalRulestackClientListCountriesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalRulestackClientListCountriesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalRulestackClientListCountriesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalRulestackClientListCountriesResponse{}, err } - return client.listCountriesHandleResponse(resp) + resp, err := client.listCountriesHandleResponse(httpResp) + return resp, err } // listCountriesCreateRequest creates the ListCountries request. @@ -521,7 +583,7 @@ func (client *GlobalRulestackClient) listCountriesCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.Skip != nil { reqQP.Set("skip", *options.Skip) } @@ -545,23 +607,30 @@ func (client *GlobalRulestackClient) listCountriesHandleResponse(resp *http.Resp // ListFirewalls - List of Firewalls associated with Rulestack // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - GlobalRulestackClientListFirewallsOptions contains the optional parameters for the GlobalRulestackClient.ListFirewalls // method. func (client *GlobalRulestackClient) ListFirewalls(ctx context.Context, globalRulestackName string, options *GlobalRulestackClientListFirewallsOptions) (GlobalRulestackClientListFirewallsResponse, error) { + var err error + const operationName = "GlobalRulestackClient.ListFirewalls" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listFirewallsCreateRequest(ctx, globalRulestackName, options) if err != nil { return GlobalRulestackClientListFirewallsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalRulestackClientListFirewallsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalRulestackClientListFirewallsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalRulestackClientListFirewallsResponse{}, err } - return client.listFirewallsHandleResponse(resp) + resp, err := client.listFirewallsHandleResponse(httpResp) + return resp, err } // listFirewallsCreateRequest creates the ListFirewalls request. @@ -576,7 +645,7 @@ func (client *GlobalRulestackClient) listFirewallsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -594,23 +663,30 @@ func (client *GlobalRulestackClient) listFirewallsHandleResponse(resp *http.Resp // ListPredefinedURLCategories - List predefined URL categories for rulestack // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - GlobalRulestackClientListPredefinedURLCategoriesOptions contains the optional parameters for the GlobalRulestackClient.ListPredefinedURLCategories // method. func (client *GlobalRulestackClient) ListPredefinedURLCategories(ctx context.Context, globalRulestackName string, options *GlobalRulestackClientListPredefinedURLCategoriesOptions) (GlobalRulestackClientListPredefinedURLCategoriesResponse, error) { + var err error + const operationName = "GlobalRulestackClient.ListPredefinedURLCategories" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listPredefinedURLCategoriesCreateRequest(ctx, globalRulestackName, options) if err != nil { return GlobalRulestackClientListPredefinedURLCategoriesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalRulestackClientListPredefinedURLCategoriesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalRulestackClientListPredefinedURLCategoriesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalRulestackClientListPredefinedURLCategoriesResponse{}, err } - return client.listPredefinedURLCategoriesHandleResponse(resp) + resp, err := client.listPredefinedURLCategoriesHandleResponse(httpResp) + return resp, err } // listPredefinedURLCategoriesCreateRequest creates the ListPredefinedURLCategories request. @@ -625,7 +701,7 @@ func (client *GlobalRulestackClient) listPredefinedURLCategoriesCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.Skip != nil { reqQP.Set("skip", *options.Skip) } @@ -649,23 +725,30 @@ func (client *GlobalRulestackClient) listPredefinedURLCategoriesHandleResponse(r // ListSecurityServices - List the security services for rulestack // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - GlobalRulestackClientListSecurityServicesOptions contains the optional parameters for the GlobalRulestackClient.ListSecurityServices // method. func (client *GlobalRulestackClient) ListSecurityServices(ctx context.Context, globalRulestackName string, typeParam SecurityServicesTypeEnum, options *GlobalRulestackClientListSecurityServicesOptions) (GlobalRulestackClientListSecurityServicesResponse, error) { + var err error + const operationName = "GlobalRulestackClient.ListSecurityServices" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSecurityServicesCreateRequest(ctx, globalRulestackName, typeParam, options) if err != nil { return GlobalRulestackClientListSecurityServicesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalRulestackClientListSecurityServicesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalRulestackClientListSecurityServicesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalRulestackClientListSecurityServicesResponse{}, err } - return client.listSecurityServicesHandleResponse(resp) + resp, err := client.listSecurityServicesHandleResponse(httpResp) + return resp, err } // listSecurityServicesCreateRequest creates the ListSecurityServices request. @@ -680,7 +763,7 @@ func (client *GlobalRulestackClient) listSecurityServicesCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.Skip != nil { reqQP.Set("skip", *options.Skip) } @@ -705,20 +788,26 @@ func (client *GlobalRulestackClient) listSecurityServicesHandleResponse(resp *ht // Revert - Revert rulestack configuration // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - GlobalRulestackClientRevertOptions contains the optional parameters for the GlobalRulestackClient.Revert method. func (client *GlobalRulestackClient) Revert(ctx context.Context, globalRulestackName string, options *GlobalRulestackClientRevertOptions) (GlobalRulestackClientRevertResponse, error) { + var err error + const operationName = "GlobalRulestackClient.Revert" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.revertCreateRequest(ctx, globalRulestackName, options) if err != nil { return GlobalRulestackClientRevertResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalRulestackClientRevertResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return GlobalRulestackClientRevertResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GlobalRulestackClientRevertResponse{}, err } return GlobalRulestackClientRevertResponse{}, nil } @@ -735,7 +824,7 @@ func (client *GlobalRulestackClient) revertCreateRequest(ctx context.Context, gl return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -744,23 +833,30 @@ func (client *GlobalRulestackClient) revertCreateRequest(ctx context.Context, gl // Update - Update a GlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - properties - The resource properties to be updated. // - options - GlobalRulestackClientUpdateOptions contains the optional parameters for the GlobalRulestackClient.Update method. func (client *GlobalRulestackClient) Update(ctx context.Context, globalRulestackName string, properties GlobalRulestackResourceUpdate, options *GlobalRulestackClientUpdateOptions) (GlobalRulestackClientUpdateResponse, error) { + var err error + const operationName = "GlobalRulestackClient.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, globalRulestackName, properties, options) if err != nil { return GlobalRulestackClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalRulestackClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalRulestackClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalRulestackClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -775,10 +871,13 @@ func (client *GlobalRulestackClient) updateCreateRequest(ctx context.Context, gl return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrules_client.go index d41cc49c..7a6a14be 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrules_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -33,7 +32,7 @@ type LocalRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLocalRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocalRulesClient, error) { - cl, err := arm.NewClient(moduleName+".LocalRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewLocalRulesClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Create a LocalRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - priority - Local Rule priority @@ -60,31 +59,41 @@ func (client *LocalRulesClient) BeginCreateOrUpdate(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalRulesClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalRulesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[LocalRulesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LocalRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create a LocalRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *LocalRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, localRulestackName string, priority string, resource LocalRulesResource, options *LocalRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "LocalRulesClient.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, localRulestackName, priority, resource, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -111,16 +120,19 @@ func (client *LocalRulesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a LocalRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - priority - Local Rule priority @@ -131,31 +143,41 @@ func (client *LocalRulesClient) BeginDelete(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalRulesClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalRulesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[LocalRulesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LocalRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete a LocalRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *LocalRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, localRulestackName string, priority string, options *LocalRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "LocalRulesClient.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, localRulestackName, priority, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -182,7 +204,7 @@ func (client *LocalRulesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -191,24 +213,31 @@ func (client *LocalRulesClient) deleteCreateRequest(ctx context.Context, resourc // Get - Get a LocalRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - priority - Local Rule priority // - options - LocalRulesClientGetOptions contains the optional parameters for the LocalRulesClient.Get method. func (client *LocalRulesClient) Get(ctx context.Context, resourceGroupName string, localRulestackName string, priority string, options *LocalRulesClientGetOptions) (LocalRulesClientGetResponse, error) { + var err error + const operationName = "LocalRulesClient.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, localRulestackName, priority, options) if err != nil { return LocalRulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalRulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -235,7 +264,7 @@ func (client *LocalRulesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -253,24 +282,31 @@ func (client *LocalRulesClient) getHandleResponse(resp *http.Response) (LocalRul // GetCounters - Get counters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - priority - Local Rule priority // - options - LocalRulesClientGetCountersOptions contains the optional parameters for the LocalRulesClient.GetCounters method. func (client *LocalRulesClient) GetCounters(ctx context.Context, resourceGroupName string, localRulestackName string, priority string, options *LocalRulesClientGetCountersOptions) (LocalRulesClientGetCountersResponse, error) { + var err error + const operationName = "LocalRulesClient.GetCounters" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCountersCreateRequest(ctx, resourceGroupName, localRulestackName, priority, options) if err != nil { return LocalRulesClientGetCountersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulesClientGetCountersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulesClientGetCountersResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalRulesClientGetCountersResponse{}, err } - return client.getCountersHandleResponse(resp) + resp, err := client.getCountersHandleResponse(httpResp) + return resp, err } // getCountersCreateRequest creates the GetCounters request. @@ -297,7 +333,7 @@ func (client *LocalRulesClient) getCountersCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.FirewallName != nil { reqQP.Set("firewallName", *options.FirewallName) } @@ -317,7 +353,7 @@ func (client *LocalRulesClient) getCountersHandleResponse(resp *http.Response) ( // NewListByLocalRulestacksPager - List LocalRulesResource resources by LocalRulestacks // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - LocalRulesClientListByLocalRulestacksOptions contains the optional parameters for the LocalRulesClient.NewListByLocalRulestacksPager @@ -328,25 +364,20 @@ func (client *LocalRulesClient) NewListByLocalRulestacksPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *LocalRulesClientListByLocalRulestacksResponse) (LocalRulesClientListByLocalRulestacksResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByLocalRulestacksCreateRequest(ctx, resourceGroupName, localRulestackName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LocalRulesClientListByLocalRulestacksResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LocalRulesClient.NewListByLocalRulestacksPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByLocalRulestacksCreateRequest(ctx, resourceGroupName, localRulestackName, options) + }, nil) if err != nil { return LocalRulesClientListByLocalRulestacksResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulesClientListByLocalRulestacksResponse{}, runtime.NewResponseError(resp) - } return client.listByLocalRulestacksHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -370,7 +401,7 @@ func (client *LocalRulesClient) listByLocalRulestacksCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -388,23 +419,29 @@ func (client *LocalRulesClient) listByLocalRulestacksHandleResponse(resp *http.R // RefreshCounters - Refresh counters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - priority - Local Rule priority // - options - LocalRulesClientRefreshCountersOptions contains the optional parameters for the LocalRulesClient.RefreshCounters // method. func (client *LocalRulesClient) RefreshCounters(ctx context.Context, resourceGroupName string, localRulestackName string, priority string, options *LocalRulesClientRefreshCountersOptions) (LocalRulesClientRefreshCountersResponse, error) { + var err error + const operationName = "LocalRulesClient.RefreshCounters" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.refreshCountersCreateRequest(ctx, resourceGroupName, localRulestackName, priority, options) if err != nil { return LocalRulesClientRefreshCountersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulesClientRefreshCountersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return LocalRulesClientRefreshCountersResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return LocalRulesClientRefreshCountersResponse{}, err } return LocalRulesClientRefreshCountersResponse{}, nil } @@ -433,7 +470,7 @@ func (client *LocalRulesClient) refreshCountersCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.FirewallName != nil { reqQP.Set("firewallName", *options.FirewallName) } @@ -445,25 +482,32 @@ func (client *LocalRulesClient) refreshCountersCreateRequest(ctx context.Context // ResetCounters - Reset counters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - priority - Local Rule priority // - options - LocalRulesClientResetCountersOptions contains the optional parameters for the LocalRulesClient.ResetCounters // method. func (client *LocalRulesClient) ResetCounters(ctx context.Context, resourceGroupName string, localRulestackName string, priority string, options *LocalRulesClientResetCountersOptions) (LocalRulesClientResetCountersResponse, error) { + var err error + const operationName = "LocalRulesClient.ResetCounters" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resetCountersCreateRequest(ctx, resourceGroupName, localRulestackName, priority, options) if err != nil { return LocalRulesClientResetCountersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulesClientResetCountersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulesClientResetCountersResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalRulesClientResetCountersResponse{}, err } - return client.resetCountersHandleResponse(resp) + resp, err := client.resetCountersHandleResponse(httpResp) + return resp, err } // resetCountersCreateRequest creates the ResetCounters request. @@ -490,7 +534,7 @@ func (client *LocalRulesClient) resetCountersCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.FirewallName != nil { reqQP.Set("firewallName", *options.FirewallName) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrulestacks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrulestacks_client.go index 8419650d..ced7f589 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrulestacks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrulestacks_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -34,7 +33,7 @@ type LocalRulestacksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLocalRulestacksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocalRulestacksClient, error) { - cl, err := arm.NewClient(moduleName+".LocalRulestacksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,7 +47,7 @@ func NewLocalRulestacksClient(subscriptionID string, credential azcore.TokenCred // BeginCommit - Commit rulestack configuration // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - LocalRulestacksClientBeginCommitOptions contains the optional parameters for the LocalRulestacksClient.BeginCommit @@ -59,31 +58,41 @@ func (client *LocalRulestacksClient) BeginCommit(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalRulestacksClientCommitResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalRulestacksClientCommitResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[LocalRulestacksClientCommitResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LocalRulestacksClientCommitResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Commit - Commit rulestack configuration // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *LocalRulestacksClient) commit(ctx context.Context, resourceGroupName string, localRulestackName string, options *LocalRulestacksClientBeginCommitOptions) (*http.Response, error) { + var err error + const operationName = "LocalRulestacksClient.BeginCommit" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.commitCreateRequest(ctx, resourceGroupName, localRulestackName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // commitCreateRequest creates the Commit request. @@ -106,7 +115,7 @@ func (client *LocalRulestacksClient) commitCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,7 +124,7 @@ func (client *LocalRulestacksClient) commitCreateRequest(ctx context.Context, re // BeginCreateOrUpdate - Create a LocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - resource - Resource create parameters. @@ -127,31 +136,41 @@ func (client *LocalRulestacksClient) BeginCreateOrUpdate(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalRulestacksClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalRulestacksClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[LocalRulestacksClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LocalRulestacksClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create a LocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *LocalRulestacksClient) createOrUpdate(ctx context.Context, resourceGroupName string, localRulestackName string, resource LocalRulestackResource, options *LocalRulestacksClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "LocalRulestacksClient.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, localRulestackName, resource, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -174,16 +193,19 @@ func (client *LocalRulestacksClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a LocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - LocalRulestacksClientBeginDeleteOptions contains the optional parameters for the LocalRulestacksClient.BeginDelete @@ -194,31 +216,41 @@ func (client *LocalRulestacksClient) BeginDelete(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalRulestacksClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalRulestacksClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[LocalRulestacksClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LocalRulestacksClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete a LocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *LocalRulestacksClient) deleteOperation(ctx context.Context, resourceGroupName string, localRulestackName string, options *LocalRulestacksClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "LocalRulestacksClient.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, localRulestackName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -241,7 +273,7 @@ func (client *LocalRulestacksClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -250,23 +282,30 @@ func (client *LocalRulestacksClient) deleteCreateRequest(ctx context.Context, re // Get - Get a LocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - LocalRulestacksClientGetOptions contains the optional parameters for the LocalRulestacksClient.Get method. func (client *LocalRulestacksClient) Get(ctx context.Context, resourceGroupName string, localRulestackName string, options *LocalRulestacksClientGetOptions) (LocalRulestacksClientGetResponse, error) { + var err error + const operationName = "LocalRulestacksClient.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, localRulestackName, options) if err != nil { return LocalRulestacksClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulestacksClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulestacksClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalRulestacksClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -289,7 +328,7 @@ func (client *LocalRulestacksClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -307,24 +346,31 @@ func (client *LocalRulestacksClient) getHandleResponse(resp *http.Response) (Loc // GetChangeLog - Get changelog // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - LocalRulestacksClientGetChangeLogOptions contains the optional parameters for the LocalRulestacksClient.GetChangeLog // method. func (client *LocalRulestacksClient) GetChangeLog(ctx context.Context, resourceGroupName string, localRulestackName string, options *LocalRulestacksClientGetChangeLogOptions) (LocalRulestacksClientGetChangeLogResponse, error) { + var err error + const operationName = "LocalRulestacksClient.GetChangeLog" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getChangeLogCreateRequest(ctx, resourceGroupName, localRulestackName, options) if err != nil { return LocalRulestacksClientGetChangeLogResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulestacksClientGetChangeLogResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulestacksClientGetChangeLogResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalRulestacksClientGetChangeLogResponse{}, err } - return client.getChangeLogHandleResponse(resp) + resp, err := client.getChangeLogHandleResponse(httpResp) + return resp, err } // getChangeLogCreateRequest creates the GetChangeLog request. @@ -347,7 +393,7 @@ func (client *LocalRulestacksClient) getChangeLogCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -365,24 +411,31 @@ func (client *LocalRulestacksClient) getChangeLogHandleResponse(resp *http.Respo // GetSupportInfo - support info for rulestack. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - LocalRulestacksClientGetSupportInfoOptions contains the optional parameters for the LocalRulestacksClient.GetSupportInfo // method. func (client *LocalRulestacksClient) GetSupportInfo(ctx context.Context, resourceGroupName string, localRulestackName string, options *LocalRulestacksClientGetSupportInfoOptions) (LocalRulestacksClientGetSupportInfoResponse, error) { + var err error + const operationName = "LocalRulestacksClient.GetSupportInfo" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSupportInfoCreateRequest(ctx, resourceGroupName, localRulestackName, options) if err != nil { return LocalRulestacksClientGetSupportInfoResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulestacksClientGetSupportInfoResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulestacksClientGetSupportInfoResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalRulestacksClientGetSupportInfoResponse{}, err } - return client.getSupportInfoHandleResponse(resp) + resp, err := client.getSupportInfoHandleResponse(httpResp) + return resp, err } // getSupportInfoCreateRequest creates the GetSupportInfo request. @@ -405,7 +458,7 @@ func (client *LocalRulestacksClient) getSupportInfoCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.Email != nil { reqQP.Set("email", *options.Email) } @@ -426,24 +479,31 @@ func (client *LocalRulestacksClient) getSupportInfoHandleResponse(resp *http.Res // ListAdvancedSecurityObjects - Get the list of advanced security objects // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - LocalRulestacksClientListAdvancedSecurityObjectsOptions contains the optional parameters for the LocalRulestacksClient.ListAdvancedSecurityObjects // method. func (client *LocalRulestacksClient) ListAdvancedSecurityObjects(ctx context.Context, resourceGroupName string, localRulestackName string, typeParam AdvSecurityObjectTypeEnum, options *LocalRulestacksClientListAdvancedSecurityObjectsOptions) (LocalRulestacksClientListAdvancedSecurityObjectsResponse, error) { + var err error + const operationName = "LocalRulestacksClient.ListAdvancedSecurityObjects" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listAdvancedSecurityObjectsCreateRequest(ctx, resourceGroupName, localRulestackName, typeParam, options) if err != nil { return LocalRulestacksClientListAdvancedSecurityObjectsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulestacksClientListAdvancedSecurityObjectsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulestacksClientListAdvancedSecurityObjectsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalRulestacksClientListAdvancedSecurityObjectsResponse{}, err } - return client.listAdvancedSecurityObjectsHandleResponse(resp) + resp, err := client.listAdvancedSecurityObjectsHandleResponse(httpResp) + return resp, err } // listAdvancedSecurityObjectsCreateRequest creates the ListAdvancedSecurityObjects request. @@ -466,7 +526,7 @@ func (client *LocalRulestacksClient) listAdvancedSecurityObjectsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.Skip != nil { reqQP.Set("skip", *options.Skip) } @@ -491,24 +551,31 @@ func (client *LocalRulestacksClient) listAdvancedSecurityObjectsHandleResponse(r // ListAppIDs - List of AppIds for LocalRulestack ApiVersion // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - LocalRulestacksClientListAppIDsOptions contains the optional parameters for the LocalRulestacksClient.ListAppIDs // method. func (client *LocalRulestacksClient) ListAppIDs(ctx context.Context, resourceGroupName string, localRulestackName string, options *LocalRulestacksClientListAppIDsOptions) (LocalRulestacksClientListAppIDsResponse, error) { + var err error + const operationName = "LocalRulestacksClient.ListAppIDs" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listAppIDsCreateRequest(ctx, resourceGroupName, localRulestackName, options) if err != nil { return LocalRulestacksClientListAppIDsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulestacksClientListAppIDsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulestacksClientListAppIDsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalRulestacksClientListAppIDsResponse{}, err } - return client.listAppIDsHandleResponse(resp) + resp, err := client.listAppIDsHandleResponse(httpResp) + return resp, err } // listAppIDsCreateRequest creates the ListAppIDs request. @@ -531,7 +598,7 @@ func (client *LocalRulestacksClient) listAppIDsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.AppIDVersion != nil { reqQP.Set("appIdVersion", *options.AppIDVersion) } @@ -560,7 +627,7 @@ func (client *LocalRulestacksClient) listAppIDsHandleResponse(resp *http.Respons // NewListByResourceGroupPager - List LocalRulestackResource resources by resource group // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - LocalRulestacksClientListByResourceGroupOptions contains the optional parameters for the LocalRulestacksClient.NewListByResourceGroupPager // method. @@ -570,25 +637,20 @@ func (client *LocalRulestacksClient) NewListByResourceGroupPager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *LocalRulestacksClientListByResourceGroupResponse) (LocalRulestacksClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LocalRulestacksClient.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 LocalRulestacksClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return LocalRulestacksClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulestacksClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -608,7 +670,7 @@ func (client *LocalRulestacksClient) listByResourceGroupCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -625,7 +687,7 @@ func (client *LocalRulestacksClient) listByResourceGroupHandleResponse(resp *htt // NewListBySubscriptionPager - List LocalRulestackResource resources by subscription ID // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - options - LocalRulestacksClientListBySubscriptionOptions contains the optional parameters for the LocalRulestacksClient.NewListBySubscriptionPager // method. func (client *LocalRulestacksClient) NewListBySubscriptionPager(options *LocalRulestacksClientListBySubscriptionOptions) *runtime.Pager[LocalRulestacksClientListBySubscriptionResponse] { @@ -634,25 +696,20 @@ func (client *LocalRulestacksClient) NewListBySubscriptionPager(options *LocalRu return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *LocalRulestacksClientListBySubscriptionResponse) (LocalRulestacksClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LocalRulestacksClientListBySubscriptionResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LocalRulestacksClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 LocalRulestacksClientListBySubscriptionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulestacksClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -668,7 +725,7 @@ func (client *LocalRulestacksClient) listBySubscriptionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -686,24 +743,31 @@ func (client *LocalRulestacksClient) listBySubscriptionHandleResponse(resp *http // ListCountries - List of countries for Rulestack // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - LocalRulestacksClientListCountriesOptions contains the optional parameters for the LocalRulestacksClient.ListCountries // method. func (client *LocalRulestacksClient) ListCountries(ctx context.Context, resourceGroupName string, localRulestackName string, options *LocalRulestacksClientListCountriesOptions) (LocalRulestacksClientListCountriesResponse, error) { + var err error + const operationName = "LocalRulestacksClient.ListCountries" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCountriesCreateRequest(ctx, resourceGroupName, localRulestackName, options) if err != nil { return LocalRulestacksClientListCountriesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulestacksClientListCountriesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulestacksClientListCountriesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalRulestacksClientListCountriesResponse{}, err } - return client.listCountriesHandleResponse(resp) + resp, err := client.listCountriesHandleResponse(httpResp) + return resp, err } // listCountriesCreateRequest creates the ListCountries request. @@ -726,7 +790,7 @@ func (client *LocalRulestacksClient) listCountriesCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.Skip != nil { reqQP.Set("skip", *options.Skip) } @@ -750,24 +814,31 @@ func (client *LocalRulestacksClient) listCountriesHandleResponse(resp *http.Resp // ListFirewalls - List of Firewalls associated with Rulestack // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - LocalRulestacksClientListFirewallsOptions contains the optional parameters for the LocalRulestacksClient.ListFirewalls // method. func (client *LocalRulestacksClient) ListFirewalls(ctx context.Context, resourceGroupName string, localRulestackName string, options *LocalRulestacksClientListFirewallsOptions) (LocalRulestacksClientListFirewallsResponse, error) { + var err error + const operationName = "LocalRulestacksClient.ListFirewalls" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listFirewallsCreateRequest(ctx, resourceGroupName, localRulestackName, options) if err != nil { return LocalRulestacksClientListFirewallsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulestacksClientListFirewallsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulestacksClientListFirewallsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalRulestacksClientListFirewallsResponse{}, err } - return client.listFirewallsHandleResponse(resp) + resp, err := client.listFirewallsHandleResponse(httpResp) + return resp, err } // listFirewallsCreateRequest creates the ListFirewalls request. @@ -790,7 +861,7 @@ func (client *LocalRulestacksClient) listFirewallsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -808,24 +879,31 @@ func (client *LocalRulestacksClient) listFirewallsHandleResponse(resp *http.Resp // ListPredefinedURLCategories - List predefined URL categories for rulestack // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - LocalRulestacksClientListPredefinedURLCategoriesOptions contains the optional parameters for the LocalRulestacksClient.ListPredefinedURLCategories // method. func (client *LocalRulestacksClient) ListPredefinedURLCategories(ctx context.Context, resourceGroupName string, localRulestackName string, options *LocalRulestacksClientListPredefinedURLCategoriesOptions) (LocalRulestacksClientListPredefinedURLCategoriesResponse, error) { + var err error + const operationName = "LocalRulestacksClient.ListPredefinedURLCategories" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listPredefinedURLCategoriesCreateRequest(ctx, resourceGroupName, localRulestackName, options) if err != nil { return LocalRulestacksClientListPredefinedURLCategoriesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulestacksClientListPredefinedURLCategoriesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulestacksClientListPredefinedURLCategoriesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalRulestacksClientListPredefinedURLCategoriesResponse{}, err } - return client.listPredefinedURLCategoriesHandleResponse(resp) + resp, err := client.listPredefinedURLCategoriesHandleResponse(httpResp) + return resp, err } // listPredefinedURLCategoriesCreateRequest creates the ListPredefinedURLCategories request. @@ -848,7 +926,7 @@ func (client *LocalRulestacksClient) listPredefinedURLCategoriesCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.Skip != nil { reqQP.Set("skip", *options.Skip) } @@ -872,24 +950,31 @@ func (client *LocalRulestacksClient) listPredefinedURLCategoriesHandleResponse(r // ListSecurityServices - List the security services for rulestack // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - LocalRulestacksClientListSecurityServicesOptions contains the optional parameters for the LocalRulestacksClient.ListSecurityServices // method. func (client *LocalRulestacksClient) ListSecurityServices(ctx context.Context, resourceGroupName string, localRulestackName string, typeParam SecurityServicesTypeEnum, options *LocalRulestacksClientListSecurityServicesOptions) (LocalRulestacksClientListSecurityServicesResponse, error) { + var err error + const operationName = "LocalRulestacksClient.ListSecurityServices" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSecurityServicesCreateRequest(ctx, resourceGroupName, localRulestackName, typeParam, options) if err != nil { return LocalRulestacksClientListSecurityServicesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulestacksClientListSecurityServicesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulestacksClientListSecurityServicesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalRulestacksClientListSecurityServicesResponse{}, err } - return client.listSecurityServicesHandleResponse(resp) + resp, err := client.listSecurityServicesHandleResponse(httpResp) + return resp, err } // listSecurityServicesCreateRequest creates the ListSecurityServices request. @@ -912,7 +997,7 @@ func (client *LocalRulestacksClient) listSecurityServicesCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.Skip != nil { reqQP.Set("skip", *options.Skip) } @@ -937,21 +1022,27 @@ func (client *LocalRulestacksClient) listSecurityServicesHandleResponse(resp *ht // Revert - Revert rulestack configuration // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - LocalRulestacksClientRevertOptions contains the optional parameters for the LocalRulestacksClient.Revert method. func (client *LocalRulestacksClient) Revert(ctx context.Context, resourceGroupName string, localRulestackName string, options *LocalRulestacksClientRevertOptions) (LocalRulestacksClientRevertResponse, error) { + var err error + const operationName = "LocalRulestacksClient.Revert" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.revertCreateRequest(ctx, resourceGroupName, localRulestackName, options) if err != nil { return LocalRulestacksClientRevertResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulestacksClientRevertResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return LocalRulestacksClientRevertResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return LocalRulestacksClientRevertResponse{}, err } return LocalRulestacksClientRevertResponse{}, nil } @@ -976,7 +1067,7 @@ func (client *LocalRulestacksClient) revertCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -985,24 +1076,31 @@ func (client *LocalRulestacksClient) revertCreateRequest(ctx context.Context, re // Update - Update a LocalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - properties - The resource properties to be updated. // - options - LocalRulestacksClientUpdateOptions contains the optional parameters for the LocalRulestacksClient.Update method. func (client *LocalRulestacksClient) Update(ctx context.Context, resourceGroupName string, localRulestackName string, properties LocalRulestackResourceUpdate, options *LocalRulestacksClientUpdateOptions) (LocalRulestacksClientUpdateResponse, error) { + var err error + const operationName = "LocalRulestacksClient.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, localRulestackName, properties, options) if err != nil { return LocalRulestacksClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalRulestacksClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalRulestacksClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalRulestacksClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -1025,10 +1123,13 @@ func (client *LocalRulestacksClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/models.go index d786e70d..6f73fbdb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -125,32 +124,6 @@ type CertificateObject struct { ProvisioningState *ProvisioningState } -// CertificateObjectGlobalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificateObjectGlobalRulestackClient.BeginCreateOrUpdate -// method. -type CertificateObjectGlobalRulestackClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CertificateObjectGlobalRulestackClientBeginDeleteOptions contains the optional parameters for the CertificateObjectGlobalRulestackClient.BeginDelete -// method. -type CertificateObjectGlobalRulestackClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CertificateObjectGlobalRulestackClientGetOptions contains the optional parameters for the CertificateObjectGlobalRulestackClient.Get -// method. -type CertificateObjectGlobalRulestackClientGetOptions struct { - // placeholder for future optional parameters -} - -// CertificateObjectGlobalRulestackClientListOptions contains the optional parameters for the CertificateObjectGlobalRulestackClient.NewListPager -// method. -type CertificateObjectGlobalRulestackClientListOptions struct { - // placeholder for future optional parameters -} - // CertificateObjectGlobalRulestackResource - GlobalRulestack Certificate Object type CertificateObjectGlobalRulestackResource struct { // REQUIRED; The resource-specific properties for this resource. @@ -178,32 +151,6 @@ type CertificateObjectGlobalRulestackResourceListResult struct { NextLink *string } -// CertificateObjectLocalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificateObjectLocalRulestackClient.BeginCreateOrUpdate -// method. -type CertificateObjectLocalRulestackClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CertificateObjectLocalRulestackClientBeginDeleteOptions contains the optional parameters for the CertificateObjectLocalRulestackClient.BeginDelete -// method. -type CertificateObjectLocalRulestackClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CertificateObjectLocalRulestackClientGetOptions contains the optional parameters for the CertificateObjectLocalRulestackClient.Get -// method. -type CertificateObjectLocalRulestackClientGetOptions struct { - // placeholder for future optional parameters -} - -// CertificateObjectLocalRulestackClientListByLocalRulestacksOptions contains the optional parameters for the CertificateObjectLocalRulestackClient.NewListByLocalRulestacksPager -// method. -type CertificateObjectLocalRulestackClientListByLocalRulestacksOptions struct { - // placeholder for future optional parameters -} - // CertificateObjectLocalRulestackResource - LocalRulestack Certificate Object type CertificateObjectLocalRulestackResource struct { // REQUIRED; The resource-specific properties for this resource. @@ -429,17 +376,6 @@ type FirewallResourceUpdateProperties struct { PlanData *PlanData } -// FirewallStatusClientGetOptions contains the optional parameters for the FirewallStatusClient.Get method. -type FirewallStatusClientGetOptions struct { - // placeholder for future optional parameters -} - -// FirewallStatusClientListByFirewallsOptions contains the optional parameters for the FirewallStatusClient.NewListByFirewallsPager -// method. -type FirewallStatusClientListByFirewallsOptions struct { - // placeholder for future optional parameters -} - // FirewallStatusProperty - Firewall Status type FirewallStatusProperty struct { // READ-ONLY; Detail description of current health of the Firewall @@ -485,87 +421,6 @@ type FirewallStatusResourceListResult struct { NextLink *string } -// FirewallsClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallsClient.BeginCreateOrUpdate -// method. -type FirewallsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FirewallsClientBeginDeleteOptions contains the optional parameters for the FirewallsClient.BeginDelete method. -type FirewallsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FirewallsClientGetGlobalRulestackOptions contains the optional parameters for the FirewallsClient.GetGlobalRulestack method. -type FirewallsClientGetGlobalRulestackOptions struct { - // placeholder for future optional parameters -} - -// FirewallsClientGetLogProfileOptions contains the optional parameters for the FirewallsClient.GetLogProfile method. -type FirewallsClientGetLogProfileOptions struct { - // placeholder for future optional parameters -} - -// FirewallsClientGetOptions contains the optional parameters for the FirewallsClient.Get method. -type FirewallsClientGetOptions struct { - // placeholder for future optional parameters -} - -// FirewallsClientGetSupportInfoOptions contains the optional parameters for the FirewallsClient.GetSupportInfo method. -type FirewallsClientGetSupportInfoOptions struct { - // email address on behalf of which this API called - Email *string -} - -// FirewallsClientListByResourceGroupOptions contains the optional parameters for the FirewallsClient.NewListByResourceGroupPager -// method. -type FirewallsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// FirewallsClientListBySubscriptionOptions contains the optional parameters for the FirewallsClient.NewListBySubscriptionPager -// method. -type FirewallsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// FirewallsClientSaveLogProfileOptions contains the optional parameters for the FirewallsClient.SaveLogProfile method. -type FirewallsClientSaveLogProfileOptions struct { - LogSettings *LogSettings -} - -// FirewallsClientUpdateOptions contains the optional parameters for the FirewallsClient.Update method. -type FirewallsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// FqdnListGlobalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the FqdnListGlobalRulestackClient.BeginCreateOrUpdate -// method. -type FqdnListGlobalRulestackClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FqdnListGlobalRulestackClientBeginDeleteOptions contains the optional parameters for the FqdnListGlobalRulestackClient.BeginDelete -// method. -type FqdnListGlobalRulestackClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FqdnListGlobalRulestackClientGetOptions contains the optional parameters for the FqdnListGlobalRulestackClient.Get method. -type FqdnListGlobalRulestackClientGetOptions struct { - // placeholder for future optional parameters -} - -// FqdnListGlobalRulestackClientListOptions contains the optional parameters for the FqdnListGlobalRulestackClient.NewListPager -// method. -type FqdnListGlobalRulestackClientListOptions struct { - // placeholder for future optional parameters -} - // FqdnListGlobalRulestackResource - GlobalRulestack fqdnList type FqdnListGlobalRulestackResource struct { // REQUIRED; The resource-specific properties for this resource. @@ -593,31 +448,6 @@ type FqdnListGlobalRulestackResourceListResult struct { NextLink *string } -// FqdnListLocalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the FqdnListLocalRulestackClient.BeginCreateOrUpdate -// method. -type FqdnListLocalRulestackClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FqdnListLocalRulestackClientBeginDeleteOptions contains the optional parameters for the FqdnListLocalRulestackClient.BeginDelete -// method. -type FqdnListLocalRulestackClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FqdnListLocalRulestackClientGetOptions contains the optional parameters for the FqdnListLocalRulestackClient.Get method. -type FqdnListLocalRulestackClientGetOptions struct { - // placeholder for future optional parameters -} - -// FqdnListLocalRulestackClientListByLocalRulestacksOptions contains the optional parameters for the FqdnListLocalRulestackClient.NewListByLocalRulestacksPager -// method. -type FqdnListLocalRulestackClientListByLocalRulestacksOptions struct { - // placeholder for future optional parameters -} - // FqdnListLocalRulestackResource - LocalRulestack fqdnList type FqdnListLocalRulestackResource struct { // REQUIRED; The resource-specific properties for this resource. @@ -678,92 +508,6 @@ type FrontendSetting struct { Protocol *ProtocolType } -// GlobalRulestackClientBeginCommitOptions contains the optional parameters for the GlobalRulestackClient.BeginCommit method. -type GlobalRulestackClientBeginCommitOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GlobalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the GlobalRulestackClient.BeginCreateOrUpdate -// method. -type GlobalRulestackClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GlobalRulestackClientBeginDeleteOptions contains the optional parameters for the GlobalRulestackClient.BeginDelete method. -type GlobalRulestackClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GlobalRulestackClientGetChangeLogOptions contains the optional parameters for the GlobalRulestackClient.GetChangeLog method. -type GlobalRulestackClientGetChangeLogOptions struct { - // placeholder for future optional parameters -} - -// GlobalRulestackClientGetOptions contains the optional parameters for the GlobalRulestackClient.Get method. -type GlobalRulestackClientGetOptions struct { - // placeholder for future optional parameters -} - -// GlobalRulestackClientListAdvancedSecurityObjectsOptions contains the optional parameters for the GlobalRulestackClient.ListAdvancedSecurityObjects -// method. -type GlobalRulestackClientListAdvancedSecurityObjectsOptions struct { - Skip *string - Top *int32 -} - -// GlobalRulestackClientListAppIDsOptions contains the optional parameters for the GlobalRulestackClient.ListAppIDs method. -type GlobalRulestackClientListAppIDsOptions struct { - AppIDVersion *string - AppPrefix *string - Skip *string - Top *int32 -} - -// GlobalRulestackClientListCountriesOptions contains the optional parameters for the GlobalRulestackClient.ListCountries -// method. -type GlobalRulestackClientListCountriesOptions struct { - Skip *string - Top *int32 -} - -// GlobalRulestackClientListFirewallsOptions contains the optional parameters for the GlobalRulestackClient.ListFirewalls -// method. -type GlobalRulestackClientListFirewallsOptions struct { - // placeholder for future optional parameters -} - -// GlobalRulestackClientListOptions contains the optional parameters for the GlobalRulestackClient.NewListPager method. -type GlobalRulestackClientListOptions struct { - // placeholder for future optional parameters -} - -// GlobalRulestackClientListPredefinedURLCategoriesOptions contains the optional parameters for the GlobalRulestackClient.ListPredefinedURLCategories -// method. -type GlobalRulestackClientListPredefinedURLCategoriesOptions struct { - Skip *string - Top *int32 -} - -// GlobalRulestackClientListSecurityServicesOptions contains the optional parameters for the GlobalRulestackClient.ListSecurityServices -// method. -type GlobalRulestackClientListSecurityServicesOptions struct { - Skip *string - Top *int32 -} - -// GlobalRulestackClientRevertOptions contains the optional parameters for the GlobalRulestackClient.Revert method. -type GlobalRulestackClientRevertOptions struct { - // placeholder for future optional parameters -} - -// GlobalRulestackClientUpdateOptions contains the optional parameters for the GlobalRulestackClient.Update method. -type GlobalRulestackClientUpdateOptions struct { - // placeholder for future optional parameters -} - // GlobalRulestackInfo - PAN Rulestack Describe Object type GlobalRulestackInfo struct { // REQUIRED; rulestack description @@ -877,45 +621,6 @@ type ListFirewallsResponse struct { NextLink *string } -// LocalRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalRulesClient.BeginCreateOrUpdate -// method. -type LocalRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LocalRulesClientBeginDeleteOptions contains the optional parameters for the LocalRulesClient.BeginDelete method. -type LocalRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LocalRulesClientGetCountersOptions contains the optional parameters for the LocalRulesClient.GetCounters method. -type LocalRulesClientGetCountersOptions struct { - FirewallName *string -} - -// LocalRulesClientGetOptions contains the optional parameters for the LocalRulesClient.Get method. -type LocalRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// LocalRulesClientListByLocalRulestacksOptions contains the optional parameters for the LocalRulesClient.NewListByLocalRulestacksPager -// method. -type LocalRulesClientListByLocalRulestacksOptions struct { - // placeholder for future optional parameters -} - -// LocalRulesClientRefreshCountersOptions contains the optional parameters for the LocalRulesClient.RefreshCounters method. -type LocalRulesClientRefreshCountersOptions struct { - FirewallName *string -} - -// LocalRulesClientResetCountersOptions contains the optional parameters for the LocalRulesClient.ResetCounters method. -type LocalRulesClientResetCountersOptions struct { - FirewallName *string -} - // LocalRulesResource - LocalRulestack rule list type LocalRulesResource struct { // REQUIRED; The resource-specific properties for this resource. @@ -1018,106 +723,6 @@ type LocalRulestackResourceUpdateProperties struct { SecurityServices *SecurityServices } -// LocalRulestacksClientBeginCommitOptions contains the optional parameters for the LocalRulestacksClient.BeginCommit method. -type LocalRulestacksClientBeginCommitOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LocalRulestacksClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalRulestacksClient.BeginCreateOrUpdate -// method. -type LocalRulestacksClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LocalRulestacksClientBeginDeleteOptions contains the optional parameters for the LocalRulestacksClient.BeginDelete method. -type LocalRulestacksClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LocalRulestacksClientGetChangeLogOptions contains the optional parameters for the LocalRulestacksClient.GetChangeLog method. -type LocalRulestacksClientGetChangeLogOptions struct { - // placeholder for future optional parameters -} - -// LocalRulestacksClientGetOptions contains the optional parameters for the LocalRulestacksClient.Get method. -type LocalRulestacksClientGetOptions struct { - // placeholder for future optional parameters -} - -// LocalRulestacksClientGetSupportInfoOptions contains the optional parameters for the LocalRulestacksClient.GetSupportInfo -// method. -type LocalRulestacksClientGetSupportInfoOptions struct { - // email address on behalf of which this API called - Email *string -} - -// LocalRulestacksClientListAdvancedSecurityObjectsOptions contains the optional parameters for the LocalRulestacksClient.ListAdvancedSecurityObjects -// method. -type LocalRulestacksClientListAdvancedSecurityObjectsOptions struct { - Skip *string - Top *int32 -} - -// LocalRulestacksClientListAppIDsOptions contains the optional parameters for the LocalRulestacksClient.ListAppIDs method. -type LocalRulestacksClientListAppIDsOptions struct { - AppIDVersion *string - AppPrefix *string - Skip *string - Top *int32 -} - -// LocalRulestacksClientListByResourceGroupOptions contains the optional parameters for the LocalRulestacksClient.NewListByResourceGroupPager -// method. -type LocalRulestacksClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// LocalRulestacksClientListBySubscriptionOptions contains the optional parameters for the LocalRulestacksClient.NewListBySubscriptionPager -// method. -type LocalRulestacksClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// LocalRulestacksClientListCountriesOptions contains the optional parameters for the LocalRulestacksClient.ListCountries -// method. -type LocalRulestacksClientListCountriesOptions struct { - Skip *string - Top *int32 -} - -// LocalRulestacksClientListFirewallsOptions contains the optional parameters for the LocalRulestacksClient.ListFirewalls -// method. -type LocalRulestacksClientListFirewallsOptions struct { - // placeholder for future optional parameters -} - -// LocalRulestacksClientListPredefinedURLCategoriesOptions contains the optional parameters for the LocalRulestacksClient.ListPredefinedURLCategories -// method. -type LocalRulestacksClientListPredefinedURLCategoriesOptions struct { - Skip *string - Top *int32 -} - -// LocalRulestacksClientListSecurityServicesOptions contains the optional parameters for the LocalRulestacksClient.ListSecurityServices -// method. -type LocalRulestacksClientListSecurityServicesOptions struct { - Skip *string - Top *int32 -} - -// LocalRulestacksClientRevertOptions contains the optional parameters for the LocalRulestacksClient.Revert method. -type LocalRulestacksClientRevertOptions struct { - // placeholder for future optional parameters -} - -// LocalRulestacksClientUpdateOptions contains the optional parameters for the LocalRulestacksClient.Update method. -type LocalRulestacksClientUpdateOptions struct { - // placeholder for future optional parameters -} - // LogDestination - Log Destination type LogDestination struct { // Event Hub configurations @@ -1210,6 +815,9 @@ type NetworkProfile struct { // Egress nat IP to use EgressNatIP []*IPAddress + // Non-RFC 1918 address + TrustedRanges []*string + // Vnet configurations VnetConfiguration *VnetConfiguration @@ -1266,11 +874,6 @@ type OperationListResult struct { Value []*Operation } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // PanoramaConfig - Panorama Config type PanoramaConfig struct { // REQUIRED; Base64 encoded string representing Panorama parameters to be used by Firewall to connect to Panorama. This string @@ -1323,44 +926,6 @@ type PlanData struct { EffectiveDate *time.Time } -// PostRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the PostRulesClient.BeginCreateOrUpdate -// method. -type PostRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PostRulesClientBeginDeleteOptions contains the optional parameters for the PostRulesClient.BeginDelete method. -type PostRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PostRulesClientGetCountersOptions contains the optional parameters for the PostRulesClient.GetCounters method. -type PostRulesClientGetCountersOptions struct { - FirewallName *string -} - -// PostRulesClientGetOptions contains the optional parameters for the PostRulesClient.Get method. -type PostRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PostRulesClientListOptions contains the optional parameters for the PostRulesClient.NewListPager method. -type PostRulesClientListOptions struct { - // placeholder for future optional parameters -} - -// PostRulesClientRefreshCountersOptions contains the optional parameters for the PostRulesClient.RefreshCounters method. -type PostRulesClientRefreshCountersOptions struct { - FirewallName *string -} - -// PostRulesClientResetCountersOptions contains the optional parameters for the PostRulesClient.ResetCounters method. -type PostRulesClientResetCountersOptions struct { - FirewallName *string -} - // PostRulesResource - PostRulestack rule list type PostRulesResource struct { // REQUIRED; The resource-specific properties for this resource. @@ -1388,43 +953,6 @@ type PostRulesResourceListResult struct { NextLink *string } -// PreRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the PreRulesClient.BeginCreateOrUpdate method. -type PreRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PreRulesClientBeginDeleteOptions contains the optional parameters for the PreRulesClient.BeginDelete method. -type PreRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PreRulesClientGetCountersOptions contains the optional parameters for the PreRulesClient.GetCounters method. -type PreRulesClientGetCountersOptions struct { - FirewallName *string -} - -// PreRulesClientGetOptions contains the optional parameters for the PreRulesClient.Get method. -type PreRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PreRulesClientListOptions contains the optional parameters for the PreRulesClient.NewListPager method. -type PreRulesClientListOptions struct { - // placeholder for future optional parameters -} - -// PreRulesClientRefreshCountersOptions contains the optional parameters for the PreRulesClient.RefreshCounters method. -type PreRulesClientRefreshCountersOptions struct { - FirewallName *string -} - -// PreRulesClientResetCountersOptions contains the optional parameters for the PreRulesClient.ResetCounters method. -type PreRulesClientResetCountersOptions struct { - FirewallName *string -} - // PreRulesResource - PreRulestack rule list type PreRulesResource struct { // REQUIRED; The resource-specific properties for this resource. @@ -1470,32 +998,6 @@ type PredefinedURLCategory struct { Name *string } -// PrefixListGlobalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the PrefixListGlobalRulestackClient.BeginCreateOrUpdate -// method. -type PrefixListGlobalRulestackClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrefixListGlobalRulestackClientBeginDeleteOptions contains the optional parameters for the PrefixListGlobalRulestackClient.BeginDelete -// method. -type PrefixListGlobalRulestackClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrefixListGlobalRulestackClientGetOptions contains the optional parameters for the PrefixListGlobalRulestackClient.Get -// method. -type PrefixListGlobalRulestackClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrefixListGlobalRulestackClientListOptions contains the optional parameters for the PrefixListGlobalRulestackClient.NewListPager -// method. -type PrefixListGlobalRulestackClientListOptions struct { - // placeholder for future optional parameters -} - // PrefixListGlobalRulestackResource - GlobalRulestack prefixList type PrefixListGlobalRulestackResource struct { // REQUIRED; The resource-specific properties for this resource. @@ -1523,31 +1025,6 @@ type PrefixListGlobalRulestackResourceListResult struct { NextLink *string } -// PrefixListLocalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the PrefixListLocalRulestackClient.BeginCreateOrUpdate -// method. -type PrefixListLocalRulestackClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrefixListLocalRulestackClientBeginDeleteOptions contains the optional parameters for the PrefixListLocalRulestackClient.BeginDelete -// method. -type PrefixListLocalRulestackClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrefixListLocalRulestackClientGetOptions contains the optional parameters for the PrefixListLocalRulestackClient.Get method. -type PrefixListLocalRulestackClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrefixListLocalRulestackClientListByLocalRulestacksOptions contains the optional parameters for the PrefixListLocalRulestackClient.NewListByLocalRulestacksPager -// method. -type PrefixListLocalRulestackClientListByLocalRulestacksOptions struct { - // placeholder for future optional parameters -} - // PrefixListResource - LocalRulestack prefixList type PrefixListResource struct { // REQUIRED; The resource-specific properties for this resource. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/models_serde.go index 578fddec..4b46f3bf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -491,8 +490,8 @@ func (c *CertificateObjectLocalRulestackResourceListResult) UnmarshalJSON(data [ func (c Changelog) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "changes", c.Changes) - populateTimeRFC3339(objectMap, "lastCommitted", c.LastCommitted) - populateTimeRFC3339(objectMap, "lastModified", c.LastModified) + populateDateTimeRFC3339(objectMap, "lastCommitted", c.LastCommitted) + populateDateTimeRFC3339(objectMap, "lastModified", c.LastModified) return json.Marshal(objectMap) } @@ -509,10 +508,10 @@ func (c *Changelog) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Changes", &c.Changes) delete(rawMsg, key) case "lastCommitted": - err = unpopulateTimeRFC3339(val, "LastCommitted", &c.LastCommitted) + err = unpopulateDateTimeRFC3339(val, "LastCommitted", &c.LastCommitted) delete(rawMsg, key) case "lastModified": - err = unpopulateTimeRFC3339(val, "LastModified", &c.LastModified) + err = unpopulateDateTimeRFC3339(val, "LastModified", &c.LastModified) delete(rawMsg, key) } if err != nil { @@ -2105,6 +2104,7 @@ func (n NetworkProfile) MarshalJSON() ([]byte, error) { populate(objectMap, "enableEgressNat", n.EnableEgressNat) populate(objectMap, "networkType", n.NetworkType) populate(objectMap, "publicIps", n.PublicIPs) + populate(objectMap, "trustedRanges", n.TrustedRanges) populate(objectMap, "vnetConfiguration", n.VnetConfiguration) populate(objectMap, "vwanConfiguration", n.VwanConfiguration) return json.Marshal(objectMap) @@ -2131,6 +2131,9 @@ func (n *NetworkProfile) UnmarshalJSON(data []byte) error { case "publicIps": err = unpopulate(val, "PublicIPs", &n.PublicIPs) delete(rawMsg, key) + case "trustedRanges": + err = unpopulate(val, "TrustedRanges", &n.TrustedRanges) + delete(rawMsg, key) case "vnetConfiguration": err = unpopulate(val, "VnetConfiguration", &n.VnetConfiguration) delete(rawMsg, key) @@ -2348,7 +2351,7 @@ func (p *PanoramaStatus) UnmarshalJSON(data []byte) error { func (p PlanData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "billingCycle", p.BillingCycle) - populateTimeRFC3339(objectMap, "effectiveDate", p.EffectiveDate) + populateDateTimeRFC3339(objectMap, "effectiveDate", p.EffectiveDate) populate(objectMap, "planId", p.PlanID) populate(objectMap, "usageType", p.UsageType) return json.Marshal(objectMap) @@ -2367,7 +2370,7 @@ func (p *PlanData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "BillingCycle", &p.BillingCycle) delete(rawMsg, key) case "effectiveDate": - err = unpopulateTimeRFC3339(val, "EffectiveDate", &p.EffectiveDate) + err = unpopulateDateTimeRFC3339(val, "EffectiveDate", &p.EffectiveDate) delete(rawMsg, key) case "planId": err = unpopulate(val, "PlanID", &p.PlanID) @@ -2790,13 +2793,13 @@ func (r RuleCounter) MarshalJSON() ([]byte, error) { populate(objectMap, "appSeen", r.AppSeen) populate(objectMap, "firewallName", r.FirewallName) populate(objectMap, "hitCount", r.HitCount) - populateTimeRFC3339(objectMap, "lastUpdatedTimestamp", r.LastUpdatedTimestamp) + populateDateTimeRFC3339(objectMap, "lastUpdatedTimestamp", r.LastUpdatedTimestamp) populate(objectMap, "priority", r.Priority) - populateTimeRFC3339(objectMap, "requestTimestamp", r.RequestTimestamp) + populateDateTimeRFC3339(objectMap, "requestTimestamp", r.RequestTimestamp) populate(objectMap, "ruleListName", r.RuleListName) populate(objectMap, "ruleName", r.RuleName) populate(objectMap, "ruleStackName", r.RuleStackName) - populateTimeRFC3339(objectMap, "timestamp", r.Timestamp) + populateDateTimeRFC3339(objectMap, "timestamp", r.Timestamp) return json.Marshal(objectMap) } @@ -2819,13 +2822,13 @@ func (r *RuleCounter) UnmarshalJSON(data []byte) error { err = unpopulate(val, "HitCount", &r.HitCount) delete(rawMsg, key) case "lastUpdatedTimestamp": - err = unpopulateTimeRFC3339(val, "LastUpdatedTimestamp", &r.LastUpdatedTimestamp) + err = unpopulateDateTimeRFC3339(val, "LastUpdatedTimestamp", &r.LastUpdatedTimestamp) delete(rawMsg, key) case "priority": err = unpopulate(val, "Priority", &r.Priority) delete(rawMsg, key) case "requestTimestamp": - err = unpopulateTimeRFC3339(val, "RequestTimestamp", &r.RequestTimestamp) + err = unpopulateDateTimeRFC3339(val, "RequestTimestamp", &r.RequestTimestamp) delete(rawMsg, key) case "ruleListName": err = unpopulate(val, "RuleListName", &r.RuleListName) @@ -2837,7 +2840,7 @@ func (r *RuleCounter) UnmarshalJSON(data []byte) error { err = unpopulate(val, "RuleStackName", &r.RuleStackName) delete(rawMsg, key) case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &r.Timestamp) + err = unpopulateDateTimeRFC3339(val, "Timestamp", &r.Timestamp) delete(rawMsg, key) } if err != nil { @@ -3352,10 +3355,10 @@ func (s *SupportInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -3371,7 +3374,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -3380,7 +3383,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/operations_client.go index 16eaf70c..8de9310e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -40,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - List the operations for the provider // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-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]{ @@ -48,25 +47,20 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -78,7 +72,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-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/paloaltonetworksngfw/armpanngfw/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/options.go new file mode 100644 index 00000000..f795ead3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/options.go @@ -0,0 +1,534 @@ +//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 armpanngfw + +// CertificateObjectGlobalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificateObjectGlobalRulestackClient.BeginCreateOrUpdate +// method. +type CertificateObjectGlobalRulestackClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CertificateObjectGlobalRulestackClientBeginDeleteOptions contains the optional parameters for the CertificateObjectGlobalRulestackClient.BeginDelete +// method. +type CertificateObjectGlobalRulestackClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CertificateObjectGlobalRulestackClientGetOptions contains the optional parameters for the CertificateObjectGlobalRulestackClient.Get +// method. +type CertificateObjectGlobalRulestackClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificateObjectGlobalRulestackClientListOptions contains the optional parameters for the CertificateObjectGlobalRulestackClient.NewListPager +// method. +type CertificateObjectGlobalRulestackClientListOptions struct { + // placeholder for future optional parameters +} + +// CertificateObjectLocalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificateObjectLocalRulestackClient.BeginCreateOrUpdate +// method. +type CertificateObjectLocalRulestackClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CertificateObjectLocalRulestackClientBeginDeleteOptions contains the optional parameters for the CertificateObjectLocalRulestackClient.BeginDelete +// method. +type CertificateObjectLocalRulestackClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CertificateObjectLocalRulestackClientGetOptions contains the optional parameters for the CertificateObjectLocalRulestackClient.Get +// method. +type CertificateObjectLocalRulestackClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificateObjectLocalRulestackClientListByLocalRulestacksOptions contains the optional parameters for the CertificateObjectLocalRulestackClient.NewListByLocalRulestacksPager +// method. +type CertificateObjectLocalRulestackClientListByLocalRulestacksOptions struct { + // placeholder for future optional parameters +} + +// FirewallStatusClientGetOptions contains the optional parameters for the FirewallStatusClient.Get method. +type FirewallStatusClientGetOptions struct { + // placeholder for future optional parameters +} + +// FirewallStatusClientListByFirewallsOptions contains the optional parameters for the FirewallStatusClient.NewListByFirewallsPager +// method. +type FirewallStatusClientListByFirewallsOptions struct { + // placeholder for future optional parameters +} + +// FirewallsClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallsClient.BeginCreateOrUpdate +// method. +type FirewallsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FirewallsClientBeginDeleteOptions contains the optional parameters for the FirewallsClient.BeginDelete method. +type FirewallsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FirewallsClientGetGlobalRulestackOptions contains the optional parameters for the FirewallsClient.GetGlobalRulestack method. +type FirewallsClientGetGlobalRulestackOptions struct { + // placeholder for future optional parameters +} + +// FirewallsClientGetLogProfileOptions contains the optional parameters for the FirewallsClient.GetLogProfile method. +type FirewallsClientGetLogProfileOptions struct { + // placeholder for future optional parameters +} + +// FirewallsClientGetOptions contains the optional parameters for the FirewallsClient.Get method. +type FirewallsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FirewallsClientGetSupportInfoOptions contains the optional parameters for the FirewallsClient.GetSupportInfo method. +type FirewallsClientGetSupportInfoOptions struct { + // email address on behalf of which this API called + Email *string +} + +// FirewallsClientListByResourceGroupOptions contains the optional parameters for the FirewallsClient.NewListByResourceGroupPager +// method. +type FirewallsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// FirewallsClientListBySubscriptionOptions contains the optional parameters for the FirewallsClient.NewListBySubscriptionPager +// method. +type FirewallsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// FirewallsClientSaveLogProfileOptions contains the optional parameters for the FirewallsClient.SaveLogProfile method. +type FirewallsClientSaveLogProfileOptions struct { + LogSettings *LogSettings +} + +// FirewallsClientUpdateOptions contains the optional parameters for the FirewallsClient.Update method. +type FirewallsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// FqdnListGlobalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the FqdnListGlobalRulestackClient.BeginCreateOrUpdate +// method. +type FqdnListGlobalRulestackClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FqdnListGlobalRulestackClientBeginDeleteOptions contains the optional parameters for the FqdnListGlobalRulestackClient.BeginDelete +// method. +type FqdnListGlobalRulestackClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FqdnListGlobalRulestackClientGetOptions contains the optional parameters for the FqdnListGlobalRulestackClient.Get method. +type FqdnListGlobalRulestackClientGetOptions struct { + // placeholder for future optional parameters +} + +// FqdnListGlobalRulestackClientListOptions contains the optional parameters for the FqdnListGlobalRulestackClient.NewListPager +// method. +type FqdnListGlobalRulestackClientListOptions struct { + // placeholder for future optional parameters +} + +// FqdnListLocalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the FqdnListLocalRulestackClient.BeginCreateOrUpdate +// method. +type FqdnListLocalRulestackClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FqdnListLocalRulestackClientBeginDeleteOptions contains the optional parameters for the FqdnListLocalRulestackClient.BeginDelete +// method. +type FqdnListLocalRulestackClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FqdnListLocalRulestackClientGetOptions contains the optional parameters for the FqdnListLocalRulestackClient.Get method. +type FqdnListLocalRulestackClientGetOptions struct { + // placeholder for future optional parameters +} + +// FqdnListLocalRulestackClientListByLocalRulestacksOptions contains the optional parameters for the FqdnListLocalRulestackClient.NewListByLocalRulestacksPager +// method. +type FqdnListLocalRulestackClientListByLocalRulestacksOptions struct { + // placeholder for future optional parameters +} + +// GlobalRulestackClientBeginCommitOptions contains the optional parameters for the GlobalRulestackClient.BeginCommit method. +type GlobalRulestackClientBeginCommitOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GlobalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the GlobalRulestackClient.BeginCreateOrUpdate +// method. +type GlobalRulestackClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GlobalRulestackClientBeginDeleteOptions contains the optional parameters for the GlobalRulestackClient.BeginDelete method. +type GlobalRulestackClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GlobalRulestackClientGetChangeLogOptions contains the optional parameters for the GlobalRulestackClient.GetChangeLog method. +type GlobalRulestackClientGetChangeLogOptions struct { + // placeholder for future optional parameters +} + +// GlobalRulestackClientGetOptions contains the optional parameters for the GlobalRulestackClient.Get method. +type GlobalRulestackClientGetOptions struct { + // placeholder for future optional parameters +} + +// GlobalRulestackClientListAdvancedSecurityObjectsOptions contains the optional parameters for the GlobalRulestackClient.ListAdvancedSecurityObjects +// method. +type GlobalRulestackClientListAdvancedSecurityObjectsOptions struct { + Skip *string + Top *int32 +} + +// GlobalRulestackClientListAppIDsOptions contains the optional parameters for the GlobalRulestackClient.ListAppIDs method. +type GlobalRulestackClientListAppIDsOptions struct { + AppIDVersion *string + AppPrefix *string + Skip *string + Top *int32 +} + +// GlobalRulestackClientListCountriesOptions contains the optional parameters for the GlobalRulestackClient.ListCountries +// method. +type GlobalRulestackClientListCountriesOptions struct { + Skip *string + Top *int32 +} + +// GlobalRulestackClientListFirewallsOptions contains the optional parameters for the GlobalRulestackClient.ListFirewalls +// method. +type GlobalRulestackClientListFirewallsOptions struct { + // placeholder for future optional parameters +} + +// GlobalRulestackClientListOptions contains the optional parameters for the GlobalRulestackClient.NewListPager method. +type GlobalRulestackClientListOptions struct { + // placeholder for future optional parameters +} + +// GlobalRulestackClientListPredefinedURLCategoriesOptions contains the optional parameters for the GlobalRulestackClient.ListPredefinedURLCategories +// method. +type GlobalRulestackClientListPredefinedURLCategoriesOptions struct { + Skip *string + Top *int32 +} + +// GlobalRulestackClientListSecurityServicesOptions contains the optional parameters for the GlobalRulestackClient.ListSecurityServices +// method. +type GlobalRulestackClientListSecurityServicesOptions struct { + Skip *string + Top *int32 +} + +// GlobalRulestackClientRevertOptions contains the optional parameters for the GlobalRulestackClient.Revert method. +type GlobalRulestackClientRevertOptions struct { + // placeholder for future optional parameters +} + +// GlobalRulestackClientUpdateOptions contains the optional parameters for the GlobalRulestackClient.Update method. +type GlobalRulestackClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// LocalRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalRulesClient.BeginCreateOrUpdate +// method. +type LocalRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LocalRulesClientBeginDeleteOptions contains the optional parameters for the LocalRulesClient.BeginDelete method. +type LocalRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LocalRulesClientGetCountersOptions contains the optional parameters for the LocalRulesClient.GetCounters method. +type LocalRulesClientGetCountersOptions struct { + FirewallName *string +} + +// LocalRulesClientGetOptions contains the optional parameters for the LocalRulesClient.Get method. +type LocalRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// LocalRulesClientListByLocalRulestacksOptions contains the optional parameters for the LocalRulesClient.NewListByLocalRulestacksPager +// method. +type LocalRulesClientListByLocalRulestacksOptions struct { + // placeholder for future optional parameters +} + +// LocalRulesClientRefreshCountersOptions contains the optional parameters for the LocalRulesClient.RefreshCounters method. +type LocalRulesClientRefreshCountersOptions struct { + FirewallName *string +} + +// LocalRulesClientResetCountersOptions contains the optional parameters for the LocalRulesClient.ResetCounters method. +type LocalRulesClientResetCountersOptions struct { + FirewallName *string +} + +// LocalRulestacksClientBeginCommitOptions contains the optional parameters for the LocalRulestacksClient.BeginCommit method. +type LocalRulestacksClientBeginCommitOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LocalRulestacksClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalRulestacksClient.BeginCreateOrUpdate +// method. +type LocalRulestacksClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LocalRulestacksClientBeginDeleteOptions contains the optional parameters for the LocalRulestacksClient.BeginDelete method. +type LocalRulestacksClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LocalRulestacksClientGetChangeLogOptions contains the optional parameters for the LocalRulestacksClient.GetChangeLog method. +type LocalRulestacksClientGetChangeLogOptions struct { + // placeholder for future optional parameters +} + +// LocalRulestacksClientGetOptions contains the optional parameters for the LocalRulestacksClient.Get method. +type LocalRulestacksClientGetOptions struct { + // placeholder for future optional parameters +} + +// LocalRulestacksClientGetSupportInfoOptions contains the optional parameters for the LocalRulestacksClient.GetSupportInfo +// method. +type LocalRulestacksClientGetSupportInfoOptions struct { + // email address on behalf of which this API called + Email *string +} + +// LocalRulestacksClientListAdvancedSecurityObjectsOptions contains the optional parameters for the LocalRulestacksClient.ListAdvancedSecurityObjects +// method. +type LocalRulestacksClientListAdvancedSecurityObjectsOptions struct { + Skip *string + Top *int32 +} + +// LocalRulestacksClientListAppIDsOptions contains the optional parameters for the LocalRulestacksClient.ListAppIDs method. +type LocalRulestacksClientListAppIDsOptions struct { + AppIDVersion *string + AppPrefix *string + Skip *string + Top *int32 +} + +// LocalRulestacksClientListByResourceGroupOptions contains the optional parameters for the LocalRulestacksClient.NewListByResourceGroupPager +// method. +type LocalRulestacksClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// LocalRulestacksClientListBySubscriptionOptions contains the optional parameters for the LocalRulestacksClient.NewListBySubscriptionPager +// method. +type LocalRulestacksClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// LocalRulestacksClientListCountriesOptions contains the optional parameters for the LocalRulestacksClient.ListCountries +// method. +type LocalRulestacksClientListCountriesOptions struct { + Skip *string + Top *int32 +} + +// LocalRulestacksClientListFirewallsOptions contains the optional parameters for the LocalRulestacksClient.ListFirewalls +// method. +type LocalRulestacksClientListFirewallsOptions struct { + // placeholder for future optional parameters +} + +// LocalRulestacksClientListPredefinedURLCategoriesOptions contains the optional parameters for the LocalRulestacksClient.ListPredefinedURLCategories +// method. +type LocalRulestacksClientListPredefinedURLCategoriesOptions struct { + Skip *string + Top *int32 +} + +// LocalRulestacksClientListSecurityServicesOptions contains the optional parameters for the LocalRulestacksClient.ListSecurityServices +// method. +type LocalRulestacksClientListSecurityServicesOptions struct { + Skip *string + Top *int32 +} + +// LocalRulestacksClientRevertOptions contains the optional parameters for the LocalRulestacksClient.Revert method. +type LocalRulestacksClientRevertOptions struct { + // placeholder for future optional parameters +} + +// LocalRulestacksClientUpdateOptions contains the optional parameters for the LocalRulestacksClient.Update method. +type LocalRulestacksClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PostRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the PostRulesClient.BeginCreateOrUpdate +// method. +type PostRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PostRulesClientBeginDeleteOptions contains the optional parameters for the PostRulesClient.BeginDelete method. +type PostRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PostRulesClientGetCountersOptions contains the optional parameters for the PostRulesClient.GetCounters method. +type PostRulesClientGetCountersOptions struct { + FirewallName *string +} + +// PostRulesClientGetOptions contains the optional parameters for the PostRulesClient.Get method. +type PostRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PostRulesClientListOptions contains the optional parameters for the PostRulesClient.NewListPager method. +type PostRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// PostRulesClientRefreshCountersOptions contains the optional parameters for the PostRulesClient.RefreshCounters method. +type PostRulesClientRefreshCountersOptions struct { + FirewallName *string +} + +// PostRulesClientResetCountersOptions contains the optional parameters for the PostRulesClient.ResetCounters method. +type PostRulesClientResetCountersOptions struct { + FirewallName *string +} + +// PreRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the PreRulesClient.BeginCreateOrUpdate method. +type PreRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PreRulesClientBeginDeleteOptions contains the optional parameters for the PreRulesClient.BeginDelete method. +type PreRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PreRulesClientGetCountersOptions contains the optional parameters for the PreRulesClient.GetCounters method. +type PreRulesClientGetCountersOptions struct { + FirewallName *string +} + +// PreRulesClientGetOptions contains the optional parameters for the PreRulesClient.Get method. +type PreRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PreRulesClientListOptions contains the optional parameters for the PreRulesClient.NewListPager method. +type PreRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// PreRulesClientRefreshCountersOptions contains the optional parameters for the PreRulesClient.RefreshCounters method. +type PreRulesClientRefreshCountersOptions struct { + FirewallName *string +} + +// PreRulesClientResetCountersOptions contains the optional parameters for the PreRulesClient.ResetCounters method. +type PreRulesClientResetCountersOptions struct { + FirewallName *string +} + +// PrefixListGlobalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the PrefixListGlobalRulestackClient.BeginCreateOrUpdate +// method. +type PrefixListGlobalRulestackClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrefixListGlobalRulestackClientBeginDeleteOptions contains the optional parameters for the PrefixListGlobalRulestackClient.BeginDelete +// method. +type PrefixListGlobalRulestackClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrefixListGlobalRulestackClientGetOptions contains the optional parameters for the PrefixListGlobalRulestackClient.Get +// method. +type PrefixListGlobalRulestackClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrefixListGlobalRulestackClientListOptions contains the optional parameters for the PrefixListGlobalRulestackClient.NewListPager +// method. +type PrefixListGlobalRulestackClientListOptions struct { + // placeholder for future optional parameters +} + +// PrefixListLocalRulestackClientBeginCreateOrUpdateOptions contains the optional parameters for the PrefixListLocalRulestackClient.BeginCreateOrUpdate +// method. +type PrefixListLocalRulestackClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrefixListLocalRulestackClientBeginDeleteOptions contains the optional parameters for the PrefixListLocalRulestackClient.BeginDelete +// method. +type PrefixListLocalRulestackClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrefixListLocalRulestackClientGetOptions contains the optional parameters for the PrefixListLocalRulestackClient.Get method. +type PrefixListLocalRulestackClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrefixListLocalRulestackClientListByLocalRulestacksOptions contains the optional parameters for the PrefixListLocalRulestackClient.NewListByLocalRulestacksPager +// method. +type PrefixListLocalRulestackClientListByLocalRulestacksOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/postrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/postrules_client.go index 8a5f11ee..1c007d5c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/postrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/postrules_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -31,7 +30,7 @@ type PostRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPostRulesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*PostRulesClient, error) { - cl, err := arm.NewClient(moduleName+".PostRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -44,7 +43,7 @@ func NewPostRulesClient(credential azcore.TokenCredential, options *arm.ClientOp // BeginCreateOrUpdate - Create a PostRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - priority - Post Rule priority // - resource - Resource create parameters. @@ -56,31 +55,41 @@ func (client *PostRulesClient) BeginCreateOrUpdate(ctx context.Context, globalRu if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PostRulesClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PostRulesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PostRulesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PostRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create a PostRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *PostRulesClient) createOrUpdate(ctx context.Context, globalRulestackName string, priority string, resource PostRulesResource, options *PostRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PostRulesClient.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, globalRulestackName, priority, resource, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -99,16 +108,19 @@ func (client *PostRulesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a PostRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - priority - Post Rule priority // - options - PostRulesClientBeginDeleteOptions contains the optional parameters for the PostRulesClient.BeginDelete method. @@ -118,31 +130,41 @@ func (client *PostRulesClient) BeginDelete(ctx context.Context, globalRulestackN if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PostRulesClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PostRulesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PostRulesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PostRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete a PostRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *PostRulesClient) deleteOperation(ctx context.Context, globalRulestackName string, priority string, options *PostRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PostRulesClient.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, globalRulestackName, priority, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -161,7 +183,7 @@ func (client *PostRulesClient) deleteCreateRequest(ctx context.Context, globalRu return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -170,23 +192,30 @@ func (client *PostRulesClient) deleteCreateRequest(ctx context.Context, globalRu // Get - Get a PostRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - priority - Post Rule priority // - options - PostRulesClientGetOptions contains the optional parameters for the PostRulesClient.Get method. func (client *PostRulesClient) Get(ctx context.Context, globalRulestackName string, priority string, options *PostRulesClientGetOptions) (PostRulesClientGetResponse, error) { + var err error + const operationName = "PostRulesClient.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, globalRulestackName, priority, options) if err != nil { return PostRulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PostRulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PostRulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PostRulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -205,7 +234,7 @@ func (client *PostRulesClient) getCreateRequest(ctx context.Context, globalRules return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -223,23 +252,30 @@ func (client *PostRulesClient) getHandleResponse(resp *http.Response) (PostRules // GetCounters - Get counters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - priority - Post Rule priority // - options - PostRulesClientGetCountersOptions contains the optional parameters for the PostRulesClient.GetCounters method. func (client *PostRulesClient) GetCounters(ctx context.Context, globalRulestackName string, priority string, options *PostRulesClientGetCountersOptions) (PostRulesClientGetCountersResponse, error) { + var err error + const operationName = "PostRulesClient.GetCounters" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCountersCreateRequest(ctx, globalRulestackName, priority, options) if err != nil { return PostRulesClientGetCountersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PostRulesClientGetCountersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PostRulesClientGetCountersResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PostRulesClientGetCountersResponse{}, err } - return client.getCountersHandleResponse(resp) + resp, err := client.getCountersHandleResponse(httpResp) + return resp, err } // getCountersCreateRequest creates the GetCounters request. @@ -258,7 +294,7 @@ func (client *PostRulesClient) getCountersCreateRequest(ctx context.Context, glo return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.FirewallName != nil { reqQP.Set("firewallName", *options.FirewallName) } @@ -278,7 +314,7 @@ func (client *PostRulesClient) getCountersHandleResponse(resp *http.Response) (P // NewListPager - List PostRulesResource resources by Tenant // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - PostRulesClientListOptions contains the optional parameters for the PostRulesClient.NewListPager method. func (client *PostRulesClient) NewListPager(globalRulestackName string, options *PostRulesClientListOptions) *runtime.Pager[PostRulesClientListResponse] { @@ -287,25 +323,20 @@ func (client *PostRulesClient) NewListPager(globalRulestackName string, options return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PostRulesClientListResponse) (PostRulesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, globalRulestackName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PostRulesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PostRulesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, globalRulestackName, options) + }, nil) if err != nil { return PostRulesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PostRulesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -321,7 +352,7 @@ func (client *PostRulesClient) listCreateRequest(ctx context.Context, globalRule return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -339,22 +370,28 @@ func (client *PostRulesClient) listHandleResponse(resp *http.Response) (PostRule // RefreshCounters - Refresh counters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - priority - Post Rule priority // - options - PostRulesClientRefreshCountersOptions contains the optional parameters for the PostRulesClient.RefreshCounters // method. func (client *PostRulesClient) RefreshCounters(ctx context.Context, globalRulestackName string, priority string, options *PostRulesClientRefreshCountersOptions) (PostRulesClientRefreshCountersResponse, error) { + var err error + const operationName = "PostRulesClient.RefreshCounters" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.refreshCountersCreateRequest(ctx, globalRulestackName, priority, options) if err != nil { return PostRulesClientRefreshCountersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PostRulesClientRefreshCountersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return PostRulesClientRefreshCountersResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PostRulesClientRefreshCountersResponse{}, err } return PostRulesClientRefreshCountersResponse{}, nil } @@ -375,7 +412,7 @@ func (client *PostRulesClient) refreshCountersCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.FirewallName != nil { reqQP.Set("firewallName", *options.FirewallName) } @@ -387,23 +424,30 @@ func (client *PostRulesClient) refreshCountersCreateRequest(ctx context.Context, // ResetCounters - Reset counters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - priority - Post Rule priority // - options - PostRulesClientResetCountersOptions contains the optional parameters for the PostRulesClient.ResetCounters method. func (client *PostRulesClient) ResetCounters(ctx context.Context, globalRulestackName string, priority string, options *PostRulesClientResetCountersOptions) (PostRulesClientResetCountersResponse, error) { + var err error + const operationName = "PostRulesClient.ResetCounters" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resetCountersCreateRequest(ctx, globalRulestackName, priority, options) if err != nil { return PostRulesClientResetCountersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PostRulesClientResetCountersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PostRulesClientResetCountersResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PostRulesClientResetCountersResponse{}, err } - return client.resetCountersHandleResponse(resp) + resp, err := client.resetCountersHandleResponse(httpResp) + return resp, err } // resetCountersCreateRequest creates the ResetCounters request. @@ -422,7 +466,7 @@ func (client *PostRulesClient) resetCountersCreateRequest(ctx context.Context, g return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.FirewallName != nil { reqQP.Set("firewallName", *options.FirewallName) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistglobalrulestack_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistglobalrulestack_client.go index dd308d09..ab7a7b8a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistglobalrulestack_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistglobalrulestack_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -31,7 +30,7 @@ type PrefixListGlobalRulestackClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPrefixListGlobalRulestackClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*PrefixListGlobalRulestackClient, error) { - cl, err := arm.NewClient(moduleName+".PrefixListGlobalRulestackClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -44,7 +43,7 @@ func NewPrefixListGlobalRulestackClient(credential azcore.TokenCredential, optio // BeginCreateOrUpdate - Create a PrefixListGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - name - Local Rule priority // - resource - Resource create parameters. @@ -56,31 +55,41 @@ func (client *PrefixListGlobalRulestackClient) BeginCreateOrUpdate(ctx context.C if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrefixListGlobalRulestackClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrefixListGlobalRulestackClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrefixListGlobalRulestackClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrefixListGlobalRulestackClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create a PrefixListGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *PrefixListGlobalRulestackClient) createOrUpdate(ctx context.Context, globalRulestackName string, name string, resource PrefixListGlobalRulestackResource, options *PrefixListGlobalRulestackClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PrefixListGlobalRulestackClient.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, globalRulestackName, name, resource, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -99,16 +108,19 @@ func (client *PrefixListGlobalRulestackClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a PrefixListGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - name - Local Rule priority // - options - PrefixListGlobalRulestackClientBeginDeleteOptions contains the optional parameters for the PrefixListGlobalRulestackClient.BeginDelete @@ -119,31 +131,41 @@ func (client *PrefixListGlobalRulestackClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrefixListGlobalRulestackClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrefixListGlobalRulestackClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrefixListGlobalRulestackClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrefixListGlobalRulestackClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete a PrefixListGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *PrefixListGlobalRulestackClient) deleteOperation(ctx context.Context, globalRulestackName string, name string, options *PrefixListGlobalRulestackClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PrefixListGlobalRulestackClient.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, globalRulestackName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -162,7 +184,7 @@ func (client *PrefixListGlobalRulestackClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -171,24 +193,31 @@ func (client *PrefixListGlobalRulestackClient) deleteCreateRequest(ctx context.C // Get - Get a PrefixListGlobalRulestackResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - name - Local Rule priority // - options - PrefixListGlobalRulestackClientGetOptions contains the optional parameters for the PrefixListGlobalRulestackClient.Get // method. func (client *PrefixListGlobalRulestackClient) Get(ctx context.Context, globalRulestackName string, name string, options *PrefixListGlobalRulestackClientGetOptions) (PrefixListGlobalRulestackClientGetResponse, error) { + var err error + const operationName = "PrefixListGlobalRulestackClient.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, globalRulestackName, name, options) if err != nil { return PrefixListGlobalRulestackClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrefixListGlobalRulestackClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrefixListGlobalRulestackClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrefixListGlobalRulestackClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -207,7 +236,7 @@ func (client *PrefixListGlobalRulestackClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -224,7 +253,7 @@ func (client *PrefixListGlobalRulestackClient) getHandleResponse(resp *http.Resp // NewListPager - List PrefixListGlobalRulestackResource resources by Tenant // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - PrefixListGlobalRulestackClientListOptions contains the optional parameters for the PrefixListGlobalRulestackClient.NewListPager // method. @@ -234,25 +263,20 @@ func (client *PrefixListGlobalRulestackClient) NewListPager(globalRulestackName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PrefixListGlobalRulestackClientListResponse) (PrefixListGlobalRulestackClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, globalRulestackName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrefixListGlobalRulestackClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrefixListGlobalRulestackClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, globalRulestackName, options) + }, nil) if err != nil { return PrefixListGlobalRulestackClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrefixListGlobalRulestackClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -268,7 +292,7 @@ func (client *PrefixListGlobalRulestackClient) listCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-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/paloaltonetworksngfw/armpanngfw/prefixlistlocalrulestack_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistlocalrulestack_client.go index dc2c1387..b393a47b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistlocalrulestack_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistlocalrulestack_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -33,7 +32,7 @@ type PrefixListLocalRulestackClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPrefixListLocalRulestackClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrefixListLocalRulestackClient, error) { - cl, err := arm.NewClient(moduleName+".PrefixListLocalRulestackClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewPrefixListLocalRulestackClient(subscriptionID string, credential azcore. // BeginCreateOrUpdate - Create a PrefixListResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - name - Local Rule priority @@ -60,31 +59,41 @@ func (client *PrefixListLocalRulestackClient) BeginCreateOrUpdate(ctx context.Co if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrefixListLocalRulestackClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrefixListLocalRulestackClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrefixListLocalRulestackClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrefixListLocalRulestackClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create a PrefixListResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *PrefixListLocalRulestackClient) createOrUpdate(ctx context.Context, resourceGroupName string, localRulestackName string, name string, resource PrefixListResource, options *PrefixListLocalRulestackClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PrefixListLocalRulestackClient.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, localRulestackName, name, resource, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -111,16 +120,19 @@ func (client *PrefixListLocalRulestackClient) createOrUpdateCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a PrefixListResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - name - Local Rule priority @@ -132,31 +144,41 @@ func (client *PrefixListLocalRulestackClient) BeginDelete(ctx context.Context, r if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrefixListLocalRulestackClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrefixListLocalRulestackClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrefixListLocalRulestackClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrefixListLocalRulestackClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete a PrefixListResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *PrefixListLocalRulestackClient) deleteOperation(ctx context.Context, resourceGroupName string, localRulestackName string, name string, options *PrefixListLocalRulestackClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PrefixListLocalRulestackClient.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, localRulestackName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -183,7 +205,7 @@ func (client *PrefixListLocalRulestackClient) deleteCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -192,25 +214,32 @@ func (client *PrefixListLocalRulestackClient) deleteCreateRequest(ctx context.Co // Get - Get a PrefixListResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - name - Local Rule priority // - options - PrefixListLocalRulestackClientGetOptions contains the optional parameters for the PrefixListLocalRulestackClient.Get // method. func (client *PrefixListLocalRulestackClient) Get(ctx context.Context, resourceGroupName string, localRulestackName string, name string, options *PrefixListLocalRulestackClientGetOptions) (PrefixListLocalRulestackClientGetResponse, error) { + var err error + const operationName = "PrefixListLocalRulestackClient.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, localRulestackName, name, options) if err != nil { return PrefixListLocalRulestackClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrefixListLocalRulestackClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrefixListLocalRulestackClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrefixListLocalRulestackClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -237,7 +266,7 @@ func (client *PrefixListLocalRulestackClient) getCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,7 +283,7 @@ func (client *PrefixListLocalRulestackClient) getHandleResponse(resp *http.Respo // NewListByLocalRulestacksPager - List PrefixListResource resources by LocalRulestacks // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - localRulestackName - LocalRulestack resource name // - options - PrefixListLocalRulestackClientListByLocalRulestacksOptions contains the optional parameters for the PrefixListLocalRulestackClient.NewListByLocalRulestacksPager @@ -265,25 +294,20 @@ func (client *PrefixListLocalRulestackClient) NewListByLocalRulestacksPager(reso return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PrefixListLocalRulestackClientListByLocalRulestacksResponse) (PrefixListLocalRulestackClientListByLocalRulestacksResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByLocalRulestacksCreateRequest(ctx, resourceGroupName, localRulestackName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrefixListLocalRulestackClientListByLocalRulestacksResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrefixListLocalRulestackClient.NewListByLocalRulestacksPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByLocalRulestacksCreateRequest(ctx, resourceGroupName, localRulestackName, options) + }, nil) if err != nil { return PrefixListLocalRulestackClientListByLocalRulestacksResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrefixListLocalRulestackClientListByLocalRulestacksResponse{}, runtime.NewResponseError(resp) - } return client.listByLocalRulestacksHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -307,7 +331,7 @@ func (client *PrefixListLocalRulestackClient) listByLocalRulestacksCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-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/paloaltonetworksngfw/armpanngfw/prerules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prerules_client.go index df91f4f6..5a673bb0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prerules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prerules_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -31,7 +30,7 @@ type PreRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPreRulesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*PreRulesClient, error) { - cl, err := arm.NewClient(moduleName+".PreRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -44,7 +43,7 @@ func NewPreRulesClient(credential azcore.TokenCredential, options *arm.ClientOpt // BeginCreateOrUpdate - Create a PreRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - priority - Pre Rule priority // - resource - Resource create parameters. @@ -56,31 +55,41 @@ func (client *PreRulesClient) BeginCreateOrUpdate(ctx context.Context, globalRul if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PreRulesClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PreRulesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PreRulesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PreRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create a PreRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *PreRulesClient) createOrUpdate(ctx context.Context, globalRulestackName string, priority string, resource PreRulesResource, options *PreRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PreRulesClient.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, globalRulestackName, priority, resource, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -99,16 +108,19 @@ func (client *PreRulesClient) createOrUpdateCreateRequest(ctx context.Context, g return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a PreRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - priority - Pre Rule priority // - options - PreRulesClientBeginDeleteOptions contains the optional parameters for the PreRulesClient.BeginDelete method. @@ -118,31 +130,41 @@ func (client *PreRulesClient) BeginDelete(ctx context.Context, globalRulestackNa if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PreRulesClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PreRulesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PreRulesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PreRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Delete a PreRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 func (client *PreRulesClient) deleteOperation(ctx context.Context, globalRulestackName string, priority string, options *PreRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PreRulesClient.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, globalRulestackName, priority, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -161,7 +183,7 @@ func (client *PreRulesClient) deleteCreateRequest(ctx context.Context, globalRul return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -170,23 +192,30 @@ func (client *PreRulesClient) deleteCreateRequest(ctx context.Context, globalRul // Get - Get a PreRulesResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - priority - Pre Rule priority // - options - PreRulesClientGetOptions contains the optional parameters for the PreRulesClient.Get method. func (client *PreRulesClient) Get(ctx context.Context, globalRulestackName string, priority string, options *PreRulesClientGetOptions) (PreRulesClientGetResponse, error) { + var err error + const operationName = "PreRulesClient.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, globalRulestackName, priority, options) if err != nil { return PreRulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PreRulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PreRulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PreRulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -205,7 +234,7 @@ func (client *PreRulesClient) getCreateRequest(ctx context.Context, globalRulest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -223,23 +252,30 @@ func (client *PreRulesClient) getHandleResponse(resp *http.Response) (PreRulesCl // GetCounters - Get counters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - priority - Pre Rule priority // - options - PreRulesClientGetCountersOptions contains the optional parameters for the PreRulesClient.GetCounters method. func (client *PreRulesClient) GetCounters(ctx context.Context, globalRulestackName string, priority string, options *PreRulesClientGetCountersOptions) (PreRulesClientGetCountersResponse, error) { + var err error + const operationName = "PreRulesClient.GetCounters" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCountersCreateRequest(ctx, globalRulestackName, priority, options) if err != nil { return PreRulesClientGetCountersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PreRulesClientGetCountersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PreRulesClientGetCountersResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PreRulesClientGetCountersResponse{}, err } - return client.getCountersHandleResponse(resp) + resp, err := client.getCountersHandleResponse(httpResp) + return resp, err } // getCountersCreateRequest creates the GetCounters request. @@ -258,7 +294,7 @@ func (client *PreRulesClient) getCountersCreateRequest(ctx context.Context, glob return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.FirewallName != nil { reqQP.Set("firewallName", *options.FirewallName) } @@ -278,7 +314,7 @@ func (client *PreRulesClient) getCountersHandleResponse(resp *http.Response) (Pr // NewListPager - List PreRulesResource resources by Tenant // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - options - PreRulesClientListOptions contains the optional parameters for the PreRulesClient.NewListPager method. func (client *PreRulesClient) NewListPager(globalRulestackName string, options *PreRulesClientListOptions) *runtime.Pager[PreRulesClientListResponse] { @@ -287,25 +323,20 @@ func (client *PreRulesClient) NewListPager(globalRulestackName string, options * return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PreRulesClientListResponse) (PreRulesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, globalRulestackName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PreRulesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PreRulesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, globalRulestackName, options) + }, nil) if err != nil { return PreRulesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PreRulesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -321,7 +352,7 @@ func (client *PreRulesClient) listCreateRequest(ctx context.Context, globalRules return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -339,22 +370,28 @@ func (client *PreRulesClient) listHandleResponse(resp *http.Response) (PreRulesC // RefreshCounters - Refresh counters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - priority - Pre Rule priority // - options - PreRulesClientRefreshCountersOptions contains the optional parameters for the PreRulesClient.RefreshCounters // method. func (client *PreRulesClient) RefreshCounters(ctx context.Context, globalRulestackName string, priority string, options *PreRulesClientRefreshCountersOptions) (PreRulesClientRefreshCountersResponse, error) { + var err error + const operationName = "PreRulesClient.RefreshCounters" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.refreshCountersCreateRequest(ctx, globalRulestackName, priority, options) if err != nil { return PreRulesClientRefreshCountersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PreRulesClientRefreshCountersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return PreRulesClientRefreshCountersResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PreRulesClientRefreshCountersResponse{}, err } return PreRulesClientRefreshCountersResponse{}, nil } @@ -375,7 +412,7 @@ func (client *PreRulesClient) refreshCountersCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.FirewallName != nil { reqQP.Set("firewallName", *options.FirewallName) } @@ -387,23 +424,30 @@ func (client *PreRulesClient) refreshCountersCreateRequest(ctx context.Context, // ResetCounters - Reset counters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-08-29 +// Generated from API version 2023-09-01 // - globalRulestackName - GlobalRulestack resource name // - priority - Pre Rule priority // - options - PreRulesClientResetCountersOptions contains the optional parameters for the PreRulesClient.ResetCounters method. func (client *PreRulesClient) ResetCounters(ctx context.Context, globalRulestackName string, priority string, options *PreRulesClientResetCountersOptions) (PreRulesClientResetCountersResponse, error) { + var err error + const operationName = "PreRulesClient.ResetCounters" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resetCountersCreateRequest(ctx, globalRulestackName, priority, options) if err != nil { return PreRulesClientResetCountersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PreRulesClientResetCountersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PreRulesClientResetCountersResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PreRulesClientResetCountersResponse{}, err } - return client.resetCountersHandleResponse(resp) + resp, err := client.resetCountersHandleResponse(httpResp) + return resp, err } // resetCountersCreateRequest creates the ResetCounters request. @@ -422,7 +466,7 @@ func (client *PreRulesClient) resetCountersCreateRequest(ctx context.Context, gl return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-08-29") + reqQP.Set("api-version", "2023-09-01") if options != nil && options.FirewallName != nil { reqQP.Set("firewallName", *options.FirewallName) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/response_types.go index 45565bcd..9eae4b83 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/response_types.go @@ -3,14 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw // CertificateObjectGlobalRulestackClientCreateOrUpdateResponse contains the response from method CertificateObjectGlobalRulestackClient.BeginCreateOrUpdate. type CertificateObjectGlobalRulestackClientCreateOrUpdateResponse struct { + // GlobalRulestack Certificate Object CertificateObjectGlobalRulestackResource } @@ -21,16 +21,19 @@ type CertificateObjectGlobalRulestackClientDeleteResponse struct { // CertificateObjectGlobalRulestackClientGetResponse contains the response from method CertificateObjectGlobalRulestackClient.Get. type CertificateObjectGlobalRulestackClientGetResponse struct { + // GlobalRulestack Certificate Object CertificateObjectGlobalRulestackResource } // CertificateObjectGlobalRulestackClientListResponse contains the response from method CertificateObjectGlobalRulestackClient.NewListPager. type CertificateObjectGlobalRulestackClientListResponse struct { + // The response of a CertificateObjectGlobalRulestackResource list operation. CertificateObjectGlobalRulestackResourceListResult } // CertificateObjectLocalRulestackClientCreateOrUpdateResponse contains the response from method CertificateObjectLocalRulestackClient.BeginCreateOrUpdate. type CertificateObjectLocalRulestackClientCreateOrUpdateResponse struct { + // LocalRulestack Certificate Object CertificateObjectLocalRulestackResource } @@ -41,26 +44,31 @@ type CertificateObjectLocalRulestackClientDeleteResponse struct { // CertificateObjectLocalRulestackClientGetResponse contains the response from method CertificateObjectLocalRulestackClient.Get. type CertificateObjectLocalRulestackClientGetResponse struct { + // LocalRulestack Certificate Object CertificateObjectLocalRulestackResource } // CertificateObjectLocalRulestackClientListByLocalRulestacksResponse contains the response from method CertificateObjectLocalRulestackClient.NewListByLocalRulestacksPager. type CertificateObjectLocalRulestackClientListByLocalRulestacksResponse struct { + // The response of a CertificateObjectLocalRulestackResource list operation. CertificateObjectLocalRulestackResourceListResult } // FirewallStatusClientGetResponse contains the response from method FirewallStatusClient.Get. type FirewallStatusClientGetResponse struct { + // Firewall Status FirewallStatusResource } // FirewallStatusClientListByFirewallsResponse contains the response from method FirewallStatusClient.NewListByFirewallsPager. type FirewallStatusClientListByFirewallsResponse struct { + // The response of a FirewallStatusResource list operation. FirewallStatusResourceListResult } // FirewallsClientCreateOrUpdateResponse contains the response from method FirewallsClient.BeginCreateOrUpdate. type FirewallsClientCreateOrUpdateResponse struct { + // PaloAltoNetworks Firewall FirewallResource } @@ -71,31 +79,37 @@ type FirewallsClientDeleteResponse struct { // FirewallsClientGetGlobalRulestackResponse contains the response from method FirewallsClient.GetGlobalRulestack. type FirewallsClientGetGlobalRulestackResponse struct { + // PAN Rulestack Describe Object GlobalRulestackInfo } // FirewallsClientGetLogProfileResponse contains the response from method FirewallsClient.GetLogProfile. type FirewallsClientGetLogProfileResponse struct { + // Log Settings for Firewall LogSettings } // FirewallsClientGetResponse contains the response from method FirewallsClient.Get. type FirewallsClientGetResponse struct { + // PaloAltoNetworks Firewall FirewallResource } // FirewallsClientGetSupportInfoResponse contains the response from method FirewallsClient.GetSupportInfo. type FirewallsClientGetSupportInfoResponse struct { + // Support information for the resource SupportInfo } // FirewallsClientListByResourceGroupResponse contains the response from method FirewallsClient.NewListByResourceGroupPager. type FirewallsClientListByResourceGroupResponse struct { + // The response of a FirewallResource list operation. FirewallResourceListResult } // FirewallsClientListBySubscriptionResponse contains the response from method FirewallsClient.NewListBySubscriptionPager. type FirewallsClientListBySubscriptionResponse struct { + // The response of a FirewallResource list operation. FirewallResourceListResult } @@ -106,11 +120,13 @@ type FirewallsClientSaveLogProfileResponse struct { // FirewallsClientUpdateResponse contains the response from method FirewallsClient.Update. type FirewallsClientUpdateResponse struct { + // PaloAltoNetworks Firewall FirewallResource } // FqdnListGlobalRulestackClientCreateOrUpdateResponse contains the response from method FqdnListGlobalRulestackClient.BeginCreateOrUpdate. type FqdnListGlobalRulestackClientCreateOrUpdateResponse struct { + // GlobalRulestack fqdnList FqdnListGlobalRulestackResource } @@ -121,16 +137,19 @@ type FqdnListGlobalRulestackClientDeleteResponse struct { // FqdnListGlobalRulestackClientGetResponse contains the response from method FqdnListGlobalRulestackClient.Get. type FqdnListGlobalRulestackClientGetResponse struct { + // GlobalRulestack fqdnList FqdnListGlobalRulestackResource } // FqdnListGlobalRulestackClientListResponse contains the response from method FqdnListGlobalRulestackClient.NewListPager. type FqdnListGlobalRulestackClientListResponse struct { + // The response of a FqdnListGlobalRulestackResource list operation. FqdnListGlobalRulestackResourceListResult } // FqdnListLocalRulestackClientCreateOrUpdateResponse contains the response from method FqdnListLocalRulestackClient.BeginCreateOrUpdate. type FqdnListLocalRulestackClientCreateOrUpdateResponse struct { + // LocalRulestack fqdnList FqdnListLocalRulestackResource } @@ -141,11 +160,13 @@ type FqdnListLocalRulestackClientDeleteResponse struct { // FqdnListLocalRulestackClientGetResponse contains the response from method FqdnListLocalRulestackClient.Get. type FqdnListLocalRulestackClientGetResponse struct { + // LocalRulestack fqdnList FqdnListLocalRulestackResource } // FqdnListLocalRulestackClientListByLocalRulestacksResponse contains the response from method FqdnListLocalRulestackClient.NewListByLocalRulestacksPager. type FqdnListLocalRulestackClientListByLocalRulestacksResponse struct { + // The response of a FqdnListLocalRulestackResource list operation. FqdnListLocalRulestackResourceListResult } @@ -156,6 +177,7 @@ type GlobalRulestackClientCommitResponse struct { // GlobalRulestackClientCreateOrUpdateResponse contains the response from method GlobalRulestackClient.BeginCreateOrUpdate. type GlobalRulestackClientCreateOrUpdateResponse struct { + // PaloAltoNetworks GlobalRulestack GlobalRulestackResource } @@ -166,16 +188,19 @@ type GlobalRulestackClientDeleteResponse struct { // GlobalRulestackClientGetChangeLogResponse contains the response from method GlobalRulestackClient.GetChangeLog. type GlobalRulestackClientGetChangeLogResponse struct { + // Changelog list Changelog } // GlobalRulestackClientGetResponse contains the response from method GlobalRulestackClient.Get. type GlobalRulestackClientGetResponse struct { + // PaloAltoNetworks GlobalRulestack GlobalRulestackResource } // GlobalRulestackClientListAdvancedSecurityObjectsResponse contains the response from method GlobalRulestackClient.ListAdvancedSecurityObjects. type GlobalRulestackClientListAdvancedSecurityObjectsResponse struct { + // advanced security object AdvSecurityObjectListResponse } @@ -186,26 +211,31 @@ type GlobalRulestackClientListAppIDsResponse struct { // GlobalRulestackClientListCountriesResponse contains the response from method GlobalRulestackClient.ListCountries. type GlobalRulestackClientListCountriesResponse struct { + // Countries Response Object CountriesResponse } // GlobalRulestackClientListFirewallsResponse contains the response from method GlobalRulestackClient.ListFirewalls. type GlobalRulestackClientListFirewallsResponse struct { + // List firewalls response ListFirewallsResponse } // GlobalRulestackClientListPredefinedURLCategoriesResponse contains the response from method GlobalRulestackClient.ListPredefinedURLCategories. type GlobalRulestackClientListPredefinedURLCategoriesResponse struct { + // predefined url categories response PredefinedURLCategoriesResponse } // GlobalRulestackClientListResponse contains the response from method GlobalRulestackClient.NewListPager. type GlobalRulestackClientListResponse struct { + // The response of a GlobalRulestackResource list operation. GlobalRulestackResourceListResult } // GlobalRulestackClientListSecurityServicesResponse contains the response from method GlobalRulestackClient.ListSecurityServices. type GlobalRulestackClientListSecurityServicesResponse struct { + // Security services list response SecurityServicesResponse } @@ -216,11 +246,13 @@ type GlobalRulestackClientRevertResponse struct { // GlobalRulestackClientUpdateResponse contains the response from method GlobalRulestackClient.Update. type GlobalRulestackClientUpdateResponse struct { + // PaloAltoNetworks GlobalRulestack GlobalRulestackResource } // LocalRulesClientCreateOrUpdateResponse contains the response from method LocalRulesClient.BeginCreateOrUpdate. type LocalRulesClientCreateOrUpdateResponse struct { + // LocalRulestack rule list LocalRulesResource } @@ -231,16 +263,19 @@ type LocalRulesClientDeleteResponse struct { // LocalRulesClientGetCountersResponse contains the response from method LocalRulesClient.GetCounters. type LocalRulesClientGetCountersResponse struct { + // Rule counter RuleCounter } // LocalRulesClientGetResponse contains the response from method LocalRulesClient.Get. type LocalRulesClientGetResponse struct { + // LocalRulestack rule list LocalRulesResource } // LocalRulesClientListByLocalRulestacksResponse contains the response from method LocalRulesClient.NewListByLocalRulestacksPager. type LocalRulesClientListByLocalRulestacksResponse struct { + // The response of a LocalRulesResource list operation. LocalRulesResourceListResult } @@ -251,6 +286,7 @@ type LocalRulesClientRefreshCountersResponse struct { // LocalRulesClientResetCountersResponse contains the response from method LocalRulesClient.ResetCounters. type LocalRulesClientResetCountersResponse struct { + // Rule counter reset RuleCounterReset } @@ -261,6 +297,7 @@ type LocalRulestacksClientCommitResponse struct { // LocalRulestacksClientCreateOrUpdateResponse contains the response from method LocalRulestacksClient.BeginCreateOrUpdate. type LocalRulestacksClientCreateOrUpdateResponse struct { + // PaloAltoNetworks LocalRulestack LocalRulestackResource } @@ -271,21 +308,25 @@ type LocalRulestacksClientDeleteResponse struct { // LocalRulestacksClientGetChangeLogResponse contains the response from method LocalRulestacksClient.GetChangeLog. type LocalRulestacksClientGetChangeLogResponse struct { + // Changelog list Changelog } // LocalRulestacksClientGetResponse contains the response from method LocalRulestacksClient.Get. type LocalRulestacksClientGetResponse struct { + // PaloAltoNetworks LocalRulestack LocalRulestackResource } // LocalRulestacksClientGetSupportInfoResponse contains the response from method LocalRulestacksClient.GetSupportInfo. type LocalRulestacksClientGetSupportInfoResponse struct { + // Support information for the resource SupportInfo } // LocalRulestacksClientListAdvancedSecurityObjectsResponse contains the response from method LocalRulestacksClient.ListAdvancedSecurityObjects. type LocalRulestacksClientListAdvancedSecurityObjectsResponse struct { + // advanced security object AdvSecurityObjectListResponse } @@ -296,31 +337,37 @@ type LocalRulestacksClientListAppIDsResponse struct { // LocalRulestacksClientListByResourceGroupResponse contains the response from method LocalRulestacksClient.NewListByResourceGroupPager. type LocalRulestacksClientListByResourceGroupResponse struct { + // The response of a LocalRulestackResource list operation. LocalRulestackResourceListResult } // LocalRulestacksClientListBySubscriptionResponse contains the response from method LocalRulestacksClient.NewListBySubscriptionPager. type LocalRulestacksClientListBySubscriptionResponse struct { + // The response of a LocalRulestackResource list operation. LocalRulestackResourceListResult } // LocalRulestacksClientListCountriesResponse contains the response from method LocalRulestacksClient.ListCountries. type LocalRulestacksClientListCountriesResponse struct { + // Countries Response Object CountriesResponse } // LocalRulestacksClientListFirewallsResponse contains the response from method LocalRulestacksClient.ListFirewalls. type LocalRulestacksClientListFirewallsResponse struct { + // List firewalls response ListFirewallsResponse } // LocalRulestacksClientListPredefinedURLCategoriesResponse contains the response from method LocalRulestacksClient.ListPredefinedURLCategories. type LocalRulestacksClientListPredefinedURLCategoriesResponse struct { + // predefined url categories response PredefinedURLCategoriesResponse } // LocalRulestacksClientListSecurityServicesResponse contains the response from method LocalRulestacksClient.ListSecurityServices. type LocalRulestacksClientListSecurityServicesResponse struct { + // Security services list response SecurityServicesResponse } @@ -331,16 +378,19 @@ type LocalRulestacksClientRevertResponse struct { // LocalRulestacksClientUpdateResponse contains the response from method LocalRulestacksClient.Update. type LocalRulestacksClientUpdateResponse struct { + // PaloAltoNetworks LocalRulestack LocalRulestackResource } // 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. OperationListResult } // PostRulesClientCreateOrUpdateResponse contains the response from method PostRulesClient.BeginCreateOrUpdate. type PostRulesClientCreateOrUpdateResponse struct { + // PostRulestack rule list PostRulesResource } @@ -351,16 +401,19 @@ type PostRulesClientDeleteResponse struct { // PostRulesClientGetCountersResponse contains the response from method PostRulesClient.GetCounters. type PostRulesClientGetCountersResponse struct { + // Rule counter RuleCounter } // PostRulesClientGetResponse contains the response from method PostRulesClient.Get. type PostRulesClientGetResponse struct { + // PostRulestack rule list PostRulesResource } // PostRulesClientListResponse contains the response from method PostRulesClient.NewListPager. type PostRulesClientListResponse struct { + // The response of a PostRulesResource list operation. PostRulesResourceListResult } @@ -371,11 +424,13 @@ type PostRulesClientRefreshCountersResponse struct { // PostRulesClientResetCountersResponse contains the response from method PostRulesClient.ResetCounters. type PostRulesClientResetCountersResponse struct { + // Rule counter reset RuleCounterReset } // PreRulesClientCreateOrUpdateResponse contains the response from method PreRulesClient.BeginCreateOrUpdate. type PreRulesClientCreateOrUpdateResponse struct { + // PreRulestack rule list PreRulesResource } @@ -386,16 +441,19 @@ type PreRulesClientDeleteResponse struct { // PreRulesClientGetCountersResponse contains the response from method PreRulesClient.GetCounters. type PreRulesClientGetCountersResponse struct { + // Rule counter RuleCounter } // PreRulesClientGetResponse contains the response from method PreRulesClient.Get. type PreRulesClientGetResponse struct { + // PreRulestack rule list PreRulesResource } // PreRulesClientListResponse contains the response from method PreRulesClient.NewListPager. type PreRulesClientListResponse struct { + // The response of a PreRulesResource list operation. PreRulesResourceListResult } @@ -406,11 +464,13 @@ type PreRulesClientRefreshCountersResponse struct { // PreRulesClientResetCountersResponse contains the response from method PreRulesClient.ResetCounters. type PreRulesClientResetCountersResponse struct { + // Rule counter reset RuleCounterReset } // PrefixListGlobalRulestackClientCreateOrUpdateResponse contains the response from method PrefixListGlobalRulestackClient.BeginCreateOrUpdate. type PrefixListGlobalRulestackClientCreateOrUpdateResponse struct { + // GlobalRulestack prefixList PrefixListGlobalRulestackResource } @@ -421,16 +481,19 @@ type PrefixListGlobalRulestackClientDeleteResponse struct { // PrefixListGlobalRulestackClientGetResponse contains the response from method PrefixListGlobalRulestackClient.Get. type PrefixListGlobalRulestackClientGetResponse struct { + // GlobalRulestack prefixList PrefixListGlobalRulestackResource } // PrefixListGlobalRulestackClientListResponse contains the response from method PrefixListGlobalRulestackClient.NewListPager. type PrefixListGlobalRulestackClientListResponse struct { + // The response of a PrefixListGlobalRulestackResource list operation. PrefixListGlobalRulestackResourceListResult } // PrefixListLocalRulestackClientCreateOrUpdateResponse contains the response from method PrefixListLocalRulestackClient.BeginCreateOrUpdate. type PrefixListLocalRulestackClientCreateOrUpdateResponse struct { + // LocalRulestack prefixList PrefixListResource } @@ -441,10 +504,12 @@ type PrefixListLocalRulestackClientDeleteResponse struct { // PrefixListLocalRulestackClientGetResponse contains the response from method PrefixListLocalRulestackClient.Get. type PrefixListLocalRulestackClientGetResponse struct { + // LocalRulestack prefixList PrefixListResource } // PrefixListLocalRulestackClientListByLocalRulestacksResponse contains the response from method PrefixListLocalRulestackClient.NewListByLocalRulestacksPager. type PrefixListLocalRulestackClientListByLocalRulestacksResponse struct { + // The response of a PrefixListResource list operation. PrefixListResourceListResult } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/time_rfc3339.go index b37eb223..9083ab38 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armpanngfw @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/CHANGELOG.md index 42b52e73..cd2202f6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/CHANGELOG.md @@ -1,998 +1,27 @@ # Release History -## 2.0.0-beta.3 (2023-03-31) +## 2.0.0-beta.4 (2024-06-14) ### Features Added -- New struct `ClientFactory` which is a client factory used to create any client in this module - +- Support for test fakes and OpenTelemetry trace spans. -## 2.0.0-beta.2 (2022-09-19) +## 1.2.0 (2023-11-24) ### Features Added -- New const `FileImportStateFatalError` -- New const `AutomationRuleBooleanConditionSupportedOperatorOr` -- New const `DeviceImportanceHigh` -- New const `FileImportStateWaitingForUpload` -- New const `ConditionTypeBoolean` -- New const `FileImportStateIngestedWithErrors` -- New const `AutomationRuleBooleanConditionSupportedOperatorAnd` -- New const `ConditionTypePropertyArray` -- New const `TriggersOnAlerts` -- New const `DeviceImportanceNormal` -- New const `FileImportStateUnspecified` -- New const `FileImportContentTypeUnspecified` -- New const `IngestionModeIngestAnyValidRecords` -- New const `AutomationRulePropertyArrayConditionSupportedArrayTypeCustomDetails` -- New const `AutomationRulePropertyArrayConditionSupportedArrayTypeCustomDetailValues` -- New const `FileFormatUnspecified` -- New const `DeleteStatusNotDeleted` -- New const `AutomationRulePropertyConditionSupportedPropertyAlertAnalyticRuleIDs` -- New const `FileFormatCSV` -- New const `AutomationRulePropertyConditionSupportedPropertyIncidentCustomDetailsKey` -- New const `FileImportStateInvalid` -- New const `DeleteStatusUnspecified` -- New const `FileImportContentTypeStixIndicator` -- New const `DeviceImportanceUnknown` -- New const `DeviceImportanceLow` -- New const `FileImportStateInProgress` -- New const `AutomationRulePropertyConditionSupportedPropertyIncidentUpdatedBySource` -- New const `DeleteStatusDeleted` -- New const `FileImportStateIngested` -- New const `FileFormatJSON` -- New const `IngestionModeIngestOnlyIfAllAreValid` -- New const `EntityTypeNic` -- New const `EntityKindNic` -- New const `AutomationRulePropertyArrayConditionSupportedArrayConditionTypeAnyItem` -- New const `AutomationRulePropertyConditionSupportedPropertyIncidentCustomDetailsValue` -- New const `FileImportContentTypeBasicIndicator` -- New const `IngestionModeUnspecified` -- New type alias `IngestionMode` -- New type alias `DeviceImportance` -- New type alias `FileFormat` -- New type alias `FileImportState` -- New type alias `DeleteStatus` -- New type alias `FileImportContentType` -- New type alias `AutomationRuleBooleanConditionSupportedOperator` -- New type alias `AutomationRulePropertyArrayConditionSupportedArrayType` -- New type alias `AutomationRulePropertyArrayConditionSupportedArrayConditionType` -- New function `PossibleDeviceImportanceValues() []DeviceImportance` -- New function `PossibleFileImportStateValues() []FileImportState` -- New function `*PropertyArrayConditionProperties.GetAutomationRuleCondition() *AutomationRuleCondition` -- New function `*BooleanConditionProperties.GetAutomationRuleCondition() *AutomationRuleCondition` -- New function `*NicEntity.GetEntity() *Entity` -- New function `PossibleFileFormatValues() []FileFormat` -- New function `NewFileImportsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FileImportsClient, error)` -- New function `PossibleAutomationRuleBooleanConditionSupportedOperatorValues() []AutomationRuleBooleanConditionSupportedOperator` -- New function `*FileImportsClient.NewListPager(string, string, *FileImportsClientListOptions) *runtime.Pager[FileImportsClientListResponse]` -- New function `*FileImportsClient.Create(context.Context, string, string, string, FileImport, *FileImportsClientCreateOptions) (FileImportsClientCreateResponse, error)` -- New function `PossibleDeleteStatusValues() []DeleteStatus` -- New function `*FileImportsClient.BeginDelete(context.Context, string, string, string, *FileImportsClientBeginDeleteOptions) (*runtime.Poller[FileImportsClientDeleteResponse], error)` -- New function `PossibleIngestionModeValues() []IngestionMode` -- New function `PossibleAutomationRulePropertyArrayConditionSupportedArrayTypeValues() []AutomationRulePropertyArrayConditionSupportedArrayType` -- New function `PossibleFileImportContentTypeValues() []FileImportContentType` -- New function `*FileImportsClient.Get(context.Context, string, string, string, *FileImportsClientGetOptions) (FileImportsClientGetResponse, error)` -- New function `PossibleAutomationRulePropertyArrayConditionSupportedArrayConditionTypeValues() []AutomationRulePropertyArrayConditionSupportedArrayConditionType` -- New struct `AutomationRuleBooleanCondition` -- New struct `AutomationRulePropertyArrayValuesCondition` -- New struct `BooleanConditionProperties` -- New struct `FileImport` -- New struct `FileImportList` -- New struct `FileImportProperties` -- New struct `FileImportsClient` -- New struct `FileImportsClientBeginDeleteOptions` -- New struct `FileImportsClientCreateOptions` -- New struct `FileImportsClientCreateResponse` -- New struct `FileImportsClientDeleteResponse` -- New struct `FileImportsClientGetOptions` -- New struct `FileImportsClientGetResponse` -- New struct `FileImportsClientListOptions` -- New struct `FileImportsClientListResponse` -- New struct `FileMetadata` -- New struct `NicEntity` -- New struct `NicEntityProperties` -- New struct `PropertyArrayConditionProperties` -- New struct `ValidationError` -- New field `DeviceSubType` in struct `IoTDeviceEntityProperties` -- New field `Sensor` in struct `IoTDeviceEntityProperties` -- New field `Zone` in struct `IoTDeviceEntityProperties` -- New field `Importance` in struct `IoTDeviceEntityProperties` -- New field `IsAuthorized` in struct `IoTDeviceEntityProperties` -- New field `PurdueLayer` in struct `IoTDeviceEntityProperties` -- New field `IsScanner` in struct `IoTDeviceEntityProperties` -- New field `NicEntityIDs` in struct `IoTDeviceEntityProperties` -- New field `IsProgramming` in struct `IoTDeviceEntityProperties` -- New field `Owners` in struct `IoTDeviceEntityProperties` -- New field `Site` in struct `IoTDeviceEntityProperties` -- New field `OutputStream` in struct `DataConnectorConnectBody` -- New field `DataCollectionEndpoint` in struct `DataConnectorConnectBody` -- New field `DataCollectionRuleImmutableID` in struct `DataConnectorConnectBody` -- New field `EventGroupingSettings` in struct `QueryBasedAlertRuleTemplateProperties` -- New field `EventGroupingSettings` in struct `NrtAlertRuleTemplateProperties` -- New field `EventGroupingSettings` in struct `NrtAlertRuleProperties` +- Support for test fakes and OpenTelemetry trace spans. -## 2.0.0-beta.1 (2022-05-24) -### Breaking Changes +## 1.1.1 (2023-04-14) +### Bug Fixes -- Type of `IncidentEntitiesResultsMetadata.EntityKind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `FileHashEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `HuntingBookmark.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `WatchlistProperties.Source` has been changed from `*Source` to `*string` -- Type of `MailMessageEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `DNSEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `WatchlistItemProperties.EntityMapping` has been changed from `interface{}` to `map[string]interface{}` -- Type of `WatchlistItemProperties.ItemsKeyValue` has been changed from `interface{}` to `map[string]interface{}` -- Type of `ThreatIntelligenceIndicatorModel.Kind` has been changed from `*ThreatIntelligenceResourceInnerKind` to `*ThreatIntelligenceResourceKindEnum` -- Type of `Entity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `HostEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `IPEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `RegistryValueEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `SubmissionMailEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `MailClusterEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `ProcessEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `IncidentPropertiesAction.Owner` has been changed from `*IncidentOwnerInfoAutoGenerated` to `*IncidentOwnerInfo` -- Type of `URLEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `ThreatIntelligenceSortingCriteria.SortOrder` has been changed from `*ThreatIntelligenceSortingOrder` to `*ThreatIntelligenceSortingCriteriaEnum` -- Type of `SecurityGroupEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `RegistryKeyEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `AccountEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `ThreatIntelligenceInformation.Kind` has been changed from `*ThreatIntelligenceResourceInnerKind` to `*ThreatIntelligenceResourceKindEnum` -- Type of `MailboxEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `SecurityAlert.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `FileEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `MalwareEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `CloudApplicationEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `IoTDeviceEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Type of `AzureResourceEntity.Kind` has been changed from `*EntityKindEnum` to `*EntityKind` -- Const `EntityKindEnumBookmark` has been removed -- Const `EntityKindEnumAzureResource` has been removed -- Const `EntityKindEnumFileHash` has been removed -- Const `EntityKindEnumRegistryValue` has been removed -- Const `EntityKindEnumSubmissionMail` has been removed -- Const `EntityKindEnumMailMessage` has been removed -- Const `EntityKindEnumIP` has been removed -- Const `EntityKindEnumCloudApplication` has been removed -- Const `EntityKindEnumFile` has been removed -- Const `EntityKindEnumSecurityGroup` has been removed -- Const `SourceLocalFile` has been removed -- Const `EntityKindEnumMailbox` has been removed -- Const `EntityKindEnumIoTDevice` has been removed -- Const `ThreatIntelligenceResourceInnerKindIndicator` has been removed -- Const `EntityKindEnumMalware` has been removed -- Const `ThreatIntelligenceSortingOrderDescending` has been removed -- Const `EntityKindEnumDNSResolution` has been removed -- Const `EntityKindEnumProcess` has been removed -- Const `EntityKindEnumRegistryKey` has been removed -- Const `ThreatIntelligenceSortingOrderUnsorted` has been removed -- Const `SourceRemoteStorage` has been removed -- Const `EntityKindEnumURL` has been removed -- Const `ThreatIntelligenceSortingOrderAscending` has been removed -- Const `EntityKindEnumAccount` has been removed -- Const `EntityKindEnumHost` has been removed -- Const `EntityKindEnumSecurityAlert` has been removed -- Const `EntityKindEnumMailCluster` has been removed -- Function `PossibleEntityKindEnumValues` has been removed -- Function `PossibleSourceValues` has been removed -- Function `PossibleThreatIntelligenceResourceInnerKindValues` has been removed -- Function `PossibleThreatIntelligenceSortingOrderValues` has been removed -- Struct `IncidentOwnerInfoAutoGenerated` has been removed +- Fix serialization bug of empty value of `any` type. + +## 1.1.0 (2023-04-07) ### Features Added -- New const `EntityKindIP` -- New const `EntityKindURL` -- New const `SupportTierCommunity` -- New const `EntityKindMailbox` -- New const `DataConnectorKindOfficeATP` -- New const `EntityTimelineKindBookmark` -- New const `KindAnalyticsRule` -- New const `SettingTypeInfoMessage` -- New const `DeploymentResultFailed` -- New const `UebaDataSourcesAzureActivity` -- New const `EntityTypeFileHash` -- New const `EntityKindRegistryKey` -- New const `SettingKindUeba` -- New const `SettingKindAnomalies` -- New const `KindWorkbookTemplate` -- New const `SourceKindLocalWorkspace` -- New const `AutomationRulePropertyArrayChangedConditionSupportedArrayTypeAlerts` -- New const `KindSolution` -- New const `ConditionTypePropertyArrayChanged` -- New const `EntityTypeRegistryKey` -- New const `EntityKindFileHash` -- New const `ConnectAuthKindBasic` -- New const `EntityTypeURL` -- New const `DataConnectorLicenseStateUnknown` -- New const `EntityQueryKindActivity` -- New const `EntityTypeSecurityAlert` -- New const `EntityTimelineKindActivity` -- New const `EntityTypeCloudApplication` -- New const `DeploymentStateInProgress` -- New const `EntityKindBookmark` -- New const `Enum13Expansion` -- New const `MicrosoftSecurityProductNameMicrosoftDefenderAdvancedThreatProtection` -- New const `EntityKindRegistryValue` -- New const `DataConnectorKindThreatIntelligenceTaxii` -- New const `EntityKindMailMessage` -- New const `DataConnectorKindOffice365Project` -- New const `SecurityMLAnalyticsSettingsKindAnomaly` -- New const `EntityKindSecurityAlert` -- New const `VersionV2` -- New const `ConnectivityTypeIsConnectedQuery` -- New const `EntityTypeIP` -- New const `DataConnectorKindOfficePowerBI` -- New const `PermissionProviderScopeSubscription` -- New const `PollingFrequencyOnceADay` -- New const `EntityTypeIoTDevice` -- New const `SourceKindCommunity` -- New const `DeploymentFetchStatusSuccess` -- New const `SupportTierPartner` -- New const `KindHuntingQuery` -- New const `EntityQueryKindExpansion` -- New const `RepoTypeDevOps` -- New const `UebaDataSourcesSecurityEvent` -- New const `DeploymentFetchStatusNotFound` -- New const `EntityTypeMailbox` -- New const `ContentTypeWorkbook` -- New const `DataConnectorKindMicrosoftThreatIntelligence` -- New const `SettingTypeCopyableLabel` -- New const `EntityTypeSubmissionMail` -- New const `GetInsightsErrorInsight` -- New const `EntityKindDNSResolution` -- New const `MicrosoftSecurityProductNameOffice365AdvancedThreatProtection` -- New const `KindAzureFunction` -- New const `EntityTypeFile` -- New const `TriggersWhenUpdated` -- New const `ProviderNameMicrosoftOperationalInsightsWorkspaces` -- New const `ConnectAuthKindOAuth2` -- New const `AutomationRulePropertyArrayChangedConditionSupportedChangeTypeAdded` -- New const `AutomationRulePropertyArrayChangedConditionSupportedArrayTypeComments` -- New const `DataConnectorKindGenericUI` -- New const `EntityProvidersActiveDirectory` -- New const `KindAutomationRule` -- New const `AlertRuleKindThreatIntelligence` -- New const `EntityProvidersAzureActiveDirectory` -- New const `EntityTypeAccount` -- New const `ConditionTypePropertyChanged` -- New const `OutputTypeNumber` -- New const `AutomationRulePropertyArrayChangedConditionSupportedArrayTypeTactics` -- New const `EntityKindIoTDevice` -- New const `SettingTypeInstructionStepsGroup` -- New const `Enum15Activity` -- New const `AutomationRulePropertyChangedConditionSupportedChangedTypeChangedTo` -- New const `ThreatIntelligenceSortingCriteriaEnumDescending` -- New const `DataConnectorKindIOT` -- New const `SourceKindSourceRepository` -- New const `EntityQueryTemplateKindActivity` -- New const `DeploymentResultSuccess` -- New const `PollingFrequencyOnceAMinute` -- New const `SourceTypeRemoteStorage` -- New const `ContentTypeAnalyticRule` -- New const `DeploymentFetchStatusUnauthorized` -- New const `DeploymentStateCompleted` -- New const `ProviderNameMicrosoftAuthorizationPolicyAssignments` -- New const `DataConnectorAuthorizationStateInvalid` -- New const `EntityTypeProcess` -- New const `UebaDataSourcesAuditLogs` -- New const `DeploymentStateCanceling` -- New const `AttackTacticReconnaissance` -- New const `EntityTypeMalware` -- New const `AttackTacticImpairProcessControl` -- New const `EntityKindAccount` -- New const `OperatorAND` -- New const `DataConnectorKindOfficeIRM` -- New const `OutputTypeEntity` -- New const `EntityKindAzureResource` -- New const `CustomEntityQueryKindActivity` -- New const `KindParser` -- New const `ProviderNameMicrosoftOperationalInsightsWorkspacesSharedKeys` -- New const `OutputTypeDate` -- New const `AutomationRulePropertyChangedConditionSupportedPropertyTypeIncidentSeverity` -- New const `EntityTimelineKindAnomaly` -- New const `KindDataConnector` -- New const `EntityQueryKindInsight` -- New const `RepoTypeGithub` -- New const `DataConnectorKindAPIPolling` -- New const `AutomationRulePropertyChangedConditionSupportedPropertyTypeIncidentOwner` -- New const `KindDataType` -- New const `AutomationRulePropertyChangedConditionSupportedPropertyTypeIncidentStatus` -- New const `EntityKindCloudApplication` -- New const `KindWatchlist` -- New const `KindPlaybookTemplate` -- New const `EntityTypeSecurityGroup` -- New const `EntityTypeHuntingBookmark` -- New const `AlertRuleKindMLBehaviorAnalytics` -- New const `EntityKindHost` -- New const `EntityTypeHost` -- New const `SettingKindEyesOn` -- New const `ThreatIntelligenceSortingCriteriaEnumAscending` -- New const `EntityTimelineKindSecurityAlert` -- New const `SettingsStatusProduction` -- New const `SourceTypeLocalFile` -- New const `PollingFrequencyOnceAnHour` -- New const `SettingsStatusFlighting` -- New const `DataConnectorLicenseStateInvalid` -- New const `AttackTacticResourceDevelopment` -- New const `OperatorOR` -- New const `EntityTypeRegistryValue` -- New const `ProviderNameMicrosoftOperationalInsightsSolutions` -- New const `AutomationRulePropertyChangedConditionSupportedChangedTypeChangedFrom` -- New const `KindWorkbook` -- New const `UebaDataSourcesSigninLogs` -- New const `AutomationRulePropertyArrayChangedConditionSupportedArrayTypeLabels` -- New const `DeploymentResultCanceled` -- New const `OutputTypeString` -- New const `KindInvestigationQuery` -- New const `ThreatIntelligenceResourceKindEnumIndicator` -- New const `SettingKindEntityAnalytics` -- New const `EntityItemQueryKindInsight` -- New const `ProviderNameMicrosoftAadiamDiagnosticSettings` -- New const `Enum13Activity` -- New const `EntityTypeMailCluster` -- New const `DeploymentStateQueued` -- New const `EntityTypeMailMessage` -- New const `SupportTierMicrosoft` -- New const `EntityTypeDNS` -- New const `EntityKindSecurityGroup` -- New const `DataConnectorKindDynamics365` -- New const `ProviderNameMicrosoftOperationalInsightsWorkspacesDatasources` -- New const `KindWatchlistTemplate` -- New const `EntityKindSubmissionMail` -- New const `ThreatIntelligenceSortingCriteriaEnumUnsorted` -- New const `EntityKindMalware` -- New const `AlertRuleKindNRT` -- New const `DataConnectorAuthorizationStateValid` -- New const `PermissionProviderScopeWorkspace` -- New const `DataConnectorLicenseStateValid` -- New const `EntityKindProcess` -- New const `SourceKindSolution` -- New const `ConnectAuthKindAPIKey` -- New const `EntityKindMailCluster` -- New const `PermissionProviderScopeResourceGroup` -- New const `KindAnalyticsRuleTemplate` -- New const `DataConnectorKindMicrosoftThreatProtection` -- New const `VersionV1` -- New const `EntityTypeAzureResource` -- New const `DataConnectorKindAmazonWebServicesS3` -- New const `KindPlaybook` -- New const `KindLogicAppsCustomConnector` -- New const `EntityKindFile` -- New const `AttackTacticInhibitResponseFunction` -- New function `PossibleGetInsightsErrorValues() []GetInsightsError` -- New function `MSTIDataConnector.MarshalJSON() ([]byte, error)` -- New function `*MetadataPropertiesPatch.UnmarshalJSON([]byte) error` -- New function `*NrtAlertRule.GetAlertRule() *AlertRule` -- New function `*EntityQueriesClientCreateOrUpdateResponse.UnmarshalJSON([]byte) error` -- New function `*NrtAlertRuleTemplateProperties.UnmarshalJSON([]byte) error` -- New function `*SettingList.UnmarshalJSON([]byte) error` -- New function `*ActivityEntityQueryTemplate.GetEntityQueryTemplate() *EntityQueryTemplate` -- New function `CodelessUIConnectorConfigPropertiesInstructionStepsItem.MarshalJSON() ([]byte, error)` -- New function `AwsCloudTrailCheckRequirements.MarshalJSON() ([]byte, error)` -- New function `MetadataProperties.MarshalJSON() ([]byte, error)` -- New function `*ASCCheckRequirements.UnmarshalJSON([]byte) error` -- New function `*AnomalyTimelineItem.UnmarshalJSON([]byte) error` -- New function `*PropertyArrayChangedConditionProperties.UnmarshalJSON([]byte) error` -- New function `*Deployment.UnmarshalJSON([]byte) error` -- New function `*MCASCheckRequirements.UnmarshalJSON([]byte) error` -- New function `*EntityQueryTemplatesClientGetResponse.UnmarshalJSON([]byte) error` -- New function `*EntityGetInsightsParameters.UnmarshalJSON([]byte) error` -- New function `*EntityTimelineItem.GetEntityTimelineItem() *EntityTimelineItem` -- New function `*BookmarkExpandResponseValue.UnmarshalJSON([]byte) error` -- New function `PossibleRepoTypeValues() []RepoType` -- New function `*DataConnectorsClient.Connect(context.Context, string, string, string, DataConnectorConnectBody, *DataConnectorsClientConnectOptions) (DataConnectorsClientConnectResponse, error)` -- New function `*IncidentsClient.CreateTeam(context.Context, string, string, string, TeamProperties, *IncidentsClientCreateTeamOptions) (IncidentsClientCreateTeamResponse, error)` -- New function `AnomalySecurityMLAnalyticsSettingsProperties.MarshalJSON() ([]byte, error)` -- New function `*MTPDataConnector.GetDataConnector() *DataConnector` -- New function `*MTPDataConnector.UnmarshalJSON([]byte) error` -- New function `*GetQueriesResponse.UnmarshalJSON([]byte) error` -- New function `MetadataPatch.MarshalJSON() ([]byte, error)` -- New function `PossibleKindValues() []Kind` -- New function `PossiblePollingFrequencyValues() []PollingFrequency` -- New function `PossibleConnectAuthKindValues() []ConnectAuthKind` -- New function `*ActivityCustomEntityQuery.GetCustomEntityQuery() *CustomEntityQuery` -- New function `EntityGetInsightsParameters.MarshalJSON() ([]byte, error)` -- New function `ExpansionEntityQueriesProperties.MarshalJSON() ([]byte, error)` -- New function `PossibleAutomationRulePropertyArrayChangedConditionSupportedArrayTypeValues() []AutomationRulePropertyArrayChangedConditionSupportedArrayType` -- New function `*OfficeIRMCheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `*CodelessAPIPollingDataConnector.GetDataConnector() *DataConnector` -- New function `PropertyChangedConditionProperties.MarshalJSON() ([]byte, error)` -- New function `FusionTemplateSourceSetting.MarshalJSON() ([]byte, error)` -- New function `PossibleOutputTypeValues() []OutputType` -- New function `OfficeATPCheckRequirements.MarshalJSON() ([]byte, error)` -- New function `Repository.MarshalJSON() ([]byte, error)` -- New function `EntityTimelineParameters.MarshalJSON() ([]byte, error)` -- New function `*ThreatIntelligenceAlertRule.GetAlertRule() *AlertRule` -- New function `*DataConnectorsCheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `*MLBehaviorAnalyticsAlertRuleProperties.UnmarshalJSON([]byte) error` -- New function `OfficePowerBICheckRequirements.MarshalJSON() ([]byte, error)` -- New function `*ThreatIntelligenceAlertRuleProperties.UnmarshalJSON([]byte) error` -- New function `ActivityEntityQueryTemplateProperties.MarshalJSON() ([]byte, error)` -- New function `*MSTICheckRequirements.UnmarshalJSON([]byte) error` -- New function `PossibleDeploymentStateValues() []DeploymentState` -- New function `ActivityEntityQueriesProperties.MarshalJSON() ([]byte, error)` -- New function `*Office365ProjectDataConnector.GetDataConnector() *DataConnector` -- New function `*IoTDataConnector.GetDataConnector() *DataConnector` -- New function `*MtpCheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `*EntityList.UnmarshalJSON([]byte) error` -- New function `*ProductSettingsClientGetResponse.UnmarshalJSON([]byte) error` -- New function `*ProductSettingsClientUpdateResponse.UnmarshalJSON([]byte) error` -- New function `Deployment.MarshalJSON() ([]byte, error)` -- New function `TeamProperties.MarshalJSON() ([]byte, error)` -- New function `AlertRuleTemplatePropertiesBase.MarshalJSON() ([]byte, error)` -- New function `*TiTaxiiCheckRequirements.UnmarshalJSON([]byte) error` -- New function `*ActivityEntityQueriesProperties.UnmarshalJSON([]byte) error` -- New function `EntityAnalyticsProperties.MarshalJSON() ([]byte, error)` -- New function `*InsightQueryItem.GetEntityQueryItem() *EntityQueryItem` -- New function `FusionSubTypeSeverityFilter.MarshalJSON() ([]byte, error)` -- New function `FusionTemplateSubTypeSeverityFilter.MarshalJSON() ([]byte, error)` -- New function `*PropertyChangedConditionProperties.GetAutomationRuleCondition() *AutomationRuleCondition` -- New function `*OfficeIRMDataConnector.GetDataConnector() *DataConnector` -- New function `PossibleProviderNameValues() []ProviderName` -- New function `*Anomalies.UnmarshalJSON([]byte) error` -- New function `*AADCheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `*OfficePowerBIDataConnector.UnmarshalJSON([]byte) error` -- New function `PossibleSecurityMLAnalyticsSettingsKindValues() []SecurityMLAnalyticsSettingsKind` -- New function `NrtAlertRuleTemplate.MarshalJSON() ([]byte, error)` -- New function `PossibleCustomEntityQueryKindValues() []CustomEntityQueryKind` -- New function `*NrtAlertRuleProperties.UnmarshalJSON([]byte) error` -- New function `*EntityTimelineParameters.UnmarshalJSON([]byte) error` -- New function `ThreatIntelligenceAlertRuleTemplate.MarshalJSON() ([]byte, error)` -- New function `MLBehaviorAnalyticsAlertRuleProperties.MarshalJSON() ([]byte, error)` -- New function `CodelessConnectorPollingResponseProperties.MarshalJSON() ([]byte, error)` -- New function `PossibleEntityItemQueryKindValues() []EntityItemQueryKind` -- New function `*EntityQueryTemplateList.UnmarshalJSON([]byte) error` -- New function `*TiTaxiiDataConnector.UnmarshalJSON([]byte) error` -- New function `MDATPCheckRequirements.MarshalJSON() ([]byte, error)` -- New function `*Dynamics365DataConnector.UnmarshalJSON([]byte) error` -- New function `*EntityQueriesClientGetResponse.UnmarshalJSON([]byte) error` -- New function `DataConnectorConnectBody.MarshalJSON() ([]byte, error)` -- New function `*MtpCheckRequirements.UnmarshalJSON([]byte) error` -- New function `ExpansionEntityQuery.MarshalJSON() ([]byte, error)` -- New function `*IoTCheckRequirements.UnmarshalJSON([]byte) error` -- New function `*ActivityEntityQuery.UnmarshalJSON([]byte) error` -- New function `ActivityEntityQuery.MarshalJSON() ([]byte, error)` -- New function `PossibleThreatIntelligenceResourceKindEnumValues() []ThreatIntelligenceResourceKindEnum` -- New function `MetadataCategories.MarshalJSON() ([]byte, error)` -- New function `IoTDataConnector.MarshalJSON() ([]byte, error)` -- New function `*EntityAnalytics.UnmarshalJSON([]byte) error` -- New function `*MLBehaviorAnalyticsAlertRule.GetAlertRule() *AlertRule` -- New function `PossibleDeploymentFetchStatusValues() []DeploymentFetchStatus` -- New function `OfficeIRMDataConnector.MarshalJSON() ([]byte, error)` -- New function `PossibleAutomationRulePropertyChangedConditionSupportedPropertyTypeValues() []AutomationRulePropertyChangedConditionSupportedPropertyType` -- New function `MLBehaviorAnalyticsAlertRule.MarshalJSON() ([]byte, error)` -- New function `PossibleEntityTimelineKindValues() []EntityTimelineKind` -- New function `*TiTaxiiDataConnector.GetDataConnector() *DataConnector` -- New function `*Dynamics365CheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `*SecurityMLAnalyticsSettingsClientCreateOrUpdateResponse.UnmarshalJSON([]byte) error` -- New function `PossibleEntityTypeValues() []EntityType` -- New function `*EntityQueryList.UnmarshalJSON([]byte) error` -- New function `ThreatIntelligenceAlertRule.MarshalJSON() ([]byte, error)` -- New function `AwsS3DataConnectorProperties.MarshalJSON() ([]byte, error)` -- New function `*SecurityAlertTimelineItem.UnmarshalJSON([]byte) error` -- New function `*EntityQuery.GetEntityQuery() *EntityQuery` -- New function `PossibleSupportTierValues() []SupportTier` -- New function `*AnomalyTimelineItem.GetEntityTimelineItem() *EntityTimelineItem` -- New function `Anomalies.MarshalJSON() ([]byte, error)` -- New function `MSTICheckRequirements.MarshalJSON() ([]byte, error)` -- New function `*OfficePowerBIDataConnector.GetDataConnector() *DataConnector` -- New function `*BookmarkTimelineItem.GetEntityTimelineItem() *EntityTimelineItem` -- New function `PossibleEntityQueryKindValues() []EntityQueryKind` -- New function `Office365ProjectDataConnector.MarshalJSON() ([]byte, error)` -- New function `AnomalySecurityMLAnalyticsSettings.MarshalJSON() ([]byte, error)` -- New function `IoTCheckRequirements.MarshalJSON() ([]byte, error)` -- New function `*EyesOn.GetSettings() *Settings` -- New function `BookmarkExpandParameters.MarshalJSON() ([]byte, error)` -- New function `*NrtAlertRule.UnmarshalJSON([]byte) error` -- New function `*OfficePowerBICheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `*CodelessUIDataConnector.GetDataConnector() *DataConnector` -- New function `*ActivityTimelineItem.UnmarshalJSON([]byte) error` -- New function `TiTaxiiCheckRequirements.MarshalJSON() ([]byte, error)` -- New function `*AnomalySecurityMLAnalyticsSettingsProperties.UnmarshalJSON([]byte) error` -- New function `*DataConnectorsClient.Disconnect(context.Context, string, string, string, *DataConnectorsClientDisconnectOptions) (DataConnectorsClientDisconnectResponse, error)` -- New function `Dynamics365CheckRequirements.MarshalJSON() ([]byte, error)` -- New function `*AwsS3CheckRequirements.UnmarshalJSON([]byte) error` -- New function `*Ueba.UnmarshalJSON([]byte) error` -- New function `*OfficeATPCheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `*EntityExpandResponseValue.UnmarshalJSON([]byte) error` -- New function `PossibleEntityKindValues() []EntityKind` -- New function `*IoTDataConnector.UnmarshalJSON([]byte) error` -- New function `*ASCCheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `NrtAlertRuleProperties.MarshalJSON() ([]byte, error)` -- New function `*EnrichmentDomainWhois.UnmarshalJSON([]byte) error` -- New function `PossibleSourceTypeValues() []SourceType` -- New function `PossibleSettingKindValues() []SettingKind` -- New function `PossibleDataConnectorLicenseStateValues() []DataConnectorLicenseState` -- New function `*CodelessUIDataConnector.UnmarshalJSON([]byte) error` -- New function `ThreatIntelligenceAlertRuleTemplateProperties.MarshalJSON() ([]byte, error)` -- New function `PossibleEnum15Values() []Enum15` -- New function `*SecurityAlertTimelineItem.GetEntityTimelineItem() *EntityTimelineItem` -- New function `Dynamics365DataConnector.MarshalJSON() ([]byte, error)` -- New function `TiTaxiiDataConnectorProperties.MarshalJSON() ([]byte, error)` -- New function `EyesOn.MarshalJSON() ([]byte, error)` -- New function `*AnomalySecurityMLAnalyticsSettings.GetSecurityMLAnalyticsSetting() *SecurityMLAnalyticsSetting` -- New function `AATPCheckRequirements.MarshalJSON() ([]byte, error)` -- New function `*MLBehaviorAnalyticsAlertRule.UnmarshalJSON([]byte) error` -- New function `ASCCheckRequirements.MarshalJSON() ([]byte, error)` -- New function `*BookmarkTimelineItem.UnmarshalJSON([]byte) error` -- New function `PossibleEntityQueryTemplateKindValues() []EntityQueryTemplateKind` -- New function `*SecurityMLAnalyticsSettingsList.UnmarshalJSON([]byte) error` -- New function `*OfficeIRMDataConnector.UnmarshalJSON([]byte) error` -- New function `BookmarkEntityMappings.MarshalJSON() ([]byte, error)` -- New function `*NrtAlertRuleTemplate.GetAlertRuleTemplate() *AlertRuleTemplate` -- New function `*ActivityEntityQueryTemplate.UnmarshalJSON([]byte) error` -- New function `*AlertRuleTemplatePropertiesBase.UnmarshalJSON([]byte) error` -- New function `PossibleUebaDataSourcesValues() []UebaDataSources` -- New function `Ueba.MarshalJSON() ([]byte, error)` -- New function `*TICheckRequirements.UnmarshalJSON([]byte) error` -- New function `EntityExpandParameters.MarshalJSON() ([]byte, error)` -- New function `AlertRuleTemplateWithMitreProperties.MarshalJSON() ([]byte, error)` -- New function `*AADCheckRequirements.UnmarshalJSON([]byte) error` -- New function `*EntityInsightItemQueryTimeInterval.UnmarshalJSON([]byte) error` -- New function `*MSTIDataConnector.GetDataConnector() *DataConnector` -- New function `*MSTICheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `*ActivityTimelineItem.GetEntityTimelineItem() *EntityTimelineItem` -- New function `*EyesOn.UnmarshalJSON([]byte) error` -- New function `NrtAlertRule.MarshalJSON() ([]byte, error)` -- New function `OfficeATPDataConnector.MarshalJSON() ([]byte, error)` -- New function `*TeamInformation.UnmarshalJSON([]byte) error` -- New function `EntityAnalytics.MarshalJSON() ([]byte, error)` -- New function `*ActivityCustomEntityQuery.UnmarshalJSON([]byte) error` -- New function `*PropertyChangedConditionProperties.UnmarshalJSON([]byte) error` -- New function `PossibleVersionValues() []Version` -- New function `AutomationRulePropertyValuesChangedCondition.MarshalJSON() ([]byte, error)` -- New function `ActivityCustomEntityQuery.MarshalJSON() ([]byte, error)` -- New function `PossibleOperatorValues() []Operator` -- New function `*CodelessAPIPollingDataConnector.UnmarshalJSON([]byte) error` -- New function `*ExpansionEntityQuery.UnmarshalJSON([]byte) error` -- New function `*OfficeATPDataConnector.UnmarshalJSON([]byte) error` -- New function `OfficePowerBIDataConnector.MarshalJSON() ([]byte, error)` -- New function `*IncidentsClient.RunPlaybook(context.Context, string, string, string, *IncidentsClientRunPlaybookOptions) (IncidentsClientRunPlaybookResponse, error)` -- New function `*AATPCheckRequirements.UnmarshalJSON([]byte) error` -- New function `*Settings.GetSettings() *Settings` -- New function `PossibleEnum13Values() []Enum13` -- New function `Permissions.MarshalJSON() ([]byte, error)` -- New function `*TiTaxiiCheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `Office365ProjectCheckRequirements.MarshalJSON() ([]byte, error)` -- New function `*IoTCheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `*ThreatIntelligenceAlertRule.UnmarshalJSON([]byte) error` -- New function `*AwsS3CheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `SecurityMLAnalyticsSettingsDataSource.MarshalJSON() ([]byte, error)` -- New function `PossibleContentTypeValues() []ContentType` -- New function `*SecurityMLAnalyticsSetting.GetSecurityMLAnalyticsSetting() *SecurityMLAnalyticsSetting` -- New function `*AlertRuleTemplateWithMitreProperties.UnmarshalJSON([]byte) error` -- New function `*CustomEntityQuery.GetCustomEntityQuery() *CustomEntityQuery` -- New function `*MCASCheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `*EntityQueryTemplate.GetEntityQueryTemplate() *EntityQueryTemplate` -- New function `*MDATPCheckRequirements.UnmarshalJSON([]byte) error` -- New function `PropertyArrayChangedConditionProperties.MarshalJSON() ([]byte, error)` -- New function `MtpCheckRequirements.MarshalJSON() ([]byte, error)` -- New function `*BookmarkExpandParameters.UnmarshalJSON([]byte) error` -- New function `PossiblePermissionProviderScopeValues() []PermissionProviderScope` -- New function `NrtAlertRuleTemplateProperties.MarshalJSON() ([]byte, error)` -- New function `*MSTIDataConnector.UnmarshalJSON([]byte) error` -- New function `*Ueba.GetSettings() *Settings` -- New function `ConnectivityCriteria.MarshalJSON() ([]byte, error)` -- New function `*AwsS3DataConnector.UnmarshalJSON([]byte) error` -- New function `*TiTaxiiDataConnectorProperties.UnmarshalJSON([]byte) error` -- New function `CodelessAPIPollingDataConnector.MarshalJSON() ([]byte, error)` -- New function `FusionSourceSettings.MarshalJSON() ([]byte, error)` -- New function `*MetadataProperties.UnmarshalJSON([]byte) error` -- New function `*EntitiesClientGetResponse.UnmarshalJSON([]byte) error` -- New function `AwsS3DataConnector.MarshalJSON() ([]byte, error)` -- New function `*AwsCloudTrailCheckRequirements.UnmarshalJSON([]byte) error` -- New function `MetadataDependencies.MarshalJSON() ([]byte, error)` -- New function `MTPDataConnector.MarshalJSON() ([]byte, error)` -- New function `PossibleDataConnectorAuthorizationStateValues() []DataConnectorAuthorizationState` -- New function `*MLBehaviorAnalyticsAlertRuleTemplate.GetAlertRuleTemplate() *AlertRuleTemplate` -- New function `QueryBasedAlertRuleTemplateProperties.MarshalJSON() ([]byte, error)` -- New function `InstructionSteps.MarshalJSON() ([]byte, error)` -- New function `CodelessUIDataConnector.MarshalJSON() ([]byte, error)` -- New function `*OfficeATPDataConnector.GetDataConnector() *DataConnector` -- New function `ActivityEntityQueryTemplate.MarshalJSON() ([]byte, error)` -- New function `MCASCheckRequirements.MarshalJSON() ([]byte, error)` -- New function `ThreatIntelligenceAlertRuleProperties.MarshalJSON() ([]byte, error)` -- New function `*Office365ProjectDataConnector.UnmarshalJSON([]byte) error` -- New function `*ExpansionEntityQuery.GetEntityQuery() *EntityQuery` -- New function `*OfficeATPCheckRequirements.UnmarshalJSON([]byte) error` -- New function `*EntityAnalytics.GetSettings() *Settings` -- New function `TeamInformation.MarshalJSON() ([]byte, error)` -- New function `MLBehaviorAnalyticsAlertRuleTemplateProperties.MarshalJSON() ([]byte, error)` -- New function `PossibleSettingTypeValues() []SettingType` -- New function `*MLBehaviorAnalyticsAlertRuleTemplate.UnmarshalJSON([]byte) error` -- New function `*PropertyArrayChangedConditionProperties.GetAutomationRuleCondition() *AutomationRuleCondition` -- New function `*TICheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `PossibleThreatIntelligenceSortingCriteriaEnumValues() []ThreatIntelligenceSortingCriteriaEnum` -- New function `*Dynamics365DataConnector.GetDataConnector() *DataConnector` -- New function `*InsightQueryItem.UnmarshalJSON([]byte) error` -- New function `*Office365ProjectCheckRequirements.UnmarshalJSON([]byte) error` -- New function `UebaProperties.MarshalJSON() ([]byte, error)` -- New function `*MDATPCheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `PossibleSettingsStatusValues() []SettingsStatus` -- New function `AADCheckRequirements.MarshalJSON() ([]byte, error)` -- New function `*AnomalySecurityMLAnalyticsSettings.UnmarshalJSON([]byte) error` -- New function `MetadataPropertiesPatch.MarshalJSON() ([]byte, error)` -- New function `*OfficeIRMCheckRequirements.UnmarshalJSON([]byte) error` -- New function `*AwsCloudTrailCheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `AwsS3CheckRequirements.MarshalJSON() ([]byte, error)` -- New function `OfficeIRMCheckRequirements.MarshalJSON() ([]byte, error)` -- New function `PossibleSourceKindValues() []SourceKind` -- New function `SourceControlProperties.MarshalJSON() ([]byte, error)` -- New function `TICheckRequirements.MarshalJSON() ([]byte, error)` -- New function `*Office365ProjectCheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New function `PossibleDeploymentResultValues() []DeploymentResult` -- New function `*ThreatIntelligenceAlertRuleTemplate.UnmarshalJSON([]byte) error` -- New function `PossibleConnectivityTypeValues() []ConnectivityType` -- New function `TiTaxiiDataConnector.MarshalJSON() ([]byte, error)` -- New function `*OfficePowerBICheckRequirements.UnmarshalJSON([]byte) error` -- New function `*EntityExpandParameters.UnmarshalJSON([]byte) error` -- New function `*EntityQueryItem.GetEntityQueryItem() *EntityQueryItem` -- New function `PossibleEntityProvidersValues() []EntityProviders` -- New function `*ActivityEntityQuery.GetEntityQuery() *EntityQuery` -- New function `MLBehaviorAnalyticsAlertRuleTemplate.MarshalJSON() ([]byte, error)` -- New function `*ThreatIntelligenceAlertRuleTemplateProperties.UnmarshalJSON([]byte) error` -- New function `*Anomalies.GetSettings() *Settings` -- New function `*MLBehaviorAnalyticsAlertRuleTemplateProperties.UnmarshalJSON([]byte) error` -- New function `*NrtAlertRuleTemplate.UnmarshalJSON([]byte) error` -- New function `PossibleAutomationRulePropertyArrayChangedConditionSupportedChangeTypeValues() []AutomationRulePropertyArrayChangedConditionSupportedChangeType` -- New function `CodelessUIConnectorConfigProperties.MarshalJSON() ([]byte, error)` -- New function `*EntityTimelineResponse.UnmarshalJSON([]byte) error` -- New function `*ThreatIntelligenceAlertRuleTemplate.GetAlertRuleTemplate() *AlertRuleTemplate` -- New function `*AwsS3DataConnector.GetDataConnector() *DataConnector` -- New function `CodelessUIConnectorConfigPropertiesConnectivityCriteriaItem.MarshalJSON() ([]byte, error)` -- New function `PossibleAutomationRulePropertyChangedConditionSupportedChangedTypeValues() []AutomationRulePropertyChangedConditionSupportedChangedType` -- New function `*SecurityMLAnalyticsSettingsClientGetResponse.UnmarshalJSON([]byte) error` -- New function `*Dynamics365CheckRequirements.UnmarshalJSON([]byte) error` -- New function `*AATPCheckRequirements.GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements` -- New struct `AADCheckRequirements` -- New struct `AADCheckRequirementsProperties` -- New struct `AATPCheckRequirements` -- New struct `AATPCheckRequirementsProperties` -- New struct `APIPollingParameters` -- New struct `ASCCheckRequirements` -- New struct `ASCCheckRequirementsProperties` -- New struct `ActivityCustomEntityQuery` -- New struct `ActivityEntityQueriesProperties` -- New struct `ActivityEntityQueriesPropertiesQueryDefinitions` -- New struct `ActivityEntityQuery` -- New struct `ActivityEntityQueryTemplate` -- New struct `ActivityEntityQueryTemplateProperties` -- New struct `ActivityEntityQueryTemplatePropertiesQueryDefinitions` -- New struct `ActivityTimelineItem` -- New struct `AlertRuleTemplatePropertiesBase` -- New struct `AlertRuleTemplateWithMitreProperties` -- New struct `Anomalies` -- New struct `AnomaliesSettingsProperties` -- New struct `AnomalySecurityMLAnalyticsSettings` -- New struct `AnomalySecurityMLAnalyticsSettingsProperties` -- New struct `AnomalyTimelineItem` -- New struct `AutomationRulePropertyArrayChangedValuesCondition` -- New struct `AutomationRulePropertyValuesChangedCondition` -- New struct `Availability` -- New struct `AwsCloudTrailCheckRequirements` -- New struct `AwsS3CheckRequirements` -- New struct `AwsS3DataConnector` -- New struct `AwsS3DataConnectorDataTypes` -- New struct `AwsS3DataConnectorDataTypesLogs` -- New struct `AwsS3DataConnectorProperties` -- New struct `AzureDevOpsResourceInfo` -- New struct `BookmarkClientExpandOptions` -- New struct `BookmarkClientExpandResponse` -- New struct `BookmarkEntityMappings` -- New struct `BookmarkExpandParameters` -- New struct `BookmarkExpandResponse` -- New struct `BookmarkExpandResponseValue` -- New struct `BookmarkRelationsClientCreateOrUpdateOptions` -- New struct `BookmarkRelationsClientCreateOrUpdateResponse` -- New struct `BookmarkRelationsClientDeleteOptions` -- New struct `BookmarkRelationsClientDeleteResponse` -- New struct `BookmarkRelationsClientGetOptions` -- New struct `BookmarkRelationsClientGetResponse` -- New struct `BookmarkRelationsClientListOptions` -- New struct `BookmarkRelationsClientListResponse` -- New struct `BookmarkTimelineItem` -- New struct `CodelessAPIPollingDataConnector` -- New struct `CodelessConnectorPollingAuthProperties` -- New struct `CodelessConnectorPollingConfigProperties` -- New struct `CodelessConnectorPollingPagingProperties` -- New struct `CodelessConnectorPollingRequestProperties` -- New struct `CodelessConnectorPollingResponseProperties` -- New struct `CodelessParameters` -- New struct `CodelessUIConnectorConfigProperties` -- New struct `CodelessUIConnectorConfigPropertiesConnectivityCriteriaItem` -- New struct `CodelessUIConnectorConfigPropertiesDataTypesItem` -- New struct `CodelessUIConnectorConfigPropertiesGraphQueriesItem` -- New struct `CodelessUIConnectorConfigPropertiesInstructionStepsItem` -- New struct `CodelessUIConnectorConfigPropertiesSampleQueriesItem` -- New struct `CodelessUIDataConnector` -- New struct `ConnectedEntity` -- New struct `ConnectivityCriteria` -- New struct `ConnectorInstructionModelBase` -- New struct `ContentPathMap` -- New struct `CustomEntityQuery` -- New struct `Customs` -- New struct `CustomsPermission` -- New struct `DataConnectorConnectBody` -- New struct `DataConnectorRequirementsState` -- New struct `DataConnectorsCheckRequirements` -- New struct `DataConnectorsCheckRequirementsClientPostOptions` -- New struct `DataConnectorsCheckRequirementsClientPostResponse` -- New struct `DataConnectorsClientConnectOptions` -- New struct `DataConnectorsClientConnectResponse` -- New struct `DataConnectorsClientDisconnectOptions` -- New struct `DataConnectorsClientDisconnectResponse` -- New struct `DataTypeDefinitions` -- New struct `Deployment` -- New struct `DeploymentInfo` -- New struct `DomainWhoisClientGetOptions` -- New struct `DomainWhoisClientGetResponse` -- New struct `Dynamics365CheckRequirements` -- New struct `Dynamics365CheckRequirementsProperties` -- New struct `Dynamics365DataConnector` -- New struct `Dynamics365DataConnectorDataTypes` -- New struct `Dynamics365DataConnectorDataTypesDynamics365CdsActivities` -- New struct `Dynamics365DataConnectorProperties` -- New struct `EnrichmentDomainWhois` -- New struct `EnrichmentDomainWhoisContact` -- New struct `EnrichmentDomainWhoisContacts` -- New struct `EnrichmentDomainWhoisDetails` -- New struct `EnrichmentDomainWhoisRegistrarDetails` -- New struct `EnrichmentIPGeodata` -- New struct `EntitiesClientExpandOptions` -- New struct `EntitiesClientExpandResponse` -- New struct `EntitiesClientGetInsightsOptions` -- New struct `EntitiesClientGetInsightsResponse` -- New struct `EntitiesClientGetOptions` -- New struct `EntitiesClientGetResponse` -- New struct `EntitiesClientListOptions` -- New struct `EntitiesClientListResponse` -- New struct `EntitiesClientQueriesOptions` -- New struct `EntitiesClientQueriesResponse` -- New struct `EntitiesGetTimelineClientListOptions` -- New struct `EntitiesGetTimelineClientListResponse` -- New struct `EntitiesRelationsClientListOptions` -- New struct `EntitiesRelationsClientListResponse` -- New struct `EntityAnalytics` -- New struct `EntityAnalyticsProperties` -- New struct `EntityEdges` -- New struct `EntityExpandParameters` -- New struct `EntityExpandResponse` -- New struct `EntityExpandResponseValue` -- New struct `EntityFieldMapping` -- New struct `EntityGetInsightsParameters` -- New struct `EntityGetInsightsResponse` -- New struct `EntityInsightItem` -- New struct `EntityInsightItemQueryTimeInterval` -- New struct `EntityList` -- New struct `EntityQueriesClientCreateOrUpdateOptions` -- New struct `EntityQueriesClientCreateOrUpdateResponse` -- New struct `EntityQueriesClientDeleteOptions` -- New struct `EntityQueriesClientDeleteResponse` -- New struct `EntityQueriesClientGetOptions` -- New struct `EntityQueriesClientGetResponse` -- New struct `EntityQueriesClientListOptions` -- New struct `EntityQueriesClientListResponse` -- New struct `EntityQuery` -- New struct `EntityQueryItem` -- New struct `EntityQueryItemProperties` -- New struct `EntityQueryItemPropertiesDataTypesItem` -- New struct `EntityQueryList` -- New struct `EntityQueryTemplate` -- New struct `EntityQueryTemplateList` -- New struct `EntityQueryTemplatesClientGetOptions` -- New struct `EntityQueryTemplatesClientGetResponse` -- New struct `EntityQueryTemplatesClientListOptions` -- New struct `EntityQueryTemplatesClientListResponse` -- New struct `EntityRelationsClientGetRelationOptions` -- New struct `EntityRelationsClientGetRelationResponse` -- New struct `EntityTimelineItem` -- New struct `EntityTimelineParameters` -- New struct `EntityTimelineResponse` -- New struct `ExpansionEntityQueriesProperties` -- New struct `ExpansionEntityQuery` -- New struct `ExpansionResultAggregation` -- New struct `ExpansionResultsMetadata` -- New struct `EyesOn` -- New struct `EyesOnSettingsProperties` -- New struct `FusionScenarioExclusionPattern` -- New struct `FusionSourceSettings` -- New struct `FusionSourceSubTypeSetting` -- New struct `FusionSubTypeSeverityFilter` -- New struct `FusionSubTypeSeverityFiltersItem` -- New struct `FusionTemplateSourceSetting` -- New struct `FusionTemplateSourceSubType` -- New struct `FusionTemplateSubTypeSeverityFilter` -- New struct `GetInsightsErrorKind` -- New struct `GetInsightsResultsMetadata` -- New struct `GetQueriesResponse` -- New struct `GitHubResourceInfo` -- New struct `GraphQueries` -- New struct `IPGeodataClientGetOptions` -- New struct `IPGeodataClientGetResponse` -- New struct `IncidentsClientCreateTeamOptions` -- New struct `IncidentsClientCreateTeamResponse` -- New struct `IncidentsClientRunPlaybookOptions` -- New struct `IncidentsClientRunPlaybookResponse` -- New struct `InsightQueryItem` -- New struct `InsightQueryItemProperties` -- New struct `InsightQueryItemPropertiesAdditionalQuery` -- New struct `InsightQueryItemPropertiesDefaultTimeRange` -- New struct `InsightQueryItemPropertiesReferenceTimeRange` -- New struct `InsightQueryItemPropertiesTableQuery` -- New struct `InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem` -- New struct `InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem` -- New struct `InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem` -- New struct `InsightsTableResult` -- New struct `InsightsTableResultColumnsItem` -- New struct `InstructionSteps` -- New struct `InstructionStepsInstructionsItem` -- New struct `IoTCheckRequirements` -- New struct `IoTCheckRequirementsProperties` -- New struct `IoTDataConnector` -- New struct `IoTDataConnectorProperties` -- New struct `LastDataReceivedDataType` -- New struct `MCASCheckRequirements` -- New struct `MCASCheckRequirementsProperties` -- New struct `MDATPCheckRequirements` -- New struct `MDATPCheckRequirementsProperties` -- New struct `MLBehaviorAnalyticsAlertRule` -- New struct `MLBehaviorAnalyticsAlertRuleProperties` -- New struct `MLBehaviorAnalyticsAlertRuleTemplate` -- New struct `MLBehaviorAnalyticsAlertRuleTemplateProperties` -- New struct `MSTICheckRequirements` -- New struct `MSTICheckRequirementsProperties` -- New struct `MSTIDataConnector` -- New struct `MSTIDataConnectorDataTypes` -- New struct `MSTIDataConnectorDataTypesBingSafetyPhishingURL` -- New struct `MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed` -- New struct `MSTIDataConnectorProperties` -- New struct `MTPCheckRequirementsProperties` -- New struct `MTPDataConnector` -- New struct `MTPDataConnectorDataTypes` -- New struct `MTPDataConnectorDataTypesIncidents` -- New struct `MTPDataConnectorProperties` -- New struct `ManualTriggerRequestBody` -- New struct `MetadataAuthor` -- New struct `MetadataCategories` -- New struct `MetadataClientCreateOptions` -- New struct `MetadataClientCreateResponse` -- New struct `MetadataClientDeleteOptions` -- New struct `MetadataClientDeleteResponse` -- New struct `MetadataClientGetOptions` -- New struct `MetadataClientGetResponse` -- New struct `MetadataClientListOptions` -- New struct `MetadataClientListResponse` -- New struct `MetadataClientUpdateOptions` -- New struct `MetadataClientUpdateResponse` -- New struct `MetadataDependencies` -- New struct `MetadataList` -- New struct `MetadataModel` -- New struct `MetadataPatch` -- New struct `MetadataProperties` -- New struct `MetadataPropertiesPatch` -- New struct `MetadataSource` -- New struct `MetadataSupport` -- New struct `MtpCheckRequirements` -- New struct `NrtAlertRule` -- New struct `NrtAlertRuleProperties` -- New struct `NrtAlertRuleTemplate` -- New struct `NrtAlertRuleTemplateProperties` -- New struct `Office365ProjectCheckRequirements` -- New struct `Office365ProjectCheckRequirementsProperties` -- New struct `Office365ProjectConnectorDataTypes` -- New struct `Office365ProjectConnectorDataTypesLogs` -- New struct `Office365ProjectDataConnector` -- New struct `Office365ProjectDataConnectorProperties` -- New struct `OfficeATPCheckRequirements` -- New struct `OfficeATPCheckRequirementsProperties` -- New struct `OfficeATPDataConnector` -- New struct `OfficeATPDataConnectorProperties` -- New struct `OfficeConsent` -- New struct `OfficeConsentList` -- New struct `OfficeConsentProperties` -- New struct `OfficeConsentsClientDeleteOptions` -- New struct `OfficeConsentsClientDeleteResponse` -- New struct `OfficeConsentsClientGetOptions` -- New struct `OfficeConsentsClientGetResponse` -- New struct `OfficeConsentsClientListOptions` -- New struct `OfficeConsentsClientListResponse` -- New struct `OfficeIRMCheckRequirements` -- New struct `OfficeIRMCheckRequirementsProperties` -- New struct `OfficeIRMDataConnector` -- New struct `OfficeIRMDataConnectorProperties` -- New struct `OfficePowerBICheckRequirements` -- New struct `OfficePowerBICheckRequirementsProperties` -- New struct `OfficePowerBIConnectorDataTypes` -- New struct `OfficePowerBIConnectorDataTypesLogs` -- New struct `OfficePowerBIDataConnector` -- New struct `OfficePowerBIDataConnectorProperties` -- New struct `Permissions` -- New struct `PermissionsCustomsItem` -- New struct `PermissionsResourceProviderItem` -- New struct `ProductSettingsClientDeleteOptions` -- New struct `ProductSettingsClientDeleteResponse` -- New struct `ProductSettingsClientGetOptions` -- New struct `ProductSettingsClientGetResponse` -- New struct `ProductSettingsClientListOptions` -- New struct `ProductSettingsClientListResponse` -- New struct `ProductSettingsClientUpdateOptions` -- New struct `ProductSettingsClientUpdateResponse` -- New struct `PropertyArrayChangedConditionProperties` -- New struct `PropertyChangedConditionProperties` -- New struct `QueryBasedAlertRuleTemplateProperties` -- New struct `Repo` -- New struct `RepoList` -- New struct `Repository` -- New struct `RepositoryResourceInfo` -- New struct `RequiredPermissions` -- New struct `ResourceProvider` -- New struct `SampleQueries` -- New struct `SecurityAlertTimelineItem` -- New struct `SecurityMLAnalyticsSetting` -- New struct `SecurityMLAnalyticsSettingsClientCreateOrUpdateOptions` -- New struct `SecurityMLAnalyticsSettingsClientCreateOrUpdateResponse` -- New struct `SecurityMLAnalyticsSettingsClientDeleteOptions` -- New struct `SecurityMLAnalyticsSettingsClientDeleteResponse` -- New struct `SecurityMLAnalyticsSettingsClientGetOptions` -- New struct `SecurityMLAnalyticsSettingsClientGetResponse` -- New struct `SecurityMLAnalyticsSettingsClientListOptions` -- New struct `SecurityMLAnalyticsSettingsClientListResponse` -- New struct `SecurityMLAnalyticsSettingsDataSource` -- New struct `SecurityMLAnalyticsSettingsList` -- New struct `SettingList` -- New struct `Settings` -- New struct `SourceControl` -- New struct `SourceControlClientListRepositoriesOptions` -- New struct `SourceControlClientListRepositoriesResponse` -- New struct `SourceControlList` -- New struct `SourceControlProperties` -- New struct `SourceControlsClientCreateOptions` -- New struct `SourceControlsClientCreateResponse` -- New struct `SourceControlsClientDeleteOptions` -- New struct `SourceControlsClientDeleteResponse` -- New struct `SourceControlsClientGetOptions` -- New struct `SourceControlsClientGetResponse` -- New struct `SourceControlsClientListOptions` -- New struct `SourceControlsClientListResponse` -- New struct `TICheckRequirements` -- New struct `TICheckRequirementsProperties` -- New struct `TeamInformation` -- New struct `TeamProperties` -- New struct `ThreatIntelligenceAlertRule` -- New struct `ThreatIntelligenceAlertRuleProperties` -- New struct `ThreatIntelligenceAlertRuleTemplate` -- New struct `ThreatIntelligenceAlertRuleTemplateProperties` -- New struct `TiTaxiiCheckRequirements` -- New struct `TiTaxiiCheckRequirementsProperties` -- New struct `TiTaxiiDataConnector` -- New struct `TiTaxiiDataConnectorDataTypes` -- New struct `TiTaxiiDataConnectorDataTypesTaxiiClient` -- New struct `TiTaxiiDataConnectorProperties` -- New struct `TimelineAggregation` -- New struct `TimelineError` -- New struct `TimelineResultsMetadata` -- New struct `Ueba` -- New struct `UebaProperties` -- New struct `Webhook` -- New field `SourceSettings` in struct `FusionAlertRuleTemplateProperties` -- New field `Techniques` in struct `FusionAlertRuleTemplateProperties` -- New field `AzureAsyncOperation` in struct `WatchlistsClientCreateOrUpdateResponse` -- New field `OwnerType` in struct `IncidentOwnerInfo` -- New field `ScenarioExclusionPatterns` in struct `FusionAlertRuleProperties` -- New field `Techniques` in struct `FusionAlertRuleProperties` -- New field `SourceSettings` in struct `FusionAlertRuleProperties` -- New field `ProviderIncidentID` in struct `IncidentProperties` -- New field `TeamInformation` in struct `IncidentProperties` -- New field `ProviderName` in struct `IncidentProperties` -- New field `Techniques` in struct `ScheduledAlertRuleTemplateProperties` -- New field `Techniques` in struct `IncidentAdditionalData` -- New field `ProviderIncidentURL` in struct `IncidentAdditionalData` -- New field `Techniques` in struct `ScheduledAlertRuleProperties` -- New field `SourceType` in struct `WatchlistProperties` -- New field `Tactics` in struct `BookmarkProperties` -- New field `EntityMappings` in struct `BookmarkProperties` -- New field `Techniques` in struct `BookmarkProperties` -- New field `AzureAsyncOperation` in struct `WatchlistsClientDeleteResponse` +- New struct `ClientFactory` which is a client factory used to create any client in this module ## 1.0.0 (2022-05-17) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/README.md index 5f065266..652cb433 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/README.md @@ -57,9 +57,16 @@ clientFactory, err := armsecurityinsights.NewClientFactory(, cr 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.NewEntityQueriesClient() +client := clientFactory.NewActionsClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/actions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/actions_client.go index a0c91527..e36f064f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/actions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/actions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type ActionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewActionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ActionsClient, error) { - cl, err := arm.NewClient(moduleName+".ActionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewActionsClient(subscriptionID string, credential azcore.TokenCredential, // - action - The action // - options - ActionsClientCreateOrUpdateOptions contains the optional parameters for the ActionsClient.CreateOrUpdate method. func (client *ActionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, actionID string, action ActionRequest, options *ActionsClientCreateOrUpdateOptions) (ActionsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ActionsClient.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, workspaceName, ruleID, actionID, action, options) if err != nil { return ActionsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ActionsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ActionsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ActionsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -100,7 +106,10 @@ func (client *ActionsClient) createOrUpdateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, action) + if err := runtime.MarshalAsJSON(req, action); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -122,16 +131,22 @@ func (client *ActionsClient) createOrUpdateHandleResponse(resp *http.Response) ( // - actionID - Action ID // - options - ActionsClientDeleteOptions contains the optional parameters for the ActionsClient.Delete method. func (client *ActionsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, actionID string, options *ActionsClientDeleteOptions) (ActionsClientDeleteResponse, error) { + var err error + const operationName = "ActionsClient.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, workspaceName, ruleID, actionID, options) if err != nil { return ActionsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ActionsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ActionsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ActionsClientDeleteResponse{}, err } return ActionsClientDeleteResponse{}, nil } @@ -180,18 +195,25 @@ func (client *ActionsClient) deleteCreateRequest(ctx context.Context, resourceGr // - actionID - Action ID // - options - ActionsClientGetOptions contains the optional parameters for the ActionsClient.Get method. func (client *ActionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, actionID string, options *ActionsClientGetOptions) (ActionsClientGetResponse, error) { + var err error + const operationName = "ActionsClient.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, ruleID, actionID, options) if err != nil { return ActionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ActionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ActionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -251,25 +273,20 @@ func (client *ActionsClient) NewListByAlertRulePager(resourceGroupName string, w return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ActionsClientListByAlertRuleResponse) (ActionsClientListByAlertRuleResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAlertRuleCreateRequest(ctx, resourceGroupName, workspaceName, ruleID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ActionsClient.NewListByAlertRulePager") + 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.listByAlertRuleCreateRequest(ctx, resourceGroupName, workspaceName, ruleID, options) + }, nil) if err != nil { return ActionsClientListByAlertRuleResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ActionsClientListByAlertRuleResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActionsClientListByAlertRuleResponse{}, runtime.NewResponseError(resp) - } return client.listByAlertRuleHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/alertrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/alertrules_client.go index 9d4ae950..58e0b2ff 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/alertrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/alertrules_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type AlertRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAlertRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertRulesClient, error) { - cl, err := arm.NewClient(moduleName+".AlertRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewAlertRulesClient(subscriptionID string, credential azcore.TokenCredentia // - options - AlertRulesClientCreateOrUpdateOptions contains the optional parameters for the AlertRulesClient.CreateOrUpdate // method. func (client *AlertRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, alertRule AlertRuleClassification, options *AlertRulesClientCreateOrUpdateOptions) (AlertRulesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AlertRulesClient.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, workspaceName, ruleID, alertRule, options) if err != nil { return AlertRulesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertRulesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return AlertRulesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return AlertRulesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *AlertRulesClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, alertRule) + if err := runtime.MarshalAsJSON(req, alertRule); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *AlertRulesClient) createOrUpdateHandleResponse(resp *http.Response // - ruleID - Alert rule ID // - options - AlertRulesClientDeleteOptions contains the optional parameters for the AlertRulesClient.Delete method. func (client *AlertRulesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, options *AlertRulesClientDeleteOptions) (AlertRulesClientDeleteResponse, error) { + var err error + const operationName = "AlertRulesClient.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, workspaceName, ruleID, options) if err != nil { return AlertRulesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertRulesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return AlertRulesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return AlertRulesClientDeleteResponse{}, err } return AlertRulesClientDeleteResponse{}, nil } @@ -170,18 +185,25 @@ func (client *AlertRulesClient) deleteCreateRequest(ctx context.Context, resourc // - ruleID - Alert rule ID // - options - AlertRulesClientGetOptions contains the optional parameters for the AlertRulesClient.Get method. func (client *AlertRulesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, ruleID string, options *AlertRulesClientGetOptions) (AlertRulesClientGetResponse, error) { + var err error + const operationName = "AlertRulesClient.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, ruleID, options) if err != nil { return AlertRulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertRulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertRulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AlertRulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -235,25 +257,20 @@ func (client *AlertRulesClient) NewListPager(resourceGroupName string, workspace return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AlertRulesClientListResponse) (AlertRulesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AlertRulesClient.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 AlertRulesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AlertRulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertRulesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/alertruletemplates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/alertruletemplates_client.go index 3a0ad90d..07c3b149 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/alertruletemplates_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/alertruletemplates_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type AlertRuleTemplatesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAlertRuleTemplatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertRuleTemplatesClient, error) { - cl, err := arm.NewClient(moduleName+".AlertRuleTemplatesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewAlertRuleTemplatesClient(subscriptionID string, credential azcore.TokenC // - alertRuleTemplateID - Alert rule template ID // - options - AlertRuleTemplatesClientGetOptions contains the optional parameters for the AlertRuleTemplatesClient.Get method. func (client *AlertRuleTemplatesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, alertRuleTemplateID string, options *AlertRuleTemplatesClientGetOptions) (AlertRuleTemplatesClientGetResponse, error) { + var err error + const operationName = "AlertRuleTemplatesClient.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, alertRuleTemplateID, options) if err != nil { return AlertRuleTemplatesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AlertRuleTemplatesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertRuleTemplatesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AlertRuleTemplatesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -119,25 +125,20 @@ func (client *AlertRuleTemplatesClient) NewListPager(resourceGroupName string, w return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AlertRuleTemplatesClientListResponse) (AlertRuleTemplatesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AlertRuleTemplatesClient.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 AlertRuleTemplatesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AlertRuleTemplatesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertRuleTemplatesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/automationrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/automationrules_client.go index 47858a49..e2d3436d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/automationrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/automationrules_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type AutomationRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAutomationRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AutomationRulesClient, error) { - cl, err := arm.NewClient(moduleName+".AutomationRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewAutomationRulesClient(subscriptionID string, credential azcore.TokenCred // - options - AutomationRulesClientCreateOrUpdateOptions contains the optional parameters for the AutomationRulesClient.CreateOrUpdate // method. func (client *AutomationRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, automationRuleID string, options *AutomationRulesClientCreateOrUpdateOptions) (AutomationRulesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AutomationRulesClient.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, workspaceName, automationRuleID, options) if err != nil { return AutomationRulesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AutomationRulesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return AutomationRulesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return AutomationRulesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *AutomationRulesClient) createOrUpdateCreateRequest(ctx context.Con req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.AutomationRuleToUpsert != nil { - return req, runtime.MarshalAsJSON(req, *options.AutomationRuleToUpsert) + if err := runtime.MarshalAsJSON(req, *options.AutomationRuleToUpsert); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -119,18 +128,25 @@ func (client *AutomationRulesClient) createOrUpdateHandleResponse(resp *http.Res // - automationRuleID - Automation rule ID // - options - AutomationRulesClientDeleteOptions contains the optional parameters for the AutomationRulesClient.Delete method. func (client *AutomationRulesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, automationRuleID string, options *AutomationRulesClientDeleteOptions) (AutomationRulesClientDeleteResponse, error) { + var err error + const operationName = "AutomationRulesClient.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, workspaceName, automationRuleID, options) if err != nil { return AutomationRulesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AutomationRulesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return AutomationRulesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return AutomationRulesClientDeleteResponse{}, err } - return client.deleteHandleResponse(resp) + resp, err := client.deleteHandleResponse(httpResp) + return resp, err } // deleteCreateRequest creates the Delete request. @@ -181,18 +197,25 @@ func (client *AutomationRulesClient) deleteHandleResponse(resp *http.Response) ( // - automationRuleID - Automation rule ID // - options - AutomationRulesClientGetOptions contains the optional parameters for the AutomationRulesClient.Get method. func (client *AutomationRulesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, automationRuleID string, options *AutomationRulesClientGetOptions) (AutomationRulesClientGetResponse, error) { + var err error + const operationName = "AutomationRulesClient.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, automationRuleID, options) if err != nil { return AutomationRulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AutomationRulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AutomationRulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AutomationRulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -247,25 +270,20 @@ func (client *AutomationRulesClient) NewListPager(resourceGroupName string, work return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AutomationRulesClientListResponse) (AutomationRulesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AutomationRulesClient.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 AutomationRulesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AutomationRulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AutomationRulesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/autorest.md index 5f611d8b..d3f5ffc2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/autorest.md @@ -5,10 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/e24bbf6a66cb0a19c072c6f15cee163acbd7acf7/specification/securityinsights/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/e24bbf6a66cb0a19c072c6f15cee163acbd7acf7/specification/securityinsights/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/6c4f3c695f0250dcb261598a62004f0aef10b9db/specification/securityinsights/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/6c4f3c695f0250dcb261598a62004f0aef10b9db/specification/securityinsights/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.0.0-beta.3 -modelerfour: - lenient-model-deduplication: true +module-version: 2.0.0-beta.4 +tag: package-preview-2022-09 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/bookmark_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/bookmark_client.go index b1e6f4bb..ad617ff0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/bookmark_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/bookmark_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type BookmarkClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBookmarkClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BookmarkClient, error) { - cl, err := arm.NewClient(moduleName+".BookmarkClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewBookmarkClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - The parameters required to execute an expand operation on the given bookmark. // - options - BookmarkClientExpandOptions contains the optional parameters for the BookmarkClient.Expand method. func (client *BookmarkClient) Expand(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string, parameters BookmarkExpandParameters, options *BookmarkClientExpandOptions) (BookmarkClientExpandResponse, error) { + var err error + const operationName = "BookmarkClient.Expand" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.expandCreateRequest(ctx, resourceGroupName, workspaceName, bookmarkID, parameters, options) if err != nil { return BookmarkClientExpandResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BookmarkClientExpandResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BookmarkClientExpandResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BookmarkClientExpandResponse{}, err } - return client.expandHandleResponse(resp) + resp, err := client.expandHandleResponse(httpResp) + return resp, err } // expandCreateRequest creates the Expand request. @@ -95,7 +101,10 @@ func (client *BookmarkClient) expandCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // expandHandleResponse handles the Expand response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/bookmarkrelations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/bookmarkrelations_client.go index a31fa25c..92c37d97 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/bookmarkrelations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/bookmarkrelations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -34,7 +33,7 @@ type BookmarkRelationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBookmarkRelationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BookmarkRelationsClient, error) { - cl, err := arm.NewClient(moduleName+".BookmarkRelationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,18 +56,25 @@ func NewBookmarkRelationsClient(subscriptionID string, credential azcore.TokenCr // - options - BookmarkRelationsClientCreateOrUpdateOptions contains the optional parameters for the BookmarkRelationsClient.CreateOrUpdate // method. func (client *BookmarkRelationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string, relationName string, relation Relation, options *BookmarkRelationsClientCreateOrUpdateOptions) (BookmarkRelationsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "BookmarkRelationsClient.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, workspaceName, bookmarkID, relationName, relation, options) if err != nil { return BookmarkRelationsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BookmarkRelationsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return BookmarkRelationsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return BookmarkRelationsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -102,7 +108,10 @@ func (client *BookmarkRelationsClient) createOrUpdateCreateRequest(ctx context.C reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, relation) + if err := runtime.MarshalAsJSON(req, relation); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -125,16 +134,22 @@ func (client *BookmarkRelationsClient) createOrUpdateHandleResponse(resp *http.R // - options - BookmarkRelationsClientDeleteOptions contains the optional parameters for the BookmarkRelationsClient.Delete // method. func (client *BookmarkRelationsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string, relationName string, options *BookmarkRelationsClientDeleteOptions) (BookmarkRelationsClientDeleteResponse, error) { + var err error + const operationName = "BookmarkRelationsClient.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, workspaceName, bookmarkID, relationName, options) if err != nil { return BookmarkRelationsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BookmarkRelationsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return BookmarkRelationsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return BookmarkRelationsClientDeleteResponse{}, err } return BookmarkRelationsClientDeleteResponse{}, nil } @@ -183,18 +198,25 @@ func (client *BookmarkRelationsClient) deleteCreateRequest(ctx context.Context, // - relationName - Relation Name // - options - BookmarkRelationsClientGetOptions contains the optional parameters for the BookmarkRelationsClient.Get method. func (client *BookmarkRelationsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string, relationName string, options *BookmarkRelationsClientGetOptions) (BookmarkRelationsClientGetResponse, error) { + var err error + const operationName = "BookmarkRelationsClient.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, bookmarkID, relationName, options) if err != nil { return BookmarkRelationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BookmarkRelationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BookmarkRelationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BookmarkRelationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -254,25 +276,20 @@ func (client *BookmarkRelationsClient) NewListPager(resourceGroupName string, wo return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *BookmarkRelationsClientListResponse) (BookmarkRelationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, bookmarkID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BookmarkRelationsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BookmarkRelationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, workspaceName, bookmarkID, options) + }, nil) if err != nil { return BookmarkRelationsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BookmarkRelationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -300,19 +317,19 @@ func (client *BookmarkRelationsClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } 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.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2022-09-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/securityinsights/armsecurityinsights/v2/bookmarks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/bookmarks_client.go index 55754de8..61b9576d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/bookmarks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/bookmarks_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type BookmarksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBookmarksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BookmarksClient, error) { - cl, err := arm.NewClient(moduleName+".BookmarksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewBookmarksClient(subscriptionID string, credential azcore.TokenCredential // - options - BookmarksClientCreateOrUpdateOptions contains the optional parameters for the BookmarksClient.CreateOrUpdate // method. func (client *BookmarksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string, bookmark Bookmark, options *BookmarksClientCreateOrUpdateOptions) (BookmarksClientCreateOrUpdateResponse, error) { + var err error + const operationName = "BookmarksClient.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, workspaceName, bookmarkID, bookmark, options) if err != nil { return BookmarksClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BookmarksClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return BookmarksClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return BookmarksClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *BookmarksClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, bookmark) + if err := runtime.MarshalAsJSON(req, bookmark); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *BookmarksClient) createOrUpdateHandleResponse(resp *http.Response) // - bookmarkID - Bookmark ID // - options - BookmarksClientDeleteOptions contains the optional parameters for the BookmarksClient.Delete method. func (client *BookmarksClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string, options *BookmarksClientDeleteOptions) (BookmarksClientDeleteResponse, error) { + var err error + const operationName = "BookmarksClient.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, workspaceName, bookmarkID, options) if err != nil { return BookmarksClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BookmarksClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return BookmarksClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return BookmarksClientDeleteResponse{}, err } return BookmarksClientDeleteResponse{}, nil } @@ -170,18 +185,25 @@ func (client *BookmarksClient) deleteCreateRequest(ctx context.Context, resource // - bookmarkID - Bookmark ID // - options - BookmarksClientGetOptions contains the optional parameters for the BookmarksClient.Get method. func (client *BookmarksClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, bookmarkID string, options *BookmarksClientGetOptions) (BookmarksClientGetResponse, error) { + var err error + const operationName = "BookmarksClient.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, bookmarkID, options) if err != nil { return BookmarksClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BookmarksClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BookmarksClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BookmarksClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -235,25 +257,20 @@ func (client *BookmarksClient) NewListPager(resourceGroupName string, workspaceN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *BookmarksClientListResponse) (BookmarksClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BookmarksClient.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 BookmarksClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BookmarksClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BookmarksClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/ci.yml index ba39b9a0..9e2ee181 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/ci.yml +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/ci.yml @@ -21,8 +21,8 @@ pr: include: - sdk/resourcemanager/securityinsights/armsecurityinsights/ -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/securityinsights/armsecurityinsights' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/client_factory.go index 05351666..9fffbe47 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -18,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. @@ -28,182 +26,283 @@ 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+".ClientFactory", 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 } -func (c *ClientFactory) NewAlertRulesClient() *AlertRulesClient { - subClient, _ := NewAlertRulesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - +// NewActionsClient creates a new instance of ActionsClient. func (c *ClientFactory) NewActionsClient() *ActionsClient { - subClient, _ := NewActionsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &ActionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewAlertRuleTemplatesClient creates a new instance of AlertRuleTemplatesClient. func (c *ClientFactory) NewAlertRuleTemplatesClient() *AlertRuleTemplatesClient { - subClient, _ := NewAlertRuleTemplatesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &AlertRuleTemplatesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewAutomationRulesClient() *AutomationRulesClient { - subClient, _ := NewAutomationRulesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewAlertRulesClient creates a new instance of AlertRulesClient. +func (c *ClientFactory) NewAlertRulesClient() *AlertRulesClient { + return &AlertRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewIncidentsClient() *IncidentsClient { - subClient, _ := NewIncidentsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewAutomationRulesClient creates a new instance of AutomationRulesClient. +func (c *ClientFactory) NewAutomationRulesClient() *AutomationRulesClient { + return &AutomationRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewBookmarksClient() *BookmarksClient { - subClient, _ := NewBookmarksClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewBookmarkClient creates a new instance of BookmarkClient. +func (c *ClientFactory) NewBookmarkClient() *BookmarkClient { + return &BookmarkClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewBookmarkRelationsClient creates a new instance of BookmarkRelationsClient. func (c *ClientFactory) NewBookmarkRelationsClient() *BookmarkRelationsClient { - subClient, _ := NewBookmarkRelationsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &BookmarkRelationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewBookmarkClient() *BookmarkClient { - subClient, _ := NewBookmarkClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewBookmarksClient creates a new instance of BookmarksClient. +func (c *ClientFactory) NewBookmarksClient() *BookmarksClient { + return &BookmarksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewIPGeodataClient() *IPGeodataClient { - subClient, _ := NewIPGeodataClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewDataConnectorsCheckRequirementsClient creates a new instance of DataConnectorsCheckRequirementsClient. +func (c *ClientFactory) NewDataConnectorsCheckRequirementsClient() *DataConnectorsCheckRequirementsClient { + return &DataConnectorsCheckRequirementsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewDataConnectorsClient creates a new instance of DataConnectorsClient. +func (c *ClientFactory) NewDataConnectorsClient() *DataConnectorsClient { + return &DataConnectorsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDomainWhoisClient creates a new instance of DomainWhoisClient. func (c *ClientFactory) NewDomainWhoisClient() *DomainWhoisClient { - subClient, _ := NewDomainWhoisClient(c.subscriptionID, c.credential, c.options) - return subClient + return &DomainWhoisClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewEntitiesClient creates a new instance of EntitiesClient. func (c *ClientFactory) NewEntitiesClient() *EntitiesClient { - subClient, _ := NewEntitiesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &EntitiesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewEntitiesGetTimelineClient creates a new instance of EntitiesGetTimelineClient. func (c *ClientFactory) NewEntitiesGetTimelineClient() *EntitiesGetTimelineClient { - subClient, _ := NewEntitiesGetTimelineClient(c.subscriptionID, c.credential, c.options) - return subClient + return &EntitiesGetTimelineClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewEntitiesRelationsClient creates a new instance of EntitiesRelationsClient. func (c *ClientFactory) NewEntitiesRelationsClient() *EntitiesRelationsClient { - subClient, _ := NewEntitiesRelationsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewEntityRelationsClient() *EntityRelationsClient { - subClient, _ := NewEntityRelationsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &EntitiesRelationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewEntityQueriesClient creates a new instance of EntityQueriesClient. func (c *ClientFactory) NewEntityQueriesClient() *EntityQueriesClient { - subClient, _ := NewEntityQueriesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &EntityQueriesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewEntityQueryTemplatesClient creates a new instance of EntityQueryTemplatesClient. func (c *ClientFactory) NewEntityQueryTemplatesClient() *EntityQueryTemplatesClient { - subClient, _ := NewEntityQueryTemplatesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &EntityQueryTemplatesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewEntityRelationsClient creates a new instance of EntityRelationsClient. +func (c *ClientFactory) NewEntityRelationsClient() *EntityRelationsClient { + return &EntityRelationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewFileImportsClient creates a new instance of FileImportsClient. func (c *ClientFactory) NewFileImportsClient() *FileImportsClient { - subClient, _ := NewFileImportsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &FileImportsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewIPGeodataClient creates a new instance of IPGeodataClient. +func (c *ClientFactory) NewIPGeodataClient() *IPGeodataClient { + return &IPGeodataClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewIncidentCommentsClient creates a new instance of IncidentCommentsClient. func (c *ClientFactory) NewIncidentCommentsClient() *IncidentCommentsClient { - subClient, _ := NewIncidentCommentsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &IncidentCommentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewIncidentRelationsClient creates a new instance of IncidentRelationsClient. func (c *ClientFactory) NewIncidentRelationsClient() *IncidentRelationsClient { - subClient, _ := NewIncidentRelationsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &IncidentRelationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewIncidentsClient creates a new instance of IncidentsClient. +func (c *ClientFactory) NewIncidentsClient() *IncidentsClient { + return &IncidentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewMetadataClient creates a new instance of MetadataClient. func (c *ClientFactory) NewMetadataClient() *MetadataClient { - subClient, _ := NewMetadataClient(c.subscriptionID, c.credential, c.options) - return subClient + return &MetadataClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewOfficeConsentsClient creates a new instance of OfficeConsentsClient. func (c *ClientFactory) NewOfficeConsentsClient() *OfficeConsentsClient { - subClient, _ := NewOfficeConsentsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &OfficeConsentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewSentinelOnboardingStatesClient() *SentinelOnboardingStatesClient { - subClient, _ := NewSentinelOnboardingStatesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } +} + +// NewProductSettingsClient creates a new instance of ProductSettingsClient. +func (c *ClientFactory) NewProductSettingsClient() *ProductSettingsClient { + return &ProductSettingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewSecurityMLAnalyticsSettingsClient creates a new instance of SecurityMLAnalyticsSettingsClient. func (c *ClientFactory) NewSecurityMLAnalyticsSettingsClient() *SecurityMLAnalyticsSettingsClient { - subClient, _ := NewSecurityMLAnalyticsSettingsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SecurityMLAnalyticsSettingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewProductSettingsClient() *ProductSettingsClient { - subClient, _ := NewProductSettingsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewSentinelOnboardingStatesClient creates a new instance of SentinelOnboardingStatesClient. +func (c *ClientFactory) NewSentinelOnboardingStatesClient() *SentinelOnboardingStatesClient { + return &SentinelOnboardingStatesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewSourceControlClient creates a new instance of SourceControlClient. func (c *ClientFactory) NewSourceControlClient() *SourceControlClient { - subClient, _ := NewSourceControlClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SourceControlClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewSourceControlsClient creates a new instance of SourceControlsClient. func (c *ClientFactory) NewSourceControlsClient() *SourceControlsClient { - subClient, _ := NewSourceControlsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SourceControlsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewThreatIntelligenceIndicatorClient creates a new instance of ThreatIntelligenceIndicatorClient. func (c *ClientFactory) NewThreatIntelligenceIndicatorClient() *ThreatIntelligenceIndicatorClient { - subClient, _ := NewThreatIntelligenceIndicatorClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewThreatIntelligenceIndicatorsClient() *ThreatIntelligenceIndicatorsClient { - subClient, _ := NewThreatIntelligenceIndicatorsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &ThreatIntelligenceIndicatorClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewThreatIntelligenceIndicatorMetricsClient creates a new instance of ThreatIntelligenceIndicatorMetricsClient. func (c *ClientFactory) NewThreatIntelligenceIndicatorMetricsClient() *ThreatIntelligenceIndicatorMetricsClient { - subClient, _ := NewThreatIntelligenceIndicatorMetricsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &ThreatIntelligenceIndicatorMetricsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewWatchlistsClient() *WatchlistsClient { - subClient, _ := NewWatchlistsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewThreatIntelligenceIndicatorsClient creates a new instance of ThreatIntelligenceIndicatorsClient. +func (c *ClientFactory) NewThreatIntelligenceIndicatorsClient() *ThreatIntelligenceIndicatorsClient { + return &ThreatIntelligenceIndicatorsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewWatchlistItemsClient creates a new instance of WatchlistItemsClient. func (c *ClientFactory) NewWatchlistItemsClient() *WatchlistItemsClient { - subClient, _ := NewWatchlistItemsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewDataConnectorsClient() *DataConnectorsClient { - subClient, _ := NewDataConnectorsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewDataConnectorsCheckRequirementsClient() *DataConnectorsCheckRequirementsClient { - subClient, _ := NewDataConnectorsCheckRequirementsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &WatchlistItemsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient +// NewWatchlistsClient creates a new instance of WatchlistsClient. +func (c *ClientFactory) NewWatchlistsClient() *WatchlistsClient { + return &WatchlistsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/constants.go index 1cfa2433..7a67cf91 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights const ( - moduleName = "armsecurityinsights" - moduleVersion = "v2.0.0-beta.3" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights" + moduleVersion = "v2.0.0-beta.4" ) // ActionType - The type of the automation rule action. @@ -832,26 +831,26 @@ func PossibleDeleteStatusValues() []DeleteStatus { type DeliveryAction string const ( - // DeliveryActionUnknown - Unknown - DeliveryActionUnknown DeliveryAction = "Unknown" - // DeliveryActionDeliveredAsSpam - DeliveredAsSpam - DeliveryActionDeliveredAsSpam DeliveryAction = "DeliveredAsSpam" - // DeliveryActionDelivered - Delivered - DeliveryActionDelivered DeliveryAction = "Delivered" // DeliveryActionBlocked - Blocked DeliveryActionBlocked DeliveryAction = "Blocked" + // DeliveryActionDelivered - Delivered + DeliveryActionDelivered DeliveryAction = "Delivered" + // DeliveryActionDeliveredAsSpam - DeliveredAsSpam + DeliveryActionDeliveredAsSpam DeliveryAction = "DeliveredAsSpam" // DeliveryActionReplaced - Replaced DeliveryActionReplaced DeliveryAction = "Replaced" + // DeliveryActionUnknown - Unknown + DeliveryActionUnknown DeliveryAction = "Unknown" ) // PossibleDeliveryActionValues returns the possible values for the DeliveryAction const type. func PossibleDeliveryActionValues() []DeliveryAction { return []DeliveryAction{ - DeliveryActionUnknown, - DeliveryActionDeliveredAsSpam, - DeliveryActionDelivered, DeliveryActionBlocked, + DeliveryActionDelivered, + DeliveryActionDeliveredAsSpam, DeliveryActionReplaced, + DeliveryActionUnknown, } } @@ -859,38 +858,38 @@ func PossibleDeliveryActionValues() []DeliveryAction { type DeliveryLocation string const ( - // DeliveryLocationUnknown - Unknown - DeliveryLocationUnknown DeliveryLocation = "Unknown" - // DeliveryLocationInbox - Inbox - DeliveryLocationInbox DeliveryLocation = "Inbox" - // DeliveryLocationJunkFolder - JunkFolder - DeliveryLocationJunkFolder DeliveryLocation = "JunkFolder" // DeliveryLocationDeletedFolder - DeletedFolder DeliveryLocationDeletedFolder DeliveryLocation = "DeletedFolder" - // DeliveryLocationQuarantine - Quarantine - DeliveryLocationQuarantine DeliveryLocation = "Quarantine" + // DeliveryLocationDropped - Dropped + DeliveryLocationDropped DeliveryLocation = "Dropped" // DeliveryLocationExternal - External DeliveryLocationExternal DeliveryLocation = "External" // DeliveryLocationFailed - Failed DeliveryLocationFailed DeliveryLocation = "Failed" - // DeliveryLocationDropped - Dropped - DeliveryLocationDropped DeliveryLocation = "Dropped" // DeliveryLocationForwarded - Forwarded DeliveryLocationForwarded DeliveryLocation = "Forwarded" + // DeliveryLocationInbox - Inbox + DeliveryLocationInbox DeliveryLocation = "Inbox" + // DeliveryLocationJunkFolder - JunkFolder + DeliveryLocationJunkFolder DeliveryLocation = "JunkFolder" + // DeliveryLocationQuarantine - Quarantine + DeliveryLocationQuarantine DeliveryLocation = "Quarantine" + // DeliveryLocationUnknown - Unknown + DeliveryLocationUnknown DeliveryLocation = "Unknown" ) // PossibleDeliveryLocationValues returns the possible values for the DeliveryLocation const type. func PossibleDeliveryLocationValues() []DeliveryLocation { return []DeliveryLocation{ - DeliveryLocationUnknown, - DeliveryLocationInbox, - DeliveryLocationJunkFolder, DeliveryLocationDeletedFolder, - DeliveryLocationQuarantine, + DeliveryLocationDropped, DeliveryLocationExternal, DeliveryLocationFailed, - DeliveryLocationDropped, DeliveryLocationForwarded, + DeliveryLocationInbox, + DeliveryLocationJunkFolder, + DeliveryLocationQuarantine, + DeliveryLocationUnknown, } } @@ -1783,26 +1782,26 @@ func PossibleMicrosoftSecurityProductNameValues() []MicrosoftSecurityProductName type OSFamily string const ( - // OSFamilyLinux - Host with Linux operating system. - OSFamilyLinux OSFamily = "Linux" - // OSFamilyWindows - Host with Windows operating system. - OSFamilyWindows OSFamily = "Windows" // OSFamilyAndroid - Host with Android operating system. OSFamilyAndroid OSFamily = "Android" // OSFamilyIOS - Host with IOS operating system. OSFamilyIOS OSFamily = "IOS" + // OSFamilyLinux - Host with Linux operating system. + OSFamilyLinux OSFamily = "Linux" // OSFamilyUnknown - Host with Unknown operating system. OSFamilyUnknown OSFamily = "Unknown" + // OSFamilyWindows - Host with Windows operating system. + OSFamilyWindows OSFamily = "Windows" ) // PossibleOSFamilyValues returns the possible values for the OSFamily const type. func PossibleOSFamilyValues() []OSFamily { return []OSFamily{ - OSFamilyLinux, - OSFamilyWindows, OSFamilyAndroid, OSFamilyIOS, + OSFamilyLinux, OSFamilyUnknown, + OSFamilyWindows, } } @@ -2203,18 +2202,18 @@ func PossibleThreatIntelligenceSortingCriteriaEnumValues() []ThreatIntelligenceS type TriggerOperator string const ( + TriggerOperatorEqual TriggerOperator = "Equal" TriggerOperatorGreaterThan TriggerOperator = "GreaterThan" TriggerOperatorLessThan TriggerOperator = "LessThan" - TriggerOperatorEqual TriggerOperator = "Equal" TriggerOperatorNotEqual TriggerOperator = "NotEqual" ) // PossibleTriggerOperatorValues returns the possible values for the TriggerOperator const type. func PossibleTriggerOperatorValues() []TriggerOperator { return []TriggerOperator{ + TriggerOperatorEqual, TriggerOperatorGreaterThan, TriggerOperatorLessThan, - TriggerOperatorEqual, TriggerOperatorNotEqual, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/dataconnectors_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/dataconnectors_client.go index 805d8284..6c168df3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/dataconnectors_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/dataconnectors_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type DataConnectorsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDataConnectorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataConnectorsClient, error) { - cl, err := arm.NewClient(moduleName+".DataConnectorsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,16 +53,22 @@ func NewDataConnectorsClient(subscriptionID string, credential azcore.TokenCrede // - connectBody - The data connector // - options - DataConnectorsClientConnectOptions contains the optional parameters for the DataConnectorsClient.Connect method. func (client *DataConnectorsClient) Connect(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string, connectBody DataConnectorConnectBody, options *DataConnectorsClientConnectOptions) (DataConnectorsClientConnectResponse, error) { + var err error + const operationName = "DataConnectorsClient.Connect" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.connectCreateRequest(ctx, resourceGroupName, workspaceName, dataConnectorID, connectBody, options) if err != nil { return DataConnectorsClientConnectResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataConnectorsClientConnectResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataConnectorsClientConnectResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataConnectorsClientConnectResponse{}, err } return DataConnectorsClientConnectResponse{}, nil } @@ -95,7 +100,10 @@ func (client *DataConnectorsClient) connectCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectBody) + if err := runtime.MarshalAsJSON(req, connectBody); err != nil { + return nil, err + } + return req, nil } // CreateOrUpdate - Creates or updates the data connector. @@ -109,18 +117,25 @@ func (client *DataConnectorsClient) connectCreateRequest(ctx context.Context, re // - options - DataConnectorsClientCreateOrUpdateOptions contains the optional parameters for the DataConnectorsClient.CreateOrUpdate // method. func (client *DataConnectorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string, dataConnector DataConnectorClassification, options *DataConnectorsClientCreateOrUpdateOptions) (DataConnectorsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DataConnectorsClient.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, workspaceName, dataConnectorID, dataConnector, options) if err != nil { return DataConnectorsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataConnectorsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DataConnectorsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DataConnectorsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -150,7 +165,10 @@ func (client *DataConnectorsClient) createOrUpdateCreateRequest(ctx context.Cont reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, dataConnector) + if err := runtime.MarshalAsJSON(req, dataConnector); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -171,16 +189,22 @@ func (client *DataConnectorsClient) createOrUpdateHandleResponse(resp *http.Resp // - dataConnectorID - Connector ID // - options - DataConnectorsClientDeleteOptions contains the optional parameters for the DataConnectorsClient.Delete method. func (client *DataConnectorsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string, options *DataConnectorsClientDeleteOptions) (DataConnectorsClientDeleteResponse, error) { + var err error + const operationName = "DataConnectorsClient.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, workspaceName, dataConnectorID, options) if err != nil { return DataConnectorsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataConnectorsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DataConnectorsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DataConnectorsClientDeleteResponse{}, err } return DataConnectorsClientDeleteResponse{}, nil } @@ -225,16 +249,22 @@ func (client *DataConnectorsClient) deleteCreateRequest(ctx context.Context, res // - options - DataConnectorsClientDisconnectOptions contains the optional parameters for the DataConnectorsClient.Disconnect // method. func (client *DataConnectorsClient) Disconnect(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string, options *DataConnectorsClientDisconnectOptions) (DataConnectorsClientDisconnectResponse, error) { + var err error + const operationName = "DataConnectorsClient.Disconnect" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.disconnectCreateRequest(ctx, resourceGroupName, workspaceName, dataConnectorID, options) if err != nil { return DataConnectorsClientDisconnectResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataConnectorsClientDisconnectResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataConnectorsClientDisconnectResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataConnectorsClientDisconnectResponse{}, err } return DataConnectorsClientDisconnectResponse{}, nil } @@ -278,18 +308,25 @@ func (client *DataConnectorsClient) disconnectCreateRequest(ctx context.Context, // - dataConnectorID - Connector ID // - options - DataConnectorsClientGetOptions contains the optional parameters for the DataConnectorsClient.Get method. func (client *DataConnectorsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorID string, options *DataConnectorsClientGetOptions) (DataConnectorsClientGetResponse, error) { + var err error + const operationName = "DataConnectorsClient.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, dataConnectorID, options) if err != nil { return DataConnectorsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataConnectorsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataConnectorsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataConnectorsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -343,25 +380,20 @@ func (client *DataConnectorsClient) NewListPager(resourceGroupName string, works return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DataConnectorsClientListResponse) (DataConnectorsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DataConnectorsClient.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 DataConnectorsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DataConnectorsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataConnectorsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/dataconnectorscheckrequirements_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/dataconnectorscheckrequirements_client.go index 2c3a9f13..3230728b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/dataconnectorscheckrequirements_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/dataconnectorscheckrequirements_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type DataConnectorsCheckRequirementsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDataConnectorsCheckRequirementsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataConnectorsCheckRequirementsClient, error) { - cl, err := arm.NewClient(moduleName+".DataConnectorsCheckRequirementsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewDataConnectorsCheckRequirementsClient(subscriptionID string, credential // - options - DataConnectorsCheckRequirementsClientPostOptions contains the optional parameters for the DataConnectorsCheckRequirementsClient.Post // method. func (client *DataConnectorsCheckRequirementsClient) Post(ctx context.Context, resourceGroupName string, workspaceName string, dataConnectorsCheckRequirements DataConnectorsCheckRequirementsClassification, options *DataConnectorsCheckRequirementsClientPostOptions) (DataConnectorsCheckRequirementsClientPostResponse, error) { + var err error + const operationName = "DataConnectorsCheckRequirementsClient.Post" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.postCreateRequest(ctx, resourceGroupName, workspaceName, dataConnectorsCheckRequirements, options) if err != nil { return DataConnectorsCheckRequirementsClientPostResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataConnectorsCheckRequirementsClientPostResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataConnectorsCheckRequirementsClientPostResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataConnectorsCheckRequirementsClientPostResponse{}, err } - return client.postHandleResponse(resp) + resp, err := client.postHandleResponse(httpResp) + return resp, err } // postCreateRequest creates the Post request. @@ -91,7 +97,10 @@ func (client *DataConnectorsCheckRequirementsClient) postCreateRequest(ctx conte reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, dataConnectorsCheckRequirements) + if err := runtime.MarshalAsJSON(req, dataConnectorsCheckRequirements); err != nil { + return nil, err + } + return req, nil } // postHandleResponse handles the Post response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/date_type.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/date_type.go index 792f35ac..6040de15 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/date_type.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/date_type.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -14,7 +13,6 @@ import ( "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "reflect" - "strings" "time" ) @@ -48,7 +46,7 @@ func populateDateType(m map[string]any, k string, t *time.Time) { } func unpopulateDateType(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 dateType diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/domainwhois_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/domainwhois_client.go index 549edb38..eb31c33a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/domainwhois_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/domainwhois_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type DomainWhoisClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDomainWhoisClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DomainWhoisClient, error) { - cl, err := arm.NewClient(moduleName+".DomainWhoisClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -52,18 +51,25 @@ func NewDomainWhoisClient(subscriptionID string, credential azcore.TokenCredenti // - domain - Domain name to be enriched // - options - DomainWhoisClientGetOptions contains the optional parameters for the DomainWhoisClient.Get method. func (client *DomainWhoisClient) Get(ctx context.Context, resourceGroupName string, domain string, options *DomainWhoisClientGetOptions) (DomainWhoisClientGetResponse, error) { + var err error + const operationName = "DomainWhoisClient.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, domain, options) if err != nil { return DomainWhoisClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DomainWhoisClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainWhoisClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainWhoisClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entities_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entities_client.go index 35a3cd0a..f3112c80 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entities_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entities_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type EntitiesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEntitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EntitiesClient, error) { - cl, err := arm.NewClient(moduleName+".EntitiesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewEntitiesClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - The parameters required to execute an expand operation on the given entity. // - options - EntitiesClientExpandOptions contains the optional parameters for the EntitiesClient.Expand method. func (client *EntitiesClient) Expand(ctx context.Context, resourceGroupName string, workspaceName string, entityID string, parameters EntityExpandParameters, options *EntitiesClientExpandOptions) (EntitiesClientExpandResponse, error) { + var err error + const operationName = "EntitiesClient.Expand" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.expandCreateRequest(ctx, resourceGroupName, workspaceName, entityID, parameters, options) if err != nil { return EntitiesClientExpandResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EntitiesClientExpandResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EntitiesClientExpandResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EntitiesClientExpandResponse{}, err } - return client.expandHandleResponse(resp) + resp, err := client.expandHandleResponse(httpResp) + return resp, err } // expandCreateRequest creates the Expand request. @@ -95,7 +101,10 @@ func (client *EntitiesClient) expandCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // expandHandleResponse handles the Expand response. @@ -116,18 +125,25 @@ func (client *EntitiesClient) expandHandleResponse(resp *http.Response) (Entitie // - entityID - entity ID // - options - EntitiesClientGetOptions contains the optional parameters for the EntitiesClient.Get method. func (client *EntitiesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, entityID string, options *EntitiesClientGetOptions) (EntitiesClientGetResponse, error) { + var err error + const operationName = "EntitiesClient.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, entityID, options) if err != nil { return EntitiesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EntitiesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EntitiesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EntitiesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -179,18 +195,25 @@ func (client *EntitiesClient) getHandleResponse(resp *http.Response) (EntitiesCl // - parameters - The parameters required to execute insights on the given entity. // - options - EntitiesClientGetInsightsOptions contains the optional parameters for the EntitiesClient.GetInsights method. func (client *EntitiesClient) GetInsights(ctx context.Context, resourceGroupName string, workspaceName string, entityID string, parameters EntityGetInsightsParameters, options *EntitiesClientGetInsightsOptions) (EntitiesClientGetInsightsResponse, error) { + var err error + const operationName = "EntitiesClient.GetInsights" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInsightsCreateRequest(ctx, resourceGroupName, workspaceName, entityID, parameters, options) if err != nil { return EntitiesClientGetInsightsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EntitiesClientGetInsightsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EntitiesClientGetInsightsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EntitiesClientGetInsightsResponse{}, err } - return client.getInsightsHandleResponse(resp) + resp, err := client.getInsightsHandleResponse(httpResp) + return resp, err } // getInsightsCreateRequest creates the GetInsights request. @@ -220,7 +243,10 @@ func (client *EntitiesClient) getInsightsCreateRequest(ctx context.Context, reso reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // getInsightsHandleResponse handles the GetInsights response. @@ -244,25 +270,20 @@ func (client *EntitiesClient) NewListPager(resourceGroupName string, workspaceNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EntitiesClientListResponse) (EntitiesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EntitiesClient.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 EntitiesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EntitiesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EntitiesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -311,18 +332,25 @@ func (client *EntitiesClient) listHandleResponse(resp *http.Response) (EntitiesC // - kind - The Kind parameter for queries // - options - EntitiesClientQueriesOptions contains the optional parameters for the EntitiesClient.Queries method. func (client *EntitiesClient) Queries(ctx context.Context, resourceGroupName string, workspaceName string, entityID string, kind EntityItemQueryKind, options *EntitiesClientQueriesOptions) (EntitiesClientQueriesResponse, error) { + var err error + const operationName = "EntitiesClient.Queries" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.queriesCreateRequest(ctx, resourceGroupName, workspaceName, entityID, kind, options) if err != nil { return EntitiesClientQueriesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EntitiesClientQueriesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EntitiesClientQueriesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EntitiesClientQueriesResponse{}, err } - return client.queriesHandleResponse(resp) + resp, err := client.queriesHandleResponse(httpResp) + return resp, err } // queriesCreateRequest creates the Queries request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entitiesgettimeline_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entitiesgettimeline_client.go index 9bbab55b..7b586d58 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entitiesgettimeline_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entitiesgettimeline_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type EntitiesGetTimelineClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEntitiesGetTimelineClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EntitiesGetTimelineClient, error) { - cl, err := arm.NewClient(moduleName+".EntitiesGetTimelineClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewEntitiesGetTimelineClient(subscriptionID string, credential azcore.Token // - options - EntitiesGetTimelineClientListOptions contains the optional parameters for the EntitiesGetTimelineClient.List // method. func (client *EntitiesGetTimelineClient) List(ctx context.Context, resourceGroupName string, workspaceName string, entityID string, parameters EntityTimelineParameters, options *EntitiesGetTimelineClientListOptions) (EntitiesGetTimelineClientListResponse, error) { + var err error + const operationName = "EntitiesGetTimelineClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, entityID, parameters, options) if err != nil { return EntitiesGetTimelineClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EntitiesGetTimelineClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EntitiesGetTimelineClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EntitiesGetTimelineClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -96,7 +102,10 @@ func (client *EntitiesGetTimelineClient) listCreateRequest(ctx context.Context, reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // listHandleResponse handles the List response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entitiesrelations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entitiesrelations_client.go index aa1edf8b..1fbece7e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entitiesrelations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entitiesrelations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -34,7 +33,7 @@ type EntitiesRelationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEntitiesRelationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EntitiesRelationsClient, error) { - cl, err := arm.NewClient(moduleName+".EntitiesRelationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,25 +58,20 @@ func (client *EntitiesRelationsClient) NewListPager(resourceGroupName string, wo return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EntitiesRelationsClientListResponse) (EntitiesRelationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, entityID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EntitiesRelationsClient.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, entityID, options) + }, nil) if err != nil { return EntitiesRelationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EntitiesRelationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EntitiesRelationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -105,19 +99,19 @@ func (client *EntitiesRelationsClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } 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.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2022-09-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/securityinsights/armsecurityinsights/v2/entityqueries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entityqueries_client.go index 72c60b61..7716fa10 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entityqueries_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entityqueries_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type EntityQueriesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEntityQueriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EntityQueriesClient, error) { - cl, err := arm.NewClient(moduleName+".EntityQueriesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewEntityQueriesClient(subscriptionID string, credential azcore.TokenCreden // - options - EntityQueriesClientCreateOrUpdateOptions contains the optional parameters for the EntityQueriesClient.CreateOrUpdate // method. func (client *EntityQueriesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, entityQueryID string, entityQuery CustomEntityQueryClassification, options *EntityQueriesClientCreateOrUpdateOptions) (EntityQueriesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "EntityQueriesClient.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, workspaceName, entityQueryID, entityQuery, options) if err != nil { return EntityQueriesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EntityQueriesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return EntityQueriesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return EntityQueriesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *EntityQueriesClient) createOrUpdateCreateRequest(ctx context.Conte reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, entityQuery) + if err := runtime.MarshalAsJSON(req, entityQuery); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *EntityQueriesClient) createOrUpdateHandleResponse(resp *http.Respo // - entityQueryID - entity query ID // - options - EntityQueriesClientDeleteOptions contains the optional parameters for the EntityQueriesClient.Delete method. func (client *EntityQueriesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, entityQueryID string, options *EntityQueriesClientDeleteOptions) (EntityQueriesClientDeleteResponse, error) { + var err error + const operationName = "EntityQueriesClient.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, workspaceName, entityQueryID, options) if err != nil { return EntityQueriesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EntityQueriesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return EntityQueriesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return EntityQueriesClientDeleteResponse{}, err } return EntityQueriesClientDeleteResponse{}, nil } @@ -170,18 +185,25 @@ func (client *EntityQueriesClient) deleteCreateRequest(ctx context.Context, reso // - entityQueryID - entity query ID // - options - EntityQueriesClientGetOptions contains the optional parameters for the EntityQueriesClient.Get method. func (client *EntityQueriesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, entityQueryID string, options *EntityQueriesClientGetOptions) (EntityQueriesClientGetResponse, error) { + var err error + const operationName = "EntityQueriesClient.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, entityQueryID, options) if err != nil { return EntityQueriesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EntityQueriesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EntityQueriesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EntityQueriesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -235,25 +257,20 @@ func (client *EntityQueriesClient) NewListPager(resourceGroupName string, worksp return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EntityQueriesClientListResponse) (EntityQueriesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EntityQueriesClient.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 EntityQueriesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EntityQueriesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EntityQueriesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -277,10 +294,10 @@ func (client *EntityQueriesClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-09-01-preview") if options != nil && options.Kind != nil { reqQP.Set("kind", string(*options.Kind)) } - reqQP.Set("api-version", "2022-09-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/securityinsights/armsecurityinsights/v2/entityquerytemplates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entityquerytemplates_client.go index 7634994f..7e309dbf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entityquerytemplates_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entityquerytemplates_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type EntityQueryTemplatesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEntityQueryTemplatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EntityQueryTemplatesClient, error) { - cl, err := arm.NewClient(moduleName+".EntityQueryTemplatesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewEntityQueryTemplatesClient(subscriptionID string, credential azcore.Toke // - options - EntityQueryTemplatesClientGetOptions contains the optional parameters for the EntityQueryTemplatesClient.Get // method. func (client *EntityQueryTemplatesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, entityQueryTemplateID string, options *EntityQueryTemplatesClientGetOptions) (EntityQueryTemplatesClientGetResponse, error) { + var err error + const operationName = "EntityQueryTemplatesClient.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, entityQueryTemplateID, options) if err != nil { return EntityQueryTemplatesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EntityQueryTemplatesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EntityQueryTemplatesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EntityQueryTemplatesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -120,25 +126,20 @@ func (client *EntityQueryTemplatesClient) NewListPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EntityQueryTemplatesClientListResponse) (EntityQueryTemplatesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EntityQueryTemplatesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EntityQueryTemplatesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 EntityQueryTemplatesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EntityQueryTemplatesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -162,10 +163,10 @@ func (client *EntityQueryTemplatesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-09-01-preview") if options != nil && options.Kind != nil { reqQP.Set("kind", string(*options.Kind)) } - reqQP.Set("api-version", "2022-09-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/securityinsights/armsecurityinsights/v2/entityrelations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entityrelations_client.go index be04a870..4dc73120 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entityrelations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/entityrelations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type EntityRelationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEntityRelationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EntityRelationsClient, error) { - cl, err := arm.NewClient(moduleName+".EntityRelationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewEntityRelationsClient(subscriptionID string, credential azcore.TokenCred // - options - EntityRelationsClientGetRelationOptions contains the optional parameters for the EntityRelationsClient.GetRelation // method. func (client *EntityRelationsClient) GetRelation(ctx context.Context, resourceGroupName string, workspaceName string, entityID string, relationName string, options *EntityRelationsClientGetRelationOptions) (EntityRelationsClientGetRelationResponse, error) { + var err error + const operationName = "EntityRelationsClient.GetRelation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getRelationCreateRequest(ctx, resourceGroupName, workspaceName, entityID, relationName, options) if err != nil { return EntityRelationsClientGetRelationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EntityRelationsClientGetRelationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EntityRelationsClientGetRelationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EntityRelationsClientGetRelationResponse{}, err } - return client.getRelationHandleResponse(resp) + resp, err := client.getRelationHandleResponse(httpResp) + return resp, err } // getRelationCreateRequest creates the GetRelation request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/fileimports_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/fileimports_client.go index 42e0e723..2b1471af 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/fileimports_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/fileimports_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -34,7 +33,7 @@ type FileImportsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFileImportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FileImportsClient, error) { - cl, err := arm.NewClient(moduleName+".FileImportsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewFileImportsClient(subscriptionID string, credential azcore.TokenCredenti // - fileImport - The file import // - options - FileImportsClientCreateOptions contains the optional parameters for the FileImportsClient.Create method. func (client *FileImportsClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, fileImportID string, fileImport FileImport, options *FileImportsClientCreateOptions) (FileImportsClientCreateResponse, error) { + var err error + const operationName = "FileImportsClient.Create" + 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, workspaceName, fileImportID, fileImport, options) if err != nil { return FileImportsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FileImportsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return FileImportsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return FileImportsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -96,7 +102,10 @@ func (client *FileImportsClient) createCreateRequest(ctx context.Context, resour reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, fileImport) + if err := runtime.MarshalAsJSON(req, fileImport); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -122,11 +131,15 @@ func (client *FileImportsClient) BeginDelete(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FileImportsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FileImportsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[FileImportsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FileImportsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -135,18 +148,24 @@ func (client *FileImportsClient) BeginDelete(ctx context.Context, resourceGroupN // // Generated from API version 2022-09-01-preview func (client *FileImportsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, fileImportID string, options *FileImportsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "FileImportsClient.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, fileImportID, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -188,18 +207,25 @@ func (client *FileImportsClient) deleteCreateRequest(ctx context.Context, resour // - fileImportID - File import ID // - options - FileImportsClientGetOptions contains the optional parameters for the FileImportsClient.Get method. func (client *FileImportsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, fileImportID string, options *FileImportsClientGetOptions) (FileImportsClientGetResponse, error) { + var err error + const operationName = "FileImportsClient.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, fileImportID, options) if err != nil { return FileImportsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FileImportsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FileImportsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FileImportsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -253,25 +279,20 @@ func (client *FileImportsClient) NewListPager(resourceGroupName string, workspac return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *FileImportsClientListResponse) (FileImportsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FileImportsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FileImportsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 FileImportsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FileImportsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -295,19 +316,19 @@ func (client *FileImportsClient) listCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } 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.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2022-09-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/securityinsights/armsecurityinsights/v2/incidentcomments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/incidentcomments_client.go index 7d67d7f1..148c62c1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/incidentcomments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/incidentcomments_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -34,7 +33,7 @@ type IncidentCommentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIncidentCommentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IncidentCommentsClient, error) { - cl, err := arm.NewClient(moduleName+".IncidentCommentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,18 +56,25 @@ func NewIncidentCommentsClient(subscriptionID string, credential azcore.TokenCre // - options - IncidentCommentsClientCreateOrUpdateOptions contains the optional parameters for the IncidentCommentsClient.CreateOrUpdate // method. func (client *IncidentCommentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, incidentCommentID string, incidentComment IncidentComment, options *IncidentCommentsClientCreateOrUpdateOptions) (IncidentCommentsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IncidentCommentsClient.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, workspaceName, incidentID, incidentCommentID, incidentComment, options) if err != nil { return IncidentCommentsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentCommentsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return IncidentCommentsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IncidentCommentsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -102,7 +108,10 @@ func (client *IncidentCommentsClient) createOrUpdateCreateRequest(ctx context.Co reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, incidentComment) + if err := runtime.MarshalAsJSON(req, incidentComment); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -124,16 +133,22 @@ func (client *IncidentCommentsClient) createOrUpdateHandleResponse(resp *http.Re // - incidentCommentID - Incident comment ID // - options - IncidentCommentsClientDeleteOptions contains the optional parameters for the IncidentCommentsClient.Delete method. func (client *IncidentCommentsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, incidentCommentID string, options *IncidentCommentsClientDeleteOptions) (IncidentCommentsClientDeleteResponse, error) { + var err error + const operationName = "IncidentCommentsClient.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, workspaceName, incidentID, incidentCommentID, options) if err != nil { return IncidentCommentsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentCommentsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IncidentCommentsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IncidentCommentsClientDeleteResponse{}, err } return IncidentCommentsClientDeleteResponse{}, nil } @@ -182,18 +197,25 @@ func (client *IncidentCommentsClient) deleteCreateRequest(ctx context.Context, r // - incidentCommentID - Incident comment ID // - options - IncidentCommentsClientGetOptions contains the optional parameters for the IncidentCommentsClient.Get method. func (client *IncidentCommentsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, incidentCommentID string, options *IncidentCommentsClientGetOptions) (IncidentCommentsClientGetResponse, error) { + var err error + const operationName = "IncidentCommentsClient.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, incidentID, incidentCommentID, options) if err != nil { return IncidentCommentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentCommentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IncidentCommentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IncidentCommentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -253,25 +275,20 @@ func (client *IncidentCommentsClient) NewListPager(resourceGroupName string, wor return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IncidentCommentsClientListResponse) (IncidentCommentsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, incidentID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IncidentCommentsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IncidentCommentsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, workspaceName, incidentID, options) + }, nil) if err != nil { return IncidentCommentsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IncidentCommentsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -299,19 +316,19 @@ func (client *IncidentCommentsClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } 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.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2022-09-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/securityinsights/armsecurityinsights/v2/incidentrelations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/incidentrelations_client.go index 5c7ff7b8..c2af2274 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/incidentrelations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/incidentrelations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -34,7 +33,7 @@ type IncidentRelationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIncidentRelationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IncidentRelationsClient, error) { - cl, err := arm.NewClient(moduleName+".IncidentRelationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,18 +56,25 @@ func NewIncidentRelationsClient(subscriptionID string, credential azcore.TokenCr // - options - IncidentRelationsClientCreateOrUpdateOptions contains the optional parameters for the IncidentRelationsClient.CreateOrUpdate // method. func (client *IncidentRelationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, relationName string, relation Relation, options *IncidentRelationsClientCreateOrUpdateOptions) (IncidentRelationsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IncidentRelationsClient.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, workspaceName, incidentID, relationName, relation, options) if err != nil { return IncidentRelationsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentRelationsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return IncidentRelationsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IncidentRelationsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -102,7 +108,10 @@ func (client *IncidentRelationsClient) createOrUpdateCreateRequest(ctx context.C reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, relation) + if err := runtime.MarshalAsJSON(req, relation); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -125,16 +134,22 @@ func (client *IncidentRelationsClient) createOrUpdateHandleResponse(resp *http.R // - options - IncidentRelationsClientDeleteOptions contains the optional parameters for the IncidentRelationsClient.Delete // method. func (client *IncidentRelationsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, relationName string, options *IncidentRelationsClientDeleteOptions) (IncidentRelationsClientDeleteResponse, error) { + var err error + const operationName = "IncidentRelationsClient.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, workspaceName, incidentID, relationName, options) if err != nil { return IncidentRelationsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentRelationsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IncidentRelationsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IncidentRelationsClientDeleteResponse{}, err } return IncidentRelationsClientDeleteResponse{}, nil } @@ -183,18 +198,25 @@ func (client *IncidentRelationsClient) deleteCreateRequest(ctx context.Context, // - relationName - Relation Name // - options - IncidentRelationsClientGetOptions contains the optional parameters for the IncidentRelationsClient.Get method. func (client *IncidentRelationsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, relationName string, options *IncidentRelationsClientGetOptions) (IncidentRelationsClientGetResponse, error) { + var err error + const operationName = "IncidentRelationsClient.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, incidentID, relationName, options) if err != nil { return IncidentRelationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentRelationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IncidentRelationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IncidentRelationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -254,25 +276,20 @@ func (client *IncidentRelationsClient) NewListPager(resourceGroupName string, wo return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IncidentRelationsClientListResponse) (IncidentRelationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, incidentID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IncidentRelationsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IncidentRelationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, workspaceName, incidentID, options) + }, nil) if err != nil { return IncidentRelationsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IncidentRelationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -300,19 +317,19 @@ func (client *IncidentRelationsClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } 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.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2022-09-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/securityinsights/armsecurityinsights/v2/incidents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/incidents_client.go index b747d241..aaf0c006 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/incidents_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/incidents_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -34,7 +33,7 @@ type IncidentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIncidentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IncidentsClient, error) { - cl, err := arm.NewClient(moduleName+".IncidentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewIncidentsClient(subscriptionID string, credential azcore.TokenCredential // - options - IncidentsClientCreateOrUpdateOptions contains the optional parameters for the IncidentsClient.CreateOrUpdate // method. func (client *IncidentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, incident Incident, options *IncidentsClientCreateOrUpdateOptions) (IncidentsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IncidentsClient.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, workspaceName, incidentID, incident, options) if err != nil { return IncidentsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return IncidentsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IncidentsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *IncidentsClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, incident) + if err := runtime.MarshalAsJSON(req, incident); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,18 +128,25 @@ func (client *IncidentsClient) createOrUpdateHandleResponse(resp *http.Response) // - teamProperties - Team properties // - options - IncidentsClientCreateTeamOptions contains the optional parameters for the IncidentsClient.CreateTeam method. func (client *IncidentsClient) CreateTeam(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, teamProperties TeamProperties, options *IncidentsClientCreateTeamOptions) (IncidentsClientCreateTeamResponse, error) { + var err error + const operationName = "IncidentsClient.CreateTeam" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createTeamCreateRequest(ctx, resourceGroupName, workspaceName, incidentID, teamProperties, options) if err != nil { return IncidentsClientCreateTeamResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentsClientCreateTeamResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IncidentsClientCreateTeamResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IncidentsClientCreateTeamResponse{}, err } - return client.createTeamHandleResponse(resp) + resp, err := client.createTeamHandleResponse(httpResp) + return resp, err } // createTeamCreateRequest creates the CreateTeam request. @@ -160,7 +176,10 @@ func (client *IncidentsClient) createTeamCreateRequest(ctx context.Context, reso reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, teamProperties) + if err := runtime.MarshalAsJSON(req, teamProperties); err != nil { + return nil, err + } + return req, nil } // createTeamHandleResponse handles the CreateTeam response. @@ -181,16 +200,22 @@ func (client *IncidentsClient) createTeamHandleResponse(resp *http.Response) (In // - incidentID - Incident ID // - options - IncidentsClientDeleteOptions contains the optional parameters for the IncidentsClient.Delete method. func (client *IncidentsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, options *IncidentsClientDeleteOptions) (IncidentsClientDeleteResponse, error) { + var err error + const operationName = "IncidentsClient.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, workspaceName, incidentID, options) if err != nil { return IncidentsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IncidentsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IncidentsClientDeleteResponse{}, err } return IncidentsClientDeleteResponse{}, nil } @@ -234,18 +259,25 @@ func (client *IncidentsClient) deleteCreateRequest(ctx context.Context, resource // - incidentID - Incident ID // - options - IncidentsClientGetOptions contains the optional parameters for the IncidentsClient.Get method. func (client *IncidentsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, options *IncidentsClientGetOptions) (IncidentsClientGetResponse, error) { + var err error + const operationName = "IncidentsClient.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, incidentID, options) if err != nil { return IncidentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IncidentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IncidentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -299,25 +331,20 @@ func (client *IncidentsClient) NewListPager(resourceGroupName string, workspaceN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IncidentsClientListResponse) (IncidentsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IncidentsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IncidentsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 IncidentsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IncidentsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -341,19 +368,19 @@ func (client *IncidentsClient) listCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } 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.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -377,18 +404,25 @@ func (client *IncidentsClient) listHandleResponse(resp *http.Response) (Incident // - incidentID - Incident ID // - options - IncidentsClientListAlertsOptions contains the optional parameters for the IncidentsClient.ListAlerts method. func (client *IncidentsClient) ListAlerts(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, options *IncidentsClientListAlertsOptions) (IncidentsClientListAlertsResponse, error) { + var err error + const operationName = "IncidentsClient.ListAlerts" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listAlertsCreateRequest(ctx, resourceGroupName, workspaceName, incidentID, options) if err != nil { return IncidentsClientListAlertsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentsClientListAlertsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IncidentsClientListAlertsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IncidentsClientListAlertsResponse{}, err } - return client.listAlertsHandleResponse(resp) + resp, err := client.listAlertsHandleResponse(httpResp) + return resp, err } // listAlertsCreateRequest creates the ListAlerts request. @@ -439,18 +473,25 @@ func (client *IncidentsClient) listAlertsHandleResponse(resp *http.Response) (In // - incidentID - Incident ID // - options - IncidentsClientListBookmarksOptions contains the optional parameters for the IncidentsClient.ListBookmarks method. func (client *IncidentsClient) ListBookmarks(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, options *IncidentsClientListBookmarksOptions) (IncidentsClientListBookmarksResponse, error) { + var err error + const operationName = "IncidentsClient.ListBookmarks" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listBookmarksCreateRequest(ctx, resourceGroupName, workspaceName, incidentID, options) if err != nil { return IncidentsClientListBookmarksResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentsClientListBookmarksResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IncidentsClientListBookmarksResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IncidentsClientListBookmarksResponse{}, err } - return client.listBookmarksHandleResponse(resp) + resp, err := client.listBookmarksHandleResponse(httpResp) + return resp, err } // listBookmarksCreateRequest creates the ListBookmarks request. @@ -501,18 +542,25 @@ func (client *IncidentsClient) listBookmarksHandleResponse(resp *http.Response) // - incidentID - Incident ID // - options - IncidentsClientListEntitiesOptions contains the optional parameters for the IncidentsClient.ListEntities method. func (client *IncidentsClient) ListEntities(ctx context.Context, resourceGroupName string, workspaceName string, incidentID string, options *IncidentsClientListEntitiesOptions) (IncidentsClientListEntitiesResponse, error) { + var err error + const operationName = "IncidentsClient.ListEntities" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listEntitiesCreateRequest(ctx, resourceGroupName, workspaceName, incidentID, options) if err != nil { return IncidentsClientListEntitiesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentsClientListEntitiesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IncidentsClientListEntitiesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IncidentsClientListEntitiesResponse{}, err } - return client.listEntitiesHandleResponse(resp) + resp, err := client.listEntitiesHandleResponse(httpResp) + return resp, err } // listEntitiesCreateRequest creates the ListEntities request. @@ -562,18 +610,25 @@ func (client *IncidentsClient) listEntitiesHandleResponse(resp *http.Response) ( // - workspaceName - The name of the workspace. // - options - IncidentsClientRunPlaybookOptions contains the optional parameters for the IncidentsClient.RunPlaybook method. func (client *IncidentsClient) RunPlaybook(ctx context.Context, resourceGroupName string, workspaceName string, incidentIdentifier string, options *IncidentsClientRunPlaybookOptions) (IncidentsClientRunPlaybookResponse, error) { + var err error + const operationName = "IncidentsClient.RunPlaybook" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.runPlaybookCreateRequest(ctx, resourceGroupName, workspaceName, incidentIdentifier, options) if err != nil { return IncidentsClientRunPlaybookResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IncidentsClientRunPlaybookResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return IncidentsClientRunPlaybookResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IncidentsClientRunPlaybookResponse{}, err } - return client.runPlaybookHandleResponse(resp) + resp, err := client.runPlaybookHandleResponse(httpResp) + return resp, err } // runPlaybookCreateRequest creates the RunPlaybook request. @@ -604,7 +659,10 @@ func (client *IncidentsClient) runPlaybookCreateRequest(ctx context.Context, res req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.RequestBody != nil { - return req, runtime.MarshalAsJSON(req, *options.RequestBody) + if err := runtime.MarshalAsJSON(req, *options.RequestBody); err != nil { + return nil, err + } + return req, nil } return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/interfaces.go new file mode 100644 index 00000000..34b3a600 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/interfaces.go @@ -0,0 +1,156 @@ +//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 armsecurityinsights + +// AlertRuleClassification provides polymorphic access to related types. +// Call the interface's GetAlertRule() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AlertRule, *FusionAlertRule, *MLBehaviorAnalyticsAlertRule, *MicrosoftSecurityIncidentCreationAlertRule, *NrtAlertRule, +// - *ScheduledAlertRule, *ThreatIntelligenceAlertRule +type AlertRuleClassification interface { + // GetAlertRule returns the AlertRule content of the underlying type. + GetAlertRule() *AlertRule +} + +// AlertRuleTemplateClassification provides polymorphic access to related types. +// Call the interface's GetAlertRuleTemplate() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AlertRuleTemplate, *FusionAlertRuleTemplate, *MLBehaviorAnalyticsAlertRuleTemplate, *MicrosoftSecurityIncidentCreationAlertRuleTemplate, +// - *NrtAlertRuleTemplate, *ScheduledAlertRuleTemplate, *ThreatIntelligenceAlertRuleTemplate +type AlertRuleTemplateClassification interface { + // GetAlertRuleTemplate returns the AlertRuleTemplate content of the underlying type. + GetAlertRuleTemplate() *AlertRuleTemplate +} + +// AutomationRuleActionClassification provides polymorphic access to related types. +// Call the interface's GetAutomationRuleAction() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AutomationRuleAction, *AutomationRuleModifyPropertiesAction, *AutomationRuleRunPlaybookAction +type AutomationRuleActionClassification interface { + // GetAutomationRuleAction returns the AutomationRuleAction content of the underlying type. + GetAutomationRuleAction() *AutomationRuleAction +} + +// AutomationRuleConditionClassification provides polymorphic access to related types. +// Call the interface's GetAutomationRuleCondition() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AutomationRuleCondition, *BooleanConditionProperties, *PropertyArrayChangedConditionProperties, *PropertyArrayConditionProperties, +// - *PropertyChangedConditionProperties, *PropertyConditionProperties +type AutomationRuleConditionClassification interface { + // GetAutomationRuleCondition returns the AutomationRuleCondition content of the underlying type. + GetAutomationRuleCondition() *AutomationRuleCondition +} + +// CustomEntityQueryClassification provides polymorphic access to related types. +// Call the interface's GetCustomEntityQuery() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ActivityCustomEntityQuery, *CustomEntityQuery +type CustomEntityQueryClassification interface { + // GetCustomEntityQuery returns the CustomEntityQuery content of the underlying type. + GetCustomEntityQuery() *CustomEntityQuery +} + +// DataConnectorClassification provides polymorphic access to related types. +// Call the interface's GetDataConnector() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AADDataConnector, *AATPDataConnector, *ASCDataConnector, *AwsCloudTrailDataConnector, *AwsS3DataConnector, *CodelessAPIPollingDataConnector, +// - *CodelessUIDataConnector, *DataConnector, *Dynamics365DataConnector, *IoTDataConnector, *MCASDataConnector, *MDATPDataConnector, +// - *MSTIDataConnector, *MTPDataConnector, *Office365ProjectDataConnector, *OfficeATPDataConnector, *OfficeDataConnector, +// - *OfficeIRMDataConnector, *OfficePowerBIDataConnector, *TIDataConnector, *TiTaxiiDataConnector +type DataConnectorClassification interface { + // GetDataConnector returns the DataConnector content of the underlying type. + GetDataConnector() *DataConnector +} + +// DataConnectorsCheckRequirementsClassification provides polymorphic access to related types. +// Call the interface's GetDataConnectorsCheckRequirements() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AADCheckRequirements, *AATPCheckRequirements, *ASCCheckRequirements, *AwsCloudTrailCheckRequirements, *AwsS3CheckRequirements, +// - *DataConnectorsCheckRequirements, *Dynamics365CheckRequirements, *IoTCheckRequirements, *MCASCheckRequirements, *MDATPCheckRequirements, +// - *MSTICheckRequirements, *MtpCheckRequirements, *Office365ProjectCheckRequirements, *OfficeATPCheckRequirements, *OfficeIRMCheckRequirements, +// - *OfficePowerBICheckRequirements, *TICheckRequirements, *TiTaxiiCheckRequirements +type DataConnectorsCheckRequirementsClassification interface { + // GetDataConnectorsCheckRequirements returns the DataConnectorsCheckRequirements content of the underlying type. + GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements +} + +// EntityClassification provides polymorphic access to related types. +// Call the interface's GetEntity() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AccountEntity, *AzureResourceEntity, *CloudApplicationEntity, *DNSEntity, *Entity, *FileEntity, *FileHashEntity, *HostEntity, +// - *HuntingBookmark, *IPEntity, *IoTDeviceEntity, *MailClusterEntity, *MailMessageEntity, *MailboxEntity, *MalwareEntity, +// - *NicEntity, *ProcessEntity, *RegistryKeyEntity, *RegistryValueEntity, *SecurityAlert, *SecurityGroupEntity, *SubmissionMailEntity, +// - *URLEntity +type EntityClassification interface { + // GetEntity returns the Entity content of the underlying type. + GetEntity() *Entity +} + +// EntityQueryClassification provides polymorphic access to related types. +// Call the interface's GetEntityQuery() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ActivityEntityQuery, *EntityQuery, *ExpansionEntityQuery +type EntityQueryClassification interface { + // GetEntityQuery returns the EntityQuery content of the underlying type. + GetEntityQuery() *EntityQuery +} + +// EntityQueryItemClassification provides polymorphic access to related types. +// Call the interface's GetEntityQueryItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EntityQueryItem, *InsightQueryItem +type EntityQueryItemClassification interface { + // GetEntityQueryItem returns the EntityQueryItem content of the underlying type. + GetEntityQueryItem() *EntityQueryItem +} + +// EntityQueryTemplateClassification provides polymorphic access to related types. +// Call the interface's GetEntityQueryTemplate() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ActivityEntityQueryTemplate, *EntityQueryTemplate +type EntityQueryTemplateClassification interface { + // GetEntityQueryTemplate returns the EntityQueryTemplate content of the underlying type. + GetEntityQueryTemplate() *EntityQueryTemplate +} + +// EntityTimelineItemClassification provides polymorphic access to related types. +// Call the interface's GetEntityTimelineItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ActivityTimelineItem, *AnomalyTimelineItem, *BookmarkTimelineItem, *EntityTimelineItem, *SecurityAlertTimelineItem +type EntityTimelineItemClassification interface { + // GetEntityTimelineItem returns the EntityTimelineItem content of the underlying type. + GetEntityTimelineItem() *EntityTimelineItem +} + +// SecurityMLAnalyticsSettingClassification provides polymorphic access to related types. +// Call the interface's GetSecurityMLAnalyticsSetting() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AnomalySecurityMLAnalyticsSettings, *SecurityMLAnalyticsSetting +type SecurityMLAnalyticsSettingClassification interface { + // GetSecurityMLAnalyticsSetting returns the SecurityMLAnalyticsSetting content of the underlying type. + GetSecurityMLAnalyticsSetting() *SecurityMLAnalyticsSetting +} + +// SettingsClassification provides polymorphic access to related types. +// Call the interface's GetSettings() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *Anomalies, *EntityAnalytics, *EyesOn, *Settings, *Ueba +type SettingsClassification interface { + // GetSettings returns the Settings content of the underlying type. + GetSettings() *Settings +} + +// ThreatIntelligenceInformationClassification provides polymorphic access to related types. +// Call the interface's GetThreatIntelligenceInformation() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ThreatIntelligenceIndicatorModel, *ThreatIntelligenceInformation +type ThreatIntelligenceInformationClassification interface { + // GetThreatIntelligenceInformation returns the ThreatIntelligenceInformation content of the underlying type. + GetThreatIntelligenceInformation() *ThreatIntelligenceInformation +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/ipgeodata_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/ipgeodata_client.go index 6df1435e..5b0a5097 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/ipgeodata_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/ipgeodata_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type IPGeodataClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIPGeodataClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPGeodataClient, error) { - cl, err := arm.NewClient(moduleName+".IPGeodataClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -52,18 +51,25 @@ func NewIPGeodataClient(subscriptionID string, credential azcore.TokenCredential // - ipAddress - IP address (v4 or v6) to be enriched // - options - IPGeodataClientGetOptions contains the optional parameters for the IPGeodataClient.Get method. func (client *IPGeodataClient) Get(ctx context.Context, resourceGroupName string, ipAddress string, options *IPGeodataClientGetOptions) (IPGeodataClientGetResponse, error) { + var err error + const operationName = "IPGeodataClient.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, ipAddress, options) if err != nil { return IPGeodataClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IPGeodataClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPGeodataClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IPGeodataClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/metadata_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/metadata_client.go index 1ce33508..5ea8e0c8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/metadata_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/metadata_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -34,7 +33,7 @@ type MetadataClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewMetadataClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MetadataClient, error) { - cl, err := arm.NewClient(moduleName+".MetadataClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewMetadataClient(subscriptionID string, credential azcore.TokenCredential, // - metadata - Metadata resource. // - options - MetadataClientCreateOptions contains the optional parameters for the MetadataClient.Create method. func (client *MetadataClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, metadataName string, metadata MetadataModel, options *MetadataClientCreateOptions) (MetadataClientCreateResponse, error) { + var err error + const operationName = "MetadataClient.Create" + 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, workspaceName, metadataName, metadata, options) if err != nil { return MetadataClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MetadataClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return MetadataClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return MetadataClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -96,7 +102,10 @@ func (client *MetadataClient) createCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, metadata) + if err := runtime.MarshalAsJSON(req, metadata); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -117,16 +126,22 @@ func (client *MetadataClient) createHandleResponse(resp *http.Response) (Metadat // - metadataName - The Metadata name. // - options - MetadataClientDeleteOptions contains the optional parameters for the MetadataClient.Delete method. func (client *MetadataClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, metadataName string, options *MetadataClientDeleteOptions) (MetadataClientDeleteResponse, error) { + var err error + const operationName = "MetadataClient.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, workspaceName, metadataName, options) if err != nil { return MetadataClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MetadataClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return MetadataClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return MetadataClientDeleteResponse{}, err } return MetadataClientDeleteResponse{}, nil } @@ -170,18 +185,25 @@ func (client *MetadataClient) deleteCreateRequest(ctx context.Context, resourceG // - metadataName - The Metadata name. // - options - MetadataClientGetOptions contains the optional parameters for the MetadataClient.Get method. func (client *MetadataClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, metadataName string, options *MetadataClientGetOptions) (MetadataClientGetResponse, error) { + var err error + const operationName = "MetadataClient.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, metadataName, options) if err != nil { return MetadataClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MetadataClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MetadataClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MetadataClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -235,25 +257,20 @@ func (client *MetadataClient) NewListPager(resourceGroupName string, workspaceNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *MetadataClientListResponse) (MetadataClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MetadataClient.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 MetadataClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return MetadataClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MetadataClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -277,19 +294,19 @@ func (client *MetadataClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } 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", 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", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -314,18 +331,25 @@ func (client *MetadataClient) listHandleResponse(resp *http.Response) (MetadataC // - metadataPatch - Partial metadata request. // - options - MetadataClientUpdateOptions contains the optional parameters for the MetadataClient.Update method. func (client *MetadataClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, metadataName string, metadataPatch MetadataPatch, options *MetadataClientUpdateOptions) (MetadataClientUpdateResponse, error) { + var err error + const operationName = "MetadataClient.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, workspaceName, metadataName, metadataPatch, options) if err != nil { return MetadataClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MetadataClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MetadataClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MetadataClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -355,7 +379,10 @@ func (client *MetadataClient) updateCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, metadataPatch) + if err := runtime.MarshalAsJSON(req, metadataPatch); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/models.go index ff507288..aa263f3a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -14,10 +13,10 @@ import "time" // AADCheckRequirements - Represents AAD (Azure Active Directory) requirements check request. type AADCheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // AAD (Azure Active Directory) requirements check properties. - Properties *AADCheckRequirementsProperties `json:"properties,omitempty"` + Properties *AADCheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type AADCheckRequirements. @@ -30,61 +29,61 @@ func (a *AADCheckRequirements) GetDataConnectorsCheckRequirements() *DataConnect // AADCheckRequirementsProperties - AAD (Azure Active Directory) requirements check properties. type AADCheckRequirementsProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // AADDataConnector - Represents AAD (Azure Active Directory) data connector. type AADDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // AAD (Azure Active Directory) data connector properties. - Properties *AADDataConnectorProperties `json:"properties,omitempty"` + Properties *AADDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type AADDataConnector. func (a *AADDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: a.Kind, Etag: a.Etag, ID: a.ID, + Kind: a.Kind, Name: a.Name, - Type: a.Type, SystemData: a.SystemData, + Type: a.Type, } } // AADDataConnectorProperties - AAD (Azure Active Directory) data connector properties. type AADDataConnectorProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // The available data types for the connector. - DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` + DataTypes *AlertsDataTypeOfDataConnector } // AATPCheckRequirements - Represents AATP (Azure Advanced Threat Protection) requirements check request. type AATPCheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // AATP (Azure Advanced Threat Protection) requirements check properties. - Properties *AATPCheckRequirementsProperties `json:"properties,omitempty"` + Properties *AATPCheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type AATPCheckRequirements. @@ -97,70 +96,70 @@ func (a *AATPCheckRequirements) GetDataConnectorsCheckRequirements() *DataConnec // AATPCheckRequirementsProperties - AATP (Azure Advanced Threat Protection) requirements check properties. type AATPCheckRequirementsProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // AATPDataConnector - Represents AATP (Azure Advanced Threat Protection) data connector. type AATPDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // AATP (Azure Advanced Threat Protection) data connector properties. - Properties *AATPDataConnectorProperties `json:"properties,omitempty"` + Properties *AATPDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type AATPDataConnector. func (a *AATPDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: a.Kind, Etag: a.Etag, ID: a.ID, + Kind: a.Kind, Name: a.Name, - Type: a.Type, SystemData: a.SystemData, + Type: a.Type, } } // AATPDataConnectorProperties - AATP (Azure Advanced Threat Protection) data connector properties. type AATPDataConnectorProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // The available data types for the connector. - DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` + DataTypes *AlertsDataTypeOfDataConnector } // APIPollingParameters - Represents Codeless API Polling data connector type APIPollingParameters struct { // Config to describe the instructions blade - ConnectorUIConfig *CodelessUIConnectorConfigProperties `json:"connectorUiConfig,omitempty"` + ConnectorUIConfig *CodelessUIConnectorConfigProperties // Config to describe the polling instructions - PollingConfig *CodelessConnectorPollingConfigProperties `json:"pollingConfig,omitempty"` + PollingConfig *CodelessConnectorPollingConfigProperties } // ASCCheckRequirements - Represents ASC (Azure Security Center) requirements check request. type ASCCheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // ASC (Azure Security Center) requirements check properties. - Properties *ASCCheckRequirementsProperties `json:"properties,omitempty"` + Properties *ASCCheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type ASCCheckRequirements. @@ -173,429 +172,409 @@ func (a *ASCCheckRequirements) GetDataConnectorsCheckRequirements() *DataConnect // ASCCheckRequirementsProperties - ASC (Azure Security Center) requirements check properties. type ASCCheckRequirementsProperties struct { // The subscription id to connect to, and get the data from. - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string } // ASCDataConnector - Represents ASC (Azure Security Center) data connector. type ASCDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // ASC (Azure Security Center) data connector properties. - Properties *ASCDataConnectorProperties `json:"properties,omitempty"` + Properties *ASCDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type ASCDataConnector. func (a *ASCDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: a.Kind, Etag: a.Etag, ID: a.ID, + Kind: a.Kind, Name: a.Name, - Type: a.Type, SystemData: a.SystemData, + Type: a.Type, } } // ASCDataConnectorProperties - ASC (Azure Security Center) data connector properties. type ASCDataConnectorProperties struct { // The available data types for the connector. - DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` + DataTypes *AlertsDataTypeOfDataConnector // The subscription id to connect to, and get the data from. - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string } // AccountEntity - Represents an account entity. type AccountEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // Account entity properties - Properties *AccountEntityProperties `json:"properties,omitempty"` + Properties *AccountEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type AccountEntity. func (a *AccountEntity) GetEntity() *Entity { return &Entity{ - Kind: a.Kind, ID: a.ID, + Kind: a.Kind, Name: a.Name, - Type: a.Type, SystemData: a.SystemData, + Type: a.Type, } } // AccountEntityProperties - Account entity property bag. type AccountEntityProperties struct { // READ-ONLY; The Azure Active Directory tenant id. - AADTenantID *string `json:"aadTenantId,omitempty" azure:"ro"` + AADTenantID *string // READ-ONLY; The Azure Active Directory user id. - AADUserID *string `json:"aadUserId,omitempty" azure:"ro"` + AADUserID *string // READ-ONLY; The name of the account. This field should hold only the name without any domain added to it, i.e. administrator. - AccountName *string `json:"accountName,omitempty" azure:"ro"` + AccountName *string // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The fully qualified domain DNS name. - DNSDomain *string `json:"dnsDomain,omitempty" azure:"ro"` + DNSDomain *string // READ-ONLY; The display name of the account. - DisplayName *string `json:"displayName,omitempty" azure:"ro"` + DisplayName *string // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The Host entity id that contains the account in case it is a local account (not domain joined) - HostEntityID *string `json:"hostEntityId,omitempty" azure:"ro"` + HostEntityID *string // READ-ONLY; Determines whether this is a domain account. - IsDomainJoined *bool `json:"isDomainJoined,omitempty" azure:"ro"` + IsDomainJoined *bool // READ-ONLY; The NetBIOS domain name as it appears in the alert format domain/username. Examples: NT AUTHORITY. - NtDomain *string `json:"ntDomain,omitempty" azure:"ro"` + NtDomain *string // READ-ONLY; The objectGUID attribute is a single-value attribute that is the unique identifier for the object, assigned // by active directory. - ObjectGUID *string `json:"objectGuid,omitempty" azure:"ro"` + ObjectGUID *string // READ-ONLY; The Azure Active Directory Passport User ID. - Puid *string `json:"puid,omitempty" azure:"ro"` + Puid *string // READ-ONLY; The account security identifier, e.g. S-1-5-18. - Sid *string `json:"sid,omitempty" azure:"ro"` + Sid *string // READ-ONLY; The user principal name suffix for the account, in some cases it is also the domain name. Examples: contoso.com. - UpnSuffix *string `json:"upnSuffix,omitempty" azure:"ro"` + UpnSuffix *string } // ActionRequest - Action for alert rule. type ActionRequest struct { // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Action properties for put request - Properties *ActionRequestProperties `json:"properties,omitempty"` + Properties *ActionRequestProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ActionRequestProperties - Action property bag. type ActionRequestProperties struct { // REQUIRED; Logic App Resource Id, /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - LogicAppResourceID *string `json:"logicAppResourceId,omitempty"` + LogicAppResourceID *string // REQUIRED; Logic App Callback URL for this specific workflow. - TriggerURI *string `json:"triggerUri,omitempty"` + TriggerURI *string } // ActionResponse - Action for alert rule. type ActionResponse struct { // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Action properties for get request - Properties *ActionResponseProperties `json:"properties,omitempty"` + Properties *ActionResponseProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ActionResponseProperties - Action property bag. type ActionResponseProperties struct { // REQUIRED; Logic App Resource Id, /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. - LogicAppResourceID *string `json:"logicAppResourceId,omitempty"` + LogicAppResourceID *string // The name of the logic app's workflow. - WorkflowID *string `json:"workflowId,omitempty"` -} - -// ActionsClientCreateOrUpdateOptions contains the optional parameters for the ActionsClient.CreateOrUpdate method. -type ActionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ActionsClientDeleteOptions contains the optional parameters for the ActionsClient.Delete method. -type ActionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ActionsClientGetOptions contains the optional parameters for the ActionsClient.Get method. -type ActionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ActionsClientListByAlertRuleOptions contains the optional parameters for the ActionsClient.NewListByAlertRulePager method. -type ActionsClientListByAlertRuleOptions struct { - // placeholder for future optional parameters + WorkflowID *string } // ActionsList - List all the actions. type ActionsList struct { // REQUIRED; Array of actions. - Value []*ActionResponse `json:"value,omitempty"` + Value []*ActionResponse // READ-ONLY; URL to fetch the next set of actions. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // ActivityCustomEntityQuery - Represents Activity entity query. type ActivityCustomEntityQuery struct { // REQUIRED; the entity query kind - Kind *CustomEntityQueryKind `json:"kind,omitempty"` + Kind *CustomEntityQueryKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Activity entity query properties - Properties *ActivityEntityQueriesProperties `json:"properties,omitempty"` + Properties *ActivityEntityQueriesProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetCustomEntityQuery implements the CustomEntityQueryClassification interface for type ActivityCustomEntityQuery. func (a *ActivityCustomEntityQuery) GetCustomEntityQuery() *CustomEntityQuery { return &CustomEntityQuery{ - Kind: a.Kind, Etag: a.Etag, ID: a.ID, + Kind: a.Kind, Name: a.Name, - Type: a.Type, SystemData: a.SystemData, + Type: a.Type, } } // ActivityEntityQueriesProperties - Describes activity entity query properties type ActivityEntityQueriesProperties struct { // The entity query content to display in timeline - Content *string `json:"content,omitempty"` + Content *string // The entity query description - Description *string `json:"description,omitempty"` + Description *string // Determines whether this activity is enabled or disabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // The query applied only to entities matching to all filters - EntitiesFilter map[string][]*string `json:"entitiesFilter,omitempty"` + EntitiesFilter map[string][]*string // The type of the query's source entity - InputEntityType *EntityType `json:"inputEntityType,omitempty"` + InputEntityType *EntityType // The Activity query definitions - QueryDefinitions *ActivityEntityQueriesPropertiesQueryDefinitions `json:"queryDefinitions,omitempty"` + QueryDefinitions *ActivityEntityQueriesPropertiesQueryDefinitions // List of the fields of the source entity that are required to run the query - RequiredInputFieldsSets [][]*string `json:"requiredInputFieldsSets,omitempty"` + RequiredInputFieldsSets [][]*string // The template id this activity was created from - TemplateName *string `json:"templateName,omitempty"` + TemplateName *string // The entity query title - Title *string `json:"title,omitempty"` + Title *string // READ-ONLY; The time the activity was created - CreatedTimeUTC *time.Time `json:"createdTimeUtc,omitempty" azure:"ro"` + CreatedTimeUTC *time.Time // READ-ONLY; The last time the activity was updated - LastModifiedTimeUTC *time.Time `json:"lastModifiedTimeUtc,omitempty" azure:"ro"` + LastModifiedTimeUTC *time.Time } // ActivityEntityQueriesPropertiesQueryDefinitions - The Activity query definitions type ActivityEntityQueriesPropertiesQueryDefinitions struct { // The Activity query to run on a given entity - Query *string `json:"query,omitempty"` + Query *string } // ActivityEntityQuery - Represents Activity entity query. type ActivityEntityQuery struct { // REQUIRED; the entity query kind - Kind *EntityQueryKind `json:"kind,omitempty"` + Kind *EntityQueryKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Activity entity query properties - Properties *ActivityEntityQueriesProperties `json:"properties,omitempty"` + Properties *ActivityEntityQueriesProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntityQuery implements the EntityQueryClassification interface for type ActivityEntityQuery. func (a *ActivityEntityQuery) GetEntityQuery() *EntityQuery { return &EntityQuery{ - Kind: a.Kind, Etag: a.Etag, ID: a.ID, + Kind: a.Kind, Name: a.Name, - Type: a.Type, SystemData: a.SystemData, + Type: a.Type, } } // ActivityEntityQueryTemplate - Represents Activity entity query. type ActivityEntityQueryTemplate struct { // REQUIRED; the entity query template kind - Kind *EntityQueryTemplateKind `json:"kind,omitempty"` + Kind *EntityQueryTemplateKind // Activity entity query properties - Properties *ActivityEntityQueryTemplateProperties `json:"properties,omitempty"` + Properties *ActivityEntityQueryTemplateProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntityQueryTemplate implements the EntityQueryTemplateClassification interface for type ActivityEntityQueryTemplate. func (a *ActivityEntityQueryTemplate) GetEntityQueryTemplate() *EntityQueryTemplate { return &EntityQueryTemplate{ - Kind: a.Kind, ID: a.ID, + Kind: a.Kind, Name: a.Name, - Type: a.Type, SystemData: a.SystemData, + Type: a.Type, } } // ActivityEntityQueryTemplateProperties - Describes activity entity query properties type ActivityEntityQueryTemplateProperties struct { // The entity query content to display in timeline - Content *string `json:"content,omitempty"` + Content *string // List of required data types for the given entity query template - DataTypes []*DataTypeDefinitions `json:"dataTypes,omitempty"` + DataTypes []*DataTypeDefinitions // The entity query description - Description *string `json:"description,omitempty"` + Description *string // The query applied only to entities matching to all filters - EntitiesFilter map[string][]*string `json:"entitiesFilter,omitempty"` + EntitiesFilter map[string][]*string // The type of the query's source entity - InputEntityType *EntityType `json:"inputEntityType,omitempty"` + InputEntityType *EntityType // The Activity query definitions - QueryDefinitions *ActivityEntityQueryTemplatePropertiesQueryDefinitions `json:"queryDefinitions,omitempty"` + QueryDefinitions *ActivityEntityQueryTemplatePropertiesQueryDefinitions // List of the fields of the source entity that are required to run the query - RequiredInputFieldsSets [][]*string `json:"requiredInputFieldsSets,omitempty"` + RequiredInputFieldsSets [][]*string // The entity query title - Title *string `json:"title,omitempty"` + Title *string } // ActivityEntityQueryTemplatePropertiesQueryDefinitions - The Activity query definitions type ActivityEntityQueryTemplatePropertiesQueryDefinitions struct { // The Activity query to run on a given entity - Query *string `json:"query,omitempty"` + Query *string // The dimensions we want to summarize the timeline results on, this is comma separated list - SummarizeBy *string `json:"summarizeBy,omitempty"` + SummarizeBy *string } // ActivityTimelineItem - Represents Activity timeline item. type ActivityTimelineItem struct { // REQUIRED; The grouping bucket end time. - BucketEndTimeUTC *time.Time `json:"bucketEndTimeUTC,omitempty"` + BucketEndTimeUTC *time.Time // REQUIRED; The grouping bucket start time. - BucketStartTimeUTC *time.Time `json:"bucketStartTimeUTC,omitempty"` + BucketStartTimeUTC *time.Time // REQUIRED; The activity timeline content. - Content *string `json:"content,omitempty"` + Content *string // REQUIRED; The time of the first activity in the grouping bucket. - FirstActivityTimeUTC *time.Time `json:"firstActivityTimeUTC,omitempty"` + FirstActivityTimeUTC *time.Time // REQUIRED; The entity query kind type. - Kind *EntityTimelineKind `json:"kind,omitempty"` + Kind *EntityTimelineKind // REQUIRED; The time of the last activity in the grouping bucket. - LastActivityTimeUTC *time.Time `json:"lastActivityTimeUTC,omitempty"` + LastActivityTimeUTC *time.Time // REQUIRED; The activity query id. - QueryID *string `json:"queryId,omitempty"` + QueryID *string // REQUIRED; The activity timeline title. - Title *string `json:"title,omitempty"` + Title *string } // GetEntityTimelineItem implements the EntityTimelineItemClassification interface for type ActivityTimelineItem. @@ -608,78 +587,58 @@ func (a *ActivityTimelineItem) GetEntityTimelineItem() *EntityTimelineItem { // AlertDetailsOverride - Settings for how to dynamically override alert static details type AlertDetailsOverride struct { // the format containing columns name(s) to override the alert description - AlertDescriptionFormat *string `json:"alertDescriptionFormat,omitempty"` + AlertDescriptionFormat *string // the format containing columns name(s) to override the alert name - AlertDisplayNameFormat *string `json:"alertDisplayNameFormat,omitempty"` + AlertDisplayNameFormat *string // the column name to take the alert severity from - AlertSeverityColumnName *string `json:"alertSeverityColumnName,omitempty"` + AlertSeverityColumnName *string // the column name to take the alert tactics from - AlertTacticsColumnName *string `json:"alertTacticsColumnName,omitempty"` -} - -// AlertRuleClassification provides polymorphic access to related types. -// Call the interface's GetAlertRule() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AlertRule, *FusionAlertRule, *MLBehaviorAnalyticsAlertRule, *MicrosoftSecurityIncidentCreationAlertRule, *NrtAlertRule, -// - *ScheduledAlertRule, *ThreatIntelligenceAlertRule -type AlertRuleClassification interface { - // GetAlertRule returns the AlertRule content of the underlying type. - GetAlertRule() *AlertRule + AlertTacticsColumnName *string } // AlertRule - Alert rule. type AlertRule struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRule implements the AlertRuleClassification interface for type AlertRule. func (a *AlertRule) GetAlertRule() *AlertRule { return a } -// AlertRuleTemplateClassification provides polymorphic access to related types. -// Call the interface's GetAlertRuleTemplate() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AlertRuleTemplate, *FusionAlertRuleTemplate, *MLBehaviorAnalyticsAlertRuleTemplate, *MicrosoftSecurityIncidentCreationAlertRuleTemplate, -// - *NrtAlertRuleTemplate, *ScheduledAlertRuleTemplate, *ThreatIntelligenceAlertRuleTemplate -type AlertRuleTemplateClassification interface { - // GetAlertRuleTemplate returns the AlertRuleTemplate content of the underlying type. - GetAlertRuleTemplate() *AlertRuleTemplate -} - // AlertRuleTemplate - Alert rule template. type AlertRuleTemplate struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRuleTemplate implements the AlertRuleTemplateClassification interface for type AlertRuleTemplate. @@ -688,227 +647,197 @@ func (a *AlertRuleTemplate) GetAlertRuleTemplate() *AlertRuleTemplate { return a // AlertRuleTemplateDataSource - alert rule template data sources type AlertRuleTemplateDataSource struct { // The connector id that provides the following data types - ConnectorID *string `json:"connectorId,omitempty"` + ConnectorID *string // The data types used by the alert rule template - DataTypes []*string `json:"dataTypes,omitempty"` -} - -// AlertRuleTemplatesClientGetOptions contains the optional parameters for the AlertRuleTemplatesClient.Get method. -type AlertRuleTemplatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// AlertRuleTemplatesClientListOptions contains the optional parameters for the AlertRuleTemplatesClient.NewListPager method. -type AlertRuleTemplatesClientListOptions struct { - // placeholder for future optional parameters + DataTypes []*string } // AlertRuleTemplatesList - List all the alert rule templates. type AlertRuleTemplatesList struct { // REQUIRED; Array of alert rule templates. - Value []AlertRuleTemplateClassification `json:"value,omitempty"` + Value []AlertRuleTemplateClassification // READ-ONLY; URL to fetch the next set of alert rule templates. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// AlertRulesClientCreateOrUpdateOptions contains the optional parameters for the AlertRulesClient.CreateOrUpdate method. -type AlertRulesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AlertRulesClientDeleteOptions contains the optional parameters for the AlertRulesClient.Delete method. -type AlertRulesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// AlertRulesClientGetOptions contains the optional parameters for the AlertRulesClient.Get method. -type AlertRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// AlertRulesClientListOptions contains the optional parameters for the AlertRulesClient.NewListPager method. -type AlertRulesClientListOptions struct { - // placeholder for future optional parameters + NextLink *string } // AlertRulesList - List all the alert rules. type AlertRulesList struct { // REQUIRED; Array of alert rules. - Value []AlertRuleClassification `json:"value,omitempty"` + Value []AlertRuleClassification // READ-ONLY; URL to fetch the next set of alert rules. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // AlertsDataTypeOfDataConnector - Alerts data type for data connectors. type AlertsDataTypeOfDataConnector struct { // REQUIRED; Alerts data type connection. - Alerts *DataConnectorDataTypeCommon `json:"alerts,omitempty"` + Alerts *DataConnectorDataTypeCommon } // Anomalies - Settings with single toggle. type Anomalies struct { // REQUIRED; The kind of the setting - Kind *SettingKind `json:"kind,omitempty"` + Kind *SettingKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Anomalies properties - Properties *AnomaliesSettingsProperties `json:"properties,omitempty"` + Properties *AnomaliesSettingsProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetSettings implements the SettingsClassification interface for type Anomalies. func (a *Anomalies) GetSettings() *Settings { return &Settings{ - Kind: a.Kind, Etag: a.Etag, ID: a.ID, + Kind: a.Kind, Name: a.Name, - Type: a.Type, SystemData: a.SystemData, + Type: a.Type, } } // AnomaliesSettingsProperties - Anomalies property bag. type AnomaliesSettingsProperties struct { // READ-ONLY; Determines whether the setting is enable or disabled. - IsEnabled *bool `json:"isEnabled,omitempty" azure:"ro"` + IsEnabled *bool } // AnomalySecurityMLAnalyticsSettings - Represents Anomaly Security ML Analytics Settings type AnomalySecurityMLAnalyticsSettings struct { // REQUIRED; The kind of security ML Analytics Settings - Kind *SecurityMLAnalyticsSettingsKind `json:"kind,omitempty"` + Kind *SecurityMLAnalyticsSettingsKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Anomaly Security ML Analytics Settings properties - Properties *AnomalySecurityMLAnalyticsSettingsProperties `json:"properties,omitempty"` + Properties *AnomalySecurityMLAnalyticsSettingsProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetSecurityMLAnalyticsSetting implements the SecurityMLAnalyticsSettingClassification interface for type AnomalySecurityMLAnalyticsSettings. func (a *AnomalySecurityMLAnalyticsSettings) GetSecurityMLAnalyticsSetting() *SecurityMLAnalyticsSetting { return &SecurityMLAnalyticsSetting{ - Kind: a.Kind, Etag: a.Etag, ID: a.ID, + Kind: a.Kind, Name: a.Name, - Type: a.Type, SystemData: a.SystemData, + Type: a.Type, } } // AnomalySecurityMLAnalyticsSettingsProperties - AnomalySecurityMLAnalytics settings base property bag. type AnomalySecurityMLAnalyticsSettingsProperties struct { // REQUIRED; The anomaly version of the AnomalySecurityMLAnalyticsSettings. - AnomalyVersion *string `json:"anomalyVersion,omitempty"` + AnomalyVersion *string // REQUIRED; The display name for settings created by this SecurityMLAnalyticsSettings. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // REQUIRED; Determines whether this settings is enabled or disabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // REQUIRED; The frequency that this SecurityMLAnalyticsSettings will be run. - Frequency *string `json:"frequency,omitempty"` + Frequency *string // REQUIRED; Determines whether this anomaly security ml analytics settings is a default settings - IsDefaultSettings *bool `json:"isDefaultSettings,omitempty"` + IsDefaultSettings *bool // REQUIRED; The anomaly SecurityMLAnalyticsSettings status - SettingsStatus *SettingsStatus `json:"settingsStatus,omitempty"` + SettingsStatus *SettingsStatus // The anomaly settings version of the Anomaly security ml analytics settings that dictates whether job version gets updated // or not. - AnomalySettingsVersion *int32 `json:"anomalySettingsVersion,omitempty"` + AnomalySettingsVersion *int32 // The customizable observations of the AnomalySecurityMLAnalyticsSettings. - CustomizableObservations any `json:"customizableObservations,omitempty"` + CustomizableObservations any // The description of the SecurityMLAnalyticsSettings. - Description *string `json:"description,omitempty"` + Description *string // The required data sources for this SecurityMLAnalyticsSettings - RequiredDataConnectors []*SecurityMLAnalyticsSettingsDataSource `json:"requiredDataConnectors,omitempty"` + RequiredDataConnectors []*SecurityMLAnalyticsSettingsDataSource // The anomaly settings definition Id - SettingsDefinitionID *string `json:"settingsDefinitionId,omitempty"` + SettingsDefinitionID *string // The tactics of the SecurityMLAnalyticsSettings - Tactics []*AttackTactic `json:"tactics,omitempty"` + Tactics []*AttackTactic // The techniques of the SecurityMLAnalyticsSettings - Techniques []*string `json:"techniques,omitempty"` + Techniques []*string // READ-ONLY; The last time that this SecurityMLAnalyticsSettings has been modified. - LastModifiedUTC *time.Time `json:"lastModifiedUtc,omitempty" azure:"ro"` + LastModifiedUTC *time.Time } // AnomalyTimelineItem - Represents anomaly timeline item. type AnomalyTimelineItem struct { // REQUIRED; The anomaly azure resource id. - AzureResourceID *string `json:"azureResourceId,omitempty"` + AzureResourceID *string // REQUIRED; The anomaly name. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // REQUIRED; The anomaly end time. - EndTimeUTC *time.Time `json:"endTimeUtc,omitempty"` + EndTimeUTC *time.Time // REQUIRED; The entity query kind type. - Kind *EntityTimelineKind `json:"kind,omitempty"` + Kind *EntityTimelineKind // REQUIRED; The anomaly start time. - StartTimeUTC *time.Time `json:"startTimeUtc,omitempty"` + StartTimeUTC *time.Time // REQUIRED; The anomaly generated time. - TimeGenerated *time.Time `json:"timeGenerated,omitempty"` + TimeGenerated *time.Time // The anomaly description. - Description *string `json:"description,omitempty"` + Description *string // The intent of the anomaly. - Intent *string `json:"intent,omitempty"` + Intent *string // The anomaly product name. - ProductName *string `json:"productName,omitempty"` + ProductName *string // The reasons that cause the anomaly. - Reasons []*string `json:"reasons,omitempty"` + Reasons []*string // The techniques of the anomaly. - Techniques []*string `json:"techniques,omitempty"` + Techniques []*string // The name of the anomaly vendor. - Vendor *string `json:"vendor,omitempty"` + Vendor *string } // GetEntityTimelineItem implements the EntityTimelineItemClassification interface for type AnomalyTimelineItem. @@ -920,64 +849,45 @@ func (a *AnomalyTimelineItem) GetEntityTimelineItem() *EntityTimelineItem { type AutomationRule struct { // REQUIRED; Automation rule properties - Properties *AutomationRuleProperties `json:"properties,omitempty"` + Properties *AutomationRuleProperties // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AutomationRuleActionClassification provides polymorphic access to related types. -// Call the interface's GetAutomationRuleAction() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AutomationRuleAction, *AutomationRuleModifyPropertiesAction, *AutomationRuleRunPlaybookAction -type AutomationRuleActionClassification interface { - // GetAutomationRuleAction returns the AutomationRuleAction content of the underlying type. - GetAutomationRuleAction() *AutomationRuleAction + Type *string } // AutomationRuleAction - Describes an automation rule action. type AutomationRuleAction struct { // REQUIRED; The type of the automation rule action. - ActionType *ActionType `json:"actionType,omitempty"` + ActionType *ActionType // REQUIRED - Order *int32 `json:"order,omitempty"` + Order *int32 } // GetAutomationRuleAction implements the AutomationRuleActionClassification interface for type AutomationRuleAction. func (a *AutomationRuleAction) GetAutomationRuleAction() *AutomationRuleAction { return a } type AutomationRuleBooleanCondition struct { - InnerConditions []AutomationRuleConditionClassification `json:"innerConditions,omitempty"` - Operator *AutomationRuleBooleanConditionSupportedOperator `json:"operator,omitempty"` -} - -// AutomationRuleConditionClassification provides polymorphic access to related types. -// Call the interface's GetAutomationRuleCondition() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AutomationRuleCondition, *BooleanConditionProperties, *PropertyArrayChangedConditionProperties, *PropertyArrayConditionProperties, -// - *PropertyChangedConditionProperties, *PropertyConditionProperties -type AutomationRuleConditionClassification interface { - // GetAutomationRuleCondition returns the AutomationRuleCondition content of the underlying type. - GetAutomationRuleCondition() *AutomationRuleCondition + InnerConditions []AutomationRuleConditionClassification + Operator *AutomationRuleBooleanConditionSupportedOperator } // AutomationRuleCondition - Describes an automation rule condition. type AutomationRuleCondition struct { // REQUIRED - ConditionType *ConditionType `json:"conditionType,omitempty"` + ConditionType *ConditionType } // GetAutomationRuleCondition implements the AutomationRuleConditionClassification interface for type AutomationRuleCondition. @@ -986,150 +896,128 @@ func (a *AutomationRuleCondition) GetAutomationRuleCondition() *AutomationRuleCo // AutomationRuleModifyPropertiesAction - Describes an automation rule action to modify an object's properties type AutomationRuleModifyPropertiesAction struct { // REQUIRED; The type of the automation rule action. - ActionType *ActionType `json:"actionType,omitempty"` + ActionType *ActionType // REQUIRED - Order *int32 `json:"order,omitempty"` - ActionConfiguration *IncidentPropertiesAction `json:"actionConfiguration,omitempty"` + Order *int32 + ActionConfiguration *IncidentPropertiesAction } // GetAutomationRuleAction implements the AutomationRuleActionClassification interface for type AutomationRuleModifyPropertiesAction. func (a *AutomationRuleModifyPropertiesAction) GetAutomationRuleAction() *AutomationRuleAction { return &AutomationRuleAction{ - Order: a.Order, ActionType: a.ActionType, + Order: a.Order, } } // AutomationRuleProperties - Automation rule properties type AutomationRuleProperties struct { // REQUIRED; The actions to execute when the automation rule is triggered. - Actions []AutomationRuleActionClassification `json:"actions,omitempty"` + Actions []AutomationRuleActionClassification // REQUIRED; The display name of the automation rule. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // REQUIRED; The order of execution of the automation rule. - Order *int32 `json:"order,omitempty"` + Order *int32 // REQUIRED; Describes automation rule triggering logic. - TriggeringLogic *AutomationRuleTriggeringLogic `json:"triggeringLogic,omitempty"` + TriggeringLogic *AutomationRuleTriggeringLogic // READ-ONLY; Information on the client (user or application) that made some action - CreatedBy *ClientInfo `json:"createdBy,omitempty" azure:"ro"` + CreatedBy *ClientInfo // READ-ONLY; The time the automation rule was created. - CreatedTimeUTC *time.Time `json:"createdTimeUtc,omitempty" azure:"ro"` + CreatedTimeUTC *time.Time // READ-ONLY; Information on the client (user or application) that made some action - LastModifiedBy *ClientInfo `json:"lastModifiedBy,omitempty" azure:"ro"` + LastModifiedBy *ClientInfo // READ-ONLY; The last time the automation rule was updated. - LastModifiedTimeUTC *time.Time `json:"lastModifiedTimeUtc,omitempty" azure:"ro"` + LastModifiedTimeUTC *time.Time } type AutomationRulePropertyArrayChangedValuesCondition struct { - ArrayType *AutomationRulePropertyArrayChangedConditionSupportedArrayType `json:"arrayType,omitempty"` - ChangeType *AutomationRulePropertyArrayChangedConditionSupportedChangeType `json:"changeType,omitempty"` + ArrayType *AutomationRulePropertyArrayChangedConditionSupportedArrayType + ChangeType *AutomationRulePropertyArrayChangedConditionSupportedChangeType } type AutomationRulePropertyArrayValuesCondition struct { - ArrayConditionType *AutomationRulePropertyArrayConditionSupportedArrayConditionType `json:"arrayConditionType,omitempty"` - ArrayType *AutomationRulePropertyArrayConditionSupportedArrayType `json:"arrayType,omitempty"` - ItemConditions []AutomationRuleConditionClassification `json:"itemConditions,omitempty"` + ArrayConditionType *AutomationRulePropertyArrayConditionSupportedArrayConditionType + ArrayType *AutomationRulePropertyArrayConditionSupportedArrayType + ItemConditions []AutomationRuleConditionClassification } type AutomationRulePropertyValuesChangedCondition struct { - ChangeType *AutomationRulePropertyChangedConditionSupportedChangedType `json:"changeType,omitempty"` - Operator *AutomationRulePropertyConditionSupportedOperator `json:"operator,omitempty"` - PropertyName *AutomationRulePropertyChangedConditionSupportedPropertyType `json:"propertyName,omitempty"` - PropertyValues []*string `json:"propertyValues,omitempty"` + ChangeType *AutomationRulePropertyChangedConditionSupportedChangedType + Operator *AutomationRulePropertyConditionSupportedOperator + PropertyName *AutomationRulePropertyChangedConditionSupportedPropertyType + PropertyValues []*string } type AutomationRulePropertyValuesCondition struct { - Operator *AutomationRulePropertyConditionSupportedOperator `json:"operator,omitempty"` + Operator *AutomationRulePropertyConditionSupportedOperator // The property to evaluate in an automation rule property condition. - PropertyName *AutomationRulePropertyConditionSupportedProperty `json:"propertyName,omitempty"` - PropertyValues []*string `json:"propertyValues,omitempty"` + PropertyName *AutomationRulePropertyConditionSupportedProperty + PropertyValues []*string } // AutomationRuleRunPlaybookAction - Describes an automation rule action to run a playbook type AutomationRuleRunPlaybookAction struct { // REQUIRED; The type of the automation rule action. - ActionType *ActionType `json:"actionType,omitempty"` + ActionType *ActionType // REQUIRED - Order *int32 `json:"order,omitempty"` - ActionConfiguration *PlaybookActionProperties `json:"actionConfiguration,omitempty"` + Order *int32 + ActionConfiguration *PlaybookActionProperties } // GetAutomationRuleAction implements the AutomationRuleActionClassification interface for type AutomationRuleRunPlaybookAction. func (a *AutomationRuleRunPlaybookAction) GetAutomationRuleAction() *AutomationRuleAction { return &AutomationRuleAction{ - Order: a.Order, ActionType: a.ActionType, + Order: a.Order, } } // AutomationRuleTriggeringLogic - Describes automation rule triggering logic. type AutomationRuleTriggeringLogic struct { // REQUIRED; Determines whether the automation rule is enabled or disabled. - IsEnabled *bool `json:"isEnabled,omitempty"` + IsEnabled *bool // REQUIRED - TriggersOn *TriggersOn `json:"triggersOn,omitempty"` + TriggersOn *TriggersOn // REQUIRED - TriggersWhen *TriggersWhen `json:"triggersWhen,omitempty"` + TriggersWhen *TriggersWhen // The conditions to evaluate to determine if the automation rule should be triggered on a given object. - Conditions []AutomationRuleConditionClassification `json:"conditions,omitempty"` + Conditions []AutomationRuleConditionClassification // Determines when the automation rule should automatically expire and be disabled. - ExpirationTimeUTC *time.Time `json:"expirationTimeUtc,omitempty"` -} - -// AutomationRulesClientCreateOrUpdateOptions contains the optional parameters for the AutomationRulesClient.CreateOrUpdate -// method. -type AutomationRulesClientCreateOrUpdateOptions struct { - // The automation rule - AutomationRuleToUpsert *AutomationRule -} - -// AutomationRulesClientDeleteOptions contains the optional parameters for the AutomationRulesClient.Delete method. -type AutomationRulesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// AutomationRulesClientGetOptions contains the optional parameters for the AutomationRulesClient.Get method. -type AutomationRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// AutomationRulesClientListOptions contains the optional parameters for the AutomationRulesClient.NewListPager method. -type AutomationRulesClientListOptions struct { - // placeholder for future optional parameters + ExpirationTimeUTC *time.Time } type AutomationRulesList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []*AutomationRule `json:"value,omitempty"` + NextLink *string + Value []*AutomationRule } // Availability - Connector Availability Status type Availability struct { // Set connector as preview - IsPreview *bool `json:"isPreview,omitempty"` + IsPreview *bool // The connector Availability Status - Status *int32 `json:"status,omitempty"` + Status *int32 } // AwsCloudTrailCheckRequirements - Amazon Web Services CloudTrail requirements check request. type AwsCloudTrailCheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type AwsCloudTrailCheckRequirements. @@ -1142,64 +1030,64 @@ func (a *AwsCloudTrailCheckRequirements) GetDataConnectorsCheckRequirements() *D // AwsCloudTrailDataConnector - Represents Amazon Web Services CloudTrail data connector. type AwsCloudTrailDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Amazon Web Services CloudTrail data connector properties. - Properties *AwsCloudTrailDataConnectorProperties `json:"properties,omitempty"` + Properties *AwsCloudTrailDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type AwsCloudTrailDataConnector. func (a *AwsCloudTrailDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: a.Kind, Etag: a.Etag, ID: a.ID, + Kind: a.Kind, Name: a.Name, - Type: a.Type, SystemData: a.SystemData, + Type: a.Type, } } // AwsCloudTrailDataConnectorDataTypes - The available data types for Amazon Web Services CloudTrail data connector. type AwsCloudTrailDataConnectorDataTypes struct { // REQUIRED; Logs data type. - Logs *AwsCloudTrailDataConnectorDataTypesLogs `json:"logs,omitempty"` + Logs *AwsCloudTrailDataConnectorDataTypesLogs } // AwsCloudTrailDataConnectorDataTypesLogs - Logs data type. type AwsCloudTrailDataConnectorDataTypesLogs struct { // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // AwsCloudTrailDataConnectorProperties - Amazon Web Services CloudTrail data connector properties. type AwsCloudTrailDataConnectorProperties struct { // REQUIRED; The available data types for the connector. - DataTypes *AwsCloudTrailDataConnectorDataTypes `json:"dataTypes,omitempty"` + DataTypes *AwsCloudTrailDataConnectorDataTypes // The Aws Role Arn (with CloudTrailReadOnly policy) that is used to access the Aws account. - AwsRoleArn *string `json:"awsRoleArn,omitempty"` + AwsRoleArn *string } // AwsS3CheckRequirements - Amazon Web Services S3 requirements check request. type AwsS3CheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type AwsS3CheckRequirements. @@ -1212,306 +1100,271 @@ func (a *AwsS3CheckRequirements) GetDataConnectorsCheckRequirements() *DataConne // AwsS3DataConnector - Represents Amazon Web Services S3 data connector. type AwsS3DataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Amazon Web Services S3 data connector properties. - Properties *AwsS3DataConnectorProperties `json:"properties,omitempty"` + Properties *AwsS3DataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type AwsS3DataConnector. func (a *AwsS3DataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: a.Kind, Etag: a.Etag, ID: a.ID, + Kind: a.Kind, Name: a.Name, - Type: a.Type, SystemData: a.SystemData, + Type: a.Type, } } // AwsS3DataConnectorDataTypes - The available data types for Amazon Web Services S3 data connector. type AwsS3DataConnectorDataTypes struct { // REQUIRED; Logs data type. - Logs *AwsS3DataConnectorDataTypesLogs `json:"logs,omitempty"` + Logs *AwsS3DataConnectorDataTypesLogs } // AwsS3DataConnectorDataTypesLogs - Logs data type. type AwsS3DataConnectorDataTypesLogs struct { // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // AwsS3DataConnectorProperties - Amazon Web Services S3 data connector properties. type AwsS3DataConnectorProperties struct { // REQUIRED; The available data types for the connector. - DataTypes *AwsS3DataConnectorDataTypes `json:"dataTypes,omitempty"` + DataTypes *AwsS3DataConnectorDataTypes // REQUIRED; The logs destination table name in LogAnalytics. - DestinationTable *string `json:"destinationTable,omitempty"` + DestinationTable *string // REQUIRED; The Aws Role Arn that is used to access the Aws account. - RoleArn *string `json:"roleArn,omitempty"` + RoleArn *string // REQUIRED; The AWS sqs urls for the connector. - SqsUrls []*string `json:"sqsUrls,omitempty"` + SqsUrls []*string } // AzureDevOpsResourceInfo - Resources created in Azure DevOps repository. type AzureDevOpsResourceInfo struct { // Id of the pipeline created for the source-control. - PipelineID *string `json:"pipelineId,omitempty"` + PipelineID *string // Id of the service-connection created for the source-control. - ServiceConnectionID *string `json:"serviceConnectionId,omitempty"` + ServiceConnectionID *string } // AzureResourceEntity - Represents an azure resource entity. type AzureResourceEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // AzureResource entity properties - Properties *AzureResourceEntityProperties `json:"properties,omitempty"` + Properties *AzureResourceEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type AzureResourceEntity. func (a *AzureResourceEntity) GetEntity() *Entity { return &Entity{ - Kind: a.Kind, ID: a.ID, + Kind: a.Kind, Name: a.Name, - Type: a.Type, SystemData: a.SystemData, + Type: a.Type, } } // AzureResourceEntityProperties - AzureResource entity property bag. type AzureResourceEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The azure resource id of the resource - ResourceID *string `json:"resourceId,omitempty" azure:"ro"` + ResourceID *string // READ-ONLY; The subscription id of the resource - SubscriptionID *string `json:"subscriptionId,omitempty" azure:"ro"` + SubscriptionID *string } // Bookmark - Represents a bookmark in Azure Security Insights. type Bookmark struct { // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Bookmark properties - Properties *BookmarkProperties `json:"properties,omitempty"` + Properties *BookmarkProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BookmarkClientExpandOptions contains the optional parameters for the BookmarkClient.Expand method. -type BookmarkClientExpandOptions struct { - // placeholder for future optional parameters + Type *string } // BookmarkEntityMappings - Describes the entity mappings of a single entity type BookmarkEntityMappings struct { // The entity type - EntityType *string `json:"entityType,omitempty"` + EntityType *string // Array of fields mapping for that entity type - FieldMappings []*EntityFieldMapping `json:"fieldMappings,omitempty"` + FieldMappings []*EntityFieldMapping } // BookmarkExpandParameters - The parameters required to execute an expand operation on the given bookmark. type BookmarkExpandParameters struct { // The end date filter, so the only expansion results returned are before this date. - EndTime *time.Time `json:"endTime,omitempty"` + EndTime *time.Time // The Id of the expansion to perform. - ExpansionID *string `json:"expansionId,omitempty"` + ExpansionID *string // The start date filter, so the only expansion results returned are after this date. - StartTime *time.Time `json:"startTime,omitempty"` + StartTime *time.Time } // BookmarkExpandResponse - The entity expansion result operation response. type BookmarkExpandResponse struct { // The metadata from the expansion operation results. - MetaData *ExpansionResultsMetadata `json:"metaData,omitempty"` + MetaData *ExpansionResultsMetadata // The expansion result values. - Value *BookmarkExpandResponseValue `json:"value,omitempty"` + Value *BookmarkExpandResponseValue } // BookmarkExpandResponseValue - The expansion result values. type BookmarkExpandResponseValue struct { // Array of expansion result connected entities - Edges []*ConnectedEntity `json:"edges,omitempty"` + Edges []*ConnectedEntity // Array of the expansion result entities. - Entities []EntityClassification `json:"entities,omitempty"` + Entities []EntityClassification } // BookmarkList - List all the bookmarks. type BookmarkList struct { // REQUIRED; Array of bookmarks. - Value []*Bookmark `json:"value,omitempty"` + Value []*Bookmark // READ-ONLY; URL to fetch the next set of bookmarks. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // BookmarkProperties - Describes bookmark properties type BookmarkProperties struct { // REQUIRED; The display name of the bookmark - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // REQUIRED; The query of the bookmark. - Query *string `json:"query,omitempty"` + Query *string // The time the bookmark was created - Created *time.Time `json:"created,omitempty"` + Created *time.Time // Describes a user that created the bookmark - CreatedBy *UserInfo `json:"createdBy,omitempty"` + CreatedBy *UserInfo // Describes the entity mappings of the bookmark - EntityMappings []*BookmarkEntityMappings `json:"entityMappings,omitempty"` + EntityMappings []*BookmarkEntityMappings // The bookmark event time - EventTime *time.Time `json:"eventTime,omitempty"` + EventTime *time.Time // Describes an incident that relates to bookmark - IncidentInfo *IncidentInfo `json:"incidentInfo,omitempty"` + IncidentInfo *IncidentInfo // List of labels relevant to this bookmark - Labels []*string `json:"labels,omitempty"` + Labels []*string // The notes of the bookmark - Notes *string `json:"notes,omitempty"` + Notes *string // The end time for the query - QueryEndTime *time.Time `json:"queryEndTime,omitempty"` + QueryEndTime *time.Time // The query result of the bookmark. - QueryResult *string `json:"queryResult,omitempty"` + QueryResult *string // The start time for the query - QueryStartTime *time.Time `json:"queryStartTime,omitempty"` + QueryStartTime *time.Time // A list of relevant mitre attacks - Tactics []*AttackTactic `json:"tactics,omitempty"` + Tactics []*AttackTactic // A list of relevant mitre techniques - Techniques []*string `json:"techniques,omitempty"` + Techniques []*string // The last time the bookmark was updated - Updated *time.Time `json:"updated,omitempty"` + Updated *time.Time // Describes a user that updated the bookmark - UpdatedBy *UserInfo `json:"updatedBy,omitempty"` -} - -// BookmarkRelationsClientCreateOrUpdateOptions contains the optional parameters for the BookmarkRelationsClient.CreateOrUpdate -// method. -type BookmarkRelationsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// BookmarkRelationsClientDeleteOptions contains the optional parameters for the BookmarkRelationsClient.Delete method. -type BookmarkRelationsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// BookmarkRelationsClientGetOptions contains the optional parameters for the BookmarkRelationsClient.Get method. -type BookmarkRelationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BookmarkRelationsClientListOptions contains the optional parameters for the BookmarkRelationsClient.NewListPager method. -type BookmarkRelationsClientListOptions struct { - // Filters the results, based on a Boolean condition. Optional. - Filter *string - // Sorts the results. Optional. - Orderby *string - // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skiptoken parameter that - // specifies a starting point to use for subsequent calls. Optional. - SkipToken *string - // Returns only the first n results. Optional. - Top *int32 + UpdatedBy *UserInfo } // BookmarkTimelineItem - Represents bookmark timeline item. type BookmarkTimelineItem struct { // REQUIRED; The bookmark azure resource id. - AzureResourceID *string `json:"azureResourceId,omitempty"` + AzureResourceID *string // REQUIRED; The entity query kind type. - Kind *EntityTimelineKind `json:"kind,omitempty"` + Kind *EntityTimelineKind // Describes a user that created the bookmark - CreatedBy *UserInfo `json:"createdBy,omitempty"` + CreatedBy *UserInfo // The bookmark display name. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // The bookmark end time. - EndTimeUTC *time.Time `json:"endTimeUtc,omitempty"` + EndTimeUTC *time.Time // The bookmark event time. - EventTime *time.Time `json:"eventTime,omitempty"` + EventTime *time.Time // List of labels relevant to this bookmark - Labels []*string `json:"labels,omitempty"` + Labels []*string // The notes of the bookmark - Notes *string `json:"notes,omitempty"` + Notes *string // The bookmark start time. - StartTimeUTC *time.Time `json:"startTimeUtc,omitempty"` + StartTimeUTC *time.Time } // GetEntityTimelineItem implements the EntityTimelineItemClassification interface for type BookmarkTimelineItem. @@ -1521,31 +1374,11 @@ func (b *BookmarkTimelineItem) GetEntityTimelineItem() *EntityTimelineItem { } } -// BookmarksClientCreateOrUpdateOptions contains the optional parameters for the BookmarksClient.CreateOrUpdate method. -type BookmarksClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// BookmarksClientDeleteOptions contains the optional parameters for the BookmarksClient.Delete method. -type BookmarksClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// BookmarksClientGetOptions contains the optional parameters for the BookmarksClient.Get method. -type BookmarksClientGetOptions struct { - // placeholder for future optional parameters -} - -// BookmarksClientListOptions contains the optional parameters for the BookmarksClient.NewListPager method. -type BookmarksClientListOptions struct { - // placeholder for future optional parameters -} - // BooleanConditionProperties - Describes an automation rule condition that applies a boolean operator (e.g AND, OR) to conditions type BooleanConditionProperties struct { // REQUIRED - ConditionType *ConditionType `json:"conditionType,omitempty"` - ConditionProperties *AutomationRuleBooleanCondition `json:"conditionProperties,omitempty"` + ConditionType *ConditionType + ConditionProperties *AutomationRuleBooleanCondition } // GetAutomationRuleCondition implements the AutomationRuleConditionClassification interface for type BooleanConditionProperties. @@ -1558,103 +1391,103 @@ func (b *BooleanConditionProperties) GetAutomationRuleCondition() *AutomationRul // ClientInfo - Information on the client (user or application) that made some action type ClientInfo struct { // The email of the client. - Email *string `json:"email,omitempty"` + Email *string // The name of the client. - Name *string `json:"name,omitempty"` + Name *string // The object id of the client. - ObjectID *string `json:"objectId,omitempty"` + ObjectID *string // The user principal name of the client. - UserPrincipalName *string `json:"userPrincipalName,omitempty"` + UserPrincipalName *string } // CloudApplicationEntity - Represents a cloud application entity. type CloudApplicationEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // CloudApplication entity properties - Properties *CloudApplicationEntityProperties `json:"properties,omitempty"` + Properties *CloudApplicationEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type CloudApplicationEntity. func (c *CloudApplicationEntity) GetEntity() *Entity { return &Entity{ - Kind: c.Kind, ID: c.ID, + Kind: c.Kind, Name: c.Name, - Type: c.Type, SystemData: c.SystemData, + Type: c.Type, } } // CloudApplicationEntityProperties - CloudApplication entity property bag. type CloudApplicationEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The technical identifier of the application. - AppID *int32 `json:"appId,omitempty" azure:"ro"` + AppID *int32 // READ-ONLY; The name of the related cloud application. - AppName *string `json:"appName,omitempty" azure:"ro"` + AppName *string // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The user defined instance name of the cloud application. It is often used to distinguish between several applications // of the same type that a customer has. - InstanceName *string `json:"instanceName,omitempty" azure:"ro"` + InstanceName *string } // CodelessAPIPollingDataConnector - Represents Codeless API Polling data connector. type CodelessAPIPollingDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Codeless poling data connector properties - Properties *APIPollingParameters `json:"properties,omitempty"` + Properties *APIPollingParameters // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type CodelessAPIPollingDataConnector. func (c *CodelessAPIPollingDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: c.Kind, Etag: c.Etag, ID: c.ID, + Kind: c.Kind, Name: c.Name, - Type: c.Type, SystemData: c.SystemData, + Type: c.Type, } } @@ -1662,320 +1495,311 @@ func (c *CodelessAPIPollingDataConnector) GetDataConnector() *DataConnector { // the server type CodelessConnectorPollingAuthProperties struct { // REQUIRED; The authentication type - AuthType *string `json:"authType,omitempty"` + AuthType *string // A prefix send in the header before the actual token - APIKeyIdentifier *string `json:"apiKeyIdentifier,omitempty"` + APIKeyIdentifier *string // The header name which the token is sent with - APIKeyName *string `json:"apiKeyName,omitempty"` + APIKeyName *string // The endpoint used to authorize the user, used in Oauth 2.0 flow - AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty"` + AuthorizationEndpoint *string // The query parameters used in authorization request, used in Oauth 2.0 flow - AuthorizationEndpointQueryParameters any `json:"authorizationEndpointQueryParameters,omitempty"` + AuthorizationEndpointQueryParameters any // Describes the flow name, for example 'AuthCode' for Oauth 2.0 - FlowName *string `json:"flowName,omitempty"` + FlowName *string // Marks if the key should sent in header - IsAPIKeyInPostPayload *string `json:"isApiKeyInPostPayload,omitempty"` + IsAPIKeyInPostPayload *string // Marks if we should send the client secret in header or payload, used in Oauth 2.0 flow - IsClientSecretInHeader *bool `json:"isClientSecretInHeader,omitempty"` + IsClientSecretInHeader *bool // The redirect endpoint where we will get the authorization code, used in Oauth 2.0 flow - RedirectionEndpoint *string `json:"redirectionEndpoint,omitempty"` + RedirectionEndpoint *string // The OAuth token scope - Scope *string `json:"scope,omitempty"` + Scope *string // The endpoint used to issue a token, used in Oauth 2.0 flow - TokenEndpoint *string `json:"tokenEndpoint,omitempty"` + TokenEndpoint *string // The query headers used in token request, used in Oauth 2.0 flow - TokenEndpointHeaders any `json:"tokenEndpointHeaders,omitempty"` + TokenEndpointHeaders any // The query parameters used in token request, used in Oauth 2.0 flow - TokenEndpointQueryParameters any `json:"tokenEndpointQueryParameters,omitempty"` + TokenEndpointQueryParameters any } // CodelessConnectorPollingConfigProperties - Config to describe the polling config for API poller connector type CodelessConnectorPollingConfigProperties struct { // REQUIRED; Describe the authentication type of the poller - Auth *CodelessConnectorPollingAuthProperties `json:"auth,omitempty"` + Auth *CodelessConnectorPollingAuthProperties // REQUIRED; Describe the poll request config parameters of the poller - Request *CodelessConnectorPollingRequestProperties `json:"request,omitempty"` + Request *CodelessConnectorPollingRequestProperties // The poller active status - IsActive *bool `json:"isActive,omitempty"` + IsActive *bool // Describe the poll request paging config of the poller - Paging *CodelessConnectorPollingPagingProperties `json:"paging,omitempty"` + Paging *CodelessConnectorPollingPagingProperties // Describe the response config parameters of the poller - Response *CodelessConnectorPollingResponseProperties `json:"response,omitempty"` + Response *CodelessConnectorPollingResponseProperties } // CodelessConnectorPollingPagingProperties - Describe the properties needed to make a pagination call type CodelessConnectorPollingPagingProperties struct { // REQUIRED; Describes the type. could be 'None', 'PageToken', 'PageCount', 'TimeStamp' - PagingType *string `json:"pagingType,omitempty"` + PagingType *string // Defines the name of a next page attribute - NextPageParaName *string `json:"nextPageParaName,omitempty"` + NextPageParaName *string // Defines the path to a next page token JSON - NextPageTokenJSONPath *string `json:"nextPageTokenJsonPath,omitempty"` + NextPageTokenJSONPath *string // Defines the path to a page count attribute - PageCountAttributePath *string `json:"pageCountAttributePath,omitempty"` + PageCountAttributePath *string // Defines the paging size - PageSize *int32 `json:"pageSize,omitempty"` + PageSize *int32 // Defines the name of the page size parameter - PageSizeParaName *string `json:"pageSizeParaName,omitempty"` + PageSizeParaName *string // Defines the path to a paging time stamp attribute - PageTimeStampAttributePath *string `json:"pageTimeStampAttributePath,omitempty"` + PageTimeStampAttributePath *string // Defines the path to a page total count attribute - PageTotalCountAttributePath *string `json:"pageTotalCountAttributePath,omitempty"` + PageTotalCountAttributePath *string // Determines whether to search for the latest time stamp in the events list - SearchTheLatestTimeStampFromEventsList *string `json:"searchTheLatestTimeStampFromEventsList,omitempty"` + SearchTheLatestTimeStampFromEventsList *string } // CodelessConnectorPollingRequestProperties - Describe the request properties needed to successfully pull from the server type CodelessConnectorPollingRequestProperties struct { // REQUIRED; Describe the endpoint we should pull the data from - APIEndpoint *string `json:"apiEndpoint,omitempty"` + APIEndpoint *string // REQUIRED; The http method type we will use in the poll request, GET or POST - HTTPMethod *string `json:"httpMethod,omitempty"` + HTTPMethod *string // REQUIRED; The time format will be used the query events in a specific window - QueryTimeFormat *string `json:"queryTimeFormat,omitempty"` + QueryTimeFormat *string // REQUIRED; The window interval we will use the pull the data - QueryWindowInMin *int32 `json:"queryWindowInMin,omitempty"` + QueryWindowInMin *int32 // This will be used the query events from the end of the time window - EndTimeAttributeName *string `json:"endTimeAttributeName,omitempty"` + EndTimeAttributeName *string // Describe the headers sent in the poll request - Headers any `json:"headers,omitempty"` + Headers any // Describe the query parameters sent in the poll request - QueryParameters any `json:"queryParameters,omitempty"` + QueryParameters any // For advanced scenarios for example user name/password embedded in nested JSON payload - QueryParametersTemplate *string `json:"queryParametersTemplate,omitempty"` + QueryParametersTemplate *string // Defines the rate limit QPS - RateLimitQPS *int32 `json:"rateLimitQps,omitempty"` + RateLimitQPS *int32 // Describe the amount of time we should try and poll the data in case of failure - RetryCount *int32 `json:"retryCount,omitempty"` + RetryCount *int32 // This will be used the query events from a start of the time window - StartTimeAttributeName *string `json:"startTimeAttributeName,omitempty"` + StartTimeAttributeName *string // The number of seconds we will consider as a request timeout - TimeoutInSeconds *int32 `json:"timeoutInSeconds,omitempty"` + TimeoutInSeconds *int32 } // CodelessConnectorPollingResponseProperties - Describes the response from the external server type CodelessConnectorPollingResponseProperties struct { // REQUIRED; Describes the path we should extract the data in the response - EventsJSONPaths []*string `json:"eventsJsonPaths,omitempty"` + EventsJSONPaths []*string // Describes if the data in the response is Gzip - IsGzipCompressed *bool `json:"isGzipCompressed,omitempty"` + IsGzipCompressed *bool // Describes the path we should extract the status code in the response - SuccessStatusJSONPath *string `json:"successStatusJsonPath,omitempty"` + SuccessStatusJSONPath *string // Describes the path we should extract the status value in the response - SuccessStatusValue *string `json:"successStatusValue,omitempty"` + SuccessStatusValue *string } // CodelessParameters - Represents Codeless UI data connector type CodelessParameters struct { // Config to describe the instructions blade - ConnectorUIConfig *CodelessUIConnectorConfigProperties `json:"connectorUiConfig,omitempty"` + ConnectorUIConfig *CodelessUIConnectorConfigProperties } // CodelessUIConnectorConfigProperties - Config to describe the instructions blade type CodelessUIConnectorConfigProperties struct { // REQUIRED; Connector Availability Status - Availability *Availability `json:"availability,omitempty"` + Availability *Availability // REQUIRED; Define the way the connector check connectivity - ConnectivityCriteria []*CodelessUIConnectorConfigPropertiesConnectivityCriteriaItem `json:"connectivityCriteria,omitempty"` + ConnectivityCriteria []*CodelessUIConnectorConfigPropertiesConnectivityCriteriaItem // REQUIRED; Data types to check for last data received - DataTypes []*CodelessUIConnectorConfigPropertiesDataTypesItem `json:"dataTypes,omitempty"` + DataTypes []*CodelessUIConnectorConfigPropertiesDataTypesItem // REQUIRED; Connector description - DescriptionMarkdown *string `json:"descriptionMarkdown,omitempty"` + DescriptionMarkdown *string // REQUIRED; The graph query to show the current data status - GraphQueries []*CodelessUIConnectorConfigPropertiesGraphQueriesItem `json:"graphQueries,omitempty"` + GraphQueries []*CodelessUIConnectorConfigPropertiesGraphQueriesItem // REQUIRED; Name of the table the connector will insert the data to - GraphQueriesTableName *string `json:"graphQueriesTableName,omitempty"` + GraphQueriesTableName *string // REQUIRED; Instruction steps to enable the connector - InstructionSteps []*CodelessUIConnectorConfigPropertiesInstructionStepsItem `json:"instructionSteps,omitempty"` + InstructionSteps []*CodelessUIConnectorConfigPropertiesInstructionStepsItem // REQUIRED; Permissions required for the connector - Permissions *Permissions `json:"permissions,omitempty"` + Permissions *Permissions // REQUIRED; Connector publisher name - Publisher *string `json:"publisher,omitempty"` + Publisher *string // REQUIRED; The sample queries for the connector - SampleQueries []*CodelessUIConnectorConfigPropertiesSampleQueriesItem `json:"sampleQueries,omitempty"` + SampleQueries []*CodelessUIConnectorConfigPropertiesSampleQueriesItem // REQUIRED; Connector blade title - Title *string `json:"title,omitempty"` + Title *string // An optional custom image to be used when displaying the connector within Azure Sentinel's connector's gallery - CustomImage *string `json:"customImage,omitempty"` + CustomImage *string } type CodelessUIConnectorConfigPropertiesConnectivityCriteriaItem struct { // type of connectivity - Type *ConnectivityType `json:"type,omitempty"` + Type *ConnectivityType // Queries for checking connectivity - Value []*string `json:"value,omitempty"` + Value []*string } type CodelessUIConnectorConfigPropertiesDataTypesItem struct { // Query for indicate last data received - LastDataReceivedQuery *string `json:"lastDataReceivedQuery,omitempty"` + LastDataReceivedQuery *string // Name of the data type to show in the graph. can be use with {{graphQueriesTableName}} placeholder - Name *string `json:"name,omitempty"` + Name *string } type CodelessUIConnectorConfigPropertiesGraphQueriesItem struct { // The base query for the graph - BaseQuery *string `json:"baseQuery,omitempty"` + BaseQuery *string // The legend for the graph - Legend *string `json:"legend,omitempty"` + Legend *string // the metric that the query is checking - MetricName *string `json:"metricName,omitempty"` + MetricName *string } type CodelessUIConnectorConfigPropertiesInstructionStepsItem struct { // Instruction step description - Description *string `json:"description,omitempty"` + Description *string // Instruction step details - Instructions []*InstructionStepsInstructionsItem `json:"instructions,omitempty"` + Instructions []*InstructionStepsInstructionsItem // Instruction step title - Title *string `json:"title,omitempty"` + Title *string } type CodelessUIConnectorConfigPropertiesSampleQueriesItem struct { // The sample query description - Description *string `json:"description,omitempty"` + Description *string // the sample query - Query *string `json:"query,omitempty"` + Query *string } // CodelessUIDataConnector - Represents Codeless UI data connector. type CodelessUIDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Codeless UI data connector properties - Properties *CodelessParameters `json:"properties,omitempty"` + Properties *CodelessParameters // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type CodelessUIDataConnector. func (c *CodelessUIDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: c.Kind, Etag: c.Etag, ID: c.ID, + Kind: c.Kind, Name: c.Name, - Type: c.Type, SystemData: c.SystemData, + Type: c.Type, } } // ConnectedEntity - Expansion result connected entities type ConnectedEntity struct { // key-value pairs for a connected entity mapping - AdditionalData any `json:"additionalData,omitempty"` + AdditionalData any // Entity Id of the connected entity - TargetEntityID *string `json:"targetEntityId,omitempty"` + TargetEntityID *string } // ContentPathMap - The mapping of content type to a repo path. type ContentPathMap struct { // Content type. - ContentType *ContentType `json:"contentType,omitempty"` + ContentType *ContentType // The path to the content. - Path *string `json:"path,omitempty"` -} - -// CustomEntityQueryClassification provides polymorphic access to related types. -// Call the interface's GetCustomEntityQuery() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ActivityCustomEntityQuery, *CustomEntityQuery -type CustomEntityQueryClassification interface { - // GetCustomEntityQuery returns the CustomEntityQuery content of the underlying type. - GetCustomEntityQuery() *CustomEntityQuery + Path *string } // CustomEntityQuery - Specific entity query that supports put requests. type CustomEntityQuery struct { // REQUIRED; the entity query kind - Kind *CustomEntityQueryKind `json:"kind,omitempty"` + Kind *CustomEntityQueryKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetCustomEntityQuery implements the CustomEntityQueryClassification interface for type CustomEntityQuery. @@ -1984,88 +1808,76 @@ func (c *CustomEntityQuery) GetCustomEntityQuery() *CustomEntityQuery { return c // DNSEntity - Represents a dns entity. type DNSEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // Dns entity properties - Properties *DNSEntityProperties `json:"properties,omitempty"` + Properties *DNSEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type DNSEntity. func (d *DNSEntity) GetEntity() *Entity { return &Entity{ - Kind: d.Kind, ID: d.ID, + Kind: d.Kind, Name: d.Name, - Type: d.Type, SystemData: d.SystemData, + Type: d.Type, } } // DNSEntityProperties - Dns entity property bag. type DNSEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; An ip entity id for the dns server resolving the request - DNSServerIPEntityID *string `json:"dnsServerIpEntityId,omitempty" azure:"ro"` + DNSServerIPEntityID *string // READ-ONLY; The name of the dns record associated with the alert - DomainName *string `json:"domainName,omitempty" azure:"ro"` + DomainName *string // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; An ip entity id for the dns request client - HostIPAddressEntityID *string `json:"hostIpAddressEntityId,omitempty" azure:"ro"` + HostIPAddressEntityID *string // READ-ONLY; Ip entity identifiers for the resolved ip address. - IPAddressEntityIDs []*string `json:"ipAddressEntityIds,omitempty" azure:"ro"` -} - -// DataConnectorClassification provides polymorphic access to related types. -// Call the interface's GetDataConnector() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AADDataConnector, *AATPDataConnector, *ASCDataConnector, *AwsCloudTrailDataConnector, *AwsS3DataConnector, *CodelessAPIPollingDataConnector, -// - *CodelessUIDataConnector, *DataConnector, *Dynamics365DataConnector, *IoTDataConnector, *MCASDataConnector, *MDATPDataConnector, -// - *MSTIDataConnector, *MTPDataConnector, *Office365ProjectDataConnector, *OfficeATPDataConnector, *OfficeDataConnector, -// - *OfficeIRMDataConnector, *OfficePowerBIDataConnector, *TIDataConnector, *TiTaxiiDataConnector -type DataConnectorClassification interface { - // GetDataConnector returns the DataConnector content of the underlying type. - GetDataConnector() *DataConnector + IPAddressEntityIDs []*string } // DataConnector - Data connector type DataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type DataConnector. @@ -2074,78 +1886,66 @@ func (d *DataConnector) GetDataConnector() *DataConnector { return d } // DataConnectorConnectBody - Represents Codeless API Polling data connector. type DataConnectorConnectBody struct { // The API key of the audit server. - APIKey *string `json:"apiKey,omitempty"` + APIKey *string // The authorization code used in OAuth 2.0 code flow to issue a token. - AuthorizationCode *string `json:"authorizationCode,omitempty"` + AuthorizationCode *string // The client id of the OAuth 2.0 application. - ClientID *string `json:"clientId,omitempty"` + ClientID *string // The client secret of the OAuth 2.0 application. - ClientSecret *string `json:"clientSecret,omitempty"` + ClientSecret *string // Used in v2 logs connector. Represents the data collection ingestion endpoint in log analytics. - DataCollectionEndpoint *string `json:"dataCollectionEndpoint,omitempty"` + DataCollectionEndpoint *string // Used in v2 logs connector. The data collection rule immutable id, the rule defines the transformation and data destination. - DataCollectionRuleImmutableID *string `json:"dataCollectionRuleImmutableId,omitempty"` + DataCollectionRuleImmutableID *string // The authentication kind used to poll the data - Kind *ConnectAuthKind `json:"kind,omitempty"` + Kind *ConnectAuthKind // Used in v2 logs connector. The stream we are sending the data to, this is the name of the streamDeclarations defined in // the DCR. - OutputStream *string `json:"outputStream,omitempty"` + OutputStream *string // The user password in the audit log server. - Password *string `json:"password,omitempty"` - RequestConfigUserInputValues []any `json:"requestConfigUserInputValues,omitempty"` + Password *string + RequestConfigUserInputValues []any // The user name in the audit log server. - UserName *string `json:"userName,omitempty"` + UserName *string } // DataConnectorDataTypeCommon - Common field for data type in data connectors. type DataConnectorDataTypeCommon struct { // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // DataConnectorList - List all the data connectors. type DataConnectorList struct { // REQUIRED; Array of data connectors. - Value []DataConnectorClassification `json:"value,omitempty"` + Value []DataConnectorClassification // READ-ONLY; URL to fetch the next set of data connectors. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // DataConnectorRequirementsState - Data connector requirements status. type DataConnectorRequirementsState struct { // Authorization state for this connector - AuthorizationState *DataConnectorAuthorizationState `json:"authorizationState,omitempty"` + AuthorizationState *DataConnectorAuthorizationState // License state for this connector - LicenseState *DataConnectorLicenseState `json:"licenseState,omitempty"` -} - -// DataConnectorsCheckRequirementsClassification provides polymorphic access to related types. -// Call the interface's GetDataConnectorsCheckRequirements() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AADCheckRequirements, *AATPCheckRequirements, *ASCCheckRequirements, *AwsCloudTrailCheckRequirements, *AwsS3CheckRequirements, -// - *DataConnectorsCheckRequirements, *Dynamics365CheckRequirements, *IoTCheckRequirements, *MCASCheckRequirements, *MDATPCheckRequirements, -// - *MSTICheckRequirements, *MtpCheckRequirements, *Office365ProjectCheckRequirements, *OfficeATPCheckRequirements, *OfficeIRMCheckRequirements, -// - *OfficePowerBICheckRequirements, *TICheckRequirements, *TiTaxiiCheckRequirements -type DataConnectorsCheckRequirementsClassification interface { - // GetDataConnectorsCheckRequirements returns the DataConnectorsCheckRequirements content of the underlying type. - GetDataConnectorsCheckRequirements() *DataConnectorsCheckRequirements + LicenseState *DataConnectorLicenseState } // DataConnectorsCheckRequirements - Data connector requirements properties. type DataConnectorsCheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type DataConnectorsCheckRequirements. @@ -2153,91 +1953,49 @@ func (d *DataConnectorsCheckRequirements) GetDataConnectorsCheckRequirements() * return d } -// DataConnectorsCheckRequirementsClientPostOptions contains the optional parameters for the DataConnectorsCheckRequirementsClient.Post -// method. -type DataConnectorsCheckRequirementsClientPostOptions struct { - // placeholder for future optional parameters -} - -// DataConnectorsClientConnectOptions contains the optional parameters for the DataConnectorsClient.Connect method. -type DataConnectorsClientConnectOptions struct { - // placeholder for future optional parameters -} - -// DataConnectorsClientCreateOrUpdateOptions contains the optional parameters for the DataConnectorsClient.CreateOrUpdate -// method. -type DataConnectorsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// DataConnectorsClientDeleteOptions contains the optional parameters for the DataConnectorsClient.Delete method. -type DataConnectorsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DataConnectorsClientDisconnectOptions contains the optional parameters for the DataConnectorsClient.Disconnect method. -type DataConnectorsClientDisconnectOptions struct { - // placeholder for future optional parameters -} - -// DataConnectorsClientGetOptions contains the optional parameters for the DataConnectorsClient.Get method. -type DataConnectorsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DataConnectorsClientListOptions contains the optional parameters for the DataConnectorsClient.NewListPager method. -type DataConnectorsClientListOptions struct { - // placeholder for future optional parameters -} - // DataTypeDefinitions - The data type definition type DataTypeDefinitions struct { // The data type name - DataType *string `json:"dataType,omitempty"` + DataType *string } // Deployment - Description about a deployment. type Deployment struct { // Deployment identifier. - DeploymentID *string `json:"deploymentId,omitempty"` + DeploymentID *string // Url to access repository action logs. - DeploymentLogsURL *string `json:"deploymentLogsUrl,omitempty"` + DeploymentLogsURL *string // The outcome of the deployment. - DeploymentResult *DeploymentResult `json:"deploymentResult,omitempty"` + DeploymentResult *DeploymentResult // Current status of the deployment. - DeploymentState *DeploymentState `json:"deploymentState,omitempty"` + DeploymentState *DeploymentState // The time when the deployment finished. - DeploymentTime *time.Time `json:"deploymentTime,omitempty"` + DeploymentTime *time.Time } // DeploymentInfo - Information regarding a deployment. type DeploymentInfo struct { // Deployment information. - Deployment *Deployment `json:"deployment,omitempty"` + Deployment *Deployment // Status while fetching the last deployment. - DeploymentFetchStatus *DeploymentFetchStatus `json:"deploymentFetchStatus,omitempty"` + DeploymentFetchStatus *DeploymentFetchStatus // Additional details about the deployment that can be shown to the user. - Message *string `json:"message,omitempty"` -} - -// DomainWhoisClientGetOptions contains the optional parameters for the DomainWhoisClient.Get method. -type DomainWhoisClientGetOptions struct { - // placeholder for future optional parameters + Message *string } // Dynamics365CheckRequirements - Represents Dynamics365 requirements check request. type Dynamics365CheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Dynamics365 requirements check properties. - Properties *Dynamics365CheckRequirementsProperties `json:"properties,omitempty"` + Properties *Dynamics365CheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type Dynamics365CheckRequirements. @@ -2250,297 +2008,241 @@ func (d *Dynamics365CheckRequirements) GetDataConnectorsCheckRequirements() *Dat // Dynamics365CheckRequirementsProperties - Dynamics365 requirements check properties. type Dynamics365CheckRequirementsProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // Dynamics365DataConnector - Represents Dynamics365 data connector. type Dynamics365DataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Dynamics365 data connector properties. - Properties *Dynamics365DataConnectorProperties `json:"properties,omitempty"` + Properties *Dynamics365DataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type Dynamics365DataConnector. func (d *Dynamics365DataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: d.Kind, Etag: d.Etag, ID: d.ID, + Kind: d.Kind, Name: d.Name, - Type: d.Type, SystemData: d.SystemData, + Type: d.Type, } } // Dynamics365DataConnectorDataTypes - The available data types for Dynamics365 data connector. type Dynamics365DataConnectorDataTypes struct { // REQUIRED; Common Data Service data type connection. - Dynamics365CdsActivities *Dynamics365DataConnectorDataTypesDynamics365CdsActivities `json:"dynamics365CdsActivities,omitempty"` + Dynamics365CdsActivities *Dynamics365DataConnectorDataTypesDynamics365CdsActivities } // Dynamics365DataConnectorDataTypesDynamics365CdsActivities - Common Data Service data type connection. type Dynamics365DataConnectorDataTypesDynamics365CdsActivities struct { // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // Dynamics365DataConnectorProperties - Dynamics365 data connector properties. type Dynamics365DataConnectorProperties struct { // REQUIRED; The available data types for the connector. - DataTypes *Dynamics365DataConnectorDataTypes `json:"dataTypes,omitempty"` + DataTypes *Dynamics365DataConnectorDataTypes // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // EnrichmentDomainWhois - Whois information for a given domain and associated metadata type EnrichmentDomainWhois struct { // The timestamp at which this record was created - Created *time.Time `json:"created,omitempty"` + Created *time.Time // The domain for this whois record - Domain *string `json:"domain,omitempty"` + Domain *string // The timestamp at which this record will expire - Expires *time.Time `json:"expires,omitempty"` + Expires *time.Time // The whois record for a given domain - ParsedWhois *EnrichmentDomainWhoisDetails `json:"parsedWhois,omitempty"` + ParsedWhois *EnrichmentDomainWhoisDetails // The hostname of this registrar's whois server - Server *string `json:"server,omitempty"` + Server *string // The timestamp at which this record was last updated - Updated *time.Time `json:"updated,omitempty"` + Updated *time.Time } // EnrichmentDomainWhoisContact - An individual contact associated with this domain type EnrichmentDomainWhoisContact struct { // The city for this contact - City *string `json:"city,omitempty"` + City *string // The country for this contact - Country *string `json:"country,omitempty"` + Country *string // The email address for this contact - Email *string `json:"email,omitempty"` + Email *string // The fax number for this contact - Fax *string `json:"fax,omitempty"` + Fax *string // The name of this contact - Name *string `json:"name,omitempty"` + Name *string // The organization for this contact - Org *string `json:"org,omitempty"` + Org *string // The phone number for this contact - Phone *string `json:"phone,omitempty"` + Phone *string // The postal code for this contact - Postal *string `json:"postal,omitempty"` + Postal *string // The state for this contact - State *string `json:"state,omitempty"` + State *string // A list describing the street address for this contact - Street []*string `json:"street,omitempty"` + Street []*string } // EnrichmentDomainWhoisContacts - The set of contacts associated with this domain type EnrichmentDomainWhoisContacts struct { // The admin contact for this whois record - Admin *EnrichmentDomainWhoisContact `json:"admin,omitempty"` + Admin *EnrichmentDomainWhoisContact // The billing contact for this whois record - Billing *EnrichmentDomainWhoisContact `json:"billing,omitempty"` + Billing *EnrichmentDomainWhoisContact // The registrant contact for this whois record - Registrant *EnrichmentDomainWhoisContact `json:"registrant,omitempty"` + Registrant *EnrichmentDomainWhoisContact // The technical contact for this whois record - Tech *EnrichmentDomainWhoisContact `json:"tech,omitempty"` + Tech *EnrichmentDomainWhoisContact } // EnrichmentDomainWhoisDetails - The whois record for a given domain type EnrichmentDomainWhoisDetails struct { // The set of contacts associated with this domain - Contacts *EnrichmentDomainWhoisContacts `json:"contacts,omitempty"` + Contacts *EnrichmentDomainWhoisContacts // A list of name servers associated with this domain - NameServers []*string `json:"nameServers,omitempty"` + NameServers []*string // The registrar associated with this domain - Registrar *EnrichmentDomainWhoisRegistrarDetails `json:"registrar,omitempty"` + Registrar *EnrichmentDomainWhoisRegistrarDetails // The set of status flags for this whois record - Statuses []*string `json:"statuses,omitempty"` + Statuses []*string } // EnrichmentDomainWhoisRegistrarDetails - The registrar associated with this domain type EnrichmentDomainWhoisRegistrarDetails struct { // This registrar's abuse contact email - AbuseContactEmail *string `json:"abuseContactEmail,omitempty"` + AbuseContactEmail *string // This registrar's abuse contact phone number - AbuseContactPhone *string `json:"abuseContactPhone,omitempty"` + AbuseContactPhone *string // This registrar's Internet Assigned Numbers Authority id - IanaID *string `json:"ianaId,omitempty"` + IanaID *string // The name of this registrar - Name *string `json:"name,omitempty"` + Name *string // This registrar's URL - URL *string `json:"url,omitempty"` + URL *string // The hostname of this registrar's whois server - WhoisServer *string `json:"whoisServer,omitempty"` + WhoisServer *string } // EnrichmentIPGeodata - Geodata information for a given IP address type EnrichmentIPGeodata struct { // The autonomous system number associated with this IP address - Asn *string `json:"asn,omitempty"` + Asn *string // The name of the carrier for this IP address - Carrier *string `json:"carrier,omitempty"` + Carrier *string // The city this IP address is located in - City *string `json:"city,omitempty"` + City *string // A numeric rating of confidence that the value in the 'city' field is correct, on a scale of 0-100 - CityCf *int32 `json:"cityCf,omitempty"` + CityCf *int32 // The continent this IP address is located on - Continent *string `json:"continent,omitempty"` + Continent *string // The county this IP address is located in - Country *string `json:"country,omitempty"` + Country *string // A numeric rating of confidence that the value in the 'country' field is correct on a scale of 0-100 - CountryCf *int32 `json:"countryCf,omitempty"` + CountryCf *int32 // The dotted-decimal or colon-separated string representation of the IP address - IPAddr *string `json:"ipAddr,omitempty"` + IPAddr *string // A description of the connection type of this IP address - IPRoutingType *string `json:"ipRoutingType,omitempty"` + IPRoutingType *string // The latitude of this IP address - Latitude *string `json:"latitude,omitempty"` + Latitude *string // The longitude of this IP address - Longitude *string `json:"longitude,omitempty"` + Longitude *string // The name of the organization for this IP address - Organization *string `json:"organization,omitempty"` + Organization *string // The type of the organization for this IP address - OrganizationType *string `json:"organizationType,omitempty"` + OrganizationType *string // The geographic region this IP address is located in - Region *string `json:"region,omitempty"` + Region *string // The state this IP address is located in - State *string `json:"state,omitempty"` + State *string // A numeric rating of confidence that the value in the 'state' field is correct on a scale of 0-100 - StateCf *int32 `json:"stateCf,omitempty"` + StateCf *int32 // The abbreviated name for the state this IP address is located in - StateCode *string `json:"stateCode,omitempty"` -} - -// EntitiesClientExpandOptions contains the optional parameters for the EntitiesClient.Expand method. -type EntitiesClientExpandOptions struct { - // placeholder for future optional parameters -} - -// EntitiesClientGetInsightsOptions contains the optional parameters for the EntitiesClient.GetInsights method. -type EntitiesClientGetInsightsOptions struct { - // placeholder for future optional parameters -} - -// EntitiesClientGetOptions contains the optional parameters for the EntitiesClient.Get method. -type EntitiesClientGetOptions struct { - // placeholder for future optional parameters -} - -// EntitiesClientListOptions contains the optional parameters for the EntitiesClient.NewListPager method. -type EntitiesClientListOptions struct { - // placeholder for future optional parameters -} - -// EntitiesClientQueriesOptions contains the optional parameters for the EntitiesClient.Queries method. -type EntitiesClientQueriesOptions struct { - // placeholder for future optional parameters -} - -// EntitiesGetTimelineClientListOptions contains the optional parameters for the EntitiesGetTimelineClient.List method. -type EntitiesGetTimelineClientListOptions struct { - // placeholder for future optional parameters -} - -// EntitiesRelationsClientListOptions contains the optional parameters for the EntitiesRelationsClient.NewListPager method. -type EntitiesRelationsClientListOptions struct { - // Filters the results, based on a Boolean condition. Optional. - Filter *string - // Sorts the results. Optional. - Orderby *string - // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skiptoken parameter that - // specifies a starting point to use for subsequent calls. Optional. - SkipToken *string - // Returns only the first n results. Optional. - Top *int32 -} - -// EntityClassification provides polymorphic access to related types. -// Call the interface's GetEntity() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AccountEntity, *AzureResourceEntity, *CloudApplicationEntity, *DNSEntity, *Entity, *FileEntity, *FileHashEntity, *HostEntity, -// - *HuntingBookmark, *IPEntity, *IoTDeviceEntity, *MailClusterEntity, *MailMessageEntity, *MailboxEntity, *MalwareEntity, -// - *NicEntity, *ProcessEntity, *RegistryKeyEntity, *RegistryValueEntity, *SecurityAlert, *SecurityGroupEntity, *SubmissionMailEntity, -// - *URLEntity -type EntityClassification interface { - // GetEntity returns the Entity content of the underlying type. - GetEntity() *Entity + StateCode *string } // Entity - Specific entity. type Entity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type Entity. @@ -2549,235 +2251,196 @@ func (e *Entity) GetEntity() *Entity { return e } // EntityAnalytics - Settings with single toggle. type EntityAnalytics struct { // REQUIRED; The kind of the setting - Kind *SettingKind `json:"kind,omitempty"` + Kind *SettingKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // EntityAnalytics properties - Properties *EntityAnalyticsProperties `json:"properties,omitempty"` + Properties *EntityAnalyticsProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetSettings implements the SettingsClassification interface for type EntityAnalytics. func (e *EntityAnalytics) GetSettings() *Settings { return &Settings{ - Kind: e.Kind, Etag: e.Etag, ID: e.ID, + Kind: e.Kind, Name: e.Name, - Type: e.Type, SystemData: e.SystemData, + Type: e.Type, } } // EntityAnalyticsProperties - EntityAnalytics property bag. type EntityAnalyticsProperties struct { // The relevant entity providers that are synced - EntityProviders []*EntityProviders `json:"entityProviders,omitempty"` + EntityProviders []*EntityProviders } // EntityEdges - The edge that connects the entity to the other entity. type EntityEdges struct { // A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty"` + AdditionalData map[string]any // The target entity Id. - TargetEntityID *string `json:"targetEntityId,omitempty"` + TargetEntityID *string } // EntityExpandParameters - The parameters required to execute an expand operation on the given entity. type EntityExpandParameters struct { // The end date filter, so the only expansion results returned are before this date. - EndTime *time.Time `json:"endTime,omitempty"` + EndTime *time.Time // The Id of the expansion to perform. - ExpansionID *string `json:"expansionId,omitempty"` + ExpansionID *string // The start date filter, so the only expansion results returned are after this date. - StartTime *time.Time `json:"startTime,omitempty"` + StartTime *time.Time } // EntityExpandResponse - The entity expansion result operation response. type EntityExpandResponse struct { // The metadata from the expansion operation results. - MetaData *ExpansionResultsMetadata `json:"metaData,omitempty"` + MetaData *ExpansionResultsMetadata // The expansion result values. - Value *EntityExpandResponseValue `json:"value,omitempty"` + Value *EntityExpandResponseValue } // EntityExpandResponseValue - The expansion result values. type EntityExpandResponseValue struct { // Array of edges that connects the entity to the list of entities. - Edges []*EntityEdges `json:"edges,omitempty"` + Edges []*EntityEdges // Array of the expansion result entities. - Entities []EntityClassification `json:"entities,omitempty"` + Entities []EntityClassification } // EntityFieldMapping - Map identifiers of a single entity type EntityFieldMapping struct { // Alert V3 identifier - Identifier *string `json:"identifier,omitempty"` + Identifier *string // The value of the identifier - Value *string `json:"value,omitempty"` + Value *string } // EntityGetInsightsParameters - The parameters required to execute insights operation on the given entity. type EntityGetInsightsParameters struct { // REQUIRED; The end timeline date, so the results returned are before this date. - EndTime *time.Time `json:"endTime,omitempty"` + EndTime *time.Time // REQUIRED; The start timeline date, so the results returned are after this date. - StartTime *time.Time `json:"startTime,omitempty"` + StartTime *time.Time // Indicates if query time range should be extended with default time range of the query. Default value is false - AddDefaultExtendedTimeRange *bool `json:"addDefaultExtendedTimeRange,omitempty"` + AddDefaultExtendedTimeRange *bool // List of Insights Query Id. If empty, default value is all insights of this entity - InsightQueryIDs []*string `json:"insightQueryIds,omitempty"` + InsightQueryIDs []*string } // EntityGetInsightsResponse - The Get Insights result operation response. type EntityGetInsightsResponse struct { // The metadata from the get insights operation results. - MetaData *GetInsightsResultsMetadata `json:"metaData,omitempty"` + MetaData *GetInsightsResultsMetadata // The insights result values. - Value []*EntityInsightItem `json:"value,omitempty"` + Value []*EntityInsightItem } // EntityInsightItem - Entity insight Item. type EntityInsightItem struct { // Query results for table insights query. - ChartQueryResults []*InsightsTableResult `json:"chartQueryResults,omitempty"` + ChartQueryResults []*InsightsTableResult // The query id of the insight - QueryID *string `json:"queryId,omitempty"` + QueryID *string // The Time interval that the query actually executed on. - QueryTimeInterval *EntityInsightItemQueryTimeInterval `json:"queryTimeInterval,omitempty"` + QueryTimeInterval *EntityInsightItemQueryTimeInterval // Query results for table insights query. - TableQueryResults *InsightsTableResult `json:"tableQueryResults,omitempty"` + TableQueryResults *InsightsTableResult } // EntityInsightItemQueryTimeInterval - The Time interval that the query actually executed on. type EntityInsightItemQueryTimeInterval struct { // Insight query end time - EndTime *time.Time `json:"endTime,omitempty"` + EndTime *time.Time // Insight query start time - StartTime *time.Time `json:"startTime,omitempty"` + StartTime *time.Time } // EntityList - List of all the entities. type EntityList struct { // REQUIRED; Array of entities. - Value []EntityClassification `json:"value,omitempty"` + Value []EntityClassification // READ-ONLY; URL to fetch the next set of entities. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // EntityMapping - Single entity mapping for the alert rule type EntityMapping struct { // The V3 type of the mapped entity - EntityType *EntityMappingType `json:"entityType,omitempty"` + EntityType *EntityMappingType // array of field mappings for the given entity mapping - FieldMappings []*FieldMapping `json:"fieldMappings,omitempty"` -} - -// EntityQueriesClientCreateOrUpdateOptions contains the optional parameters for the EntityQueriesClient.CreateOrUpdate method. -type EntityQueriesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// EntityQueriesClientDeleteOptions contains the optional parameters for the EntityQueriesClient.Delete method. -type EntityQueriesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// EntityQueriesClientGetOptions contains the optional parameters for the EntityQueriesClient.Get method. -type EntityQueriesClientGetOptions struct { - // placeholder for future optional parameters -} - -// EntityQueriesClientListOptions contains the optional parameters for the EntityQueriesClient.NewListPager method. -type EntityQueriesClientListOptions struct { - // The entity query kind we want to fetch - Kind *Enum13 -} - -// EntityQueryClassification provides polymorphic access to related types. -// Call the interface's GetEntityQuery() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ActivityEntityQuery, *EntityQuery, *ExpansionEntityQuery -type EntityQueryClassification interface { - // GetEntityQuery returns the EntityQuery content of the underlying type. - GetEntityQuery() *EntityQuery + FieldMappings []*FieldMapping } // EntityQuery - Specific entity query. type EntityQuery struct { // REQUIRED; the entity query kind - Kind *EntityQueryKind `json:"kind,omitempty"` + Kind *EntityQueryKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntityQuery implements the EntityQueryClassification interface for type EntityQuery. func (e *EntityQuery) GetEntityQuery() *EntityQuery { return e } -// EntityQueryItemClassification provides polymorphic access to related types. -// Call the interface's GetEntityQueryItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *EntityQueryItem, *InsightQueryItem -type EntityQueryItemClassification interface { - // GetEntityQueryItem returns the EntityQueryItem content of the underlying type. - GetEntityQueryItem() *EntityQueryItem -} - // EntityQueryItem - An abstract Query item for entity type EntityQueryItem struct { // REQUIRED; The kind of the entity query - Kind *EntityQueryKind `json:"kind,omitempty"` + Kind *EntityQueryKind // Query Template ARM Name - Name *string `json:"name,omitempty"` + Name *string // ARM Type - Type *string `json:"type,omitempty"` + Type *string // READ-ONLY; Query Template ARM ID - ID *string `json:"id,omitempty" azure:"ro"` + ID *string } // GetEntityQueryItem implements the EntityQueryItemClassification interface for type EntityQueryItem. @@ -2785,43 +2448,34 @@ func (e *EntityQueryItem) GetEntityQueryItem() *EntityQueryItem { return e } type EntityQueryItemPropertiesDataTypesItem struct { // Data type name - DataType *string `json:"dataType,omitempty"` + DataType *string } // EntityQueryList - List of all the entity queries. type EntityQueryList struct { // REQUIRED; Array of entity queries. - Value []EntityQueryClassification `json:"value,omitempty"` + Value []EntityQueryClassification // READ-ONLY; URL to fetch the next set of entity queries. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// EntityQueryTemplateClassification provides polymorphic access to related types. -// Call the interface's GetEntityQueryTemplate() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ActivityEntityQueryTemplate, *EntityQueryTemplate -type EntityQueryTemplateClassification interface { - // GetEntityQueryTemplate returns the EntityQueryTemplate content of the underlying type. - GetEntityQueryTemplate() *EntityQueryTemplate + NextLink *string } // EntityQueryTemplate - Specific entity query template. type EntityQueryTemplate struct { // REQUIRED; the entity query template kind - Kind *EntityQueryTemplateKind `json:"kind,omitempty"` + Kind *EntityQueryTemplateKind // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntityQueryTemplate implements the EntityQueryTemplateClassification interface for type EntityQueryTemplate. @@ -2830,42 +2484,16 @@ func (e *EntityQueryTemplate) GetEntityQueryTemplate() *EntityQueryTemplate { re // EntityQueryTemplateList - List of all the entity query templates. type EntityQueryTemplateList struct { // REQUIRED; Array of entity query templates. - Value []EntityQueryTemplateClassification `json:"value,omitempty"` + Value []EntityQueryTemplateClassification // READ-ONLY; URL to fetch the next set of entity query templates. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// EntityQueryTemplatesClientGetOptions contains the optional parameters for the EntityQueryTemplatesClient.Get method. -type EntityQueryTemplatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// EntityQueryTemplatesClientListOptions contains the optional parameters for the EntityQueryTemplatesClient.NewListPager -// method. -type EntityQueryTemplatesClientListOptions struct { - // The entity template query kind we want to fetch - Kind *Enum15 -} - -// EntityRelationsClientGetRelationOptions contains the optional parameters for the EntityRelationsClient.GetRelation method. -type EntityRelationsClientGetRelationOptions struct { - // placeholder for future optional parameters -} - -// EntityTimelineItemClassification provides polymorphic access to related types. -// Call the interface's GetEntityTimelineItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ActivityTimelineItem, *AnomalyTimelineItem, *BookmarkTimelineItem, *EntityTimelineItem, *SecurityAlertTimelineItem -type EntityTimelineItemClassification interface { - // GetEntityTimelineItem returns the EntityTimelineItem content of the underlying type. - GetEntityTimelineItem() *EntityTimelineItem + NextLink *string } // EntityTimelineItem - Entity timeline Item. type EntityTimelineItem struct { // REQUIRED; The entity query kind type. - Kind *EntityTimelineKind `json:"kind,omitempty"` + Kind *EntityTimelineKind } // GetEntityTimelineItem implements the EntityTimelineItemClassification interface for type EntityTimelineItem. @@ -2874,1438 +2502,1289 @@ func (e *EntityTimelineItem) GetEntityTimelineItem() *EntityTimelineItem { retur // EntityTimelineParameters - The parameters required to execute s timeline operation on the given entity. type EntityTimelineParameters struct { // REQUIRED; The end timeline date, so the results returned are before this date. - EndTime *time.Time `json:"endTime,omitempty"` + EndTime *time.Time // REQUIRED; The start timeline date, so the results returned are after this date. - StartTime *time.Time `json:"startTime,omitempty"` + StartTime *time.Time // Array of timeline Item kinds. - Kinds []*EntityTimelineKind `json:"kinds,omitempty"` + Kinds []*EntityTimelineKind // The number of bucket for timeline queries aggregation. - NumberOfBucket *int32 `json:"numberOfBucket,omitempty"` + NumberOfBucket *int32 } // EntityTimelineResponse - The entity timeline result operation response. type EntityTimelineResponse struct { // The metadata from the timeline operation results. - MetaData *TimelineResultsMetadata `json:"metaData,omitempty"` + MetaData *TimelineResultsMetadata // The timeline result values. - Value []EntityTimelineItemClassification `json:"value,omitempty"` + Value []EntityTimelineItemClassification } // EventGroupingSettings - Event grouping settings property bag. type EventGroupingSettings struct { // The event grouping aggregation kinds - AggregationKind *EventGroupingAggregationKind `json:"aggregationKind,omitempty"` + AggregationKind *EventGroupingAggregationKind } // ExpansionEntityQueriesProperties - Describes expansion entity query properties type ExpansionEntityQueriesProperties struct { // List of the data sources that are required to run the query - DataSources []*string `json:"dataSources,omitempty"` + DataSources []*string // The query display name - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // The type of the query's source entity - InputEntityType *EntityType `json:"inputEntityType,omitempty"` + InputEntityType *EntityType // List of the fields of the source entity that are required to run the query - InputFields []*string `json:"inputFields,omitempty"` + InputFields []*string // List of the desired output types to be constructed from the result - OutputEntityTypes []*EntityType `json:"outputEntityTypes,omitempty"` + OutputEntityTypes []*EntityType // The template query string to be parsed and formatted - QueryTemplate *string `json:"queryTemplate,omitempty"` + QueryTemplate *string } // ExpansionEntityQuery - Represents Expansion entity query. type ExpansionEntityQuery struct { // REQUIRED; the entity query kind - Kind *EntityQueryKind `json:"kind,omitempty"` + Kind *EntityQueryKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Expansion entity query properties - Properties *ExpansionEntityQueriesProperties `json:"properties,omitempty"` + Properties *ExpansionEntityQueriesProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntityQuery implements the EntityQueryClassification interface for type ExpansionEntityQuery. func (e *ExpansionEntityQuery) GetEntityQuery() *EntityQuery { return &EntityQuery{ - Kind: e.Kind, Etag: e.Etag, ID: e.ID, + Kind: e.Kind, Name: e.Name, - Type: e.Type, SystemData: e.SystemData, + Type: e.Type, } } // ExpansionResultAggregation - Information of a specific aggregation in the expansion result. type ExpansionResultAggregation struct { // REQUIRED; Total number of aggregations of the given kind (and aggregationType if given) in the expansion result. - Count *int32 `json:"count,omitempty"` + Count *int32 // REQUIRED; The kind of the aggregated entity. - EntityKind *EntityKind `json:"entityKind,omitempty"` + EntityKind *EntityKind // The common type of the aggregation. (for e.g. entity field name) - AggregationType *string `json:"aggregationType,omitempty"` + AggregationType *string // The display name of the aggregation by type. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string } // ExpansionResultsMetadata - Expansion result metadata. type ExpansionResultsMetadata struct { // Information of the aggregated nodes in the expansion result. - Aggregations []*ExpansionResultAggregation `json:"aggregations,omitempty"` + Aggregations []*ExpansionResultAggregation } // EyesOn - Settings with single toggle. type EyesOn struct { // REQUIRED; The kind of the setting - Kind *SettingKind `json:"kind,omitempty"` + Kind *SettingKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // EyesOn properties - Properties *EyesOnSettingsProperties `json:"properties,omitempty"` + Properties *EyesOnSettingsProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetSettings implements the SettingsClassification interface for type EyesOn. func (e *EyesOn) GetSettings() *Settings { return &Settings{ - Kind: e.Kind, Etag: e.Etag, ID: e.ID, + Kind: e.Kind, Name: e.Name, - Type: e.Type, SystemData: e.SystemData, + Type: e.Type, } } // EyesOnSettingsProperties - EyesOn property bag. type EyesOnSettingsProperties struct { // READ-ONLY; Determines whether the setting is enable or disabled. - IsEnabled *bool `json:"isEnabled,omitempty" azure:"ro"` + IsEnabled *bool } // FieldMapping - A single field mapping of the mapped entity type FieldMapping struct { // the column name to be mapped to the identifier - ColumnName *string `json:"columnName,omitempty"` + ColumnName *string // the V3 identifier of the entity - Identifier *string `json:"identifier,omitempty"` + Identifier *string } // FileEntity - Represents a file entity. type FileEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // File entity properties - Properties *FileEntityProperties `json:"properties,omitempty"` + Properties *FileEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type FileEntity. func (f *FileEntity) GetEntity() *Entity { return &Entity{ - Kind: f.Kind, ID: f.ID, + Kind: f.Kind, Name: f.Name, - Type: f.Type, SystemData: f.SystemData, + Type: f.Type, } } // FileEntityProperties - File entity property bag. type FileEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The full path to the file. - Directory *string `json:"directory,omitempty" azure:"ro"` + Directory *string // READ-ONLY; The file hash entity identifiers associated with this file - FileHashEntityIDs []*string `json:"fileHashEntityIds,omitempty" azure:"ro"` + FileHashEntityIDs []*string // READ-ONLY; The file name without path (some alerts might not include path). - FileName *string `json:"fileName,omitempty" azure:"ro"` + FileName *string // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The Host entity id which the file belongs to - HostEntityID *string `json:"hostEntityId,omitempty" azure:"ro"` + HostEntityID *string } // FileHashEntity - Represents a file hash entity. type FileHashEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // FileHash entity properties - Properties *FileHashEntityProperties `json:"properties,omitempty"` + Properties *FileHashEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type FileHashEntity. func (f *FileHashEntity) GetEntity() *Entity { return &Entity{ - Kind: f.Kind, ID: f.ID, + Kind: f.Kind, Name: f.Name, - Type: f.Type, SystemData: f.SystemData, + Type: f.Type, } } // FileHashEntityProperties - FileHash entity property bag. type FileHashEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The hash algorithm type. - Algorithm *FileHashAlgorithm `json:"algorithm,omitempty" azure:"ro"` + Algorithm *FileHashAlgorithm // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The file hash value. - HashValue *string `json:"hashValue,omitempty" azure:"ro"` + HashValue *string } // FileImport - Represents a file import in Azure Security Insights. type FileImport struct { // File import properties - Properties *FileImportProperties `json:"properties,omitempty"` + Properties *FileImportProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // FileImportList - List all the file imports. type FileImportList struct { // REQUIRED; Array of file imports. - Value []*FileImport `json:"value,omitempty"` + Value []*FileImport // READ-ONLY; URL to fetch the next set of file imports. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // FileImportProperties - Describes the FileImport's properties type FileImportProperties struct { // REQUIRED; The content type of this file. - ContentType *FileImportContentType `json:"contentType,omitempty"` + ContentType *FileImportContentType // REQUIRED; Represents the imported file. - ImportFile *FileMetadata `json:"importFile,omitempty"` + ImportFile *FileMetadata // REQUIRED; Describes how to ingest the records in the file. - IngestionMode *IngestionMode `json:"ingestionMode,omitempty"` + IngestionMode *IngestionMode // REQUIRED; The source for the data in the file. - Source *string `json:"source,omitempty"` + Source *string // READ-ONLY; The time the file was imported. - CreatedTimeUTC *time.Time `json:"createdTimeUTC,omitempty" azure:"ro"` + CreatedTimeUTC *time.Time // READ-ONLY; Represents the error file (if the import was ingested with errors or failed the validation). - ErrorFile *FileMetadata `json:"errorFile,omitempty" azure:"ro"` + ErrorFile *FileMetadata // READ-ONLY; An ordered list of some of the errors that were encountered during validation. - ErrorsPreview []*ValidationError `json:"errorsPreview,omitempty" azure:"ro"` + ErrorsPreview []*ValidationError // READ-ONLY; The time the files associated with this import are deleted from the storage account. - FilesValidUntilTimeUTC *time.Time `json:"filesValidUntilTimeUTC,omitempty" azure:"ro"` + FilesValidUntilTimeUTC *time.Time // READ-ONLY; The time the file import record is soft deleted from the database and history. - ImportValidUntilTimeUTC *time.Time `json:"importValidUntilTimeUTC,omitempty" azure:"ro"` + ImportValidUntilTimeUTC *time.Time // READ-ONLY; The number of records that have been successfully ingested. - IngestedRecordCount *int32 `json:"ingestedRecordCount,omitempty" azure:"ro"` + IngestedRecordCount *int32 // READ-ONLY; The state of the file import. - State *FileImportState `json:"state,omitempty" azure:"ro"` + State *FileImportState // READ-ONLY; The number of records in the file. - TotalRecordCount *int32 `json:"totalRecordCount,omitempty" azure:"ro"` + TotalRecordCount *int32 // READ-ONLY; The number of records that have passed validation. - ValidRecordCount *int32 `json:"validRecordCount,omitempty" azure:"ro"` -} - -// FileImportsClientBeginDeleteOptions contains the optional parameters for the FileImportsClient.BeginDelete method. -type FileImportsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FileImportsClientCreateOptions contains the optional parameters for the FileImportsClient.Create method. -type FileImportsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// FileImportsClientGetOptions contains the optional parameters for the FileImportsClient.Get method. -type FileImportsClientGetOptions struct { - // placeholder for future optional parameters -} - -// FileImportsClientListOptions contains the optional parameters for the FileImportsClient.NewListPager method. -type FileImportsClientListOptions struct { - // Filters the results, based on a Boolean condition. Optional. - Filter *string - // Sorts the results. Optional. - Orderby *string - // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skiptoken parameter that - // specifies a starting point to use for subsequent calls. Optional. - SkipToken *string - // Returns only the first n results. Optional. - Top *int32 + ValidRecordCount *int32 } // FileMetadata - Represents a file. type FileMetadata struct { // The format of the file - FileFormat *FileFormat `json:"fileFormat,omitempty"` + FileFormat *FileFormat // The name of the file. - FileName *string `json:"fileName,omitempty"` + FileName *string // The size of the file. - FileSize *int32 `json:"fileSize,omitempty"` + FileSize *int32 // READ-ONLY; Indicates whether the file was deleted from the storage account. - DeleteStatus *DeleteStatus `json:"deleteStatus,omitempty" azure:"ro"` + DeleteStatus *DeleteStatus // READ-ONLY; A URI with a valid SAS token to allow uploading / downloading the file. - FileContentURI *string `json:"fileContentUri,omitempty" azure:"ro"` + FileContentURI *string } // FusionAlertRule - Represents Fusion alert rule. type FusionAlertRule struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Fusion alert rule properties - Properties *FusionAlertRuleProperties `json:"properties,omitempty"` + Properties *FusionAlertRuleProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRule implements the AlertRuleClassification interface for type FusionAlertRule. func (f *FusionAlertRule) GetAlertRule() *AlertRule { return &AlertRule{ - Kind: f.Kind, Etag: f.Etag, ID: f.ID, + Kind: f.Kind, Name: f.Name, - Type: f.Type, SystemData: f.SystemData, + Type: f.Type, } } // FusionAlertRuleProperties - Fusion alert rule base property bag. type FusionAlertRuleProperties struct { // REQUIRED; The Name of the alert rule template used to create this rule. - AlertRuleTemplateName *string `json:"alertRuleTemplateName,omitempty"` + AlertRuleTemplateName *string // REQUIRED; Determines whether this alert rule is enabled or disabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // Configuration to exclude scenarios in fusion detection. - ScenarioExclusionPatterns []*FusionScenarioExclusionPattern `json:"scenarioExclusionPatterns,omitempty"` + ScenarioExclusionPatterns []*FusionScenarioExclusionPattern // Configuration for all supported source signals in fusion detection. - SourceSettings []*FusionSourceSettings `json:"sourceSettings,omitempty"` + SourceSettings []*FusionSourceSettings // READ-ONLY; The description of the alert rule. - Description *string `json:"description,omitempty" azure:"ro"` + Description *string // READ-ONLY; The display name for alerts created by this alert rule. - DisplayName *string `json:"displayName,omitempty" azure:"ro"` + DisplayName *string // READ-ONLY; The last time that this alert has been modified. - LastModifiedUTC *time.Time `json:"lastModifiedUtc,omitempty" azure:"ro"` + LastModifiedUTC *time.Time // READ-ONLY; The severity for alerts created by this alert rule. - Severity *AlertSeverity `json:"severity,omitempty" azure:"ro"` + Severity *AlertSeverity // READ-ONLY; The tactics of the alert rule - Tactics []*AttackTactic `json:"tactics,omitempty" azure:"ro"` + Tactics []*AttackTactic // READ-ONLY; The techniques of the alert rule - Techniques []*string `json:"techniques,omitempty" azure:"ro"` + Techniques []*string } // FusionAlertRuleTemplate - Represents Fusion alert rule template. type FusionAlertRuleTemplate struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // Fusion alert rule template properties - Properties *FusionAlertRuleTemplateProperties `json:"properties,omitempty"` + Properties *FusionAlertRuleTemplateProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRuleTemplate implements the AlertRuleTemplateClassification interface for type FusionAlertRuleTemplate. func (f *FusionAlertRuleTemplate) GetAlertRuleTemplate() *AlertRuleTemplate { return &AlertRuleTemplate{ - Kind: f.Kind, ID: f.ID, + Kind: f.Kind, Name: f.Name, - Type: f.Type, SystemData: f.SystemData, + Type: f.Type, } } // FusionAlertRuleTemplateProperties - Fusion alert rule template properties type FusionAlertRuleTemplateProperties struct { // the number of alert rules that were created by this template - AlertRulesCreatedByTemplateCount *int32 `json:"alertRulesCreatedByTemplateCount,omitempty"` + AlertRulesCreatedByTemplateCount *int32 // The description of the alert rule template. - Description *string `json:"description,omitempty"` + Description *string // The display name for alert rule template. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // The required data connectors for this template - RequiredDataConnectors []*AlertRuleTemplateDataSource `json:"requiredDataConnectors,omitempty"` + RequiredDataConnectors []*AlertRuleTemplateDataSource // The severity for alerts created by this alert rule. - Severity *AlertSeverity `json:"severity,omitempty"` + Severity *AlertSeverity // All supported source signal configurations consumed in fusion detection. - SourceSettings []*FusionTemplateSourceSetting `json:"sourceSettings,omitempty"` + SourceSettings []*FusionTemplateSourceSetting // The alert rule template status. - Status *TemplateStatus `json:"status,omitempty"` + Status *TemplateStatus // The tactics of the alert rule template - Tactics []*AttackTactic `json:"tactics,omitempty"` + Tactics []*AttackTactic // The techniques of the alert rule - Techniques []*string `json:"techniques,omitempty"` + Techniques []*string // READ-ONLY; The time that this alert rule template has been added. - CreatedDateUTC *time.Time `json:"createdDateUTC,omitempty" azure:"ro"` + CreatedDateUTC *time.Time // READ-ONLY; The time that this alert rule template was last updated. - LastUpdatedDateUTC *time.Time `json:"lastUpdatedDateUTC,omitempty" azure:"ro"` + LastUpdatedDateUTC *time.Time } // FusionScenarioExclusionPattern - Represents a Fusion scenario exclusion patterns in Fusion detection. type FusionScenarioExclusionPattern struct { // REQUIRED; DateTime when scenario exclusion pattern is added in UTC. - DateAddedInUTC *string `json:"dateAddedInUTC,omitempty"` + DateAddedInUTC *string // REQUIRED; Scenario exclusion pattern. - ExclusionPattern *string `json:"exclusionPattern,omitempty"` + ExclusionPattern *string } // FusionSourceSettings - Represents a supported source signal configuration in Fusion detection. type FusionSourceSettings struct { // REQUIRED; Determines whether this source signal is enabled or disabled in Fusion detection. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // REQUIRED; Name of the Fusion source signal. Refer to Fusion alert rule template for supported values. - SourceName *string `json:"sourceName,omitempty"` + SourceName *string // Configuration for all source subtypes under this source signal consumed in fusion detection. - SourceSubTypes []*FusionSourceSubTypeSetting `json:"sourceSubTypes,omitempty"` + SourceSubTypes []*FusionSourceSubTypeSetting } // FusionSourceSubTypeSetting - Represents a supported source subtype configuration under a source signal in Fusion detection. type FusionSourceSubTypeSetting struct { // REQUIRED; Determines whether this source subtype under source signal is enabled or disabled in Fusion detection. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // REQUIRED; Severity configuration for a source subtype consumed in fusion detection. - SeverityFilters *FusionSubTypeSeverityFilter `json:"severityFilters,omitempty"` + SeverityFilters *FusionSubTypeSeverityFilter // REQUIRED; The Name of the source subtype under a given source signal in Fusion detection. Refer to Fusion alert rule template // for supported values. - SourceSubTypeName *string `json:"sourceSubTypeName,omitempty"` + SourceSubTypeName *string // READ-ONLY; The display name of source subtype under a source signal consumed in Fusion detection. - SourceSubTypeDisplayName *string `json:"sourceSubTypeDisplayName,omitempty" azure:"ro"` + SourceSubTypeDisplayName *string } // FusionSubTypeSeverityFilter - Represents severity configuration for a source subtype consumed in Fusion detection. type FusionSubTypeSeverityFilter struct { // Individual Severity configuration settings for a given source subtype consumed in Fusion detection. - Filters []*FusionSubTypeSeverityFiltersItem `json:"filters,omitempty"` + Filters []*FusionSubTypeSeverityFiltersItem // READ-ONLY; Determines whether this source subtype supports severity configuration or not. - IsSupported *bool `json:"isSupported,omitempty" azure:"ro"` + IsSupported *bool } // FusionSubTypeSeverityFiltersItem - Represents a Severity filter setting for a given source subtype consumed in Fusion detection. type FusionSubTypeSeverityFiltersItem struct { // REQUIRED; Determines whether this severity is enabled or disabled for this source subtype consumed in Fusion detection. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // REQUIRED; The Severity for a given source subtype consumed in Fusion detection. - Severity *AlertSeverity `json:"severity,omitempty"` + Severity *AlertSeverity } // FusionTemplateSourceSetting - Represents a source signal consumed in Fusion detection. type FusionTemplateSourceSetting struct { // REQUIRED; The name of a source signal consumed in Fusion detection. - SourceName *string `json:"sourceName,omitempty"` + SourceName *string // All supported source subtypes under this source signal consumed in fusion detection. - SourceSubTypes []*FusionTemplateSourceSubType `json:"sourceSubTypes,omitempty"` + SourceSubTypes []*FusionTemplateSourceSubType } // FusionTemplateSourceSubType - Represents a source subtype under a source signal consumed in Fusion detection. type FusionTemplateSourceSubType struct { // REQUIRED; Severity configuration available for a source subtype consumed in fusion detection. - SeverityFilter *FusionTemplateSubTypeSeverityFilter `json:"severityFilter,omitempty"` + SeverityFilter *FusionTemplateSubTypeSeverityFilter // REQUIRED; The name of source subtype under a source signal consumed in Fusion detection. - SourceSubTypeName *string `json:"sourceSubTypeName,omitempty"` + SourceSubTypeName *string // READ-ONLY; The display name of source subtype under a source signal consumed in Fusion detection. - SourceSubTypeDisplayName *string `json:"sourceSubTypeDisplayName,omitempty" azure:"ro"` + SourceSubTypeDisplayName *string } // FusionTemplateSubTypeSeverityFilter - Represents severity configurations available for a source subtype consumed in Fusion // detection. type FusionTemplateSubTypeSeverityFilter struct { // REQUIRED; Determines whether severity configuration is supported for this source subtype consumed in Fusion detection. - IsSupported *bool `json:"isSupported,omitempty"` + IsSupported *bool // List of all supported severities for this source subtype consumed in Fusion detection. - SeverityFilters []*AlertSeverity `json:"severityFilters,omitempty"` + SeverityFilters []*AlertSeverity } // GeoLocation - The geo-location context attached to the ip entity type GeoLocation struct { // READ-ONLY; Autonomous System Number - Asn *int32 `json:"asn,omitempty" azure:"ro"` + Asn *int32 // READ-ONLY; City name - City *string `json:"city,omitempty" azure:"ro"` + City *string // READ-ONLY; The country code according to ISO 3166 format - CountryCode *string `json:"countryCode,omitempty" azure:"ro"` + CountryCode *string // READ-ONLY; Country name according to ISO 3166 Alpha 2: the lowercase of the English Short Name - CountryName *string `json:"countryName,omitempty" azure:"ro"` + CountryName *string // READ-ONLY; The longitude of the identified location, expressed as a floating point number with range of -180 to 180, with // positive numbers representing East and negative numbers representing West. Latitude and // longitude are derived from the city or postal code. - Latitude *float64 `json:"latitude,omitempty" azure:"ro"` + Latitude *float64 // READ-ONLY; The latitude of the identified location, expressed as a floating point number with range of - 90 to 90, with // positive numbers representing North and negative numbers representing South. Latitude and // longitude are derived from the city or postal code. - Longitude *float64 `json:"longitude,omitempty" azure:"ro"` + Longitude *float64 // READ-ONLY; State name - State *string `json:"state,omitempty" azure:"ro"` + State *string } // GetInsightsErrorKind - GetInsights Query Errors. type GetInsightsErrorKind struct { // REQUIRED; the error message - ErrorMessage *string `json:"errorMessage,omitempty"` + ErrorMessage *string // REQUIRED; the query kind - Kind *GetInsightsError `json:"kind,omitempty"` + Kind *GetInsightsError // the query id - QueryID *string `json:"queryId,omitempty"` + QueryID *string } // GetInsightsResultsMetadata - Get Insights result metadata. type GetInsightsResultsMetadata struct { // REQUIRED; the total items found for the insights request - TotalCount *int32 `json:"totalCount,omitempty"` + TotalCount *int32 // information about the failed queries - Errors []*GetInsightsErrorKind `json:"errors,omitempty"` + Errors []*GetInsightsErrorKind } // GetQueriesResponse - Retrieve queries for entity result operation response. type GetQueriesResponse struct { // The query result values. - Value []EntityQueryItemClassification `json:"value,omitempty"` + Value []EntityQueryItemClassification } // GitHubResourceInfo - Resources created in GitHub repository. type GitHubResourceInfo struct { // GitHub application installation id. - AppInstallationID *string `json:"appInstallationId,omitempty"` + AppInstallationID *string } // GroupingConfiguration - Grouping configuration property bag. type GroupingConfiguration struct { // REQUIRED; Grouping enabled - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // REQUIRED; Limit the group to alerts created within the lookback duration (in ISO 8601 duration format) - LookbackDuration *string `json:"lookbackDuration,omitempty"` + LookbackDuration *string // REQUIRED; Grouping matching method. When method is Selected at least one of groupByEntities, groupByAlertDetails, groupByCustomDetails // must be provided and not empty. - MatchingMethod *MatchingMethod `json:"matchingMethod,omitempty"` + MatchingMethod *MatchingMethod // REQUIRED; Re-open closed matching incidents - ReopenClosedIncident *bool `json:"reopenClosedIncident,omitempty"` + ReopenClosedIncident *bool // A list of alert details to group by (when matchingMethod is Selected) - GroupByAlertDetails []*AlertDetail `json:"groupByAlertDetails,omitempty"` + GroupByAlertDetails []*AlertDetail // A list of custom details keys to group by (when matchingMethod is Selected). Only keys defined in the current alert rule // may be used. - GroupByCustomDetails []*string `json:"groupByCustomDetails,omitempty"` + GroupByCustomDetails []*string // A list of entity types to group by (when matchingMethod is Selected). Only entities defined in the current alert rule may // be used. - GroupByEntities []*EntityMappingType `json:"groupByEntities,omitempty"` + GroupByEntities []*EntityMappingType } // HostEntity - Represents a host entity. type HostEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // Host entity properties - Properties *HostEntityProperties `json:"properties,omitempty"` + Properties *HostEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type HostEntity. func (h *HostEntity) GetEntity() *Entity { return &Entity{ - Kind: h.Kind, ID: h.ID, + Kind: h.Kind, Name: h.Name, - Type: h.Type, SystemData: h.SystemData, + Type: h.Type, } } // HostEntityProperties - Host entity property bag. type HostEntityProperties struct { // The operating system type. - OSFamily *OSFamily `json:"osFamily,omitempty"` + OSFamily *OSFamily // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The azure resource id of the VM. - AzureID *string `json:"azureID,omitempty" azure:"ro"` + AzureID *string // READ-ONLY; The DNS domain that this host belongs to. Should contain the compete DNS suffix for the domain - DNSDomain *string `json:"dnsDomain,omitempty" azure:"ro"` + DNSDomain *string // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The hostname without the domain suffix. - HostName *string `json:"hostName,omitempty" azure:"ro"` + HostName *string // READ-ONLY; Determines whether this host belongs to a domain. - IsDomainJoined *bool `json:"isDomainJoined,omitempty" azure:"ro"` + IsDomainJoined *bool // READ-ONLY; The host name (pre-windows2000). - NetBiosName *string `json:"netBiosName,omitempty" azure:"ro"` + NetBiosName *string // READ-ONLY; The NT domain that this host belongs to. - NtDomain *string `json:"ntDomain,omitempty" azure:"ro"` + NtDomain *string // READ-ONLY; A free text representation of the operating system. This field is meant to hold specific versions the are more // fine grained than OSFamily or future values not supported by OSFamily enumeration - OSVersion *string `json:"osVersion,omitempty" azure:"ro"` + OSVersion *string // READ-ONLY; The OMS agent id, if the host has OMS agent installed. - OmsAgentID *string `json:"omsAgentID,omitempty" azure:"ro"` + OmsAgentID *string } // HuntingBookmark - Represents a Hunting bookmark entity. type HuntingBookmark struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // HuntingBookmark entity properties - Properties *HuntingBookmarkProperties `json:"properties,omitempty"` + Properties *HuntingBookmarkProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type HuntingBookmark. func (h *HuntingBookmark) GetEntity() *Entity { return &Entity{ - Kind: h.Kind, ID: h.ID, + Kind: h.Kind, Name: h.Name, - Type: h.Type, SystemData: h.SystemData, + Type: h.Type, } } // HuntingBookmarkProperties - Describes bookmark properties type HuntingBookmarkProperties struct { // REQUIRED; The display name of the bookmark - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // REQUIRED; The query of the bookmark. - Query *string `json:"query,omitempty"` + Query *string // The time the bookmark was created - Created *time.Time `json:"created,omitempty"` + Created *time.Time // Describes a user that created the bookmark - CreatedBy *UserInfo `json:"createdBy,omitempty"` + CreatedBy *UserInfo // The time of the event - EventTime *time.Time `json:"eventTime,omitempty"` + EventTime *time.Time // Describes an incident that relates to bookmark - IncidentInfo *IncidentInfo `json:"incidentInfo,omitempty"` + IncidentInfo *IncidentInfo // List of labels relevant to this bookmark - Labels []*string `json:"labels,omitempty"` + Labels []*string // The notes of the bookmark - Notes *string `json:"notes,omitempty"` + Notes *string // The query result of the bookmark. - QueryResult *string `json:"queryResult,omitempty"` + QueryResult *string // The last time the bookmark was updated - Updated *time.Time `json:"updated,omitempty"` + Updated *time.Time // Describes a user that updated the bookmark - UpdatedBy *UserInfo `json:"updatedBy,omitempty"` + UpdatedBy *UserInfo // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string } // IPEntity - Represents an ip entity. type IPEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // Ip entity properties - Properties *IPEntityProperties `json:"properties,omitempty"` + Properties *IPEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type IPEntity. func (i *IPEntity) GetEntity() *Entity { return &Entity{ - Kind: i.Kind, ID: i.ID, + Kind: i.Kind, Name: i.Name, - Type: i.Type, SystemData: i.SystemData, + Type: i.Type, } } // IPEntityProperties - Ip entity property bag. type IPEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The IP address as string, e.g. 127.0.0.1 (either in Ipv4 or Ipv6) - Address *string `json:"address,omitempty" azure:"ro"` + Address *string // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The geo-location context attached to the ip entity - Location *GeoLocation `json:"location,omitempty" azure:"ro"` + Location *GeoLocation // READ-ONLY; A list of TI contexts attached to the ip entity. - ThreatIntelligence []*ThreatIntelligence `json:"threatIntelligence,omitempty" azure:"ro"` -} - -// IPGeodataClientGetOptions contains the optional parameters for the IPGeodataClient.Get method. -type IPGeodataClientGetOptions struct { - // placeholder for future optional parameters + ThreatIntelligence []*ThreatIntelligence } // Incident - Represents an incident in Azure Security Insights. type Incident struct { // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Incident properties - Properties *IncidentProperties `json:"properties,omitempty"` + Properties *IncidentProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // IncidentAdditionalData - Incident additional data property bag. type IncidentAdditionalData struct { // READ-ONLY; List of product names of alerts in the incident - AlertProductNames []*string `json:"alertProductNames,omitempty" azure:"ro"` + AlertProductNames []*string // READ-ONLY; The number of alerts in the incident - AlertsCount *int32 `json:"alertsCount,omitempty" azure:"ro"` + AlertsCount *int32 // READ-ONLY; The number of bookmarks in the incident - BookmarksCount *int32 `json:"bookmarksCount,omitempty" azure:"ro"` + BookmarksCount *int32 // READ-ONLY; The number of comments in the incident - CommentsCount *int32 `json:"commentsCount,omitempty" azure:"ro"` + CommentsCount *int32 // READ-ONLY; The provider incident url to the incident in Microsoft 365 Defender portal - ProviderIncidentURL *string `json:"providerIncidentUrl,omitempty" azure:"ro"` + ProviderIncidentURL *string // READ-ONLY; The tactics associated with incident - Tactics []*AttackTactic `json:"tactics,omitempty" azure:"ro"` + Tactics []*AttackTactic // READ-ONLY; The techniques associated with incident's tactics' - Techniques []*string `json:"techniques,omitempty" azure:"ro"` + Techniques []*string } // IncidentAlertList - List of incident alerts. type IncidentAlertList struct { // REQUIRED; Array of incident alerts. - Value []*SecurityAlert `json:"value,omitempty"` + Value []*SecurityAlert } // IncidentBookmarkList - List of incident bookmarks. type IncidentBookmarkList struct { // REQUIRED; Array of incident bookmarks. - Value []*HuntingBookmark `json:"value,omitempty"` + Value []*HuntingBookmark } // IncidentComment - Represents an incident comment type IncidentComment struct { // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Incident comment properties - Properties *IncidentCommentProperties `json:"properties,omitempty"` + Properties *IncidentCommentProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // IncidentCommentList - List of incident comments. type IncidentCommentList struct { // REQUIRED; Array of comments. - Value []*IncidentComment `json:"value,omitempty"` + Value []*IncidentComment // READ-ONLY; URL to fetch the next set of comments. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // IncidentCommentProperties - Incident comment property bag. type IncidentCommentProperties struct { // REQUIRED; The comment message - Message *string `json:"message,omitempty"` + Message *string // READ-ONLY; Describes the client that created the comment - Author *ClientInfo `json:"author,omitempty" azure:"ro"` + Author *ClientInfo // READ-ONLY; The time the comment was created - CreatedTimeUTC *time.Time `json:"createdTimeUtc,omitempty" azure:"ro"` + CreatedTimeUTC *time.Time // READ-ONLY; The time the comment was updated - LastModifiedTimeUTC *time.Time `json:"lastModifiedTimeUtc,omitempty" azure:"ro"` -} - -// IncidentCommentsClientCreateOrUpdateOptions contains the optional parameters for the IncidentCommentsClient.CreateOrUpdate -// method. -type IncidentCommentsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// IncidentCommentsClientDeleteOptions contains the optional parameters for the IncidentCommentsClient.Delete method. -type IncidentCommentsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IncidentCommentsClientGetOptions contains the optional parameters for the IncidentCommentsClient.Get method. -type IncidentCommentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// IncidentCommentsClientListOptions contains the optional parameters for the IncidentCommentsClient.NewListPager method. -type IncidentCommentsClientListOptions struct { - // Filters the results, based on a Boolean condition. Optional. - Filter *string - // Sorts the results. Optional. - Orderby *string - // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skiptoken parameter that - // specifies a starting point to use for subsequent calls. Optional. - SkipToken *string - // Returns only the first n results. Optional. - Top *int32 + LastModifiedTimeUTC *time.Time } // IncidentConfiguration - Incident Configuration property bag. type IncidentConfiguration struct { // REQUIRED; Create incidents from alerts triggered by this analytics rule - CreateIncident *bool `json:"createIncident,omitempty"` + CreateIncident *bool // Set how the alerts that are triggered by this analytics rule, are grouped into incidents - GroupingConfiguration *GroupingConfiguration `json:"groupingConfiguration,omitempty"` + GroupingConfiguration *GroupingConfiguration } // IncidentEntitiesResponse - The incident related entities response. type IncidentEntitiesResponse struct { // Array of the incident related entities. - Entities []EntityClassification `json:"entities,omitempty"` + Entities []EntityClassification // The metadata from the incident related entities results. - MetaData []*IncidentEntitiesResultsMetadata `json:"metaData,omitempty"` + MetaData []*IncidentEntitiesResultsMetadata } // IncidentEntitiesResultsMetadata - Information of a specific aggregation in the incident related entities result. type IncidentEntitiesResultsMetadata struct { // REQUIRED; Total number of aggregations of the given kind in the incident related entities result. - Count *int32 `json:"count,omitempty"` + Count *int32 // REQUIRED; The kind of the aggregated entity. - EntityKind *EntityKind `json:"entityKind,omitempty"` + EntityKind *EntityKind } // IncidentInfo - Describes related incident information for the bookmark type IncidentInfo struct { // Incident Id - IncidentID *string `json:"incidentId,omitempty"` + IncidentID *string // Relation Name - RelationName *string `json:"relationName,omitempty"` + RelationName *string // The severity of the incident - Severity *IncidentSeverity `json:"severity,omitempty"` + Severity *IncidentSeverity // The title of the incident - Title *string `json:"title,omitempty"` + Title *string } // IncidentLabel - Represents an incident label type IncidentLabel struct { // REQUIRED; The name of the label - LabelName *string `json:"labelName,omitempty"` + LabelName *string // READ-ONLY; The type of the label - LabelType *IncidentLabelType `json:"labelType,omitempty" azure:"ro"` + LabelType *IncidentLabelType } // IncidentList - List all the incidents. type IncidentList struct { // REQUIRED; Array of incidents. - Value []*Incident `json:"value,omitempty"` + Value []*Incident // READ-ONLY; URL to fetch the next set of incidents. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // IncidentOwnerInfo - Information on the user an incident is assigned to type IncidentOwnerInfo struct { // The name of the user the incident is assigned to. - AssignedTo *string `json:"assignedTo,omitempty"` + AssignedTo *string // The email of the user the incident is assigned to. - Email *string `json:"email,omitempty"` + Email *string // The object id of the user the incident is assigned to. - ObjectID *string `json:"objectId,omitempty"` + ObjectID *string // The type of the owner the incident is assigned to. - OwnerType *OwnerType `json:"ownerType,omitempty"` + OwnerType *OwnerType // The user principal name of the user the incident is assigned to. - UserPrincipalName *string `json:"userPrincipalName,omitempty"` + UserPrincipalName *string } // IncidentProperties - Describes incident properties type IncidentProperties struct { // REQUIRED; The severity of the incident - Severity *IncidentSeverity `json:"severity,omitempty"` + Severity *IncidentSeverity // REQUIRED; The status of the incident - Status *IncidentStatus `json:"status,omitempty"` + Status *IncidentStatus // REQUIRED; The title of the incident - Title *string `json:"title,omitempty"` + Title *string // The reason the incident was closed - Classification *IncidentClassification `json:"classification,omitempty"` + Classification *IncidentClassification // Describes the reason the incident was closed - ClassificationComment *string `json:"classificationComment,omitempty"` + ClassificationComment *string // The classification reason the incident was closed with - ClassificationReason *IncidentClassificationReason `json:"classificationReason,omitempty"` + ClassificationReason *IncidentClassificationReason // The description of the incident - Description *string `json:"description,omitempty"` + Description *string // The time of the first activity in the incident - FirstActivityTimeUTC *time.Time `json:"firstActivityTimeUtc,omitempty"` + FirstActivityTimeUTC *time.Time // List of labels relevant to this incident - Labels []*IncidentLabel `json:"labels,omitempty"` + Labels []*IncidentLabel // The time of the last activity in the incident - LastActivityTimeUTC *time.Time `json:"lastActivityTimeUtc,omitempty"` + LastActivityTimeUTC *time.Time // Describes a user that the incident is assigned to - Owner *IncidentOwnerInfo `json:"owner,omitempty"` + Owner *IncidentOwnerInfo // The incident ID assigned by the incident provider - ProviderIncidentID *string `json:"providerIncidentId,omitempty"` + ProviderIncidentID *string // The name of the source provider that generated the incident - ProviderName *string `json:"providerName,omitempty"` + ProviderName *string // Describes a team for the incident - TeamInformation *TeamInformation `json:"teamInformation,omitempty"` + TeamInformation *TeamInformation // READ-ONLY; Additional data on the incident - AdditionalData *IncidentAdditionalData `json:"additionalData,omitempty" azure:"ro"` + AdditionalData *IncidentAdditionalData // READ-ONLY; The time the incident was created - CreatedTimeUTC *time.Time `json:"createdTimeUtc,omitempty" azure:"ro"` + CreatedTimeUTC *time.Time // READ-ONLY; A sequential number - IncidentNumber *int32 `json:"incidentNumber,omitempty" azure:"ro"` + IncidentNumber *int32 // READ-ONLY; The deep-link url to the incident in Azure portal - IncidentURL *string `json:"incidentUrl,omitempty" azure:"ro"` + IncidentURL *string // READ-ONLY; The last time the incident was updated - LastModifiedTimeUTC *time.Time `json:"lastModifiedTimeUtc,omitempty" azure:"ro"` + LastModifiedTimeUTC *time.Time // READ-ONLY; List of resource ids of Analytic rules related to the incident - RelatedAnalyticRuleIDs []*string `json:"relatedAnalyticRuleIds,omitempty" azure:"ro"` + RelatedAnalyticRuleIDs []*string } type IncidentPropertiesAction struct { // The reason the incident was closed - Classification *IncidentClassification `json:"classification,omitempty"` + Classification *IncidentClassification // Describes the reason the incident was closed. - ClassificationComment *string `json:"classificationComment,omitempty"` + ClassificationComment *string // The classification reason the incident was closed with - ClassificationReason *IncidentClassificationReason `json:"classificationReason,omitempty"` + ClassificationReason *IncidentClassificationReason // List of labels to add to the incident. - Labels []*IncidentLabel `json:"labels,omitempty"` - - // Information on the user an incident is assigned to - Owner *IncidentOwnerInfo `json:"owner,omitempty"` - - // The severity of the incident - Severity *IncidentSeverity `json:"severity,omitempty"` - - // The status of the incident - Status *IncidentStatus `json:"status,omitempty"` -} - -// IncidentRelationsClientCreateOrUpdateOptions contains the optional parameters for the IncidentRelationsClient.CreateOrUpdate -// method. -type IncidentRelationsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// IncidentRelationsClientDeleteOptions contains the optional parameters for the IncidentRelationsClient.Delete method. -type IncidentRelationsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IncidentRelationsClientGetOptions contains the optional parameters for the IncidentRelationsClient.Get method. -type IncidentRelationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// IncidentRelationsClientListOptions contains the optional parameters for the IncidentRelationsClient.NewListPager method. -type IncidentRelationsClientListOptions struct { - // Filters the results, based on a Boolean condition. Optional. - Filter *string - // Sorts the results. Optional. - Orderby *string - // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skiptoken parameter that - // specifies a starting point to use for subsequent calls. Optional. - SkipToken *string - // Returns only the first n results. Optional. - Top *int32 -} - -// IncidentsClientCreateOrUpdateOptions contains the optional parameters for the IncidentsClient.CreateOrUpdate method. -type IncidentsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// IncidentsClientCreateTeamOptions contains the optional parameters for the IncidentsClient.CreateTeam method. -type IncidentsClientCreateTeamOptions struct { - // placeholder for future optional parameters -} - -// IncidentsClientDeleteOptions contains the optional parameters for the IncidentsClient.Delete method. -type IncidentsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IncidentsClientGetOptions contains the optional parameters for the IncidentsClient.Get method. -type IncidentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// IncidentsClientListAlertsOptions contains the optional parameters for the IncidentsClient.ListAlerts method. -type IncidentsClientListAlertsOptions struct { - // placeholder for future optional parameters -} - -// IncidentsClientListBookmarksOptions contains the optional parameters for the IncidentsClient.ListBookmarks method. -type IncidentsClientListBookmarksOptions struct { - // placeholder for future optional parameters -} + Labels []*IncidentLabel -// IncidentsClientListEntitiesOptions contains the optional parameters for the IncidentsClient.ListEntities method. -type IncidentsClientListEntitiesOptions struct { - // placeholder for future optional parameters -} + // Information on the user an incident is assigned to + Owner *IncidentOwnerInfo -// IncidentsClientListOptions contains the optional parameters for the IncidentsClient.NewListPager method. -type IncidentsClientListOptions struct { - // Filters the results, based on a Boolean condition. Optional. - Filter *string - // Sorts the results. Optional. - Orderby *string - // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skiptoken parameter that - // specifies a starting point to use for subsequent calls. Optional. - SkipToken *string - // Returns only the first n results. Optional. - Top *int32 -} + // The severity of the incident + Severity *IncidentSeverity -// IncidentsClientRunPlaybookOptions contains the optional parameters for the IncidentsClient.RunPlaybook method. -type IncidentsClientRunPlaybookOptions struct { - RequestBody *ManualTriggerRequestBody + // The status of the incident + Status *IncidentStatus } // InsightQueryItem - Represents Insight Query. type InsightQueryItem struct { // REQUIRED; The kind of the entity query - Kind *EntityQueryKind `json:"kind,omitempty"` + Kind *EntityQueryKind // Query Template ARM Name - Name *string `json:"name,omitempty"` + Name *string // Properties bag for InsightQueryItem - Properties *InsightQueryItemProperties `json:"properties,omitempty"` + Properties *InsightQueryItemProperties // ARM Type - Type *string `json:"type,omitempty"` + Type *string // READ-ONLY; Query Template ARM ID - ID *string `json:"id,omitempty" azure:"ro"` + ID *string } // GetEntityQueryItem implements the EntityQueryItemClassification interface for type InsightQueryItem. func (i *InsightQueryItem) GetEntityQueryItem() *EntityQueryItem { return &EntityQueryItem{ ID: i.ID, + Kind: i.Kind, Name: i.Name, Type: i.Type, - Kind: i.Kind, } } // InsightQueryItemProperties - Represents Insight Query. type InsightQueryItemProperties struct { // The activity query definitions. - AdditionalQuery *InsightQueryItemPropertiesAdditionalQuery `json:"additionalQuery,omitempty"` + AdditionalQuery *InsightQueryItemPropertiesAdditionalQuery // The base query of the insight. - BaseQuery *string `json:"baseQuery,omitempty"` + BaseQuery *string // The insight chart query. - ChartQuery any `json:"chartQuery,omitempty"` + ChartQuery any // Data types for template - DataTypes []*EntityQueryItemPropertiesDataTypesItem `json:"dataTypes,omitempty"` + DataTypes []*EntityQueryItemPropertiesDataTypesItem // The insight chart query. - DefaultTimeRange *InsightQueryItemPropertiesDefaultTimeRange `json:"defaultTimeRange,omitempty"` + DefaultTimeRange *InsightQueryItemPropertiesDefaultTimeRange // The insight description. - Description *string `json:"description,omitempty"` + Description *string // The insight display name. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // The query applied only to entities matching to all filters - EntitiesFilter any `json:"entitiesFilter,omitempty"` + EntitiesFilter any // The type of the entity - InputEntityType *EntityType `json:"inputEntityType,omitempty"` + InputEntityType *EntityType // The insight chart query. - ReferenceTimeRange *InsightQueryItemPropertiesReferenceTimeRange `json:"referenceTimeRange,omitempty"` + ReferenceTimeRange *InsightQueryItemPropertiesReferenceTimeRange // Data types for template - RequiredInputFieldsSets [][]*string `json:"requiredInputFieldsSets,omitempty"` + RequiredInputFieldsSets [][]*string // The insight table query. - TableQuery *InsightQueryItemPropertiesTableQuery `json:"tableQuery,omitempty"` + TableQuery *InsightQueryItemPropertiesTableQuery } // InsightQueryItemPropertiesAdditionalQuery - The activity query definitions. type InsightQueryItemPropertiesAdditionalQuery struct { // The insight query. - Query *string `json:"query,omitempty"` + Query *string // The insight text. - Text *string `json:"text,omitempty"` + Text *string } // InsightQueryItemPropertiesDefaultTimeRange - The insight chart query. type InsightQueryItemPropertiesDefaultTimeRange struct { // The padding for the end time of the query. - AfterRange *string `json:"afterRange,omitempty"` + AfterRange *string // The padding for the start time of the query. - BeforeRange *string `json:"beforeRange,omitempty"` + BeforeRange *string } // InsightQueryItemPropertiesReferenceTimeRange - The insight chart query. type InsightQueryItemPropertiesReferenceTimeRange struct { // Additional query time for looking back. - BeforeRange *string `json:"beforeRange,omitempty"` + BeforeRange *string } // InsightQueryItemPropertiesTableQuery - The insight table query. type InsightQueryItemPropertiesTableQuery struct { // List of insight column definitions. - ColumnsDefinitions []*InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem `json:"columnsDefinitions,omitempty"` + ColumnsDefinitions []*InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem // List of insight queries definitions. - QueriesDefinitions []*InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem `json:"queriesDefinitions,omitempty"` + QueriesDefinitions []*InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem } type InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem struct { // Insight column header. - Header *string `json:"header,omitempty"` + Header *string // Insights Column type. - OutputType *OutputType `json:"outputType,omitempty"` + OutputType *OutputType // Is query supports deep-link. - SupportDeepLink *bool `json:"supportDeepLink,omitempty"` + SupportDeepLink *bool } type InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem struct { // Insight column header. - Filter *string `json:"filter,omitempty"` + Filter *string // Insight column header. - LinkColumnsDefinitions []*InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem `json:"linkColumnsDefinitions,omitempty"` + LinkColumnsDefinitions []*InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem // Insight column header. - Project *string `json:"project,omitempty"` + Project *string // Insight column header. - Summarize *string `json:"summarize,omitempty"` + Summarize *string } type InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem struct { // Insight Link Definition Projected Name. - ProjectedName *string `json:"projectedName,omitempty"` + ProjectedName *string // Insight Link Definition Query. - Query *string `json:"Query,omitempty"` + Query *string } // InsightsTableResult - Query results for table insights query. type InsightsTableResult struct { // Columns Metadata of the table - Columns []*InsightsTableResultColumnsItem `json:"columns,omitempty"` + Columns []*InsightsTableResultColumnsItem // Rows data of the table - Rows [][]*string `json:"rows,omitempty"` + Rows [][]*string } type InsightsTableResultColumnsItem struct { // the name of the colum - Name *string `json:"name,omitempty"` + Name *string // the type of the colum - Type *string `json:"type,omitempty"` + Type *string } type InstructionStepsInstructionsItem struct { // REQUIRED; The kind of the setting - Type *SettingType `json:"type,omitempty"` + Type *SettingType // The parameters for the setting - Parameters any `json:"parameters,omitempty"` + Parameters any } // IoTCheckRequirements - Represents IoT requirements check request. type IoTCheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // IoT requirements check properties. - Properties *IoTCheckRequirementsProperties `json:"properties,omitempty"` + Properties *IoTCheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type IoTCheckRequirements. @@ -4318,187 +3797,187 @@ func (i *IoTCheckRequirements) GetDataConnectorsCheckRequirements() *DataConnect // IoTCheckRequirementsProperties - IoT requirements check properties. type IoTCheckRequirementsProperties struct { // The subscription id to connect to, and get the data from. - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string } // IoTDataConnector - Represents IoT data connector. type IoTDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // IoT data connector properties. - Properties *IoTDataConnectorProperties `json:"properties,omitempty"` + Properties *IoTDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type IoTDataConnector. func (i *IoTDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: i.Kind, Etag: i.Etag, ID: i.ID, + Kind: i.Kind, Name: i.Name, - Type: i.Type, SystemData: i.SystemData, + Type: i.Type, } } // IoTDataConnectorProperties - IoT data connector properties. type IoTDataConnectorProperties struct { // The available data types for the connector. - DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` + DataTypes *AlertsDataTypeOfDataConnector // The subscription id to connect to, and get the data from. - SubscriptionID *string `json:"subscriptionId,omitempty"` + SubscriptionID *string } // IoTDeviceEntity - Represents an IoT device entity. type IoTDeviceEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // IoTDevice entity properties - Properties *IoTDeviceEntityProperties `json:"properties,omitempty"` + Properties *IoTDeviceEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type IoTDeviceEntity. func (i *IoTDeviceEntity) GetEntity() *Entity { return &Entity{ - Kind: i.Kind, ID: i.ID, + Kind: i.Kind, Name: i.Name, - Type: i.Type, SystemData: i.SystemData, + Type: i.Type, } } // IoTDeviceEntityProperties - IoTDevice entity property bag. type IoTDeviceEntityProperties struct { // Device importance, determines if the device classified as 'crown jewel' - Importance *DeviceImportance `json:"importance,omitempty"` + Importance *DeviceImportance // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The ID of the IoT Device in the IoT Hub - DeviceID *string `json:"deviceId,omitempty" azure:"ro"` + DeviceID *string // READ-ONLY; The friendly name of the device - DeviceName *string `json:"deviceName,omitempty" azure:"ro"` + DeviceName *string // READ-ONLY; The subType of the device ('PLC', 'HMI', 'EWS', etc.) - DeviceSubType *string `json:"deviceSubType,omitempty" azure:"ro"` + DeviceSubType *string // READ-ONLY; The type of the device - DeviceType *string `json:"deviceType,omitempty" azure:"ro"` + DeviceType *string // READ-ONLY; The ID of the edge device - EdgeID *string `json:"edgeId,omitempty" azure:"ro"` + EdgeID *string // READ-ONLY; The firmware version of the device - FirmwareVersion *string `json:"firmwareVersion,omitempty" azure:"ro"` + FirmwareVersion *string // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The Host entity id of this device - HostEntityID *string `json:"hostEntityId,omitempty" azure:"ro"` + HostEntityID *string // READ-ONLY; The IP entity if of this device - IPAddressEntityID *string `json:"ipAddressEntityId,omitempty" azure:"ro"` + IPAddressEntityID *string // READ-ONLY; The AzureResource entity id of the IoT Hub - IotHubEntityID *string `json:"iotHubEntityId,omitempty" azure:"ro"` + IotHubEntityID *string // READ-ONLY; The ID of the security agent running on the device - IotSecurityAgentID *string `json:"iotSecurityAgentId,omitempty" azure:"ro"` + IotSecurityAgentID *string // READ-ONLY; Determines whether the device classified as authorized device - IsAuthorized *bool `json:"isAuthorized,omitempty" azure:"ro"` + IsAuthorized *bool // READ-ONLY; Determines whether the device classified as programming device - IsProgramming *bool `json:"isProgramming,omitempty" azure:"ro"` + IsProgramming *bool // READ-ONLY; Is the device classified as a scanner device - IsScanner *bool `json:"isScanner,omitempty" azure:"ro"` + IsScanner *bool // READ-ONLY; The MAC address of the device - MacAddress *string `json:"macAddress,omitempty" azure:"ro"` + MacAddress *string // READ-ONLY; The model of the device - Model *string `json:"model,omitempty" azure:"ro"` + Model *string // READ-ONLY; A list of Nic entity ids of the IoTDevice entity. - NicEntityIDs []*string `json:"nicEntityIds,omitempty" azure:"ro"` + NicEntityIDs []*string // READ-ONLY; The operating system of the device - OperatingSystem *string `json:"operatingSystem,omitempty" azure:"ro"` + OperatingSystem *string // READ-ONLY; A list of owners of the IoTDevice entity. - Owners []*string `json:"owners,omitempty" azure:"ro"` + Owners []*string // READ-ONLY; A list of protocols of the IoTDevice entity. - Protocols []*string `json:"protocols,omitempty" azure:"ro"` + Protocols []*string // READ-ONLY; The Purdue Layer of the device - PurdueLayer *string `json:"purdueLayer,omitempty" azure:"ro"` + PurdueLayer *string // READ-ONLY; The sensor the device is monitored by - Sensor *string `json:"sensor,omitempty" azure:"ro"` + Sensor *string // READ-ONLY; The serial number of the device - SerialNumber *string `json:"serialNumber,omitempty" azure:"ro"` + SerialNumber *string // READ-ONLY; The site of the device - Site *string `json:"site,omitempty" azure:"ro"` + Site *string // READ-ONLY; The source of the device - Source *string `json:"source,omitempty" azure:"ro"` + Source *string // READ-ONLY; A list of TI contexts attached to the IoTDevice entity. - ThreatIntelligence []*ThreatIntelligence `json:"threatIntelligence,omitempty" azure:"ro"` + ThreatIntelligence []*ThreatIntelligence // READ-ONLY; The vendor of the device - Vendor *string `json:"vendor,omitempty" azure:"ro"` + Vendor *string // READ-ONLY; The zone location of the device within a site - Zone *string `json:"zone,omitempty" azure:"ro"` + Zone *string } // MCASCheckRequirements - Represents MCAS (Microsoft Cloud App Security) requirements check request. type MCASCheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // MCAS (Microsoft Cloud App Security) requirements check properties. - Properties *MCASCheckRequirementsProperties `json:"properties,omitempty"` + Properties *MCASCheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type MCASCheckRequirements. @@ -4511,70 +3990,70 @@ func (m *MCASCheckRequirements) GetDataConnectorsCheckRequirements() *DataConnec // MCASCheckRequirementsProperties - MCAS (Microsoft Cloud App Security) requirements check properties. type MCASCheckRequirementsProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // MCASDataConnector - Represents MCAS (Microsoft Cloud App Security) data connector. type MCASDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // MCAS (Microsoft Cloud App Security) data connector properties. - Properties *MCASDataConnectorProperties `json:"properties,omitempty"` + Properties *MCASDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type MCASDataConnector. func (m *MCASDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: m.Kind, Etag: m.Etag, ID: m.ID, + Kind: m.Kind, Name: m.Name, - Type: m.Type, SystemData: m.SystemData, + Type: m.Type, } } // MCASDataConnectorDataTypes - The available data types for MCAS (Microsoft Cloud App Security) data connector. type MCASDataConnectorDataTypes struct { // REQUIRED; Alerts data type connection. - Alerts *DataConnectorDataTypeCommon `json:"alerts,omitempty"` + Alerts *DataConnectorDataTypeCommon // Discovery log data type connection. - DiscoveryLogs *DataConnectorDataTypeCommon `json:"discoveryLogs,omitempty"` + DiscoveryLogs *DataConnectorDataTypeCommon } // MCASDataConnectorProperties - MCAS (Microsoft Cloud App Security) data connector properties. type MCASDataConnectorProperties struct { // REQUIRED; The available data types for the connector. - DataTypes *MCASDataConnectorDataTypes `json:"dataTypes,omitempty"` + DataTypes *MCASDataConnectorDataTypes // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // MDATPCheckRequirements - Represents MDATP (Microsoft Defender Advanced Threat Protection) requirements check request. type MDATPCheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // MDATP (Microsoft Defender Advanced Threat Protection) requirements check properties. - Properties *MDATPCheckRequirementsProperties `json:"properties,omitempty"` + Properties *MDATPCheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type MDATPCheckRequirements. @@ -4587,189 +4066,189 @@ func (m *MDATPCheckRequirements) GetDataConnectorsCheckRequirements() *DataConne // MDATPCheckRequirementsProperties - MDATP (Microsoft Defender Advanced Threat Protection) requirements check properties. type MDATPCheckRequirementsProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // MDATPDataConnector - Represents MDATP (Microsoft Defender Advanced Threat Protection) data connector. type MDATPDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // MDATP (Microsoft Defender Advanced Threat Protection) data connector properties. - Properties *MDATPDataConnectorProperties `json:"properties,omitempty"` + Properties *MDATPDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type MDATPDataConnector. func (m *MDATPDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: m.Kind, Etag: m.Etag, ID: m.ID, + Kind: m.Kind, Name: m.Name, - Type: m.Type, SystemData: m.SystemData, + Type: m.Type, } } // MDATPDataConnectorProperties - MDATP (Microsoft Defender Advanced Threat Protection) data connector properties. type MDATPDataConnectorProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // The available data types for the connector. - DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` + DataTypes *AlertsDataTypeOfDataConnector } // MLBehaviorAnalyticsAlertRule - Represents MLBehaviorAnalytics alert rule. type MLBehaviorAnalyticsAlertRule struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // MLBehaviorAnalytics alert rule properties - Properties *MLBehaviorAnalyticsAlertRuleProperties `json:"properties,omitempty"` + Properties *MLBehaviorAnalyticsAlertRuleProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRule implements the AlertRuleClassification interface for type MLBehaviorAnalyticsAlertRule. func (m *MLBehaviorAnalyticsAlertRule) GetAlertRule() *AlertRule { return &AlertRule{ - Kind: m.Kind, Etag: m.Etag, ID: m.ID, + Kind: m.Kind, Name: m.Name, - Type: m.Type, SystemData: m.SystemData, + Type: m.Type, } } // MLBehaviorAnalyticsAlertRuleProperties - MLBehaviorAnalytics alert rule base property bag. type MLBehaviorAnalyticsAlertRuleProperties struct { // REQUIRED; The Name of the alert rule template used to create this rule. - AlertRuleTemplateName *string `json:"alertRuleTemplateName,omitempty"` + AlertRuleTemplateName *string // REQUIRED; Determines whether this alert rule is enabled or disabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // READ-ONLY; The description of the alert rule. - Description *string `json:"description,omitempty" azure:"ro"` + Description *string // READ-ONLY; The display name for alerts created by this alert rule. - DisplayName *string `json:"displayName,omitempty" azure:"ro"` + DisplayName *string // READ-ONLY; The last time that this alert rule has been modified. - LastModifiedUTC *time.Time `json:"lastModifiedUtc,omitempty" azure:"ro"` + LastModifiedUTC *time.Time // READ-ONLY; The severity for alerts created by this alert rule. - Severity *AlertSeverity `json:"severity,omitempty" azure:"ro"` + Severity *AlertSeverity // READ-ONLY; The tactics of the alert rule - Tactics []*AttackTactic `json:"tactics,omitempty" azure:"ro"` + Tactics []*AttackTactic // READ-ONLY; The techniques of the alert rule - Techniques []*string `json:"techniques,omitempty" azure:"ro"` + Techniques []*string } // MLBehaviorAnalyticsAlertRuleTemplate - Represents MLBehaviorAnalytics alert rule template. type MLBehaviorAnalyticsAlertRuleTemplate struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // MLBehaviorAnalytics alert rule template properties. - Properties *MLBehaviorAnalyticsAlertRuleTemplateProperties `json:"properties,omitempty"` + Properties *MLBehaviorAnalyticsAlertRuleTemplateProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRuleTemplate implements the AlertRuleTemplateClassification interface for type MLBehaviorAnalyticsAlertRuleTemplate. func (m *MLBehaviorAnalyticsAlertRuleTemplate) GetAlertRuleTemplate() *AlertRuleTemplate { return &AlertRuleTemplate{ - Kind: m.Kind, ID: m.ID, + Kind: m.Kind, Name: m.Name, - Type: m.Type, SystemData: m.SystemData, + Type: m.Type, } } // MLBehaviorAnalyticsAlertRuleTemplateProperties - MLBehaviorAnalytics alert rule template properties. type MLBehaviorAnalyticsAlertRuleTemplateProperties struct { // REQUIRED; The severity for alerts created by this alert rule. - Severity *AlertSeverity `json:"severity,omitempty"` + Severity *AlertSeverity // the number of alert rules that were created by this template - AlertRulesCreatedByTemplateCount *int32 `json:"alertRulesCreatedByTemplateCount,omitempty"` + AlertRulesCreatedByTemplateCount *int32 // The description of the alert rule template. - Description *string `json:"description,omitempty"` + Description *string // The display name for alert rule template. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // The required data sources for this template - RequiredDataConnectors []*AlertRuleTemplateDataSource `json:"requiredDataConnectors,omitempty"` + RequiredDataConnectors []*AlertRuleTemplateDataSource // The alert rule template status. - Status *TemplateStatus `json:"status,omitempty"` + Status *TemplateStatus // The tactics of the alert rule - Tactics []*AttackTactic `json:"tactics,omitempty"` + Tactics []*AttackTactic // The techniques of the alert rule - Techniques []*string `json:"techniques,omitempty"` + Techniques []*string // READ-ONLY; The time that this alert rule template has been added. - CreatedDateUTC *time.Time `json:"createdDateUTC,omitempty" azure:"ro"` + CreatedDateUTC *time.Time // READ-ONLY; The last time that this alert rule template has been updated. - LastUpdatedDateUTC *time.Time `json:"lastUpdatedDateUTC,omitempty" azure:"ro"` + LastUpdatedDateUTC *time.Time } // MSTICheckRequirements - Represents Microsoft Threat Intelligence requirements check request. type MSTICheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Microsoft Threat Intelligence requirements check properties. - Properties *MSTICheckRequirementsProperties `json:"properties,omitempty"` + Properties *MSTICheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type MSTICheckRequirements. @@ -4782,515 +4261,483 @@ func (m *MSTICheckRequirements) GetDataConnectorsCheckRequirements() *DataConnec // MSTICheckRequirementsProperties - Microsoft Threat Intelligence requirements check properties. type MSTICheckRequirementsProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // MSTIDataConnector - Represents Microsoft Threat Intelligence data connector. type MSTIDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Microsoft Threat Intelligence data connector properties. - Properties *MSTIDataConnectorProperties `json:"properties,omitempty"` + Properties *MSTIDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type MSTIDataConnector. func (m *MSTIDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: m.Kind, Etag: m.Etag, ID: m.ID, + Kind: m.Kind, Name: m.Name, - Type: m.Type, SystemData: m.SystemData, + Type: m.Type, } } // MSTIDataConnectorDataTypes - The available data types for Microsoft Threat Intelligence Platforms data connector. type MSTIDataConnectorDataTypes struct { // REQUIRED; Data type for Microsoft Threat Intelligence Platforms data connector. - BingSafetyPhishingURL *MSTIDataConnectorDataTypesBingSafetyPhishingURL `json:"bingSafetyPhishingURL,omitempty"` + BingSafetyPhishingURL *MSTIDataConnectorDataTypesBingSafetyPhishingURL // REQUIRED; Data type for Microsoft Threat Intelligence Platforms data connector. - MicrosoftEmergingThreatFeed *MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed `json:"microsoftEmergingThreatFeed,omitempty"` + MicrosoftEmergingThreatFeed *MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed } // MSTIDataConnectorDataTypesBingSafetyPhishingURL - Data type for Microsoft Threat Intelligence Platforms data connector. type MSTIDataConnectorDataTypesBingSafetyPhishingURL struct { // REQUIRED; lookback period - LookbackPeriod *string `json:"lookbackPeriod,omitempty"` + LookbackPeriod *string // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed - Data type for Microsoft Threat Intelligence Platforms data connector. type MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed struct { // REQUIRED; lookback period - LookbackPeriod *string `json:"lookbackPeriod,omitempty"` + LookbackPeriod *string // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // MSTIDataConnectorProperties - Microsoft Threat Intelligence data connector properties. type MSTIDataConnectorProperties struct { // REQUIRED; The available data types for the connector. - DataTypes *MSTIDataConnectorDataTypes `json:"dataTypes,omitempty"` + DataTypes *MSTIDataConnectorDataTypes // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // MTPCheckRequirementsProperties - MTP (Microsoft Threat Protection) requirements check properties. type MTPCheckRequirementsProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // MTPDataConnector - Represents MTP (Microsoft Threat Protection) data connector. type MTPDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // MTP (Microsoft Threat Protection) data connector properties. - Properties *MTPDataConnectorProperties `json:"properties,omitempty"` + Properties *MTPDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type MTPDataConnector. func (m *MTPDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: m.Kind, Etag: m.Etag, ID: m.ID, + Kind: m.Kind, Name: m.Name, - Type: m.Type, SystemData: m.SystemData, + Type: m.Type, } } // MTPDataConnectorDataTypes - The available data types for Microsoft Threat Protection Platforms data connector. type MTPDataConnectorDataTypes struct { // REQUIRED; Data type for Microsoft Threat Protection Platforms data connector. - Incidents *MTPDataConnectorDataTypesIncidents `json:"incidents,omitempty"` + Incidents *MTPDataConnectorDataTypesIncidents } // MTPDataConnectorDataTypesIncidents - Data type for Microsoft Threat Protection Platforms data connector. type MTPDataConnectorDataTypesIncidents struct { // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // MTPDataConnectorProperties - MTP (Microsoft Threat Protection) data connector properties. type MTPDataConnectorProperties struct { // REQUIRED; The available data types for the connector. - DataTypes *MTPDataConnectorDataTypes `json:"dataTypes,omitempty"` + DataTypes *MTPDataConnectorDataTypes // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // MailClusterEntity - Represents a mail cluster entity. type MailClusterEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // Mail cluster entity properties - Properties *MailClusterEntityProperties `json:"properties,omitempty"` + Properties *MailClusterEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type MailClusterEntity. func (m *MailClusterEntity) GetEntity() *Entity { return &Entity{ - Kind: m.Kind, ID: m.ID, + Kind: m.Kind, Name: m.Name, - Type: m.Type, SystemData: m.SystemData, + Type: m.Type, } } // MailClusterEntityProperties - Mail cluster entity property bag. type MailClusterEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The cluster group - ClusterGroup *string `json:"clusterGroup,omitempty" azure:"ro"` + ClusterGroup *string // READ-ONLY; The cluster query end time - ClusterQueryEndTime *time.Time `json:"clusterQueryEndTime,omitempty" azure:"ro"` + ClusterQueryEndTime *time.Time // READ-ONLY; The cluster query start time - ClusterQueryStartTime *time.Time `json:"clusterQueryStartTime,omitempty" azure:"ro"` + ClusterQueryStartTime *time.Time // READ-ONLY; The id of the cluster source - ClusterSourceIdentifier *string `json:"clusterSourceIdentifier,omitempty" azure:"ro"` + ClusterSourceIdentifier *string // READ-ONLY; The type of the cluster source - ClusterSourceType *string `json:"clusterSourceType,omitempty" azure:"ro"` + ClusterSourceType *string // READ-ONLY; Count of mail messages by DeliveryStatus string representation - CountByDeliveryStatus any `json:"countByDeliveryStatus,omitempty" azure:"ro"` + CountByDeliveryStatus any // READ-ONLY; Count of mail messages by ProtectionStatus string representation - CountByProtectionStatus any `json:"countByProtectionStatus,omitempty" azure:"ro"` + CountByProtectionStatus any // READ-ONLY; Count of mail messages by ThreatType string representation - CountByThreatType any `json:"countByThreatType,omitempty" azure:"ro"` + CountByThreatType any // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; Is this a volume anomaly mail cluster - IsVolumeAnomaly *bool `json:"isVolumeAnomaly,omitempty" azure:"ro"` + IsVolumeAnomaly *bool // READ-ONLY; The number of mail messages that are part of the mail cluster - MailCount *int32 `json:"mailCount,omitempty" azure:"ro"` + MailCount *int32 // READ-ONLY; The mail message IDs that are part of the mail cluster - NetworkMessageIDs []*string `json:"networkMessageIds,omitempty" azure:"ro"` + NetworkMessageIDs []*string // READ-ONLY; The query that was used to identify the messages of the mail cluster - Query *string `json:"query,omitempty" azure:"ro"` + Query *string // READ-ONLY; The query time - QueryTime *time.Time `json:"queryTime,omitempty" azure:"ro"` + QueryTime *time.Time // READ-ONLY; The source of the mail cluster (default is 'O365 ATP') - Source *string `json:"source,omitempty" azure:"ro"` + Source *string // READ-ONLY; The threats of mail messages that are part of the mail cluster - Threats []*string `json:"threats,omitempty" azure:"ro"` + Threats []*string } // MailMessageEntity - Represents a mail message entity. type MailMessageEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // Mail message entity properties - Properties *MailMessageEntityProperties `json:"properties,omitempty"` + Properties *MailMessageEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type MailMessageEntity. func (m *MailMessageEntity) GetEntity() *Entity { return &Entity{ - Kind: m.Kind, ID: m.ID, + Kind: m.Kind, Name: m.Name, - Type: m.Type, SystemData: m.SystemData, + Type: m.Type, } } // MailMessageEntityProperties - Mail message entity property bag. type MailMessageEntityProperties struct { // The directionality of this mail message - AntispamDirection *AntispamMailDirection `json:"antispamDirection,omitempty"` + AntispamDirection *AntispamMailDirection // The bodyFingerprintBin1 - BodyFingerprintBin1 *int32 `json:"bodyFingerprintBin1,omitempty"` + BodyFingerprintBin1 *int32 // The bodyFingerprintBin2 - BodyFingerprintBin2 *int32 `json:"bodyFingerprintBin2,omitempty"` + BodyFingerprintBin2 *int32 // The bodyFingerprintBin3 - BodyFingerprintBin3 *int32 `json:"bodyFingerprintBin3,omitempty"` + BodyFingerprintBin3 *int32 // The bodyFingerprintBin4 - BodyFingerprintBin4 *int32 `json:"bodyFingerprintBin4,omitempty"` + BodyFingerprintBin4 *int32 // The bodyFingerprintBin5 - BodyFingerprintBin5 *int32 `json:"bodyFingerprintBin5,omitempty"` + BodyFingerprintBin5 *int32 // The delivery action of this mail message like Delivered, Blocked, Replaced etc - DeliveryAction *DeliveryAction `json:"deliveryAction,omitempty"` + DeliveryAction *DeliveryAction // The delivery location of this mail message like Inbox, JunkFolder etc - DeliveryLocation *DeliveryLocation `json:"deliveryLocation,omitempty"` + DeliveryLocation *DeliveryLocation // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The File entity ids of this mail message's attachments - FileEntityIDs []*string `json:"fileEntityIds,omitempty" azure:"ro"` + FileEntityIDs []*string // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The internet message id of this mail message - InternetMessageID *string `json:"internetMessageId,omitempty" azure:"ro"` + InternetMessageID *string // READ-ONLY; The language of this mail message - Language *string `json:"language,omitempty" azure:"ro"` + Language *string // READ-ONLY; The network message id of this mail message - NetworkMessageID *string `json:"networkMessageId,omitempty" azure:"ro"` + NetworkMessageID *string // READ-ONLY; The p1 sender's email address - P1Sender *string `json:"p1Sender,omitempty" azure:"ro"` + P1Sender *string // READ-ONLY; The p1 sender's display name - P1SenderDisplayName *string `json:"p1SenderDisplayName,omitempty" azure:"ro"` + P1SenderDisplayName *string // READ-ONLY; The p1 sender's domain - P1SenderDomain *string `json:"p1SenderDomain,omitempty" azure:"ro"` + P1SenderDomain *string // READ-ONLY; The p2 sender's email address - P2Sender *string `json:"p2Sender,omitempty" azure:"ro"` + P2Sender *string // READ-ONLY; The p2 sender's display name - P2SenderDisplayName *string `json:"p2SenderDisplayName,omitempty" azure:"ro"` + P2SenderDisplayName *string // READ-ONLY; The p2 sender's domain - P2SenderDomain *string `json:"p2SenderDomain,omitempty" azure:"ro"` + P2SenderDomain *string // READ-ONLY; The receive date of this message - ReceiveDate *time.Time `json:"receiveDate,omitempty" azure:"ro"` + ReceiveDate *time.Time // READ-ONLY; The recipient of this mail message. Note that in case of multiple recipients the mail message is forked and // each copy has one recipient - Recipient *string `json:"recipient,omitempty" azure:"ro"` + Recipient *string // READ-ONLY; The sender's IP address - SenderIP *string `json:"senderIP,omitempty" azure:"ro"` + SenderIP *string // READ-ONLY; The subject of this mail message - Subject *string `json:"subject,omitempty" azure:"ro"` + Subject *string // READ-ONLY; The threat detection methods - ThreatDetectionMethods []*string `json:"threatDetectionMethods,omitempty" azure:"ro"` + ThreatDetectionMethods []*string // READ-ONLY; The threats of this mail message - Threats []*string `json:"threats,omitempty" azure:"ro"` + Threats []*string // READ-ONLY; The Urls contained in this mail message - Urls []*string `json:"urls,omitempty" azure:"ro"` + Urls []*string } // MailboxEntity - Represents a mailbox entity. type MailboxEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // Mailbox entity properties - Properties *MailboxEntityProperties `json:"properties,omitempty"` + Properties *MailboxEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type MailboxEntity. func (m *MailboxEntity) GetEntity() *Entity { return &Entity{ - Kind: m.Kind, ID: m.ID, + Kind: m.Kind, Name: m.Name, - Type: m.Type, SystemData: m.SystemData, + Type: m.Type, } } // MailboxEntityProperties - Mailbox entity property bag. type MailboxEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The mailbox's display name - DisplayName *string `json:"displayName,omitempty" azure:"ro"` + DisplayName *string // READ-ONLY; The AzureAD identifier of mailbox. Similar to AadUserId in account entity but this property is specific to mailbox // object on office side - ExternalDirectoryObjectID *string `json:"externalDirectoryObjectId,omitempty" azure:"ro"` + ExternalDirectoryObjectID *string // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The mailbox's primary address - MailboxPrimaryAddress *string `json:"mailboxPrimaryAddress,omitempty" azure:"ro"` + MailboxPrimaryAddress *string // READ-ONLY; The mailbox's UPN - Upn *string `json:"upn,omitempty" azure:"ro"` + Upn *string } // MalwareEntity - Represents a malware entity. type MalwareEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // File entity properties - Properties *MalwareEntityProperties `json:"properties,omitempty"` + Properties *MalwareEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type MalwareEntity. func (m *MalwareEntity) GetEntity() *Entity { return &Entity{ - Kind: m.Kind, ID: m.ID, + Kind: m.Kind, Name: m.Name, - Type: m.Type, SystemData: m.SystemData, + Type: m.Type, } } // MalwareEntityProperties - Malware entity property bag. type MalwareEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The malware category by the vendor, e.g. Trojan - Category *string `json:"category,omitempty" azure:"ro"` + Category *string // READ-ONLY; List of linked file entity identifiers on which the malware was found - FileEntityIDs []*string `json:"fileEntityIds,omitempty" azure:"ro"` + FileEntityIDs []*string // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The malware name by the vendor, e.g. Win32/Toga!rfn - MalwareName *string `json:"malwareName,omitempty" azure:"ro"` + MalwareName *string // READ-ONLY; List of linked process entity identifiers on which the malware was found. - ProcessEntityIDs []*string `json:"processEntityIds,omitempty" azure:"ro"` + ProcessEntityIDs []*string } type ManualTriggerRequestBody struct { // REQUIRED - LogicAppsResourceID *string `json:"logicAppsResourceId,omitempty"` - TenantID *string `json:"tenantId,omitempty"` + LogicAppsResourceID *string + TenantID *string } // MetadataAuthor - Publisher or creator of the content item. type MetadataAuthor struct { // Email of author contact - Email *string `json:"email,omitempty"` + Email *string // Link for author/vendor page - Link *string `json:"link,omitempty"` + Link *string // Name of the author. Company or person. - Name *string `json:"name,omitempty"` + Name *string } // MetadataCategories - ies for the solution content item type MetadataCategories struct { // domain for the solution content item - Domains []*string `json:"domains,omitempty"` + Domains []*string // Industry verticals for the solution content item - Verticals []*string `json:"verticals,omitempty"` -} - -// MetadataClientCreateOptions contains the optional parameters for the MetadataClient.Create method. -type MetadataClientCreateOptions struct { - // placeholder for future optional parameters -} - -// MetadataClientDeleteOptions contains the optional parameters for the MetadataClient.Delete method. -type MetadataClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// MetadataClientGetOptions contains the optional parameters for the MetadataClient.Get method. -type MetadataClientGetOptions struct { - // placeholder for future optional parameters -} - -// MetadataClientListOptions contains the optional parameters for the MetadataClient.NewListPager method. -type MetadataClientListOptions struct { - // Filters the results, based on a Boolean condition. Optional. - Filter *string - // Sorts the results. Optional. - Orderby *string - // Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results if there are any left. - Skip *int32 - // Returns only the first n results. Optional. - Top *int32 -} - -// MetadataClientUpdateOptions contains the optional parameters for the MetadataClient.Update method. -type MetadataClientUpdateOptions struct { - // placeholder for future optional parameters + Verticals []*string } // MetadataDependencies - Dependencies for the content item, what other content items it requires to work. Can describe more @@ -5298,380 +4745,380 @@ type MetadataClientUpdateOptions struct { // can be supplied or operator/criteria for complex dependencies. type MetadataDependencies struct { // Id of the content item we depend on - ContentID *string `json:"contentId,omitempty"` + ContentID *string // This is the list of dependencies we must fulfill, according to the AND/OR operator - Criteria []*MetadataDependencies `json:"criteria,omitempty"` + Criteria []*MetadataDependencies // Type of the content item we depend on - Kind *Kind `json:"kind,omitempty"` + Kind *Kind // Name of the content item - Name *string `json:"name,omitempty"` + Name *string // Operator used for list of dependencies in criteria array. - Operator *Operator `json:"operator,omitempty"` + Operator *Operator // Version of the the content item we depend on. Can be blank, * or missing to indicate any version fulfills the dependency. // If version does not match our defined numeric format then an exact match is // required. - Version *string `json:"version,omitempty"` + Version *string } // MetadataList - List of all the metadata. type MetadataList struct { // REQUIRED; Array of metadata. - Value []*MetadataModel `json:"value,omitempty"` + Value []*MetadataModel // READ-ONLY; URL to fetch the next page of metadata. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // MetadataModel - Metadata resource definition. type MetadataModel struct { // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Metadata properties - Properties *MetadataProperties `json:"properties,omitempty"` + Properties *MetadataProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // MetadataPatch - Metadata patch request body. type MetadataPatch struct { // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Metadata patch request body - Properties *MetadataPropertiesPatch `json:"properties,omitempty"` + Properties *MetadataPropertiesPatch // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // MetadataProperties - Metadata property bag. type MetadataProperties struct { // REQUIRED; The kind of content the metadata is for. - Kind *Kind `json:"kind,omitempty"` + Kind *Kind // REQUIRED; Full parent resource ID of the content item the metadata is for. This is the full resource ID including the scope // (subscription and resource group) - ParentID *string `json:"parentId,omitempty"` + ParentID *string // The creator of the content item. - Author *MetadataAuthor `json:"author,omitempty"` + Author *MetadataAuthor // Categories for the solution content item - Categories *MetadataCategories `json:"categories,omitempty"` + Categories *MetadataCategories // Static ID for the content. Used to identify dependencies and content from solutions or community. Hard-coded/static for // out of the box content and solutions. Dynamic for user-created. This is the // resource name - ContentID *string `json:"contentId,omitempty"` + ContentID *string // Schema version of the content. Can be used to distinguish between different flow based on the schema version - ContentSchemaVersion *string `json:"contentSchemaVersion,omitempty"` + ContentSchemaVersion *string // The custom version of the content. A optional free text - CustomVersion *string `json:"customVersion,omitempty"` + CustomVersion *string // Dependencies for the content item, what other content items it requires to work. Can describe more complex dependencies // using a recursive/nested structure. For a single dependency an id/kind/version // can be supplied or operator/criteria for complex formats. - Dependencies *MetadataDependencies `json:"dependencies,omitempty"` + Dependencies *MetadataDependencies // first publish date solution content item - FirstPublishDate *time.Time `json:"firstPublishDate,omitempty"` + FirstPublishDate *time.Time // the icon identifier. this id can later be fetched from the solution template - Icon *string `json:"icon,omitempty"` + Icon *string // last publish date for the solution content item - LastPublishDate *time.Time `json:"lastPublishDate,omitempty"` + LastPublishDate *time.Time // preview image file names. These will be taken from the solution artifacts - PreviewImages []*string `json:"previewImages,omitempty"` + PreviewImages []*string // preview image file names. These will be taken from the solution artifacts. used for dark theme support - PreviewImagesDark []*string `json:"previewImagesDark,omitempty"` + PreviewImagesDark []*string // Providers for the solution content item - Providers []*string `json:"providers,omitempty"` + Providers []*string // Source of the content. This is where/how it was created. - Source *MetadataSource `json:"source,omitempty"` + Source *MetadataSource // Support information for the metadata - type, name, contact information - Support *MetadataSupport `json:"support,omitempty"` + Support *MetadataSupport // the tactics the resource covers - ThreatAnalysisTactics []*string `json:"threatAnalysisTactics,omitempty"` + ThreatAnalysisTactics []*string // the techniques the resource covers, these have to be aligned with the tactics being used - ThreatAnalysisTechniques []*string `json:"threatAnalysisTechniques,omitempty"` + ThreatAnalysisTechniques []*string // Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM template // best practices. Can also be any string, but then we cannot guarantee any version // checks - Version *string `json:"version,omitempty"` + Version *string } // MetadataPropertiesPatch - Metadata property bag for patch requests. This is the same as the MetadataProperties, but with // nothing required type MetadataPropertiesPatch struct { // The creator of the content item. - Author *MetadataAuthor `json:"author,omitempty"` + Author *MetadataAuthor // Categories for the solution content item - Categories *MetadataCategories `json:"categories,omitempty"` + Categories *MetadataCategories // Static ID for the content. Used to identify dependencies and content from solutions or community. Hard-coded/static for // out of the box content and solutions. Dynamic for user-created. This is the // resource name - ContentID *string `json:"contentId,omitempty"` + ContentID *string // Schema version of the content. Can be used to distinguish between different flow based on the schema version - ContentSchemaVersion *string `json:"contentSchemaVersion,omitempty"` + ContentSchemaVersion *string // The custom version of the content. A optional free text - CustomVersion *string `json:"customVersion,omitempty"` + CustomVersion *string // Dependencies for the content item, what other content items it requires to work. Can describe more complex dependencies // using a recursive/nested structure. For a single dependency an id/kind/version // can be supplied or operator/criteria for complex formats. - Dependencies *MetadataDependencies `json:"dependencies,omitempty"` + Dependencies *MetadataDependencies // first publish date solution content item - FirstPublishDate *time.Time `json:"firstPublishDate,omitempty"` + FirstPublishDate *time.Time // the icon identifier. this id can later be fetched from the solution template - Icon *string `json:"icon,omitempty"` + Icon *string // The kind of content the metadata is for. - Kind *Kind `json:"kind,omitempty"` + Kind *Kind // last publish date for the solution content item - LastPublishDate *time.Time `json:"lastPublishDate,omitempty"` + LastPublishDate *time.Time // Full parent resource ID of the content item the metadata is for. This is the full resource ID including the scope (subscription // and resource group) - ParentID *string `json:"parentId,omitempty"` + ParentID *string // preview image file names. These will be taken from the solution artifacts - PreviewImages []*string `json:"previewImages,omitempty"` + PreviewImages []*string // preview image file names. These will be taken from the solution artifacts. used for dark theme support - PreviewImagesDark []*string `json:"previewImagesDark,omitempty"` + PreviewImagesDark []*string // Providers for the solution content item - Providers []*string `json:"providers,omitempty"` + Providers []*string // Source of the content. This is where/how it was created. - Source *MetadataSource `json:"source,omitempty"` + Source *MetadataSource // Support information for the metadata - type, name, contact information - Support *MetadataSupport `json:"support,omitempty"` + Support *MetadataSupport // the tactics the resource covers - ThreatAnalysisTactics []*string `json:"threatAnalysisTactics,omitempty"` + ThreatAnalysisTactics []*string // the techniques the resource covers, these have to be aligned with the tactics being used - ThreatAnalysisTechniques []*string `json:"threatAnalysisTechniques,omitempty"` + ThreatAnalysisTechniques []*string // Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM template // best practices. Can also be any string, but then we cannot guarantee any version // checks - Version *string `json:"version,omitempty"` + Version *string } // MetadataSource - The original source of the content item, where it comes from. type MetadataSource struct { // REQUIRED; Source type of the content - Kind *SourceKind `json:"kind,omitempty"` + Kind *SourceKind // Name of the content source. The repo name, solution name, LA workspace name etc. - Name *string `json:"name,omitempty"` + Name *string // ID of the content source. The solution ID, workspace ID, etc - SourceID *string `json:"sourceId,omitempty"` + SourceID *string } // MetadataSupport - Support information for the content item. type MetadataSupport struct { // REQUIRED; Type of support for content item - Tier *SupportTier `json:"tier,omitempty"` + Tier *SupportTier // Email of support contact - Email *string `json:"email,omitempty"` + Email *string // Link for support help, like to support page to open a ticket etc. - Link *string `json:"link,omitempty"` + Link *string // Name of the support contact. Company or person. - Name *string `json:"name,omitempty"` + Name *string } // MicrosoftSecurityIncidentCreationAlertRule - Represents MicrosoftSecurityIncidentCreation rule. type MicrosoftSecurityIncidentCreationAlertRule struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // MicrosoftSecurityIncidentCreation rule properties - Properties *MicrosoftSecurityIncidentCreationAlertRuleProperties `json:"properties,omitempty"` + Properties *MicrosoftSecurityIncidentCreationAlertRuleProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRule implements the AlertRuleClassification interface for type MicrosoftSecurityIncidentCreationAlertRule. func (m *MicrosoftSecurityIncidentCreationAlertRule) GetAlertRule() *AlertRule { return &AlertRule{ - Kind: m.Kind, Etag: m.Etag, ID: m.ID, + Kind: m.Kind, Name: m.Name, - Type: m.Type, SystemData: m.SystemData, + Type: m.Type, } } // MicrosoftSecurityIncidentCreationAlertRuleProperties - MicrosoftSecurityIncidentCreation rule property bag. type MicrosoftSecurityIncidentCreationAlertRuleProperties struct { // REQUIRED; The display name for alerts created by this alert rule. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // REQUIRED; Determines whether this alert rule is enabled or disabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // REQUIRED; The alerts' productName on which the cases will be generated - ProductFilter *MicrosoftSecurityProductName `json:"productFilter,omitempty"` + ProductFilter *MicrosoftSecurityProductName // The Name of the alert rule template used to create this rule. - AlertRuleTemplateName *string `json:"alertRuleTemplateName,omitempty"` + AlertRuleTemplateName *string // The description of the alert rule. - Description *string `json:"description,omitempty"` + Description *string // the alerts' displayNames on which the cases will not be generated - DisplayNamesExcludeFilter []*string `json:"displayNamesExcludeFilter,omitempty"` + DisplayNamesExcludeFilter []*string // the alerts' displayNames on which the cases will be generated - DisplayNamesFilter []*string `json:"displayNamesFilter,omitempty"` + DisplayNamesFilter []*string // the alerts' severities on which the cases will be generated - SeveritiesFilter []*AlertSeverity `json:"severitiesFilter,omitempty"` + SeveritiesFilter []*AlertSeverity // READ-ONLY; The last time that this alert has been modified. - LastModifiedUTC *time.Time `json:"lastModifiedUtc,omitempty" azure:"ro"` + LastModifiedUTC *time.Time } // MicrosoftSecurityIncidentCreationAlertRuleTemplate - Represents MicrosoftSecurityIncidentCreation rule template. type MicrosoftSecurityIncidentCreationAlertRuleTemplate struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // MicrosoftSecurityIncidentCreation rule template properties - Properties *MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties `json:"properties,omitempty"` + Properties *MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRuleTemplate implements the AlertRuleTemplateClassification interface for type MicrosoftSecurityIncidentCreationAlertRuleTemplate. func (m *MicrosoftSecurityIncidentCreationAlertRuleTemplate) GetAlertRuleTemplate() *AlertRuleTemplate { return &AlertRuleTemplate{ - Kind: m.Kind, ID: m.ID, + Kind: m.Kind, Name: m.Name, - Type: m.Type, SystemData: m.SystemData, + Type: m.Type, } } // MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties - MicrosoftSecurityIncidentCreation rule template properties type MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties struct { // the number of alert rules that were created by this template - AlertRulesCreatedByTemplateCount *int32 `json:"alertRulesCreatedByTemplateCount,omitempty"` + AlertRulesCreatedByTemplateCount *int32 // The description of the alert rule template. - Description *string `json:"description,omitempty"` + Description *string // The display name for alert rule template. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // the alerts' displayNames on which the cases will not be generated - DisplayNamesExcludeFilter []*string `json:"displayNamesExcludeFilter,omitempty"` + DisplayNamesExcludeFilter []*string // the alerts' displayNames on which the cases will be generated - DisplayNamesFilter []*string `json:"displayNamesFilter,omitempty"` + DisplayNamesFilter []*string // The alerts' productName on which the cases will be generated - ProductFilter *MicrosoftSecurityProductName `json:"productFilter,omitempty"` + ProductFilter *MicrosoftSecurityProductName // The required data sources for this template - RequiredDataConnectors []*AlertRuleTemplateDataSource `json:"requiredDataConnectors,omitempty"` + RequiredDataConnectors []*AlertRuleTemplateDataSource // the alerts' severities on which the cases will be generated - SeveritiesFilter []*AlertSeverity `json:"severitiesFilter,omitempty"` + SeveritiesFilter []*AlertSeverity // The alert rule template status. - Status *TemplateStatus `json:"status,omitempty"` + Status *TemplateStatus // READ-ONLY; The time that this alert rule template has been added. - CreatedDateUTC *time.Time `json:"createdDateUTC,omitempty" azure:"ro"` + CreatedDateUTC *time.Time // READ-ONLY; The last time that this alert rule template has been updated. - LastUpdatedDateUTC *time.Time `json:"lastUpdatedDateUTC,omitempty" azure:"ro"` + LastUpdatedDateUTC *time.Time } // MtpCheckRequirements - Represents MTP (Microsoft Threat Protection) requirements check request. type MtpCheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // MTP (Microsoft Threat Protection) requirements check properties. - Properties *MTPCheckRequirementsProperties `json:"properties,omitempty"` + Properties *MTPCheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type MtpCheckRequirements. @@ -5684,234 +5131,234 @@ func (m *MtpCheckRequirements) GetDataConnectorsCheckRequirements() *DataConnect // NicEntity - Represents an network interface entity. type NicEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // Network interface entity properties - Properties *NicEntityProperties `json:"properties,omitempty"` + Properties *NicEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type NicEntity. func (n *NicEntity) GetEntity() *Entity { return &Entity{ - Kind: n.Kind, ID: n.ID, + Kind: n.Kind, Name: n.Name, - Type: n.Type, SystemData: n.SystemData, + Type: n.Type, } } // NicEntityProperties - Nic entity property bag. type NicEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The IP entity id of this network interface - IPAddressEntityID *string `json:"ipAddressEntityId,omitempty" azure:"ro"` + IPAddressEntityID *string // READ-ONLY; The MAC address of this network interface - MacAddress *string `json:"macAddress,omitempty" azure:"ro"` + MacAddress *string // READ-ONLY; A list of VLANs of the network interface entity. - Vlans []*string `json:"vlans,omitempty" azure:"ro"` + Vlans []*string } // NrtAlertRule - Represents NRT alert rule. type NrtAlertRule struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // NRT alert rule properties - Properties *NrtAlertRuleProperties `json:"properties,omitempty"` + Properties *NrtAlertRuleProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRule implements the AlertRuleClassification interface for type NrtAlertRule. func (n *NrtAlertRule) GetAlertRule() *AlertRule { return &AlertRule{ - Kind: n.Kind, Etag: n.Etag, ID: n.ID, + Kind: n.Kind, Name: n.Name, - Type: n.Type, SystemData: n.SystemData, + Type: n.Type, } } // NrtAlertRuleProperties - Nrt alert rule base property bag. type NrtAlertRuleProperties struct { // REQUIRED; The display name for alerts created by this alert rule. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // REQUIRED; Determines whether this alert rule is enabled or disabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // REQUIRED; The query that creates alerts for this rule. - Query *string `json:"query,omitempty"` + Query *string // REQUIRED; The severity for alerts created by this alert rule. - Severity *AlertSeverity `json:"severity,omitempty"` + Severity *AlertSeverity // REQUIRED; The suppression (in ISO 8601 duration format) to wait since last time this alert rule been triggered. - SuppressionDuration *string `json:"suppressionDuration,omitempty"` + SuppressionDuration *string // REQUIRED; Determines whether the suppression for this alert rule is enabled or disabled. - SuppressionEnabled *bool `json:"suppressionEnabled,omitempty"` + SuppressionEnabled *bool // The alert details override settings - AlertDetailsOverride *AlertDetailsOverride `json:"alertDetailsOverride,omitempty"` + AlertDetailsOverride *AlertDetailsOverride // The Name of the alert rule template used to create this rule. - AlertRuleTemplateName *string `json:"alertRuleTemplateName,omitempty"` + AlertRuleTemplateName *string // Dictionary of string key-value pairs of columns to be attached to the alert - CustomDetails map[string]*string `json:"customDetails,omitempty"` + CustomDetails map[string]*string // The description of the alert rule. - Description *string `json:"description,omitempty"` + Description *string // Array of the entity mappings of the alert rule - EntityMappings []*EntityMapping `json:"entityMappings,omitempty"` + EntityMappings []*EntityMapping // The event grouping settings. - EventGroupingSettings *EventGroupingSettings `json:"eventGroupingSettings,omitempty"` + EventGroupingSettings *EventGroupingSettings // The settings of the incidents that created from alerts triggered by this analytics rule - IncidentConfiguration *IncidentConfiguration `json:"incidentConfiguration,omitempty"` + IncidentConfiguration *IncidentConfiguration // The tactics of the alert rule - Tactics []*AttackTactic `json:"tactics,omitempty"` + Tactics []*AttackTactic // The techniques of the alert rule - Techniques []*string `json:"techniques,omitempty"` + Techniques []*string // The version of the alert rule template used to create this rule - in format , where all are numbers, for example 0 - TemplateVersion *string `json:"templateVersion,omitempty"` + TemplateVersion *string // READ-ONLY; The last time that this alert rule has been modified. - LastModifiedUTC *time.Time `json:"lastModifiedUtc,omitempty" azure:"ro"` + LastModifiedUTC *time.Time } // NrtAlertRuleTemplate - Represents NRT alert rule template. type NrtAlertRuleTemplate struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // NRT alert rule template properties - Properties *NrtAlertRuleTemplateProperties `json:"properties,omitempty"` + Properties *NrtAlertRuleTemplateProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRuleTemplate implements the AlertRuleTemplateClassification interface for type NrtAlertRuleTemplate. func (n *NrtAlertRuleTemplate) GetAlertRuleTemplate() *AlertRuleTemplate { return &AlertRuleTemplate{ - Kind: n.Kind, ID: n.ID, + Kind: n.Kind, Name: n.Name, - Type: n.Type, SystemData: n.SystemData, + Type: n.Type, } } // NrtAlertRuleTemplateProperties - NRT alert rule template properties type NrtAlertRuleTemplateProperties struct { // The alert details override settings - AlertDetailsOverride *AlertDetailsOverride `json:"alertDetailsOverride,omitempty"` + AlertDetailsOverride *AlertDetailsOverride // the number of alert rules that were created by this template - AlertRulesCreatedByTemplateCount *int32 `json:"alertRulesCreatedByTemplateCount,omitempty"` + AlertRulesCreatedByTemplateCount *int32 // Dictionary of string key-value pairs of columns to be attached to the alert - CustomDetails map[string]*string `json:"customDetails,omitempty"` + CustomDetails map[string]*string // The description of the alert rule template. - Description *string `json:"description,omitempty"` + Description *string // The display name for alert rule template. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Array of the entity mappings of the alert rule - EntityMappings []*EntityMapping `json:"entityMappings,omitempty"` + EntityMappings []*EntityMapping // The event grouping settings. - EventGroupingSettings *EventGroupingSettings `json:"eventGroupingSettings,omitempty"` + EventGroupingSettings *EventGroupingSettings // The query that creates alerts for this rule. - Query *string `json:"query,omitempty"` + Query *string // The required data sources for this template - RequiredDataConnectors []*AlertRuleTemplateDataSource `json:"requiredDataConnectors,omitempty"` + RequiredDataConnectors []*AlertRuleTemplateDataSource // The severity for alerts created by this alert rule. - Severity *AlertSeverity `json:"severity,omitempty"` + Severity *AlertSeverity // The alert rule template status. - Status *TemplateStatus `json:"status,omitempty"` + Status *TemplateStatus // The tactics of the alert rule - Tactics []*AttackTactic `json:"tactics,omitempty"` + Tactics []*AttackTactic // The techniques of the alert rule - Techniques []*string `json:"techniques,omitempty"` + Techniques []*string // The version of this template - in format , where all are numbers. For example . - Version *string `json:"version,omitempty"` + Version *string // READ-ONLY; The time that this alert rule template has been added. - CreatedDateUTC *time.Time `json:"createdDateUTC,omitempty" azure:"ro"` + CreatedDateUTC *time.Time // READ-ONLY; The last time that this alert rule template has been updated. - LastUpdatedDateUTC *time.Time `json:"lastUpdatedDateUTC,omitempty" azure:"ro"` + LastUpdatedDateUTC *time.Time } // Office365ProjectCheckRequirements - Represents Office365 Project requirements check request. type Office365ProjectCheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Office365 Project requirements check properties. - Properties *Office365ProjectCheckRequirementsProperties `json:"properties,omitempty"` + Properties *Office365ProjectCheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type Office365ProjectCheckRequirements. @@ -5924,73 +5371,73 @@ func (o *Office365ProjectCheckRequirements) GetDataConnectorsCheckRequirements() // Office365ProjectCheckRequirementsProperties - Office365 Project requirements check properties. type Office365ProjectCheckRequirementsProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // Office365ProjectConnectorDataTypes - The available data types for Office Microsoft Project data connector. type Office365ProjectConnectorDataTypes struct { // REQUIRED; Logs data type. - Logs *Office365ProjectConnectorDataTypesLogs `json:"logs,omitempty"` + Logs *Office365ProjectConnectorDataTypesLogs } // Office365ProjectConnectorDataTypesLogs - Logs data type. type Office365ProjectConnectorDataTypesLogs struct { // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // Office365ProjectDataConnector - Represents Office Microsoft Project data connector. type Office365ProjectDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Office Microsoft Project data connector properties. - Properties *Office365ProjectDataConnectorProperties `json:"properties,omitempty"` + Properties *Office365ProjectDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type Office365ProjectDataConnector. func (o *Office365ProjectDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: o.Kind, Etag: o.Etag, ID: o.ID, + Kind: o.Kind, Name: o.Name, - Type: o.Type, SystemData: o.SystemData, + Type: o.Type, } } // Office365ProjectDataConnectorProperties - Office Microsoft Project data connector properties. type Office365ProjectDataConnectorProperties struct { // REQUIRED; The available data types for the connector. - DataTypes *Office365ProjectConnectorDataTypes `json:"dataTypes,omitempty"` + DataTypes *Office365ProjectConnectorDataTypes // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // OfficeATPCheckRequirements - Represents OfficeATP (Office 365 Advanced Threat Protection) requirements check request. type OfficeATPCheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // OfficeATP (Office 365 Advanced Threat Protection) requirements check properties. - Properties *OfficeATPCheckRequirementsProperties `json:"properties,omitempty"` + Properties *OfficeATPCheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type OfficeATPCheckRequirements. @@ -6003,187 +5450,172 @@ func (o *OfficeATPCheckRequirements) GetDataConnectorsCheckRequirements() *DataC // OfficeATPCheckRequirementsProperties - OfficeATP (Office 365 Advanced Threat Protection) requirements check properties. type OfficeATPCheckRequirementsProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // OfficeATPDataConnector - Represents OfficeATP (Office 365 Advanced Threat Protection) data connector. type OfficeATPDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // OfficeATP (Office 365 Advanced Threat Protection) data connector properties. - Properties *OfficeATPDataConnectorProperties `json:"properties,omitempty"` + Properties *OfficeATPDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type OfficeATPDataConnector. func (o *OfficeATPDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: o.Kind, Etag: o.Etag, ID: o.ID, + Kind: o.Kind, Name: o.Name, - Type: o.Type, SystemData: o.SystemData, + Type: o.Type, } } // OfficeATPDataConnectorProperties - OfficeATP (Office 365 Advanced Threat Protection) data connector properties. type OfficeATPDataConnectorProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // The available data types for the connector. - DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` + DataTypes *AlertsDataTypeOfDataConnector } // OfficeConsent - Consent for Office365 tenant that already made. type OfficeConsent struct { // Office consent properties - Properties *OfficeConsentProperties `json:"properties,omitempty"` + Properties *OfficeConsentProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // OfficeConsentList - List of all the office365 consents. type OfficeConsentList struct { // REQUIRED; Array of the consents. - Value []*OfficeConsent `json:"value,omitempty"` + Value []*OfficeConsent // READ-ONLY; URL to fetch the next set of office consents. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // OfficeConsentProperties - Consent property bag. type OfficeConsentProperties struct { // Help to easily cascade among the data layers. - ConsentID *string `json:"consentId,omitempty"` + ConsentID *string // The tenantId of the Office365 with the consent. - TenantID *string `json:"tenantId,omitempty"` -} - -// OfficeConsentsClientDeleteOptions contains the optional parameters for the OfficeConsentsClient.Delete method. -type OfficeConsentsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// OfficeConsentsClientGetOptions contains the optional parameters for the OfficeConsentsClient.Get method. -type OfficeConsentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// OfficeConsentsClientListOptions contains the optional parameters for the OfficeConsentsClient.NewListPager method. -type OfficeConsentsClientListOptions struct { - // placeholder for future optional parameters + TenantID *string } // OfficeDataConnector - Represents office data connector. type OfficeDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Office data connector properties. - Properties *OfficeDataConnectorProperties `json:"properties,omitempty"` + Properties *OfficeDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type OfficeDataConnector. func (o *OfficeDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: o.Kind, Etag: o.Etag, ID: o.ID, + Kind: o.Kind, Name: o.Name, - Type: o.Type, SystemData: o.SystemData, + Type: o.Type, } } // OfficeDataConnectorDataTypes - The available data types for office data connector. type OfficeDataConnectorDataTypes struct { // REQUIRED; Exchange data type connection. - Exchange *OfficeDataConnectorDataTypesExchange `json:"exchange,omitempty"` + Exchange *OfficeDataConnectorDataTypesExchange // REQUIRED; SharePoint data type connection. - SharePoint *OfficeDataConnectorDataTypesSharePoint `json:"sharePoint,omitempty"` + SharePoint *OfficeDataConnectorDataTypesSharePoint // REQUIRED; Teams data type connection. - Teams *OfficeDataConnectorDataTypesTeams `json:"teams,omitempty"` + Teams *OfficeDataConnectorDataTypesTeams } // OfficeDataConnectorDataTypesExchange - Exchange data type connection. type OfficeDataConnectorDataTypesExchange struct { // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // OfficeDataConnectorDataTypesSharePoint - SharePoint data type connection. type OfficeDataConnectorDataTypesSharePoint struct { // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // OfficeDataConnectorDataTypesTeams - Teams data type connection. type OfficeDataConnectorDataTypesTeams struct { // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // OfficeDataConnectorProperties - Office data connector properties. type OfficeDataConnectorProperties struct { // REQUIRED; The available data types for the connector. - DataTypes *OfficeDataConnectorDataTypes `json:"dataTypes,omitempty"` + DataTypes *OfficeDataConnectorDataTypes // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // OfficeIRMCheckRequirements - Represents OfficeIRM (Microsoft Insider Risk Management) requirements check request. type OfficeIRMCheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // OfficeIRM (Microsoft Insider Risk Management) requirements check properties. - Properties *OfficeIRMCheckRequirementsProperties `json:"properties,omitempty"` + Properties *OfficeIRMCheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type OfficeIRMCheckRequirements. @@ -6196,61 +5628,61 @@ func (o *OfficeIRMCheckRequirements) GetDataConnectorsCheckRequirements() *DataC // OfficeIRMCheckRequirementsProperties - OfficeIRM (Microsoft Insider Risk Management) requirements check properties. type OfficeIRMCheckRequirementsProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // OfficeIRMDataConnector - Represents OfficeIRM (Microsoft Insider Risk Management) data connector. type OfficeIRMDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // OfficeIRM (Microsoft Insider Risk Management) data connector properties. - Properties *OfficeIRMDataConnectorProperties `json:"properties,omitempty"` + Properties *OfficeIRMDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type OfficeIRMDataConnector. func (o *OfficeIRMDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: o.Kind, Etag: o.Etag, ID: o.ID, + Kind: o.Kind, Name: o.Name, - Type: o.Type, SystemData: o.SystemData, + Type: o.Type, } } // OfficeIRMDataConnectorProperties - OfficeIRM (Microsoft Insider Risk Management) data connector properties. type OfficeIRMDataConnectorProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // The available data types for the connector. - DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` + DataTypes *AlertsDataTypeOfDataConnector } // OfficePowerBICheckRequirements - Represents Office PowerBI requirements check request. type OfficePowerBICheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Office Power BI requirements check properties. - Properties *OfficePowerBICheckRequirementsProperties `json:"properties,omitempty"` + Properties *OfficePowerBICheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type OfficePowerBICheckRequirements. @@ -6263,247 +5695,222 @@ func (o *OfficePowerBICheckRequirements) GetDataConnectorsCheckRequirements() *D // OfficePowerBICheckRequirementsProperties - Office PowerBI requirements check properties. type OfficePowerBICheckRequirementsProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // OfficePowerBIConnectorDataTypes - The available data types for Office Microsoft PowerBI data connector. type OfficePowerBIConnectorDataTypes struct { // REQUIRED; Logs data type. - Logs *OfficePowerBIConnectorDataTypesLogs `json:"logs,omitempty"` + Logs *OfficePowerBIConnectorDataTypesLogs } // OfficePowerBIConnectorDataTypesLogs - Logs data type. type OfficePowerBIConnectorDataTypesLogs struct { // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // OfficePowerBIDataConnector - Represents Office Microsoft PowerBI data connector. type OfficePowerBIDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Office Microsoft PowerBI data connector properties. - Properties *OfficePowerBIDataConnectorProperties `json:"properties,omitempty"` + Properties *OfficePowerBIDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type OfficePowerBIDataConnector. func (o *OfficePowerBIDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: o.Kind, Etag: o.Etag, ID: o.ID, + Kind: o.Kind, Name: o.Name, - Type: o.Type, SystemData: o.SystemData, + Type: o.Type, } } // OfficePowerBIDataConnectorProperties - Office Microsoft PowerBI data connector properties. type OfficePowerBIDataConnectorProperties struct { // REQUIRED; The available data types for the connector. - DataTypes *OfficePowerBIConnectorDataTypes `json:"dataTypes,omitempty"` + DataTypes *OfficePowerBIConnectorDataTypes // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // Operation provided by provider type Operation struct { // Properties of the operation - Display *OperationDisplay `json:"display,omitempty"` + Display *OperationDisplay // Indicates whether the operation is a data action - IsDataAction *bool `json:"isDataAction,omitempty"` + IsDataAction *bool // Name of the operation - Name *string `json:"name,omitempty"` + Name *string // The origin of the operation - Origin *string `json:"origin,omitempty"` + Origin *string } // OperationDisplay - Properties of the operation type OperationDisplay struct { // Description of the operation - Description *string `json:"description,omitempty"` + Description *string // Operation name - Operation *string `json:"operation,omitempty"` + Operation *string // Provider name - Provider *string `json:"provider,omitempty"` + Provider *string // Resource name - Resource *string `json:"resource,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters + Resource *string } // OperationsList - Lists the operations available in the SecurityInsights RP. type OperationsList struct { // REQUIRED; Array of operations - Value []*Operation `json:"value,omitempty"` + Value []*Operation // READ-ONLY; URL to fetch the next set of operations. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // Permissions required for the connector type Permissions struct { // Customs permissions required for the connector - Customs []*PermissionsCustomsItem `json:"customs,omitempty"` + Customs []*PermissionsCustomsItem // Resource provider permissions required for the connector - ResourceProvider []*PermissionsResourceProviderItem `json:"resourceProvider,omitempty"` + ResourceProvider []*PermissionsResourceProviderItem } type PermissionsCustomsItem struct { // Customs permissions description - Description *string `json:"description,omitempty"` + Description *string // Customs permissions name - Name *string `json:"name,omitempty"` + Name *string } type PermissionsResourceProviderItem struct { // Permission description text - PermissionsDisplayText *string `json:"permissionsDisplayText,omitempty"` + PermissionsDisplayText *string // Provider name - Provider *ProviderName `json:"provider,omitempty"` + Provider *ProviderName // Permission provider display name - ProviderDisplayName *string `json:"providerDisplayName,omitempty"` + ProviderDisplayName *string // Required permissions for the connector - RequiredPermissions *RequiredPermissions `json:"requiredPermissions,omitempty"` + RequiredPermissions *RequiredPermissions // Permission provider scope - Scope *PermissionProviderScope `json:"scope,omitempty"` + Scope *PermissionProviderScope } type PlaybookActionProperties struct { // The resource id of the playbook resource. - LogicAppResourceID *string `json:"logicAppResourceId,omitempty"` + LogicAppResourceID *string // The tenant id of the playbook resource. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // ProcessEntity - Represents a process entity. type ProcessEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // Process entity properties - Properties *ProcessEntityProperties `json:"properties,omitempty"` + Properties *ProcessEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type ProcessEntity. func (p *ProcessEntity) GetEntity() *Entity { return &Entity{ - Kind: p.Kind, ID: p.ID, + Kind: p.Kind, Name: p.Name, - Type: p.Type, SystemData: p.SystemData, + Type: p.Type, } } // ProcessEntityProperties - Process entity property bag. type ProcessEntityProperties struct { // The elevation token associated with the process. - ElevationToken *ElevationToken `json:"elevationToken,omitempty"` + ElevationToken *ElevationToken // READ-ONLY; The account entity id running the processes. - AccountEntityID *string `json:"accountEntityId,omitempty" azure:"ro"` + AccountEntityID *string // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The command line used to create the process - CommandLine *string `json:"commandLine,omitempty" azure:"ro"` + CommandLine *string // READ-ONLY; The time when the process started to run - CreationTimeUTC *time.Time `json:"creationTimeUtc,omitempty" azure:"ro"` + CreationTimeUTC *time.Time // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The host entity id on which the process was running - HostEntityID *string `json:"hostEntityId,omitempty" azure:"ro"` + HostEntityID *string // READ-ONLY; The session entity id in which the process was running - HostLogonSessionEntityID *string `json:"hostLogonSessionEntityId,omitempty" azure:"ro"` + HostLogonSessionEntityID *string // READ-ONLY; Image file entity id - ImageFileEntityID *string `json:"imageFileEntityId,omitempty" azure:"ro"` + ImageFileEntityID *string // READ-ONLY; The parent process entity id. - ParentProcessEntityID *string `json:"parentProcessEntityId,omitempty" azure:"ro"` + ParentProcessEntityID *string // READ-ONLY; The process ID - ProcessID *string `json:"processId,omitempty" azure:"ro"` -} - -// ProductSettingsClientDeleteOptions contains the optional parameters for the ProductSettingsClient.Delete method. -type ProductSettingsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ProductSettingsClientGetOptions contains the optional parameters for the ProductSettingsClient.Get method. -type ProductSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProductSettingsClientListOptions contains the optional parameters for the ProductSettingsClient.List method. -type ProductSettingsClientListOptions struct { - // placeholder for future optional parameters -} - -// ProductSettingsClientUpdateOptions contains the optional parameters for the ProductSettingsClient.Update method. -type ProductSettingsClientUpdateOptions struct { - // placeholder for future optional parameters + ProcessID *string } // PropertyArrayChangedConditionProperties - Describes an automation rule condition that evaluates an array property's value // change type PropertyArrayChangedConditionProperties struct { // REQUIRED - ConditionType *ConditionType `json:"conditionType,omitempty"` - ConditionProperties *AutomationRulePropertyArrayChangedValuesCondition `json:"conditionProperties,omitempty"` + ConditionType *ConditionType + ConditionProperties *AutomationRulePropertyArrayChangedValuesCondition } // GetAutomationRuleCondition implements the AutomationRuleConditionClassification interface for type PropertyArrayChangedConditionProperties. @@ -6516,8 +5923,8 @@ func (p *PropertyArrayChangedConditionProperties) GetAutomationRuleCondition() * // PropertyArrayConditionProperties - Describes an automation rule condition that evaluates an array property's value type PropertyArrayConditionProperties struct { // REQUIRED - ConditionType *ConditionType `json:"conditionType,omitempty"` - ConditionProperties *AutomationRulePropertyArrayValuesCondition `json:"conditionProperties,omitempty"` + ConditionType *ConditionType + ConditionProperties *AutomationRulePropertyArrayValuesCondition } // GetAutomationRuleCondition implements the AutomationRuleConditionClassification interface for type PropertyArrayConditionProperties. @@ -6530,8 +5937,8 @@ func (p *PropertyArrayConditionProperties) GetAutomationRuleCondition() *Automat // PropertyChangedConditionProperties - Describes an automation rule condition that evaluates a property's value change type PropertyChangedConditionProperties struct { // REQUIRED - ConditionType *ConditionType `json:"conditionType,omitempty"` - ConditionProperties *AutomationRulePropertyValuesChangedCondition `json:"conditionProperties,omitempty"` + ConditionType *ConditionType + ConditionProperties *AutomationRulePropertyValuesChangedCondition } // GetAutomationRuleCondition implements the AutomationRuleConditionClassification interface for type PropertyChangedConditionProperties. @@ -6544,8 +5951,8 @@ func (p *PropertyChangedConditionProperties) GetAutomationRuleCondition() *Autom // PropertyConditionProperties - Describes an automation rule condition that evaluates a property's value type PropertyConditionProperties struct { // REQUIRED - ConditionType *ConditionType `json:"conditionType,omitempty"` - ConditionProperties *AutomationRulePropertyValuesCondition `json:"conditionProperties,omitempty"` + ConditionType *ConditionType + ConditionProperties *AutomationRulePropertyValuesCondition } // GetAutomationRuleCondition implements the AutomationRuleConditionClassification interface for type PropertyConditionProperties. @@ -6558,572 +5965,572 @@ func (p *PropertyConditionProperties) GetAutomationRuleCondition() *AutomationRu // RegistryKeyEntity - Represents a registry key entity. type RegistryKeyEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // RegistryKey entity properties - Properties *RegistryKeyEntityProperties `json:"properties,omitempty"` + Properties *RegistryKeyEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type RegistryKeyEntity. func (r *RegistryKeyEntity) GetEntity() *Entity { return &Entity{ - Kind: r.Kind, ID: r.ID, + Kind: r.Kind, Name: r.Name, - Type: r.Type, SystemData: r.SystemData, + Type: r.Type, } } // RegistryKeyEntityProperties - RegistryKey entity property bag. type RegistryKeyEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; the hive that holds the registry key. - Hive *RegistryHive `json:"hive,omitempty" azure:"ro"` + Hive *RegistryHive // READ-ONLY; The registry key path. - Key *string `json:"key,omitempty" azure:"ro"` + Key *string } // RegistryValueEntity - Represents a registry value entity. type RegistryValueEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // RegistryKey entity properties - Properties *RegistryValueEntityProperties `json:"properties,omitempty"` + Properties *RegistryValueEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type RegistryValueEntity. func (r *RegistryValueEntity) GetEntity() *Entity { return &Entity{ - Kind: r.Kind, ID: r.ID, + Kind: r.Kind, Name: r.Name, - Type: r.Type, SystemData: r.SystemData, + Type: r.Type, } } // RegistryValueEntityProperties - RegistryValue entity property bag. type RegistryValueEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The registry key entity id. - KeyEntityID *string `json:"keyEntityId,omitempty" azure:"ro"` + KeyEntityID *string // READ-ONLY; String formatted representation of the value data. - ValueData *string `json:"valueData,omitempty" azure:"ro"` + ValueData *string // READ-ONLY; The registry value name. - ValueName *string `json:"valueName,omitempty" azure:"ro"` + ValueName *string // READ-ONLY; Specifies the data types to use when storing values in the registry, or identifies the data type of a value // in the registry. - ValueType *RegistryValueKind `json:"valueType,omitempty" azure:"ro"` + ValueType *RegistryValueKind } // Relation - Represents a relation between two resources type Relation struct { // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Relation properties - Properties *RelationProperties `json:"properties,omitempty"` + Properties *RelationProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // RelationList - List of relations. type RelationList struct { // REQUIRED; Array of relations. - Value []*Relation `json:"value,omitempty"` + Value []*Relation // READ-ONLY; URL to fetch the next set of relations. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // RelationProperties - Relation property bag. type RelationProperties struct { // REQUIRED; The resource ID of the related resource - RelatedResourceID *string `json:"relatedResourceId,omitempty"` + RelatedResourceID *string // READ-ONLY; The resource kind of the related resource - RelatedResourceKind *string `json:"relatedResourceKind,omitempty" azure:"ro"` + RelatedResourceKind *string // READ-ONLY; The name of the related resource - RelatedResourceName *string `json:"relatedResourceName,omitempty" azure:"ro"` + RelatedResourceName *string // READ-ONLY; The resource type of the related resource - RelatedResourceType *string `json:"relatedResourceType,omitempty" azure:"ro"` + RelatedResourceType *string } // Repo - Represents a repository. type Repo struct { // Array of branches. - Branches []*string `json:"branches,omitempty"` + Branches []*string // The name of the repository. - FullName *string `json:"fullName,omitempty"` + FullName *string // The url to access the repository. - URL *string `json:"url,omitempty"` + URL *string } // RepoList - List all the source controls. type RepoList struct { // REQUIRED; Array of repositories. - Value []*Repo `json:"value,omitempty"` + Value []*Repo // READ-ONLY; URL to fetch the next set of repositories. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // Repository - metadata of a repository. type Repository struct { // Branch name of repository. - Branch *string `json:"branch,omitempty"` + Branch *string // Url to access repository action logs. - DeploymentLogsURL *string `json:"deploymentLogsUrl,omitempty"` + DeploymentLogsURL *string // Display url of repository. - DisplayURL *string `json:"displayUrl,omitempty"` + DisplayURL *string // Dictionary of source control content type and path mapping. - PathMapping []*ContentPathMap `json:"pathMapping,omitempty"` + PathMapping []*ContentPathMap // Url of repository. - URL *string `json:"url,omitempty"` + URL *string } // RepositoryResourceInfo - Resources created in user's repository for the source-control. type RepositoryResourceInfo struct { // Resources created in Azure DevOps for this source-control. - AzureDevOpsResourceInfo *AzureDevOpsResourceInfo `json:"azureDevOpsResourceInfo,omitempty"` + AzureDevOpsResourceInfo *AzureDevOpsResourceInfo // Resources created in GitHub for this source-control. - GitHubResourceInfo *GitHubResourceInfo `json:"gitHubResourceInfo,omitempty"` + GitHubResourceInfo *GitHubResourceInfo // The webhook object created for the source-control. - Webhook *Webhook `json:"webhook,omitempty"` + Webhook *Webhook } // RequiredPermissions - Required permissions for the connector type RequiredPermissions struct { // action permission - Action *bool `json:"action,omitempty"` + Action *bool // delete permission - Delete *bool `json:"delete,omitempty"` + Delete *bool // read permission - Read *bool `json:"read,omitempty"` + Read *bool // write permission - Write *bool `json:"write,omitempty"` + Write *bool } // ScheduledAlertRule - Represents scheduled alert rule. type ScheduledAlertRule struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Scheduled alert rule properties - Properties *ScheduledAlertRuleProperties `json:"properties,omitempty"` + Properties *ScheduledAlertRuleProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRule implements the AlertRuleClassification interface for type ScheduledAlertRule. func (s *ScheduledAlertRule) GetAlertRule() *AlertRule { return &AlertRule{ - Kind: s.Kind, Etag: s.Etag, ID: s.ID, + Kind: s.Kind, Name: s.Name, - Type: s.Type, SystemData: s.SystemData, + Type: s.Type, } } // ScheduledAlertRuleProperties - Scheduled alert rule base property bag. type ScheduledAlertRuleProperties struct { // REQUIRED; The display name for alerts created by this alert rule. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // REQUIRED; Determines whether this alert rule is enabled or disabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // REQUIRED; The suppression (in ISO 8601 duration format) to wait since last time this alert rule been triggered. - SuppressionDuration *string `json:"suppressionDuration,omitempty"` + SuppressionDuration *string // REQUIRED; Determines whether the suppression for this alert rule is enabled or disabled. - SuppressionEnabled *bool `json:"suppressionEnabled,omitempty"` + SuppressionEnabled *bool // The alert details override settings - AlertDetailsOverride *AlertDetailsOverride `json:"alertDetailsOverride,omitempty"` + AlertDetailsOverride *AlertDetailsOverride // The Name of the alert rule template used to create this rule. - AlertRuleTemplateName *string `json:"alertRuleTemplateName,omitempty"` + AlertRuleTemplateName *string // Dictionary of string key-value pairs of columns to be attached to the alert - CustomDetails map[string]*string `json:"customDetails,omitempty"` + CustomDetails map[string]*string // The description of the alert rule. - Description *string `json:"description,omitempty"` + Description *string // Array of the entity mappings of the alert rule - EntityMappings []*EntityMapping `json:"entityMappings,omitempty"` + EntityMappings []*EntityMapping // The event grouping settings. - EventGroupingSettings *EventGroupingSettings `json:"eventGroupingSettings,omitempty"` + EventGroupingSettings *EventGroupingSettings // The settings of the incidents that created from alerts triggered by this analytics rule - IncidentConfiguration *IncidentConfiguration `json:"incidentConfiguration,omitempty"` + IncidentConfiguration *IncidentConfiguration // The query that creates alerts for this rule. - Query *string `json:"query,omitempty"` + Query *string // The frequency (in ISO 8601 duration format) for this alert rule to run. - QueryFrequency *string `json:"queryFrequency,omitempty"` + QueryFrequency *string // The period (in ISO 8601 duration format) that this alert rule looks at. - QueryPeriod *string `json:"queryPeriod,omitempty"` + QueryPeriod *string // The severity for alerts created by this alert rule. - Severity *AlertSeverity `json:"severity,omitempty"` + Severity *AlertSeverity // The tactics of the alert rule - Tactics []*AttackTactic `json:"tactics,omitempty"` + Tactics []*AttackTactic // The techniques of the alert rule - Techniques []*string `json:"techniques,omitempty"` + Techniques []*string // The version of the alert rule template used to create this rule - in format , where all are numbers, for example 0 - TemplateVersion *string `json:"templateVersion,omitempty"` + TemplateVersion *string // The operation against the threshold that triggers alert rule. - TriggerOperator *TriggerOperator `json:"triggerOperator,omitempty"` + TriggerOperator *TriggerOperator // The threshold triggers this alert rule. - TriggerThreshold *int32 `json:"triggerThreshold,omitempty"` + TriggerThreshold *int32 // READ-ONLY; The last time that this alert rule has been modified. - LastModifiedUTC *time.Time `json:"lastModifiedUtc,omitempty" azure:"ro"` + LastModifiedUTC *time.Time } // ScheduledAlertRuleTemplate - Represents scheduled alert rule template. type ScheduledAlertRuleTemplate struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // Scheduled alert rule template properties - Properties *ScheduledAlertRuleTemplateProperties `json:"properties,omitempty"` + Properties *ScheduledAlertRuleTemplateProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRuleTemplate implements the AlertRuleTemplateClassification interface for type ScheduledAlertRuleTemplate. func (s *ScheduledAlertRuleTemplate) GetAlertRuleTemplate() *AlertRuleTemplate { return &AlertRuleTemplate{ - Kind: s.Kind, ID: s.ID, + Kind: s.Kind, Name: s.Name, - Type: s.Type, SystemData: s.SystemData, + Type: s.Type, } } // ScheduledAlertRuleTemplateProperties - Scheduled alert rule template properties type ScheduledAlertRuleTemplateProperties struct { // The alert details override settings - AlertDetailsOverride *AlertDetailsOverride `json:"alertDetailsOverride,omitempty"` + AlertDetailsOverride *AlertDetailsOverride // the number of alert rules that were created by this template - AlertRulesCreatedByTemplateCount *int32 `json:"alertRulesCreatedByTemplateCount,omitempty"` + AlertRulesCreatedByTemplateCount *int32 // Dictionary of string key-value pairs of columns to be attached to the alert - CustomDetails map[string]*string `json:"customDetails,omitempty"` + CustomDetails map[string]*string // The description of the alert rule template. - Description *string `json:"description,omitempty"` + Description *string // The display name for alert rule template. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Array of the entity mappings of the alert rule - EntityMappings []*EntityMapping `json:"entityMappings,omitempty"` + EntityMappings []*EntityMapping // The event grouping settings. - EventGroupingSettings *EventGroupingSettings `json:"eventGroupingSettings,omitempty"` + EventGroupingSettings *EventGroupingSettings // The query that creates alerts for this rule. - Query *string `json:"query,omitempty"` + Query *string // The frequency (in ISO 8601 duration format) for this alert rule to run. - QueryFrequency *string `json:"queryFrequency,omitempty"` + QueryFrequency *string // The period (in ISO 8601 duration format) that this alert rule looks at. - QueryPeriod *string `json:"queryPeriod,omitempty"` + QueryPeriod *string // The required data connectors for this template - RequiredDataConnectors []*AlertRuleTemplateDataSource `json:"requiredDataConnectors,omitempty"` + RequiredDataConnectors []*AlertRuleTemplateDataSource // The severity for alerts created by this alert rule. - Severity *AlertSeverity `json:"severity,omitempty"` + Severity *AlertSeverity // The alert rule template status. - Status *TemplateStatus `json:"status,omitempty"` + Status *TemplateStatus // The tactics of the alert rule template - Tactics []*AttackTactic `json:"tactics,omitempty"` + Tactics []*AttackTactic // The techniques of the alert rule - Techniques []*string `json:"techniques,omitempty"` + Techniques []*string // The operation against the threshold that triggers alert rule. - TriggerOperator *TriggerOperator `json:"triggerOperator,omitempty"` + TriggerOperator *TriggerOperator // The threshold triggers this alert rule. - TriggerThreshold *int32 `json:"triggerThreshold,omitempty"` + TriggerThreshold *int32 // The version of this template - in format , where all are numbers. For example . - Version *string `json:"version,omitempty"` + Version *string // READ-ONLY; The time that this alert rule template has been added. - CreatedDateUTC *time.Time `json:"createdDateUTC,omitempty" azure:"ro"` + CreatedDateUTC *time.Time // READ-ONLY; The time that this alert rule template was last updated. - LastUpdatedDateUTC *time.Time `json:"lastUpdatedDateUTC,omitempty" azure:"ro"` + LastUpdatedDateUTC *time.Time } // SecurityAlert - Represents a security alert entity. type SecurityAlert struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // SecurityAlert entity properties - Properties *SecurityAlertProperties `json:"properties,omitempty"` + Properties *SecurityAlertProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type SecurityAlert. func (s *SecurityAlert) GetEntity() *Entity { return &Entity{ - Kind: s.Kind, ID: s.ID, + Kind: s.Kind, Name: s.Name, - Type: s.Type, SystemData: s.SystemData, + Type: s.Type, } } // SecurityAlertProperties - SecurityAlert entity property bag. type SecurityAlertProperties struct { // The severity of the alert - Severity *AlertSeverity `json:"severity,omitempty"` + Severity *AlertSeverity // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The display name of the alert. - AlertDisplayName *string `json:"alertDisplayName,omitempty" azure:"ro"` + AlertDisplayName *string // READ-ONLY; The uri link of the alert. - AlertLink *string `json:"alertLink,omitempty" azure:"ro"` + AlertLink *string // READ-ONLY; The type name of the alert. - AlertType *string `json:"alertType,omitempty" azure:"ro"` + AlertType *string // READ-ONLY; Display name of the main entity being reported on. - CompromisedEntity *string `json:"compromisedEntity,omitempty" azure:"ro"` + CompromisedEntity *string // READ-ONLY; The confidence level of this alert. - ConfidenceLevel *ConfidenceLevel `json:"confidenceLevel,omitempty" azure:"ro"` + ConfidenceLevel *ConfidenceLevel // READ-ONLY; The confidence reasons - ConfidenceReasons []*SecurityAlertPropertiesConfidenceReasonsItem `json:"confidenceReasons,omitempty" azure:"ro"` + ConfidenceReasons []*SecurityAlertPropertiesConfidenceReasonsItem // READ-ONLY; The confidence score of the alert. - ConfidenceScore *float64 `json:"confidenceScore,omitempty" azure:"ro"` + ConfidenceScore *float64 // READ-ONLY; The confidence score calculation status, i.e. indicating if score calculation is pending for this alert, not // applicable or final. - ConfidenceScoreStatus *ConfidenceScoreStatus `json:"confidenceScoreStatus,omitempty" azure:"ro"` + ConfidenceScoreStatus *ConfidenceScoreStatus // READ-ONLY; Alert description. - Description *string `json:"description,omitempty" azure:"ro"` + Description *string // READ-ONLY; The impact end time of the alert (the time of the last event contributing to the alert). - EndTimeUTC *time.Time `json:"endTimeUtc,omitempty" azure:"ro"` + EndTimeUTC *time.Time // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; Holds the alert intent stage(s) mapping for this alert. - Intent *KillChainIntent `json:"intent,omitempty" azure:"ro"` + Intent *KillChainIntent // READ-ONLY; The time the alert was made available for consumption. - ProcessingEndTime *time.Time `json:"processingEndTime,omitempty" azure:"ro"` + ProcessingEndTime *time.Time // READ-ONLY; The name of a component inside the product which generated the alert. - ProductComponentName *string `json:"productComponentName,omitempty" azure:"ro"` + ProductComponentName *string // READ-ONLY; The name of the product which published this alert. - ProductName *string `json:"productName,omitempty" azure:"ro"` + ProductName *string // READ-ONLY; The version of the product generating the alert. - ProductVersion *string `json:"productVersion,omitempty" azure:"ro"` + ProductVersion *string // READ-ONLY; The identifier of the alert inside the product which generated the alert. - ProviderAlertID *string `json:"providerAlertId,omitempty" azure:"ro"` + ProviderAlertID *string // READ-ONLY; Manual action items to take to remediate the alert. - RemediationSteps []*string `json:"remediationSteps,omitempty" azure:"ro"` + RemediationSteps []*string // READ-ONLY; The list of resource identifiers of the alert. - ResourceIdentifiers []any `json:"resourceIdentifiers,omitempty" azure:"ro"` + ResourceIdentifiers []any // READ-ONLY; The impact start time of the alert (the time of the first event contributing to the alert). - StartTimeUTC *time.Time `json:"startTimeUtc,omitempty" azure:"ro"` + StartTimeUTC *time.Time // READ-ONLY; The lifecycle status of the alert. - Status *AlertStatus `json:"status,omitempty" azure:"ro"` + Status *AlertStatus // READ-ONLY; Holds the product identifier of the alert for the product. - SystemAlertID *string `json:"systemAlertId,omitempty" azure:"ro"` + SystemAlertID *string // READ-ONLY; The tactics of the alert - Tactics []*AttackTactic `json:"tactics,omitempty" azure:"ro"` + Tactics []*AttackTactic // READ-ONLY; The time the alert was generated. - TimeGenerated *time.Time `json:"timeGenerated,omitempty" azure:"ro"` + TimeGenerated *time.Time // READ-ONLY; The name of the vendor that raise the alert. - VendorName *string `json:"vendorName,omitempty" azure:"ro"` + VendorName *string } // SecurityAlertPropertiesConfidenceReasonsItem - confidence reason item type SecurityAlertPropertiesConfidenceReasonsItem struct { // READ-ONLY; The reason's description - Reason *string `json:"reason,omitempty" azure:"ro"` + Reason *string // READ-ONLY; The type (category) of the reason - ReasonType *string `json:"reasonType,omitempty" azure:"ro"` + ReasonType *string } // SecurityAlertTimelineItem - Represents security alert timeline item. type SecurityAlertTimelineItem struct { // REQUIRED; The name of the alert type. - AlertType *string `json:"alertType,omitempty"` + AlertType *string // REQUIRED; The alert azure resource id. - AzureResourceID *string `json:"azureResourceId,omitempty"` + AzureResourceID *string // REQUIRED; The alert name. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // REQUIRED; The alert end time. - EndTimeUTC *time.Time `json:"endTimeUtc,omitempty"` + EndTimeUTC *time.Time // REQUIRED; The entity query kind type. - Kind *EntityTimelineKind `json:"kind,omitempty"` + Kind *EntityTimelineKind // REQUIRED; The alert severity. - Severity *AlertSeverity `json:"severity,omitempty"` + Severity *AlertSeverity // REQUIRED; The alert start time. - StartTimeUTC *time.Time `json:"startTimeUtc,omitempty"` + StartTimeUTC *time.Time // REQUIRED; The alert generated time. - TimeGenerated *time.Time `json:"timeGenerated,omitempty"` + TimeGenerated *time.Time // The alert description. - Description *string `json:"description,omitempty"` + Description *string // The alert product name. - ProductName *string `json:"productName,omitempty"` + ProductName *string } // GetEntityTimelineItem implements the EntityTimelineItemClassification interface for type SecurityAlertTimelineItem. @@ -7136,82 +6543,73 @@ func (s *SecurityAlertTimelineItem) GetEntityTimelineItem() *EntityTimelineItem // SecurityGroupEntity - Represents a security group entity. type SecurityGroupEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // SecurityGroup entity properties - Properties *SecurityGroupEntityProperties `json:"properties,omitempty"` + Properties *SecurityGroupEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type SecurityGroupEntity. func (s *SecurityGroupEntity) GetEntity() *Entity { return &Entity{ - Kind: s.Kind, ID: s.ID, + Kind: s.Kind, Name: s.Name, - Type: s.Type, SystemData: s.SystemData, + Type: s.Type, } } // SecurityGroupEntityProperties - SecurityGroup entity property bag. type SecurityGroupEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The group distinguished name - DistinguishedName *string `json:"distinguishedName,omitempty" azure:"ro"` + DistinguishedName *string // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; A single-value attribute that is the unique identifier for the object, assigned by active directory. - ObjectGUID *string `json:"objectGuid,omitempty" azure:"ro"` + ObjectGUID *string // READ-ONLY; The SID attribute is a single-value attribute that specifies the security identifier (SID) of the group - Sid *string `json:"sid,omitempty" azure:"ro"` -} - -// SecurityMLAnalyticsSettingClassification provides polymorphic access to related types. -// Call the interface's GetSecurityMLAnalyticsSetting() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AnomalySecurityMLAnalyticsSettings, *SecurityMLAnalyticsSetting -type SecurityMLAnalyticsSettingClassification interface { - // GetSecurityMLAnalyticsSetting returns the SecurityMLAnalyticsSetting content of the underlying type. - GetSecurityMLAnalyticsSetting() *SecurityMLAnalyticsSetting + Sid *string } // SecurityMLAnalyticsSetting - Security ML Analytics Setting type SecurityMLAnalyticsSetting struct { // REQUIRED; The kind of security ML Analytics Settings - Kind *SecurityMLAnalyticsSettingsKind `json:"kind,omitempty"` + Kind *SecurityMLAnalyticsSettingsKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetSecurityMLAnalyticsSetting implements the SecurityMLAnalyticsSettingClassification interface for type SecurityMLAnalyticsSetting. @@ -7219,139 +6617,82 @@ func (s *SecurityMLAnalyticsSetting) GetSecurityMLAnalyticsSetting() *SecurityML return s } -// SecurityMLAnalyticsSettingsClientCreateOrUpdateOptions contains the optional parameters for the SecurityMLAnalyticsSettingsClient.CreateOrUpdate -// method. -type SecurityMLAnalyticsSettingsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SecurityMLAnalyticsSettingsClientDeleteOptions contains the optional parameters for the SecurityMLAnalyticsSettingsClient.Delete -// method. -type SecurityMLAnalyticsSettingsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SecurityMLAnalyticsSettingsClientGetOptions contains the optional parameters for the SecurityMLAnalyticsSettingsClient.Get -// method. -type SecurityMLAnalyticsSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SecurityMLAnalyticsSettingsClientListOptions contains the optional parameters for the SecurityMLAnalyticsSettingsClient.NewListPager -// method. -type SecurityMLAnalyticsSettingsClientListOptions struct { - // placeholder for future optional parameters -} - // SecurityMLAnalyticsSettingsDataSource - security ml analytics settings data sources type SecurityMLAnalyticsSettingsDataSource struct { // The connector id that provides the following data types - ConnectorID *string `json:"connectorId,omitempty"` + ConnectorID *string // The data types used by the security ml analytics settings - DataTypes []*string `json:"dataTypes,omitempty"` + DataTypes []*string } // SecurityMLAnalyticsSettingsList - List all the SecurityMLAnalyticsSettings type SecurityMLAnalyticsSettingsList struct { // REQUIRED; Array of SecurityMLAnalyticsSettings - Value []SecurityMLAnalyticsSettingClassification `json:"value,omitempty"` + Value []SecurityMLAnalyticsSettingClassification // READ-ONLY; URL to fetch the next set of SecurityMLAnalyticsSettings. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // SentinelOnboardingState - Sentinel onboarding state type SentinelOnboardingState struct { // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // The Sentinel onboarding state object - Properties *SentinelOnboardingStateProperties `json:"properties,omitempty"` + Properties *SentinelOnboardingStateProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // SentinelOnboardingStateProperties - The Sentinel onboarding state properties type SentinelOnboardingStateProperties struct { // Flag that indicates the status of the CMK setting - CustomerManagedKey *bool `json:"customerManagedKey,omitempty"` -} - -// SentinelOnboardingStatesClientCreateOptions contains the optional parameters for the SentinelOnboardingStatesClient.Create -// method. -type SentinelOnboardingStatesClientCreateOptions struct { - // The Sentinel onboarding state parameter - SentinelOnboardingStateParameter *SentinelOnboardingState -} - -// SentinelOnboardingStatesClientDeleteOptions contains the optional parameters for the SentinelOnboardingStatesClient.Delete -// method. -type SentinelOnboardingStatesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SentinelOnboardingStatesClientGetOptions contains the optional parameters for the SentinelOnboardingStatesClient.Get method. -type SentinelOnboardingStatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// SentinelOnboardingStatesClientListOptions contains the optional parameters for the SentinelOnboardingStatesClient.List -// method. -type SentinelOnboardingStatesClientListOptions struct { - // placeholder for future optional parameters + CustomerManagedKey *bool } // SentinelOnboardingStatesList - List of the Sentinel onboarding states type SentinelOnboardingStatesList struct { // REQUIRED; Array of Sentinel onboarding states - Value []*SentinelOnboardingState `json:"value,omitempty"` + Value []*SentinelOnboardingState } // SettingList - List of all the settings. type SettingList struct { // REQUIRED; Array of settings. - Value []SettingsClassification `json:"value,omitempty"` -} - -// SettingsClassification provides polymorphic access to related types. -// Call the interface's GetSettings() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *Anomalies, *EntityAnalytics, *EyesOn, *Settings, *Ueba -type SettingsClassification interface { - // GetSettings returns the Settings content of the underlying type. - GetSettings() *Settings + Value []SettingsClassification } // Settings - The Setting. type Settings struct { // REQUIRED; The kind of the setting - Kind *SettingKind `json:"kind,omitempty"` + Kind *SettingKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetSettings implements the SettingsClassification interface for type Settings. @@ -7360,189 +6701,163 @@ func (s *Settings) GetSettings() *Settings { return s } // SourceControl - Represents a SourceControl in Azure Security Insights. type SourceControl struct { // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // source control properties - Properties *SourceControlProperties `json:"properties,omitempty"` + Properties *SourceControlProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SourceControlClientListRepositoriesOptions contains the optional parameters for the SourceControlClient.NewListRepositoriesPager -// method. -type SourceControlClientListRepositoriesOptions struct { - // placeholder for future optional parameters + Type *string } // SourceControlList - List all the source controls. type SourceControlList struct { // REQUIRED; Array of source controls. - Value []*SourceControl `json:"value,omitempty"` + Value []*SourceControl // READ-ONLY; URL to fetch the next set of source controls. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // SourceControlProperties - Describes source control properties type SourceControlProperties struct { // REQUIRED; Array of source control content types. - ContentTypes []*ContentType `json:"contentTypes,omitempty"` + ContentTypes []*ContentType // REQUIRED; The display name of the source control - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // REQUIRED; The repository type of the source control - RepoType *RepoType `json:"repoType,omitempty"` + RepoType *RepoType // REQUIRED; Repository metadata. - Repository *Repository `json:"repository,omitempty"` + Repository *Repository // A description of the source control - Description *string `json:"description,omitempty"` + Description *string // The id (a Guid) of the source control - ID *string `json:"id,omitempty"` + ID *string // Information regarding the latest deployment for the source control. - LastDeploymentInfo *DeploymentInfo `json:"lastDeploymentInfo,omitempty"` + LastDeploymentInfo *DeploymentInfo // Information regarding the resources created in user's repository. - RepositoryResourceInfo *RepositoryResourceInfo `json:"repositoryResourceInfo,omitempty"` + RepositoryResourceInfo *RepositoryResourceInfo // The version number associated with the source control - Version *Version `json:"version,omitempty"` -} - -// SourceControlsClientCreateOptions contains the optional parameters for the SourceControlsClient.Create method. -type SourceControlsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// SourceControlsClientDeleteOptions contains the optional parameters for the SourceControlsClient.Delete method. -type SourceControlsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SourceControlsClientGetOptions contains the optional parameters for the SourceControlsClient.Get method. -type SourceControlsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SourceControlsClientListOptions contains the optional parameters for the SourceControlsClient.NewListPager method. -type SourceControlsClientListOptions struct { - // placeholder for future optional parameters + Version *Version } // SubmissionMailEntity - Represents a submission mail entity. type SubmissionMailEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // Submission mail entity properties - Properties *SubmissionMailEntityProperties `json:"properties,omitempty"` + Properties *SubmissionMailEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type SubmissionMailEntity. func (s *SubmissionMailEntity) GetEntity() *Entity { return &Entity{ - Kind: s.Kind, ID: s.ID, + Kind: s.Kind, Name: s.Name, - Type: s.Type, SystemData: s.SystemData, + Type: s.Type, } } // SubmissionMailEntityProperties - Submission mail entity property bag. type SubmissionMailEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; The network message id of email to which submission belongs - NetworkMessageID *string `json:"networkMessageId,omitempty" azure:"ro"` + NetworkMessageID *string // READ-ONLY; The recipient of the mail - Recipient *string `json:"recipient,omitempty" azure:"ro"` + Recipient *string // READ-ONLY; The submission type for the given instance. This maps to Junk, Phish, Malware or NotJunk. - ReportType *string `json:"reportType,omitempty" azure:"ro"` + ReportType *string // READ-ONLY; The sender of the mail - Sender *string `json:"sender,omitempty" azure:"ro"` + Sender *string // READ-ONLY; The sender's IP - SenderIP *string `json:"senderIp,omitempty" azure:"ro"` + SenderIP *string // READ-ONLY; The subject of submission mail - Subject *string `json:"subject,omitempty" azure:"ro"` + Subject *string // READ-ONLY; The submission date - SubmissionDate *time.Time `json:"submissionDate,omitempty" azure:"ro"` + SubmissionDate *time.Time // READ-ONLY; The submission id - SubmissionID *string `json:"submissionId,omitempty" azure:"ro"` + SubmissionID *string // READ-ONLY; The submitter - Submitter *string `json:"submitter,omitempty" azure:"ro"` + Submitter *string // READ-ONLY; The Time stamp when the message is received (Mail) - Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` + Timestamp *time.Time } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` + CreatedAt *time.Time // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` + CreatedBy *string // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` + CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` + LastModifiedAt *time.Time // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedBy *string // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` + LastModifiedByType *CreatedByType } // TICheckRequirements - Threat Intelligence Platforms data connector check requirements type TICheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Threat Intelligence Platforms data connector check required properties - Properties *TICheckRequirementsProperties `json:"properties,omitempty"` + Properties *TICheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type TICheckRequirements. @@ -7555,550 +6870,478 @@ func (t *TICheckRequirements) GetDataConnectorsCheckRequirements() *DataConnecto // TICheckRequirementsProperties - Threat Intelligence Platforms data connector required properties. type TICheckRequirementsProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // TIDataConnector - Represents threat intelligence data connector. type TIDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // TI (Threat Intelligence) data connector properties. - Properties *TIDataConnectorProperties `json:"properties,omitempty"` + Properties *TIDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type TIDataConnector. func (t *TIDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: t.Kind, Etag: t.Etag, ID: t.ID, + Kind: t.Kind, Name: t.Name, - Type: t.Type, SystemData: t.SystemData, + Type: t.Type, } } // TIDataConnectorDataTypes - The available data types for TI (Threat Intelligence) data connector. type TIDataConnectorDataTypes struct { // REQUIRED; Data type for indicators connection. - Indicators *TIDataConnectorDataTypesIndicators `json:"indicators,omitempty"` + Indicators *TIDataConnectorDataTypesIndicators } // TIDataConnectorDataTypesIndicators - Data type for indicators connection. type TIDataConnectorDataTypesIndicators struct { // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // TIDataConnectorProperties - TI (Threat Intelligence) data connector properties. type TIDataConnectorProperties struct { // REQUIRED; The available data types for the connector. - DataTypes *TIDataConnectorDataTypes `json:"dataTypes,omitempty"` + DataTypes *TIDataConnectorDataTypes // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // The lookback period for the feed to be imported. - TipLookbackPeriod *time.Time `json:"tipLookbackPeriod,omitempty"` + TipLookbackPeriod *time.Time } // TeamInformation - Describes team information type TeamInformation struct { // READ-ONLY; The description of the team - Description *string `json:"description,omitempty" azure:"ro"` + Description *string // READ-ONLY; The name of the team - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The primary channel URL of the team - PrimaryChannelURL *string `json:"primaryChannelUrl,omitempty" azure:"ro"` + PrimaryChannelURL *string // READ-ONLY; The time the team was created - TeamCreationTimeUTC *time.Time `json:"teamCreationTimeUtc,omitempty" azure:"ro"` + TeamCreationTimeUTC *time.Time // READ-ONLY; Team ID - TeamID *string `json:"teamId,omitempty" azure:"ro"` + TeamID *string } // TeamProperties - Describes team properties type TeamProperties struct { // REQUIRED; The name of the team - TeamName *string `json:"teamName,omitempty"` + TeamName *string // List of group IDs to add their members to the team - GroupIDs []*string `json:"groupIds,omitempty"` + GroupIDs []*string // List of member IDs to add to the team - MemberIDs []*string `json:"memberIds,omitempty"` + MemberIDs []*string // The description of the team - TeamDescription *string `json:"teamDescription,omitempty"` + TeamDescription *string } // ThreatIntelligence property bag. type ThreatIntelligence struct { // READ-ONLY; Confidence (must be between 0 and 1) - Confidence *float64 `json:"confidence,omitempty" azure:"ro"` + Confidence *float64 // READ-ONLY; Name of the provider from whom this Threat Intelligence information was received - ProviderName *string `json:"providerName,omitempty" azure:"ro"` + ProviderName *string // READ-ONLY; Report link - ReportLink *string `json:"reportLink,omitempty" azure:"ro"` + ReportLink *string // READ-ONLY; Threat description (free text) - ThreatDescription *string `json:"threatDescription,omitempty" azure:"ro"` + ThreatDescription *string // READ-ONLY; Threat name (e.g. "Jedobot malware") - ThreatName *string `json:"threatName,omitempty" azure:"ro"` + ThreatName *string // READ-ONLY; Threat type (e.g. "Botnet") - ThreatType *string `json:"threatType,omitempty" azure:"ro"` + ThreatType *string } // ThreatIntelligenceAlertRule - Represents Threat Intelligence alert rule. type ThreatIntelligenceAlertRule struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Threat Intelligence alert rule properties - Properties *ThreatIntelligenceAlertRuleProperties `json:"properties,omitempty"` + Properties *ThreatIntelligenceAlertRuleProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRule implements the AlertRuleClassification interface for type ThreatIntelligenceAlertRule. func (t *ThreatIntelligenceAlertRule) GetAlertRule() *AlertRule { return &AlertRule{ - Kind: t.Kind, Etag: t.Etag, ID: t.ID, + Kind: t.Kind, Name: t.Name, - Type: t.Type, SystemData: t.SystemData, + Type: t.Type, } } // ThreatIntelligenceAlertRuleProperties - Threat Intelligence alert rule base property bag. type ThreatIntelligenceAlertRuleProperties struct { // REQUIRED; The Name of the alert rule template used to create this rule. - AlertRuleTemplateName *string `json:"alertRuleTemplateName,omitempty"` + AlertRuleTemplateName *string // REQUIRED; Determines whether this alert rule is enabled or disabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // READ-ONLY; The description of the alert rule. - Description *string `json:"description,omitempty" azure:"ro"` + Description *string // READ-ONLY; The display name for alerts created by this alert rule. - DisplayName *string `json:"displayName,omitempty" azure:"ro"` + DisplayName *string // READ-ONLY; The last time that this alert has been modified. - LastModifiedUTC *time.Time `json:"lastModifiedUtc,omitempty" azure:"ro"` + LastModifiedUTC *time.Time // READ-ONLY; The severity for alerts created by this alert rule. - Severity *AlertSeverity `json:"severity,omitempty" azure:"ro"` + Severity *AlertSeverity // READ-ONLY; The tactics of the alert rule - Tactics []*AttackTactic `json:"tactics,omitempty" azure:"ro"` + Tactics []*AttackTactic // READ-ONLY; The techniques of the alert rule - Techniques []*string `json:"techniques,omitempty" azure:"ro"` + Techniques []*string } // ThreatIntelligenceAlertRuleTemplate - Represents Threat Intelligence alert rule template. type ThreatIntelligenceAlertRuleTemplate struct { // REQUIRED; The kind of the alert rule - Kind *AlertRuleKind `json:"kind,omitempty"` + Kind *AlertRuleKind // Threat Intelligence alert rule template properties - Properties *ThreatIntelligenceAlertRuleTemplateProperties `json:"properties,omitempty"` + Properties *ThreatIntelligenceAlertRuleTemplateProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetAlertRuleTemplate implements the AlertRuleTemplateClassification interface for type ThreatIntelligenceAlertRuleTemplate. func (t *ThreatIntelligenceAlertRuleTemplate) GetAlertRuleTemplate() *AlertRuleTemplate { return &AlertRuleTemplate{ - Kind: t.Kind, ID: t.ID, + Kind: t.Kind, Name: t.Name, - Type: t.Type, SystemData: t.SystemData, + Type: t.Type, } } // ThreatIntelligenceAlertRuleTemplateProperties - Threat Intelligence alert rule template properties type ThreatIntelligenceAlertRuleTemplateProperties struct { // REQUIRED; The severity for alerts created by this alert rule. - Severity *AlertSeverity `json:"severity,omitempty"` + Severity *AlertSeverity // the number of alert rules that were created by this template - AlertRulesCreatedByTemplateCount *int32 `json:"alertRulesCreatedByTemplateCount,omitempty"` + AlertRulesCreatedByTemplateCount *int32 // The description of the alert rule template. - Description *string `json:"description,omitempty"` + Description *string // The display name for alert rule template. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // The required data sources for this template - RequiredDataConnectors []*AlertRuleTemplateDataSource `json:"requiredDataConnectors,omitempty"` + RequiredDataConnectors []*AlertRuleTemplateDataSource // The alert rule template status. - Status *TemplateStatus `json:"status,omitempty"` + Status *TemplateStatus // The tactics of the alert rule - Tactics []*AttackTactic `json:"tactics,omitempty"` + Tactics []*AttackTactic // The techniques of the alert rule - Techniques []*string `json:"techniques,omitempty"` + Techniques []*string // READ-ONLY; The time that this alert rule template has been added. - CreatedDateUTC *time.Time `json:"createdDateUTC,omitempty" azure:"ro"` + CreatedDateUTC *time.Time // READ-ONLY; The last time that this alert rule template has been updated. - LastUpdatedDateUTC *time.Time `json:"lastUpdatedDateUTC,omitempty" azure:"ro"` + LastUpdatedDateUTC *time.Time } // ThreatIntelligenceAppendTags - Array of tags to be appended to the threat intelligence indicator. type ThreatIntelligenceAppendTags struct { // List of tags to be appended. - ThreatIntelligenceTags []*string `json:"threatIntelligenceTags,omitempty"` + ThreatIntelligenceTags []*string } // ThreatIntelligenceExternalReference - Describes external reference type ThreatIntelligenceExternalReference struct { // External reference description - Description *string `json:"description,omitempty"` + Description *string // External reference ID - ExternalID *string `json:"externalId,omitempty"` + ExternalID *string // External reference hashes - Hashes map[string]*string `json:"hashes,omitempty"` + Hashes map[string]*string // External reference source name - SourceName *string `json:"sourceName,omitempty"` + SourceName *string // External reference URL - URL *string `json:"url,omitempty"` + URL *string } // ThreatIntelligenceFilteringCriteria - Filtering criteria for querying threat intelligence indicators. type ThreatIntelligenceFilteringCriteria struct { // Ids of threat intelligence indicators - IDs []*string `json:"ids,omitempty"` + IDs []*string // Parameter to include/exclude disabled indicators. - IncludeDisabled *bool `json:"includeDisabled,omitempty"` + IncludeDisabled *bool // Keywords for searching threat intelligence indicators - Keywords []*string `json:"keywords,omitempty"` + Keywords []*string // Maximum confidence. - MaxConfidence *int32 `json:"maxConfidence,omitempty"` + MaxConfidence *int32 // End time for ValidUntil filter. - MaxValidUntil *string `json:"maxValidUntil,omitempty"` + MaxValidUntil *string // Minimum confidence. - MinConfidence *int32 `json:"minConfidence,omitempty"` + MinConfidence *int32 // Start time for ValidUntil filter. - MinValidUntil *string `json:"minValidUntil,omitempty"` + MinValidUntil *string // Page size - PageSize *int32 `json:"pageSize,omitempty"` + PageSize *int32 // Pattern types - PatternTypes []*string `json:"patternTypes,omitempty"` + PatternTypes []*string // Skip token. - SkipToken *string `json:"skipToken,omitempty"` + SkipToken *string // Columns to sort by and sorting order - SortBy []*ThreatIntelligenceSortingCriteria `json:"sortBy,omitempty"` + SortBy []*ThreatIntelligenceSortingCriteria // Sources of threat intelligence indicators - Sources []*string `json:"sources,omitempty"` + Sources []*string // Threat types of threat intelligence indicators - ThreatTypes []*string `json:"threatTypes,omitempty"` + ThreatTypes []*string } // ThreatIntelligenceGranularMarkingModel - Describes threat granular marking model entity type ThreatIntelligenceGranularMarkingModel struct { // Language granular marking model - Language *string `json:"language,omitempty"` + Language *string // marking reference granular marking model - MarkingRef *int32 `json:"markingRef,omitempty"` + MarkingRef *int32 // granular marking model selectors - Selectors []*string `json:"selectors,omitempty"` -} - -// ThreatIntelligenceIndicatorClientAppendTagsOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.AppendTags -// method. -type ThreatIntelligenceIndicatorClientAppendTagsOptions struct { - // placeholder for future optional parameters -} - -// ThreatIntelligenceIndicatorClientCreateIndicatorOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.CreateIndicator -// method. -type ThreatIntelligenceIndicatorClientCreateIndicatorOptions struct { - // placeholder for future optional parameters -} - -// ThreatIntelligenceIndicatorClientCreateOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.Create -// method. -type ThreatIntelligenceIndicatorClientCreateOptions struct { - // placeholder for future optional parameters -} - -// ThreatIntelligenceIndicatorClientDeleteOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.Delete -// method. -type ThreatIntelligenceIndicatorClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ThreatIntelligenceIndicatorClientGetOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.Get -// method. -type ThreatIntelligenceIndicatorClientGetOptions struct { - // placeholder for future optional parameters -} - -// ThreatIntelligenceIndicatorClientQueryIndicatorsOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.NewQueryIndicatorsPager -// method. -type ThreatIntelligenceIndicatorClientQueryIndicatorsOptions struct { - // placeholder for future optional parameters -} - -// ThreatIntelligenceIndicatorClientReplaceTagsOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.ReplaceTags -// method. -type ThreatIntelligenceIndicatorClientReplaceTagsOptions struct { - // placeholder for future optional parameters -} - -// ThreatIntelligenceIndicatorMetricsClientListOptions contains the optional parameters for the ThreatIntelligenceIndicatorMetricsClient.List -// method. -type ThreatIntelligenceIndicatorMetricsClientListOptions struct { - // placeholder for future optional parameters + Selectors []*string } // ThreatIntelligenceIndicatorModel - Threat intelligence indicator entity. type ThreatIntelligenceIndicatorModel struct { // REQUIRED; The kind of the entity. - Kind *ThreatIntelligenceResourceKindEnum `json:"kind,omitempty"` + Kind *ThreatIntelligenceResourceKindEnum // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Threat Intelligence Entity properties - Properties *ThreatIntelligenceIndicatorProperties `json:"properties,omitempty"` + Properties *ThreatIntelligenceIndicatorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetThreatIntelligenceInformation implements the ThreatIntelligenceInformationClassification interface for type ThreatIntelligenceIndicatorModel. func (t *ThreatIntelligenceIndicatorModel) GetThreatIntelligenceInformation() *ThreatIntelligenceInformation { return &ThreatIntelligenceInformation{ - Kind: t.Kind, Etag: t.Etag, ID: t.ID, + Kind: t.Kind, Name: t.Name, - Type: t.Type, SystemData: t.SystemData, + Type: t.Type, } } // ThreatIntelligenceIndicatorProperties - Describes threat intelligence entity properties type ThreatIntelligenceIndicatorProperties struct { // Confidence of threat intelligence entity - Confidence *int32 `json:"confidence,omitempty"` + Confidence *int32 // Created by - Created *string `json:"created,omitempty"` + Created *string // Created by reference of threat intelligence entity - CreatedByRef *string `json:"createdByRef,omitempty"` + CreatedByRef *string // Is threat intelligence entity defanged - Defanged *bool `json:"defanged,omitempty"` + Defanged *bool // Description of a threat intelligence entity - Description *string `json:"description,omitempty"` + Description *string // Display name of a threat intelligence entity - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Extensions map - Extensions map[string]any `json:"extensions,omitempty"` + Extensions map[string]any // External ID of threat intelligence entity - ExternalID *string `json:"externalId,omitempty"` + ExternalID *string // External last updated time in UTC - ExternalLastUpdatedTimeUTC *string `json:"externalLastUpdatedTimeUtc,omitempty"` + ExternalLastUpdatedTimeUTC *string // External References - ExternalReferences []*ThreatIntelligenceExternalReference `json:"externalReferences,omitempty"` + ExternalReferences []*ThreatIntelligenceExternalReference // Granular Markings - GranularMarkings []*ThreatIntelligenceGranularMarkingModel `json:"granularMarkings,omitempty"` + GranularMarkings []*ThreatIntelligenceGranularMarkingModel // Indicator types of threat intelligence entities - IndicatorTypes []*string `json:"indicatorTypes,omitempty"` + IndicatorTypes []*string // Kill chain phases - KillChainPhases []*ThreatIntelligenceKillChainPhase `json:"killChainPhases,omitempty"` + KillChainPhases []*ThreatIntelligenceKillChainPhase // Labels of threat intelligence entity - Labels []*string `json:"labels,omitempty"` + Labels []*string // Language of threat intelligence entity - Language *string `json:"language,omitempty"` + Language *string // Last updated time in UTC - LastUpdatedTimeUTC *string `json:"lastUpdatedTimeUtc,omitempty"` + LastUpdatedTimeUTC *string // Modified by - Modified *string `json:"modified,omitempty"` + Modified *string // Threat intelligence entity object marking references - ObjectMarkingRefs []*string `json:"objectMarkingRefs,omitempty"` + ObjectMarkingRefs []*string // Parsed patterns - ParsedPattern []*ThreatIntelligenceParsedPattern `json:"parsedPattern,omitempty"` + ParsedPattern []*ThreatIntelligenceParsedPattern // Pattern of a threat intelligence entity - Pattern *string `json:"pattern,omitempty"` + Pattern *string // Pattern type of a threat intelligence entity - PatternType *string `json:"patternType,omitempty"` + PatternType *string // Pattern version of a threat intelligence entity - PatternVersion *string `json:"patternVersion,omitempty"` + PatternVersion *string // Is threat intelligence entity revoked - Revoked *bool `json:"revoked,omitempty"` + Revoked *bool // Source of a threat intelligence entity - Source *string `json:"source,omitempty"` + Source *string // List of tags - ThreatIntelligenceTags []*string `json:"threatIntelligenceTags,omitempty"` + ThreatIntelligenceTags []*string // Threat types - ThreatTypes []*string `json:"threatTypes,omitempty"` + ThreatTypes []*string // Valid from - ValidFrom *string `json:"validFrom,omitempty"` + ValidFrom *string // Valid until - ValidUntil *string `json:"validUntil,omitempty"` + ValidUntil *string // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` -} - -// ThreatIntelligenceIndicatorsClientListOptions contains the optional parameters for the ThreatIntelligenceIndicatorsClient.NewListPager -// method. -type ThreatIntelligenceIndicatorsClientListOptions struct { - // Filters the results, based on a Boolean condition. Optional. - Filter *string - // Sorts the results. Optional. - Orderby *string - // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skiptoken parameter that - // specifies a starting point to use for subsequent calls. Optional. - SkipToken *string - // Returns only the first n results. Optional. - Top *int32 -} - -// ThreatIntelligenceInformationClassification provides polymorphic access to related types. -// Call the interface's GetThreatIntelligenceInformation() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ThreatIntelligenceIndicatorModel, *ThreatIntelligenceInformation -type ThreatIntelligenceInformationClassification interface { - // GetThreatIntelligenceInformation returns the ThreatIntelligenceInformation content of the underlying type. - GetThreatIntelligenceInformation() *ThreatIntelligenceInformation + FriendlyName *string } // ThreatIntelligenceInformation - Threat intelligence information object. type ThreatIntelligenceInformation struct { // REQUIRED; The kind of the entity. - Kind *ThreatIntelligenceResourceKindEnum `json:"kind,omitempty"` + Kind *ThreatIntelligenceResourceKindEnum // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetThreatIntelligenceInformation implements the ThreatIntelligenceInformationClassification interface for type ThreatIntelligenceInformation. @@ -8109,91 +7352,91 @@ func (t *ThreatIntelligenceInformation) GetThreatIntelligenceInformation() *Thre // ThreatIntelligenceInformationList - List of all the threat intelligence information objects. type ThreatIntelligenceInformationList struct { // REQUIRED; Array of threat intelligence information objects. - Value []ThreatIntelligenceInformationClassification `json:"value,omitempty"` + Value []ThreatIntelligenceInformationClassification // READ-ONLY; URL to fetch the next set of information objects. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // ThreatIntelligenceKillChainPhase - Describes threat kill chain phase entity type ThreatIntelligenceKillChainPhase struct { // Kill chainName name - KillChainName *string `json:"killChainName,omitempty"` + KillChainName *string // Phase name - PhaseName *string `json:"phaseName,omitempty"` + PhaseName *string } // ThreatIntelligenceMetric - Describes threat intelligence metric type ThreatIntelligenceMetric struct { // Last updated indicator metric - LastUpdatedTimeUTC *string `json:"lastUpdatedTimeUtc,omitempty"` + LastUpdatedTimeUTC *string // Pattern type metrics - PatternTypeMetrics []*ThreatIntelligenceMetricEntity `json:"patternTypeMetrics,omitempty"` + PatternTypeMetrics []*ThreatIntelligenceMetricEntity // Source metrics - SourceMetrics []*ThreatIntelligenceMetricEntity `json:"sourceMetrics,omitempty"` + SourceMetrics []*ThreatIntelligenceMetricEntity // Threat type metrics - ThreatTypeMetrics []*ThreatIntelligenceMetricEntity `json:"threatTypeMetrics,omitempty"` + ThreatTypeMetrics []*ThreatIntelligenceMetricEntity } // ThreatIntelligenceMetricEntity - Describes threat intelligence metric entity type ThreatIntelligenceMetricEntity struct { // Metric name - MetricName *string `json:"metricName,omitempty"` + MetricName *string // Metric value - MetricValue *int32 `json:"metricValue,omitempty"` + MetricValue *int32 } // ThreatIntelligenceMetrics - Threat intelligence metrics. type ThreatIntelligenceMetrics struct { // Threat intelligence metrics. - Properties *ThreatIntelligenceMetric `json:"properties,omitempty"` + Properties *ThreatIntelligenceMetric } // ThreatIntelligenceMetricsList - List of all the threat intelligence metric fields (type/threat type/source). type ThreatIntelligenceMetricsList struct { // REQUIRED; Array of threat intelligence metric fields (type/threat type/source). - Value []*ThreatIntelligenceMetrics `json:"value,omitempty"` + Value []*ThreatIntelligenceMetrics } // ThreatIntelligenceParsedPattern - Describes parsed pattern entity type ThreatIntelligenceParsedPattern struct { // Pattern type key - PatternTypeKey *string `json:"patternTypeKey,omitempty"` + PatternTypeKey *string // Pattern type keys - PatternTypeValues []*ThreatIntelligenceParsedPatternTypeValue `json:"patternTypeValues,omitempty"` + PatternTypeValues []*ThreatIntelligenceParsedPatternTypeValue } // ThreatIntelligenceParsedPatternTypeValue - Describes threat kill chain phase entity type ThreatIntelligenceParsedPatternTypeValue struct { // Value of parsed pattern - Value *string `json:"value,omitempty"` + Value *string // Type of the value - ValueType *string `json:"valueType,omitempty"` + ValueType *string } // ThreatIntelligenceSortingCriteria - List of available columns for sorting type ThreatIntelligenceSortingCriteria struct { // Column name - ItemKey *string `json:"itemKey,omitempty"` + ItemKey *string // Sorting order (ascending/descending/unsorted). - SortOrder *ThreatIntelligenceSortingCriteriaEnum `json:"sortOrder,omitempty"` + SortOrder *ThreatIntelligenceSortingCriteriaEnum } // TiTaxiiCheckRequirements - Threat Intelligence TAXII data connector check requirements type TiTaxiiCheckRequirements struct { // REQUIRED; Describes the kind of connector to be checked. - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Threat Intelligence TAXII check required properties. - Properties *TiTaxiiCheckRequirementsProperties `json:"properties,omitempty"` + Properties *TiTaxiiCheckRequirementsProperties } // GetDataConnectorsCheckRequirements implements the DataConnectorsCheckRequirementsClassification interface for type TiTaxiiCheckRequirements. @@ -8206,452 +7449,405 @@ func (t *TiTaxiiCheckRequirements) GetDataConnectorsCheckRequirements() *DataCon // TiTaxiiCheckRequirementsProperties - Threat Intelligence TAXII data connector required properties. type TiTaxiiCheckRequirementsProperties struct { // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // TiTaxiiDataConnector - Data connector to pull Threat intelligence data from TAXII 2.0/2.1 server type TiTaxiiDataConnector struct { // REQUIRED; The data connector kind - Kind *DataConnectorKind `json:"kind,omitempty"` + Kind *DataConnectorKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Threat intelligence TAXII data connector properties. - Properties *TiTaxiiDataConnectorProperties `json:"properties,omitempty"` + Properties *TiTaxiiDataConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetDataConnector implements the DataConnectorClassification interface for type TiTaxiiDataConnector. func (t *TiTaxiiDataConnector) GetDataConnector() *DataConnector { return &DataConnector{ - Kind: t.Kind, Etag: t.Etag, ID: t.ID, + Kind: t.Kind, Name: t.Name, - Type: t.Type, SystemData: t.SystemData, + Type: t.Type, } } // TiTaxiiDataConnectorDataTypes - The available data types for Threat Intelligence TAXII data connector. type TiTaxiiDataConnectorDataTypes struct { // REQUIRED; Data type for TAXII connector. - TaxiiClient *TiTaxiiDataConnectorDataTypesTaxiiClient `json:"taxiiClient,omitempty"` + TaxiiClient *TiTaxiiDataConnectorDataTypesTaxiiClient } // TiTaxiiDataConnectorDataTypesTaxiiClient - Data type for TAXII connector. type TiTaxiiDataConnectorDataTypesTaxiiClient struct { // REQUIRED; Describe whether this data type connection is enabled or not. - State *DataTypeState `json:"state,omitempty"` + State *DataTypeState } // TiTaxiiDataConnectorProperties - Threat Intelligence TAXII data connector properties. type TiTaxiiDataConnectorProperties struct { // REQUIRED; The available data types for Threat Intelligence TAXII data connector. - DataTypes *TiTaxiiDataConnectorDataTypes `json:"dataTypes,omitempty"` + DataTypes *TiTaxiiDataConnectorDataTypes // REQUIRED; The polling frequency for the TAXII server. - PollingFrequency *PollingFrequency `json:"pollingFrequency,omitempty"` + PollingFrequency *PollingFrequency // REQUIRED; The tenant id to connect to, and get the data from. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // The collection id of the TAXII server. - CollectionID *string `json:"collectionId,omitempty"` + CollectionID *string // The friendly name for the TAXII server. - FriendlyName *string `json:"friendlyName,omitempty"` + FriendlyName *string // The password for the TAXII server. - Password *string `json:"password,omitempty"` + Password *string // The lookback period for the TAXII server. - TaxiiLookbackPeriod *time.Time `json:"taxiiLookbackPeriod,omitempty"` + TaxiiLookbackPeriod *time.Time // The API root for the TAXII server. - TaxiiServer *string `json:"taxiiServer,omitempty"` + TaxiiServer *string // The userName for the TAXII server. - UserName *string `json:"userName,omitempty"` + UserName *string // The workspace id. - WorkspaceID *string `json:"workspaceId,omitempty"` + WorkspaceID *string } // TimelineAggregation - timeline aggregation information per kind type TimelineAggregation struct { // REQUIRED; the total items found for a kind - Count *int32 `json:"count,omitempty"` + Count *int32 // REQUIRED; the query kind - Kind *EntityTimelineKind `json:"kind,omitempty"` + Kind *EntityTimelineKind } // TimelineError - Timeline Query Errors. type TimelineError struct { // REQUIRED; the error message - ErrorMessage *string `json:"errorMessage,omitempty"` + ErrorMessage *string // REQUIRED; the query kind - Kind *EntityTimelineKind `json:"kind,omitempty"` + Kind *EntityTimelineKind // the query id - QueryID *string `json:"queryId,omitempty"` + QueryID *string } // TimelineResultsMetadata - Expansion result metadata. type TimelineResultsMetadata struct { // REQUIRED; timeline aggregation per kind - Aggregations []*TimelineAggregation `json:"aggregations,omitempty"` + Aggregations []*TimelineAggregation // REQUIRED; the total items found for the timeline request - TotalCount *int32 `json:"totalCount,omitempty"` + TotalCount *int32 // information about the failure queries - Errors []*TimelineError `json:"errors,omitempty"` + Errors []*TimelineError } // URLEntity - Represents a url entity. type URLEntity struct { // REQUIRED; The kind of the entity. - Kind *EntityKind `json:"kind,omitempty"` + Kind *EntityKind // Url entity properties - Properties *URLEntityProperties `json:"properties,omitempty"` + Properties *URLEntityProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEntity implements the EntityClassification interface for type URLEntity. func (u *URLEntity) GetEntity() *Entity { return &Entity{ - Kind: u.Kind, ID: u.ID, + Kind: u.Kind, Name: u.Name, - Type: u.Type, SystemData: u.SystemData, + Type: u.Type, } } // URLEntityProperties - Url entity property bag. type URLEntityProperties struct { // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. - AdditionalData map[string]any `json:"additionalData,omitempty" azure:"ro"` + AdditionalData map[string]any // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property // is optional and might be system generated. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + FriendlyName *string // READ-ONLY; A full URL the entity points to - URL *string `json:"url,omitempty" azure:"ro"` + URL *string } // Ueba - Settings with single toggle. type Ueba struct { // REQUIRED; The kind of the setting - Kind *SettingKind `json:"kind,omitempty"` + Kind *SettingKind // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Ueba properties - Properties *UebaProperties `json:"properties,omitempty"` + Properties *UebaProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetSettings implements the SettingsClassification interface for type Ueba. func (u *Ueba) GetSettings() *Settings { return &Settings{ - Kind: u.Kind, Etag: u.Etag, ID: u.ID, + Kind: u.Kind, Name: u.Name, - Type: u.Type, SystemData: u.SystemData, + Type: u.Type, } } // UebaProperties - Ueba property bag. type UebaProperties struct { // The relevant data sources that enriched by ueba - DataSources []*UebaDataSources `json:"dataSources,omitempty"` + DataSources []*UebaDataSources } // UserInfo - User information that made some action type UserInfo struct { // The object id of the user. - ObjectID *string `json:"objectId,omitempty"` + ObjectID *string // READ-ONLY; The email of the user. - Email *string `json:"email,omitempty" azure:"ro"` + Email *string // READ-ONLY; The name of the user. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string } // ValidationError - Describes an error encountered in the file during validation. type ValidationError struct { // The number of the record that has the error. - RecordIndex *int32 `json:"recordIndex,omitempty"` + RecordIndex *int32 // READ-ONLY; A list of descriptions of the error. - ErrorMessages []*string `json:"errorMessages,omitempty" azure:"ro"` + ErrorMessages []*string } // Watchlist - Represents a Watchlist in Azure Security Insights. type Watchlist struct { // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Watchlist properties - Properties *WatchlistProperties `json:"properties,omitempty"` + Properties *WatchlistProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // WatchlistItem - Represents a Watchlist item in Azure Security Insights. type WatchlistItem struct { // Etag of the azure resource - Etag *string `json:"etag,omitempty"` + Etag *string // Watchlist Item properties - Properties *WatchlistItemProperties `json:"properties,omitempty"` + Properties *WatchlistItemProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // WatchlistItemList - List all the watchlist items. type WatchlistItemList struct { // REQUIRED; Array of watchlist items. - Value []*WatchlistItem `json:"value,omitempty"` + Value []*WatchlistItem // READ-ONLY; URL to fetch the next set of watchlist item. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // WatchlistItemProperties - Describes watchlist item properties type WatchlistItemProperties struct { // REQUIRED; key-value pairs for a watchlist item - ItemsKeyValue map[string]any `json:"itemsKeyValue,omitempty"` + ItemsKeyValue map[string]any // The time the watchlist item was created - Created *time.Time `json:"created,omitempty"` + Created *time.Time // Describes a user that created the watchlist item - CreatedBy *UserInfo `json:"createdBy,omitempty"` + CreatedBy *UserInfo // key-value pairs for a watchlist item entity mapping - EntityMapping map[string]any `json:"entityMapping,omitempty"` + EntityMapping map[string]any // A flag that indicates if the watchlist item is deleted or not - IsDeleted *bool `json:"isDeleted,omitempty"` + IsDeleted *bool // The tenantId to which the watchlist item belongs to - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // The last time the watchlist item was updated - Updated *time.Time `json:"updated,omitempty"` + Updated *time.Time // Describes a user that updated the watchlist item - UpdatedBy *UserInfo `json:"updatedBy,omitempty"` + UpdatedBy *UserInfo // The id (a Guid) of the watchlist item - WatchlistItemID *string `json:"watchlistItemId,omitempty"` + WatchlistItemID *string // The type of the watchlist item - WatchlistItemType *string `json:"watchlistItemType,omitempty"` -} - -// WatchlistItemsClientCreateOrUpdateOptions contains the optional parameters for the WatchlistItemsClient.CreateOrUpdate -// method. -type WatchlistItemsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WatchlistItemsClientDeleteOptions contains the optional parameters for the WatchlistItemsClient.Delete method. -type WatchlistItemsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// WatchlistItemsClientGetOptions contains the optional parameters for the WatchlistItemsClient.Get method. -type WatchlistItemsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WatchlistItemsClientListOptions contains the optional parameters for the WatchlistItemsClient.NewListPager method. -type WatchlistItemsClientListOptions struct { - // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skiptoken parameter that - // specifies a starting point to use for subsequent calls. Optional. - SkipToken *string + WatchlistItemType *string } // WatchlistList - List all the watchlists. type WatchlistList struct { // REQUIRED; Array of watchlist. - Value []*Watchlist `json:"value,omitempty"` + Value []*Watchlist // READ-ONLY; URL to fetch the next set of watchlists. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // WatchlistProperties - Describes watchlist properties type WatchlistProperties struct { // REQUIRED; The display name of the watchlist - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // REQUIRED; The search key is used to optimize query performance when using watchlists for joins with other data. For example, // enable a column with IP addresses to be the designated SearchKey field, then use this // field as the key field when joining to other event data by IP address. - ItemsSearchKey *string `json:"itemsSearchKey,omitempty"` + ItemsSearchKey *string // REQUIRED; The provider of the watchlist - Provider *string `json:"provider,omitempty"` + Provider *string // The content type of the raw content. Example : text/csv or text/tsv - ContentType *string `json:"contentType,omitempty"` + ContentType *string // The time the watchlist was created - Created *time.Time `json:"created,omitempty"` + Created *time.Time // Describes a user that created the watchlist - CreatedBy *UserInfo `json:"createdBy,omitempty"` + CreatedBy *UserInfo // The default duration of a watchlist (in ISO 8601 duration format) - DefaultDuration *string `json:"defaultDuration,omitempty"` + DefaultDuration *string // A description of the watchlist - Description *string `json:"description,omitempty"` + Description *string // A flag that indicates if the watchlist is deleted or not - IsDeleted *bool `json:"isDeleted,omitempty"` + IsDeleted *bool // List of labels relevant to this watchlist - Labels []*string `json:"labels,omitempty"` + Labels []*string // The number of lines in a csv/tsv content to skip before the header - NumberOfLinesToSkip *int32 `json:"numberOfLinesToSkip,omitempty"` + NumberOfLinesToSkip *int32 // The raw content that represents to watchlist items to create. In case of csv/tsv content type, it's the content of the // file that will parsed by the endpoint - RawContent *string `json:"rawContent,omitempty"` + RawContent *string // The filename of the watchlist, called 'source' - Source *string `json:"source,omitempty"` + Source *string // The sourceType of the watchlist - SourceType *SourceType `json:"sourceType,omitempty"` + SourceType *SourceType // The tenantId where the watchlist belongs to - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // The last time the watchlist was updated - Updated *time.Time `json:"updated,omitempty"` + Updated *time.Time // Describes a user that updated the watchlist - UpdatedBy *UserInfo `json:"updatedBy,omitempty"` + UpdatedBy *UserInfo // The status of the Watchlist upload : New, InProgress or Complete. Pls note : When a Watchlist upload status is equal to // InProgress, the Watchlist cannot be deleted - UploadStatus *string `json:"uploadStatus,omitempty"` + UploadStatus *string // The alias of the watchlist - WatchlistAlias *string `json:"watchlistAlias,omitempty"` + WatchlistAlias *string // The id (a Guid) of the watchlist - WatchlistID *string `json:"watchlistId,omitempty"` + WatchlistID *string // The type of the watchlist - WatchlistType *string `json:"watchlistType,omitempty"` -} - -// WatchlistsClientCreateOrUpdateOptions contains the optional parameters for the WatchlistsClient.CreateOrUpdate method. -type WatchlistsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WatchlistsClientDeleteOptions contains the optional parameters for the WatchlistsClient.Delete method. -type WatchlistsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// WatchlistsClientGetOptions contains the optional parameters for the WatchlistsClient.Get method. -type WatchlistsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WatchlistsClientListOptions contains the optional parameters for the WatchlistsClient.NewListPager method. -type WatchlistsClientListOptions struct { - // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skiptoken parameter that - // specifies a starting point to use for subsequent calls. Optional. - SkipToken *string + WatchlistType *string } // Webhook - Detail about the webhook object. type Webhook struct { // A flag to instruct the backend service to rotate webhook secret. - RotateWebhookSecret *bool `json:"rotateWebhookSecret,omitempty"` + RotateWebhookSecret *bool // Unique identifier for the webhook. - WebhookID *string `json:"webhookId,omitempty"` + WebhookID *string // Time when the webhook secret was updated. - WebhookSecretUpdateTime *string `json:"webhookSecretUpdateTime,omitempty"` + WebhookSecretUpdateTime *string // URL that gets invoked by the webhook. - WebhookURL *string `json:"webhookUrl,omitempty"` + WebhookURL *string } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/models_serde.go index 10d640b6..26b85981 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -835,12 +834,12 @@ func (a *ActivityCustomEntityQuery) UnmarshalJSON(data []byte) error { func (a ActivityEntityQueriesProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "content", a.Content) - populateTimeRFC3339(objectMap, "createdTimeUtc", a.CreatedTimeUTC) + populateDateTimeRFC3339(objectMap, "createdTimeUtc", a.CreatedTimeUTC) populate(objectMap, "description", a.Description) populate(objectMap, "enabled", a.Enabled) populate(objectMap, "entitiesFilter", a.EntitiesFilter) populate(objectMap, "inputEntityType", a.InputEntityType) - populateTimeRFC3339(objectMap, "lastModifiedTimeUtc", a.LastModifiedTimeUTC) + populateDateTimeRFC3339(objectMap, "lastModifiedTimeUtc", a.LastModifiedTimeUTC) populate(objectMap, "queryDefinitions", a.QueryDefinitions) populate(objectMap, "requiredInputFieldsSets", a.RequiredInputFieldsSets) populate(objectMap, "templateName", a.TemplateName) @@ -861,7 +860,7 @@ func (a *ActivityEntityQueriesProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Content", &a.Content) delete(rawMsg, key) case "createdTimeUtc": - err = unpopulateTimeRFC3339(val, "CreatedTimeUTC", &a.CreatedTimeUTC) + err = unpopulateDateTimeRFC3339(val, "CreatedTimeUTC", &a.CreatedTimeUTC) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &a.Description) @@ -876,7 +875,7 @@ func (a *ActivityEntityQueriesProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "InputEntityType", &a.InputEntityType) delete(rawMsg, key) case "lastModifiedTimeUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedTimeUTC", &a.LastModifiedTimeUTC) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTimeUTC", &a.LastModifiedTimeUTC) delete(rawMsg, key) case "queryDefinitions": err = unpopulate(val, "QueryDefinitions", &a.QueryDefinitions) @@ -1112,12 +1111,12 @@ func (a *ActivityEntityQueryTemplatePropertiesQueryDefinitions) UnmarshalJSON(da // MarshalJSON implements the json.Marshaller interface for type ActivityTimelineItem. func (a ActivityTimelineItem) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "bucketEndTimeUTC", a.BucketEndTimeUTC) - populateTimeRFC3339(objectMap, "bucketStartTimeUTC", a.BucketStartTimeUTC) + populateDateTimeRFC3339(objectMap, "bucketEndTimeUTC", a.BucketEndTimeUTC) + populateDateTimeRFC3339(objectMap, "bucketStartTimeUTC", a.BucketStartTimeUTC) populate(objectMap, "content", a.Content) - populateTimeRFC3339(objectMap, "firstActivityTimeUTC", a.FirstActivityTimeUTC) + populateDateTimeRFC3339(objectMap, "firstActivityTimeUTC", a.FirstActivityTimeUTC) objectMap["kind"] = EntityTimelineKindActivity - populateTimeRFC3339(objectMap, "lastActivityTimeUTC", a.LastActivityTimeUTC) + populateDateTimeRFC3339(objectMap, "lastActivityTimeUTC", a.LastActivityTimeUTC) populate(objectMap, "queryId", a.QueryID) populate(objectMap, "title", a.Title) return json.Marshal(objectMap) @@ -1133,22 +1132,22 @@ func (a *ActivityTimelineItem) UnmarshalJSON(data []byte) error { var err error switch key { case "bucketEndTimeUTC": - err = unpopulateTimeRFC3339(val, "BucketEndTimeUTC", &a.BucketEndTimeUTC) + err = unpopulateDateTimeRFC3339(val, "BucketEndTimeUTC", &a.BucketEndTimeUTC) delete(rawMsg, key) case "bucketStartTimeUTC": - err = unpopulateTimeRFC3339(val, "BucketStartTimeUTC", &a.BucketStartTimeUTC) + err = unpopulateDateTimeRFC3339(val, "BucketStartTimeUTC", &a.BucketStartTimeUTC) delete(rawMsg, key) case "content": err = unpopulate(val, "Content", &a.Content) delete(rawMsg, key) case "firstActivityTimeUTC": - err = unpopulateTimeRFC3339(val, "FirstActivityTimeUTC", &a.FirstActivityTimeUTC) + err = unpopulateDateTimeRFC3339(val, "FirstActivityTimeUTC", &a.FirstActivityTimeUTC) delete(rawMsg, key) case "kind": err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "lastActivityTimeUTC": - err = unpopulateTimeRFC3339(val, "LastActivityTimeUTC", &a.LastActivityTimeUTC) + err = unpopulateDateTimeRFC3339(val, "LastActivityTimeUTC", &a.LastActivityTimeUTC) delete(rawMsg, key) case "queryId": err = unpopulate(val, "QueryID", &a.QueryID) @@ -1547,13 +1546,13 @@ func (a AnomalySecurityMLAnalyticsSettingsProperties) MarshalJSON() ([]byte, err objectMap := make(map[string]any) populate(objectMap, "anomalySettingsVersion", a.AnomalySettingsVersion) populate(objectMap, "anomalyVersion", a.AnomalyVersion) - populate(objectMap, "customizableObservations", &a.CustomizableObservations) + populateAny(objectMap, "customizableObservations", a.CustomizableObservations) populate(objectMap, "description", a.Description) populate(objectMap, "displayName", a.DisplayName) populate(objectMap, "enabled", a.Enabled) populate(objectMap, "frequency", a.Frequency) populate(objectMap, "isDefaultSettings", a.IsDefaultSettings) - populateTimeRFC3339(objectMap, "lastModifiedUtc", a.LastModifiedUTC) + populateDateTimeRFC3339(objectMap, "lastModifiedUtc", a.LastModifiedUTC) populate(objectMap, "requiredDataConnectors", a.RequiredDataConnectors) populate(objectMap, "settingsDefinitionId", a.SettingsDefinitionID) populate(objectMap, "settingsStatus", a.SettingsStatus) @@ -1596,7 +1595,7 @@ func (a *AnomalySecurityMLAnalyticsSettingsProperties) UnmarshalJSON(data []byte err = unpopulate(val, "IsDefaultSettings", &a.IsDefaultSettings) delete(rawMsg, key) case "lastModifiedUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedUTC", &a.LastModifiedUTC) + err = unpopulateDateTimeRFC3339(val, "LastModifiedUTC", &a.LastModifiedUTC) delete(rawMsg, key) case "requiredDataConnectors": err = unpopulate(val, "RequiredDataConnectors", &a.RequiredDataConnectors) @@ -1627,14 +1626,14 @@ func (a AnomalyTimelineItem) MarshalJSON() ([]byte, error) { populate(objectMap, "azureResourceId", a.AzureResourceID) populate(objectMap, "description", a.Description) populate(objectMap, "displayName", a.DisplayName) - populateTimeRFC3339(objectMap, "endTimeUtc", a.EndTimeUTC) + populateDateTimeRFC3339(objectMap, "endTimeUtc", a.EndTimeUTC) populate(objectMap, "intent", a.Intent) objectMap["kind"] = EntityTimelineKindAnomaly populate(objectMap, "productName", a.ProductName) populate(objectMap, "reasons", a.Reasons) - populateTimeRFC3339(objectMap, "startTimeUtc", a.StartTimeUTC) + populateDateTimeRFC3339(objectMap, "startTimeUtc", a.StartTimeUTC) populate(objectMap, "techniques", a.Techniques) - populateTimeRFC3339(objectMap, "timeGenerated", a.TimeGenerated) + populateDateTimeRFC3339(objectMap, "timeGenerated", a.TimeGenerated) populate(objectMap, "vendor", a.Vendor) return json.Marshal(objectMap) } @@ -1658,7 +1657,7 @@ func (a *AnomalyTimelineItem) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DisplayName", &a.DisplayName) delete(rawMsg, key) case "endTimeUtc": - err = unpopulateTimeRFC3339(val, "EndTimeUTC", &a.EndTimeUTC) + err = unpopulateDateTimeRFC3339(val, "EndTimeUTC", &a.EndTimeUTC) delete(rawMsg, key) case "intent": err = unpopulate(val, "Intent", &a.Intent) @@ -1673,13 +1672,13 @@ func (a *AnomalyTimelineItem) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Reasons", &a.Reasons) delete(rawMsg, key) case "startTimeUtc": - err = unpopulateTimeRFC3339(val, "StartTimeUTC", &a.StartTimeUTC) + err = unpopulateDateTimeRFC3339(val, "StartTimeUTC", &a.StartTimeUTC) delete(rawMsg, key) case "techniques": err = unpopulate(val, "Techniques", &a.Techniques) delete(rawMsg, key) case "timeGenerated": - err = unpopulateTimeRFC3339(val, "TimeGenerated", &a.TimeGenerated) + err = unpopulateDateTimeRFC3339(val, "TimeGenerated", &a.TimeGenerated) delete(rawMsg, key) case "vendor": err = unpopulate(val, "Vendor", &a.Vendor) @@ -1868,10 +1867,10 @@ func (a AutomationRuleProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "actions", a.Actions) populate(objectMap, "createdBy", a.CreatedBy) - populateTimeRFC3339(objectMap, "createdTimeUtc", a.CreatedTimeUTC) + populateDateTimeRFC3339(objectMap, "createdTimeUtc", a.CreatedTimeUTC) populate(objectMap, "displayName", a.DisplayName) populate(objectMap, "lastModifiedBy", a.LastModifiedBy) - populateTimeRFC3339(objectMap, "lastModifiedTimeUtc", a.LastModifiedTimeUTC) + populateDateTimeRFC3339(objectMap, "lastModifiedTimeUtc", a.LastModifiedTimeUTC) populate(objectMap, "order", a.Order) populate(objectMap, "triggeringLogic", a.TriggeringLogic) return json.Marshal(objectMap) @@ -1893,7 +1892,7 @@ func (a *AutomationRuleProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedBy", &a.CreatedBy) delete(rawMsg, key) case "createdTimeUtc": - err = unpopulateTimeRFC3339(val, "CreatedTimeUTC", &a.CreatedTimeUTC) + err = unpopulateDateTimeRFC3339(val, "CreatedTimeUTC", &a.CreatedTimeUTC) delete(rawMsg, key) case "displayName": err = unpopulate(val, "DisplayName", &a.DisplayName) @@ -1902,7 +1901,7 @@ func (a *AutomationRuleProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "LastModifiedBy", &a.LastModifiedBy) delete(rawMsg, key) case "lastModifiedTimeUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedTimeUTC", &a.LastModifiedTimeUTC) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTimeUTC", &a.LastModifiedTimeUTC) delete(rawMsg, key) case "order": err = unpopulate(val, "Order", &a.Order) @@ -2097,7 +2096,7 @@ func (a *AutomationRuleRunPlaybookAction) UnmarshalJSON(data []byte) error { func (a AutomationRuleTriggeringLogic) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "conditions", a.Conditions) - populateTimeRFC3339(objectMap, "expirationTimeUtc", a.ExpirationTimeUTC) + populateDateTimeRFC3339(objectMap, "expirationTimeUtc", a.ExpirationTimeUTC) populate(objectMap, "isEnabled", a.IsEnabled) populate(objectMap, "triggersOn", a.TriggersOn) populate(objectMap, "triggersWhen", a.TriggersWhen) @@ -2117,7 +2116,7 @@ func (a *AutomationRuleTriggeringLogic) UnmarshalJSON(data []byte) error { a.Conditions, err = unmarshalAutomationRuleConditionClassificationArray(val) delete(rawMsg, key) case "expirationTimeUtc": - err = unpopulateTimeRFC3339(val, "ExpirationTimeUTC", &a.ExpirationTimeUTC) + err = unpopulateDateTimeRFC3339(val, "ExpirationTimeUTC", &a.ExpirationTimeUTC) delete(rawMsg, key) case "isEnabled": err = unpopulate(val, "IsEnabled", &a.IsEnabled) @@ -2171,7 +2170,7 @@ func (a *AutomationRulesList) UnmarshalJSON(data []byte) error { func (a Availability) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "isPreview", a.IsPreview) - objectMap["status"] = 1 + objectMap["status"] = int32(1) return json.Marshal(objectMap) } @@ -2730,9 +2729,9 @@ func (b *BookmarkEntityMappings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BookmarkExpandParameters. func (b BookmarkExpandParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", b.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", b.EndTime) populate(objectMap, "expansionId", b.ExpansionID) - populateTimeRFC3339(objectMap, "startTime", b.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", b.StartTime) return json.Marshal(objectMap) } @@ -2746,13 +2745,13 @@ func (b *BookmarkExpandParameters) UnmarshalJSON(data []byte) error { var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &b.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &b.EndTime) delete(rawMsg, key) case "expansionId": err = unpopulate(val, "ExpansionID", &b.ExpansionID) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &b.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &b.StartTime) delete(rawMsg, key) } if err != nil { @@ -2858,21 +2857,21 @@ func (b *BookmarkList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BookmarkProperties. func (b BookmarkProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "created", b.Created) + populateDateTimeRFC3339(objectMap, "created", b.Created) populate(objectMap, "createdBy", b.CreatedBy) populate(objectMap, "displayName", b.DisplayName) populate(objectMap, "entityMappings", b.EntityMappings) - populateTimeRFC3339(objectMap, "eventTime", b.EventTime) + populateDateTimeRFC3339(objectMap, "eventTime", b.EventTime) populate(objectMap, "incidentInfo", b.IncidentInfo) populate(objectMap, "labels", b.Labels) populate(objectMap, "notes", b.Notes) populate(objectMap, "query", b.Query) - populateTimeRFC3339(objectMap, "queryEndTime", b.QueryEndTime) + populateDateTimeRFC3339(objectMap, "queryEndTime", b.QueryEndTime) populate(objectMap, "queryResult", b.QueryResult) - populateTimeRFC3339(objectMap, "queryStartTime", b.QueryStartTime) + populateDateTimeRFC3339(objectMap, "queryStartTime", b.QueryStartTime) populate(objectMap, "tactics", b.Tactics) populate(objectMap, "techniques", b.Techniques) - populateTimeRFC3339(objectMap, "updated", b.Updated) + populateDateTimeRFC3339(objectMap, "updated", b.Updated) populate(objectMap, "updatedBy", b.UpdatedBy) return json.Marshal(objectMap) } @@ -2887,7 +2886,7 @@ func (b *BookmarkProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "created": - err = unpopulateTimeRFC3339(val, "Created", &b.Created) + err = unpopulateDateTimeRFC3339(val, "Created", &b.Created) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &b.CreatedBy) @@ -2899,7 +2898,7 @@ func (b *BookmarkProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "EntityMappings", &b.EntityMappings) delete(rawMsg, key) case "eventTime": - err = unpopulateTimeRFC3339(val, "EventTime", &b.EventTime) + err = unpopulateDateTimeRFC3339(val, "EventTime", &b.EventTime) delete(rawMsg, key) case "incidentInfo": err = unpopulate(val, "IncidentInfo", &b.IncidentInfo) @@ -2914,13 +2913,13 @@ func (b *BookmarkProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Query", &b.Query) delete(rawMsg, key) case "queryEndTime": - err = unpopulateTimeRFC3339(val, "QueryEndTime", &b.QueryEndTime) + err = unpopulateDateTimeRFC3339(val, "QueryEndTime", &b.QueryEndTime) delete(rawMsg, key) case "queryResult": err = unpopulate(val, "QueryResult", &b.QueryResult) delete(rawMsg, key) case "queryStartTime": - err = unpopulateTimeRFC3339(val, "QueryStartTime", &b.QueryStartTime) + err = unpopulateDateTimeRFC3339(val, "QueryStartTime", &b.QueryStartTime) delete(rawMsg, key) case "tactics": err = unpopulate(val, "Tactics", &b.Tactics) @@ -2929,7 +2928,7 @@ func (b *BookmarkProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Techniques", &b.Techniques) delete(rawMsg, key) case "updated": - err = unpopulateTimeRFC3339(val, "Updated", &b.Updated) + err = unpopulateDateTimeRFC3339(val, "Updated", &b.Updated) delete(rawMsg, key) case "updatedBy": err = unpopulate(val, "UpdatedBy", &b.UpdatedBy) @@ -2948,12 +2947,12 @@ func (b BookmarkTimelineItem) MarshalJSON() ([]byte, error) { populate(objectMap, "azureResourceId", b.AzureResourceID) populate(objectMap, "createdBy", b.CreatedBy) populate(objectMap, "displayName", b.DisplayName) - populateTimeRFC3339(objectMap, "endTimeUtc", b.EndTimeUTC) - populateTimeRFC3339(objectMap, "eventTime", b.EventTime) + populateDateTimeRFC3339(objectMap, "endTimeUtc", b.EndTimeUTC) + populateDateTimeRFC3339(objectMap, "eventTime", b.EventTime) objectMap["kind"] = EntityTimelineKindBookmark populate(objectMap, "labels", b.Labels) populate(objectMap, "notes", b.Notes) - populateTimeRFC3339(objectMap, "startTimeUtc", b.StartTimeUTC) + populateDateTimeRFC3339(objectMap, "startTimeUtc", b.StartTimeUTC) return json.Marshal(objectMap) } @@ -2976,10 +2975,10 @@ func (b *BookmarkTimelineItem) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DisplayName", &b.DisplayName) delete(rawMsg, key) case "endTimeUtc": - err = unpopulateTimeRFC3339(val, "EndTimeUTC", &b.EndTimeUTC) + err = unpopulateDateTimeRFC3339(val, "EndTimeUTC", &b.EndTimeUTC) delete(rawMsg, key) case "eventTime": - err = unpopulateTimeRFC3339(val, "EventTime", &b.EventTime) + err = unpopulateDateTimeRFC3339(val, "EventTime", &b.EventTime) delete(rawMsg, key) case "kind": err = unpopulate(val, "Kind", &b.Kind) @@ -2991,7 +2990,7 @@ func (b *BookmarkTimelineItem) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Notes", &b.Notes) delete(rawMsg, key) case "startTimeUtc": - err = unpopulateTimeRFC3339(val, "StartTimeUTC", &b.StartTimeUTC) + err = unpopulateDateTimeRFC3339(val, "StartTimeUTC", &b.StartTimeUTC) delete(rawMsg, key) } if err != nil { @@ -3219,15 +3218,15 @@ func (c CodelessConnectorPollingAuthProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "apiKeyName", c.APIKeyName) populate(objectMap, "authType", c.AuthType) populate(objectMap, "authorizationEndpoint", c.AuthorizationEndpoint) - populate(objectMap, "authorizationEndpointQueryParameters", &c.AuthorizationEndpointQueryParameters) + populateAny(objectMap, "authorizationEndpointQueryParameters", c.AuthorizationEndpointQueryParameters) populate(objectMap, "flowName", c.FlowName) populate(objectMap, "isApiKeyInPostPayload", c.IsAPIKeyInPostPayload) populate(objectMap, "isClientSecretInHeader", c.IsClientSecretInHeader) populate(objectMap, "redirectionEndpoint", c.RedirectionEndpoint) populate(objectMap, "scope", c.Scope) populate(objectMap, "tokenEndpoint", c.TokenEndpoint) - populate(objectMap, "tokenEndpointHeaders", &c.TokenEndpointHeaders) - populate(objectMap, "tokenEndpointQueryParameters", &c.TokenEndpointQueryParameters) + populateAny(objectMap, "tokenEndpointHeaders", c.TokenEndpointHeaders) + populateAny(objectMap, "tokenEndpointQueryParameters", c.TokenEndpointQueryParameters) return json.Marshal(objectMap) } @@ -3395,8 +3394,8 @@ func (c CodelessConnectorPollingRequestProperties) MarshalJSON() ([]byte, error) populate(objectMap, "apiEndpoint", c.APIEndpoint) populate(objectMap, "endTimeAttributeName", c.EndTimeAttributeName) populate(objectMap, "httpMethod", c.HTTPMethod) - populate(objectMap, "headers", &c.Headers) - populate(objectMap, "queryParameters", &c.QueryParameters) + populateAny(objectMap, "headers", c.Headers) + populateAny(objectMap, "queryParameters", c.QueryParameters) populate(objectMap, "queryParametersTemplate", c.QueryParametersTemplate) populate(objectMap, "queryTimeFormat", c.QueryTimeFormat) populate(objectMap, "queryWindowInMin", c.QueryWindowInMin) @@ -3814,7 +3813,7 @@ func (c *CodelessUIDataConnector) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectedEntity. func (c ConnectedEntity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "additionalData", &c.AdditionalData) + populateAny(objectMap, "additionalData", c.AdditionalData) populate(objectMap, "targetEntityId", c.TargetEntityID) return json.Marshal(objectMap) } @@ -4278,7 +4277,7 @@ func (d Deployment) MarshalJSON() ([]byte, error) { populate(objectMap, "deploymentLogsUrl", d.DeploymentLogsURL) populate(objectMap, "deploymentResult", d.DeploymentResult) populate(objectMap, "deploymentState", d.DeploymentState) - populateTimeRFC3339(objectMap, "deploymentTime", d.DeploymentTime) + populateDateTimeRFC3339(objectMap, "deploymentTime", d.DeploymentTime) return json.Marshal(objectMap) } @@ -4304,7 +4303,7 @@ func (d *Deployment) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DeploymentState", &d.DeploymentState) delete(rawMsg, key) case "deploymentTime": - err = unpopulateTimeRFC3339(val, "DeploymentTime", &d.DeploymentTime) + err = unpopulateDateTimeRFC3339(val, "DeploymentTime", &d.DeploymentTime) delete(rawMsg, key) } if err != nil { @@ -4546,12 +4545,12 @@ func (d *Dynamics365DataConnectorProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EnrichmentDomainWhois. func (e EnrichmentDomainWhois) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "created", e.Created) + populateDateTimeRFC3339(objectMap, "created", e.Created) populate(objectMap, "domain", e.Domain) - populateTimeRFC3339(objectMap, "expires", e.Expires) + populateDateTimeRFC3339(objectMap, "expires", e.Expires) populate(objectMap, "parsedWhois", e.ParsedWhois) populate(objectMap, "server", e.Server) - populateTimeRFC3339(objectMap, "updated", e.Updated) + populateDateTimeRFC3339(objectMap, "updated", e.Updated) return json.Marshal(objectMap) } @@ -4565,13 +4564,13 @@ func (e *EnrichmentDomainWhois) UnmarshalJSON(data []byte) error { var err error switch key { case "created": - err = unpopulateTimeRFC3339(val, "Created", &e.Created) + err = unpopulateDateTimeRFC3339(val, "Created", &e.Created) delete(rawMsg, key) case "domain": err = unpopulate(val, "Domain", &e.Domain) delete(rawMsg, key) case "expires": - err = unpopulateTimeRFC3339(val, "Expires", &e.Expires) + err = unpopulateDateTimeRFC3339(val, "Expires", &e.Expires) delete(rawMsg, key) case "parsedWhois": err = unpopulate(val, "ParsedWhois", &e.ParsedWhois) @@ -4580,7 +4579,7 @@ func (e *EnrichmentDomainWhois) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Server", &e.Server) delete(rawMsg, key) case "updated": - err = unpopulateTimeRFC3339(val, "Updated", &e.Updated) + err = unpopulateDateTimeRFC3339(val, "Updated", &e.Updated) delete(rawMsg, key) } if err != nil { @@ -5024,9 +5023,9 @@ func (e *EntityEdges) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EntityExpandParameters. func (e EntityExpandParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", e.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", e.EndTime) populate(objectMap, "expansionId", e.ExpansionID) - populateTimeRFC3339(objectMap, "startTime", e.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", e.StartTime) return json.Marshal(objectMap) } @@ -5040,13 +5039,13 @@ func (e *EntityExpandParameters) UnmarshalJSON(data []byte) error { var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &e.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &e.EndTime) delete(rawMsg, key) case "expansionId": err = unpopulate(val, "ExpansionID", &e.ExpansionID) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &e.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &e.StartTime) delete(rawMsg, key) } if err != nil { @@ -5153,9 +5152,9 @@ func (e *EntityFieldMapping) UnmarshalJSON(data []byte) error { func (e EntityGetInsightsParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "addDefaultExtendedTimeRange", e.AddDefaultExtendedTimeRange) - populateTimeRFC3339(objectMap, "endTime", e.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", e.EndTime) populate(objectMap, "insightQueryIds", e.InsightQueryIDs) - populateTimeRFC3339(objectMap, "startTime", e.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", e.StartTime) return json.Marshal(objectMap) } @@ -5172,13 +5171,13 @@ func (e *EntityGetInsightsParameters) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AddDefaultExtendedTimeRange", &e.AddDefaultExtendedTimeRange) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &e.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &e.EndTime) delete(rawMsg, key) case "insightQueryIds": err = unpopulate(val, "InsightQueryIDs", &e.InsightQueryIDs) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &e.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &e.StartTime) delete(rawMsg, key) } if err != nil { @@ -5261,8 +5260,8 @@ func (e *EntityInsightItem) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EntityInsightItemQueryTimeInterval. func (e EntityInsightItemQueryTimeInterval) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", e.EndTime) - populateTimeRFC3339(objectMap, "startTime", e.StartTime) + populateDateTimeRFC3339(objectMap, "endTime", e.EndTime) + populateDateTimeRFC3339(objectMap, "startTime", e.StartTime) return json.Marshal(objectMap) } @@ -5276,10 +5275,10 @@ func (e *EntityInsightItemQueryTimeInterval) UnmarshalJSON(data []byte) error { var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &e.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &e.EndTime) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &e.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &e.StartTime) delete(rawMsg, key) } if err != nil { @@ -5599,10 +5598,10 @@ func (e *EntityTimelineItem) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EntityTimelineParameters. func (e EntityTimelineParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", e.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", e.EndTime) populate(objectMap, "kinds", e.Kinds) populate(objectMap, "numberOfBucket", e.NumberOfBucket) - populateTimeRFC3339(objectMap, "startTime", e.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", e.StartTime) return json.Marshal(objectMap) } @@ -5616,7 +5615,7 @@ func (e *EntityTimelineParameters) UnmarshalJSON(data []byte) error { var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &e.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &e.EndTime) delete(rawMsg, key) case "kinds": err = unpopulate(val, "Kinds", &e.Kinds) @@ -5625,7 +5624,7 @@ func (e *EntityTimelineParameters) UnmarshalJSON(data []byte) error { err = unpopulate(val, "NumberOfBucket", &e.NumberOfBucket) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &e.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &e.StartTime) delete(rawMsg, key) } if err != nil { @@ -6224,12 +6223,12 @@ func (f *FileImportList) UnmarshalJSON(data []byte) error { func (f FileImportProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "contentType", f.ContentType) - populateTimeRFC3339(objectMap, "createdTimeUTC", f.CreatedTimeUTC) + populateDateTimeRFC3339(objectMap, "createdTimeUTC", f.CreatedTimeUTC) populate(objectMap, "errorFile", f.ErrorFile) populate(objectMap, "errorsPreview", f.ErrorsPreview) - populateTimeRFC3339(objectMap, "filesValidUntilTimeUTC", f.FilesValidUntilTimeUTC) + populateDateTimeRFC3339(objectMap, "filesValidUntilTimeUTC", f.FilesValidUntilTimeUTC) populate(objectMap, "importFile", f.ImportFile) - populateTimeRFC3339(objectMap, "importValidUntilTimeUTC", f.ImportValidUntilTimeUTC) + populateDateTimeRFC3339(objectMap, "importValidUntilTimeUTC", f.ImportValidUntilTimeUTC) populate(objectMap, "ingestedRecordCount", f.IngestedRecordCount) populate(objectMap, "ingestionMode", f.IngestionMode) populate(objectMap, "source", f.Source) @@ -6252,7 +6251,7 @@ func (f *FileImportProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ContentType", &f.ContentType) delete(rawMsg, key) case "createdTimeUTC": - err = unpopulateTimeRFC3339(val, "CreatedTimeUTC", &f.CreatedTimeUTC) + err = unpopulateDateTimeRFC3339(val, "CreatedTimeUTC", &f.CreatedTimeUTC) delete(rawMsg, key) case "errorFile": err = unpopulate(val, "ErrorFile", &f.ErrorFile) @@ -6261,13 +6260,13 @@ func (f *FileImportProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ErrorsPreview", &f.ErrorsPreview) delete(rawMsg, key) case "filesValidUntilTimeUTC": - err = unpopulateTimeRFC3339(val, "FilesValidUntilTimeUTC", &f.FilesValidUntilTimeUTC) + err = unpopulateDateTimeRFC3339(val, "FilesValidUntilTimeUTC", &f.FilesValidUntilTimeUTC) delete(rawMsg, key) case "importFile": err = unpopulate(val, "ImportFile", &f.ImportFile) delete(rawMsg, key) case "importValidUntilTimeUTC": - err = unpopulateTimeRFC3339(val, "ImportValidUntilTimeUTC", &f.ImportValidUntilTimeUTC) + err = unpopulateDateTimeRFC3339(val, "ImportValidUntilTimeUTC", &f.ImportValidUntilTimeUTC) delete(rawMsg, key) case "ingestedRecordCount": err = unpopulate(val, "IngestedRecordCount", &f.IngestedRecordCount) @@ -6396,7 +6395,7 @@ func (f FusionAlertRuleProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "description", f.Description) populate(objectMap, "displayName", f.DisplayName) populate(objectMap, "enabled", f.Enabled) - populateTimeRFC3339(objectMap, "lastModifiedUtc", f.LastModifiedUTC) + populateDateTimeRFC3339(objectMap, "lastModifiedUtc", f.LastModifiedUTC) populate(objectMap, "scenarioExclusionPatterns", f.ScenarioExclusionPatterns) populate(objectMap, "severity", f.Severity) populate(objectMap, "sourceSettings", f.SourceSettings) @@ -6427,7 +6426,7 @@ func (f *FusionAlertRuleProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Enabled", &f.Enabled) delete(rawMsg, key) case "lastModifiedUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedUTC", &f.LastModifiedUTC) + err = unpopulateDateTimeRFC3339(val, "LastModifiedUTC", &f.LastModifiedUTC) delete(rawMsg, key) case "scenarioExclusionPatterns": err = unpopulate(val, "ScenarioExclusionPatterns", &f.ScenarioExclusionPatterns) @@ -6503,10 +6502,10 @@ func (f *FusionAlertRuleTemplate) UnmarshalJSON(data []byte) error { func (f FusionAlertRuleTemplateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "alertRulesCreatedByTemplateCount", f.AlertRulesCreatedByTemplateCount) - populateTimeRFC3339(objectMap, "createdDateUTC", f.CreatedDateUTC) + populateDateTimeRFC3339(objectMap, "createdDateUTC", f.CreatedDateUTC) populate(objectMap, "description", f.Description) populate(objectMap, "displayName", f.DisplayName) - populateTimeRFC3339(objectMap, "lastUpdatedDateUTC", f.LastUpdatedDateUTC) + populateDateTimeRFC3339(objectMap, "lastUpdatedDateUTC", f.LastUpdatedDateUTC) populate(objectMap, "requiredDataConnectors", f.RequiredDataConnectors) populate(objectMap, "severity", f.Severity) populate(objectMap, "sourceSettings", f.SourceSettings) @@ -6529,7 +6528,7 @@ func (f *FusionAlertRuleTemplateProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AlertRulesCreatedByTemplateCount", &f.AlertRulesCreatedByTemplateCount) delete(rawMsg, key) case "createdDateUTC": - err = unpopulateTimeRFC3339(val, "CreatedDateUTC", &f.CreatedDateUTC) + err = unpopulateDateTimeRFC3339(val, "CreatedDateUTC", &f.CreatedDateUTC) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &f.Description) @@ -6538,7 +6537,7 @@ func (f *FusionAlertRuleTemplateProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DisplayName", &f.DisplayName) delete(rawMsg, key) case "lastUpdatedDateUTC": - err = unpopulateTimeRFC3339(val, "LastUpdatedDateUTC", &f.LastUpdatedDateUTC) + err = unpopulateDateTimeRFC3339(val, "LastUpdatedDateUTC", &f.LastUpdatedDateUTC) delete(rawMsg, key) case "requiredDataConnectors": err = unpopulate(val, "RequiredDataConnectors", &f.RequiredDataConnectors) @@ -7217,17 +7216,17 @@ func (h *HuntingBookmark) UnmarshalJSON(data []byte) error { func (h HuntingBookmarkProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "additionalData", h.AdditionalData) - populateTimeRFC3339(objectMap, "created", h.Created) + populateDateTimeRFC3339(objectMap, "created", h.Created) populate(objectMap, "createdBy", h.CreatedBy) populate(objectMap, "displayName", h.DisplayName) - populateTimeRFC3339(objectMap, "eventTime", h.EventTime) + populateDateTimeRFC3339(objectMap, "eventTime", h.EventTime) populate(objectMap, "friendlyName", h.FriendlyName) populate(objectMap, "incidentInfo", h.IncidentInfo) populate(objectMap, "labels", h.Labels) populate(objectMap, "notes", h.Notes) populate(objectMap, "query", h.Query) populate(objectMap, "queryResult", h.QueryResult) - populateTimeRFC3339(objectMap, "updated", h.Updated) + populateDateTimeRFC3339(objectMap, "updated", h.Updated) populate(objectMap, "updatedBy", h.UpdatedBy) return json.Marshal(objectMap) } @@ -7245,7 +7244,7 @@ func (h *HuntingBookmarkProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AdditionalData", &h.AdditionalData) delete(rawMsg, key) case "created": - err = unpopulateTimeRFC3339(val, "Created", &h.Created) + err = unpopulateDateTimeRFC3339(val, "Created", &h.Created) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &h.CreatedBy) @@ -7254,7 +7253,7 @@ func (h *HuntingBookmarkProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DisplayName", &h.DisplayName) delete(rawMsg, key) case "eventTime": - err = unpopulateTimeRFC3339(val, "EventTime", &h.EventTime) + err = unpopulateDateTimeRFC3339(val, "EventTime", &h.EventTime) delete(rawMsg, key) case "friendlyName": err = unpopulate(val, "FriendlyName", &h.FriendlyName) @@ -7275,7 +7274,7 @@ func (h *HuntingBookmarkProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "QueryResult", &h.QueryResult) delete(rawMsg, key) case "updated": - err = unpopulateTimeRFC3339(val, "Updated", &h.Updated) + err = unpopulateDateTimeRFC3339(val, "Updated", &h.Updated) delete(rawMsg, key) case "updatedBy": err = unpopulate(val, "UpdatedBy", &h.UpdatedBy) @@ -7612,8 +7611,8 @@ func (i *IncidentCommentList) UnmarshalJSON(data []byte) error { func (i IncidentCommentProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "author", i.Author) - populateTimeRFC3339(objectMap, "createdTimeUtc", i.CreatedTimeUTC) - populateTimeRFC3339(objectMap, "lastModifiedTimeUtc", i.LastModifiedTimeUTC) + populateDateTimeRFC3339(objectMap, "createdTimeUtc", i.CreatedTimeUTC) + populateDateTimeRFC3339(objectMap, "lastModifiedTimeUtc", i.LastModifiedTimeUTC) populate(objectMap, "message", i.Message) return json.Marshal(objectMap) } @@ -7631,10 +7630,10 @@ func (i *IncidentCommentProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Author", &i.Author) delete(rawMsg, key) case "createdTimeUtc": - err = unpopulateTimeRFC3339(val, "CreatedTimeUTC", &i.CreatedTimeUTC) + err = unpopulateDateTimeRFC3339(val, "CreatedTimeUTC", &i.CreatedTimeUTC) delete(rawMsg, key) case "lastModifiedTimeUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedTimeUTC", &i.LastModifiedTimeUTC) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTimeUTC", &i.LastModifiedTimeUTC) delete(rawMsg, key) case "message": err = unpopulate(val, "Message", &i.Message) @@ -7891,14 +7890,14 @@ func (i IncidentProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "classification", i.Classification) populate(objectMap, "classificationComment", i.ClassificationComment) populate(objectMap, "classificationReason", i.ClassificationReason) - populateTimeRFC3339(objectMap, "createdTimeUtc", i.CreatedTimeUTC) + populateDateTimeRFC3339(objectMap, "createdTimeUtc", i.CreatedTimeUTC) populate(objectMap, "description", i.Description) - populateTimeRFC3339(objectMap, "firstActivityTimeUtc", i.FirstActivityTimeUTC) + populateDateTimeRFC3339(objectMap, "firstActivityTimeUtc", i.FirstActivityTimeUTC) populate(objectMap, "incidentNumber", i.IncidentNumber) populate(objectMap, "incidentUrl", i.IncidentURL) populate(objectMap, "labels", i.Labels) - populateTimeRFC3339(objectMap, "lastActivityTimeUtc", i.LastActivityTimeUTC) - populateTimeRFC3339(objectMap, "lastModifiedTimeUtc", i.LastModifiedTimeUTC) + populateDateTimeRFC3339(objectMap, "lastActivityTimeUtc", i.LastActivityTimeUTC) + populateDateTimeRFC3339(objectMap, "lastModifiedTimeUtc", i.LastModifiedTimeUTC) populate(objectMap, "owner", i.Owner) populate(objectMap, "providerIncidentId", i.ProviderIncidentID) populate(objectMap, "providerName", i.ProviderName) @@ -7932,13 +7931,13 @@ func (i *IncidentProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ClassificationReason", &i.ClassificationReason) delete(rawMsg, key) case "createdTimeUtc": - err = unpopulateTimeRFC3339(val, "CreatedTimeUTC", &i.CreatedTimeUTC) + err = unpopulateDateTimeRFC3339(val, "CreatedTimeUTC", &i.CreatedTimeUTC) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &i.Description) delete(rawMsg, key) case "firstActivityTimeUtc": - err = unpopulateTimeRFC3339(val, "FirstActivityTimeUTC", &i.FirstActivityTimeUTC) + err = unpopulateDateTimeRFC3339(val, "FirstActivityTimeUTC", &i.FirstActivityTimeUTC) delete(rawMsg, key) case "incidentNumber": err = unpopulate(val, "IncidentNumber", &i.IncidentNumber) @@ -7950,10 +7949,10 @@ func (i *IncidentProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Labels", &i.Labels) delete(rawMsg, key) case "lastActivityTimeUtc": - err = unpopulateTimeRFC3339(val, "LastActivityTimeUTC", &i.LastActivityTimeUTC) + err = unpopulateDateTimeRFC3339(val, "LastActivityTimeUTC", &i.LastActivityTimeUTC) delete(rawMsg, key) case "lastModifiedTimeUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedTimeUTC", &i.LastModifiedTimeUTC) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTimeUTC", &i.LastModifiedTimeUTC) delete(rawMsg, key) case "owner": err = unpopulate(val, "Owner", &i.Owner) @@ -8086,12 +8085,12 @@ func (i InsightQueryItemProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "additionalQuery", i.AdditionalQuery) populate(objectMap, "baseQuery", i.BaseQuery) - populate(objectMap, "chartQuery", &i.ChartQuery) + populateAny(objectMap, "chartQuery", i.ChartQuery) populate(objectMap, "dataTypes", i.DataTypes) populate(objectMap, "defaultTimeRange", i.DefaultTimeRange) populate(objectMap, "description", i.Description) populate(objectMap, "displayName", i.DisplayName) - populate(objectMap, "entitiesFilter", &i.EntitiesFilter) + populateAny(objectMap, "entitiesFilter", i.EntitiesFilter) populate(objectMap, "inputEntityType", i.InputEntityType) populate(objectMap, "referenceTimeRange", i.ReferenceTimeRange) populate(objectMap, "requiredInputFieldsSets", i.RequiredInputFieldsSets) @@ -8442,7 +8441,7 @@ func (i *InsightsTableResultColumnsItem) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InstructionStepsInstructionsItem. func (i InstructionStepsInstructionsItem) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "parameters", &i.Parameters) + populateAny(objectMap, "parameters", i.Parameters) populate(objectMap, "type", i.Type) return json.Marshal(objectMap) } @@ -9169,7 +9168,7 @@ func (m MLBehaviorAnalyticsAlertRuleProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "description", m.Description) populate(objectMap, "displayName", m.DisplayName) populate(objectMap, "enabled", m.Enabled) - populateTimeRFC3339(objectMap, "lastModifiedUtc", m.LastModifiedUTC) + populateDateTimeRFC3339(objectMap, "lastModifiedUtc", m.LastModifiedUTC) populate(objectMap, "severity", m.Severity) populate(objectMap, "tactics", m.Tactics) populate(objectMap, "techniques", m.Techniques) @@ -9198,7 +9197,7 @@ func (m *MLBehaviorAnalyticsAlertRuleProperties) UnmarshalJSON(data []byte) erro err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) case "lastModifiedUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedUTC", &m.LastModifiedUTC) + err = unpopulateDateTimeRFC3339(val, "LastModifiedUTC", &m.LastModifiedUTC) delete(rawMsg, key) case "severity": err = unpopulate(val, "Severity", &m.Severity) @@ -9268,10 +9267,10 @@ func (m *MLBehaviorAnalyticsAlertRuleTemplate) UnmarshalJSON(data []byte) error func (m MLBehaviorAnalyticsAlertRuleTemplateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "alertRulesCreatedByTemplateCount", m.AlertRulesCreatedByTemplateCount) - populateTimeRFC3339(objectMap, "createdDateUTC", m.CreatedDateUTC) + populateDateTimeRFC3339(objectMap, "createdDateUTC", m.CreatedDateUTC) populate(objectMap, "description", m.Description) populate(objectMap, "displayName", m.DisplayName) - populateTimeRFC3339(objectMap, "lastUpdatedDateUTC", m.LastUpdatedDateUTC) + populateDateTimeRFC3339(objectMap, "lastUpdatedDateUTC", m.LastUpdatedDateUTC) populate(objectMap, "requiredDataConnectors", m.RequiredDataConnectors) populate(objectMap, "severity", m.Severity) populate(objectMap, "status", m.Status) @@ -9293,7 +9292,7 @@ func (m *MLBehaviorAnalyticsAlertRuleTemplateProperties) UnmarshalJSON(data []by err = unpopulate(val, "AlertRulesCreatedByTemplateCount", &m.AlertRulesCreatedByTemplateCount) delete(rawMsg, key) case "createdDateUTC": - err = unpopulateTimeRFC3339(val, "CreatedDateUTC", &m.CreatedDateUTC) + err = unpopulateDateTimeRFC3339(val, "CreatedDateUTC", &m.CreatedDateUTC) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &m.Description) @@ -9302,7 +9301,7 @@ func (m *MLBehaviorAnalyticsAlertRuleTemplateProperties) UnmarshalJSON(data []by err = unpopulate(val, "DisplayName", &m.DisplayName) delete(rawMsg, key) case "lastUpdatedDateUTC": - err = unpopulateTimeRFC3339(val, "LastUpdatedDateUTC", &m.LastUpdatedDateUTC) + err = unpopulateDateTimeRFC3339(val, "LastUpdatedDateUTC", &m.LastUpdatedDateUTC) delete(rawMsg, key) case "requiredDataConnectors": err = unpopulate(val, "RequiredDataConnectors", &m.RequiredDataConnectors) @@ -9775,19 +9774,19 @@ func (m MailClusterEntityProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "additionalData", m.AdditionalData) populate(objectMap, "clusterGroup", m.ClusterGroup) - populateTimeRFC3339(objectMap, "clusterQueryEndTime", m.ClusterQueryEndTime) - populateTimeRFC3339(objectMap, "clusterQueryStartTime", m.ClusterQueryStartTime) + populateDateTimeRFC3339(objectMap, "clusterQueryEndTime", m.ClusterQueryEndTime) + populateDateTimeRFC3339(objectMap, "clusterQueryStartTime", m.ClusterQueryStartTime) populate(objectMap, "clusterSourceIdentifier", m.ClusterSourceIdentifier) populate(objectMap, "clusterSourceType", m.ClusterSourceType) - populate(objectMap, "countByDeliveryStatus", &m.CountByDeliveryStatus) - populate(objectMap, "countByProtectionStatus", &m.CountByProtectionStatus) - populate(objectMap, "countByThreatType", &m.CountByThreatType) + populateAny(objectMap, "countByDeliveryStatus", m.CountByDeliveryStatus) + populateAny(objectMap, "countByProtectionStatus", m.CountByProtectionStatus) + populateAny(objectMap, "countByThreatType", m.CountByThreatType) populate(objectMap, "friendlyName", m.FriendlyName) populate(objectMap, "isVolumeAnomaly", m.IsVolumeAnomaly) populate(objectMap, "mailCount", m.MailCount) populate(objectMap, "networkMessageIds", m.NetworkMessageIDs) populate(objectMap, "query", m.Query) - populateTimeRFC3339(objectMap, "queryTime", m.QueryTime) + populateDateTimeRFC3339(objectMap, "queryTime", m.QueryTime) populate(objectMap, "source", m.Source) populate(objectMap, "threats", m.Threats) return json.Marshal(objectMap) @@ -9809,10 +9808,10 @@ func (m *MailClusterEntityProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ClusterGroup", &m.ClusterGroup) delete(rawMsg, key) case "clusterQueryEndTime": - err = unpopulateTimeRFC3339(val, "ClusterQueryEndTime", &m.ClusterQueryEndTime) + err = unpopulateDateTimeRFC3339(val, "ClusterQueryEndTime", &m.ClusterQueryEndTime) delete(rawMsg, key) case "clusterQueryStartTime": - err = unpopulateTimeRFC3339(val, "ClusterQueryStartTime", &m.ClusterQueryStartTime) + err = unpopulateDateTimeRFC3339(val, "ClusterQueryStartTime", &m.ClusterQueryStartTime) delete(rawMsg, key) case "clusterSourceIdentifier": err = unpopulate(val, "ClusterSourceIdentifier", &m.ClusterSourceIdentifier) @@ -9845,7 +9844,7 @@ func (m *MailClusterEntityProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Query", &m.Query) delete(rawMsg, key) case "queryTime": - err = unpopulateTimeRFC3339(val, "QueryTime", &m.QueryTime) + err = unpopulateDateTimeRFC3339(val, "QueryTime", &m.QueryTime) delete(rawMsg, key) case "source": err = unpopulate(val, "Source", &m.Source) @@ -9931,7 +9930,7 @@ func (m MailMessageEntityProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "p2Sender", m.P2Sender) populate(objectMap, "p2SenderDisplayName", m.P2SenderDisplayName) populate(objectMap, "p2SenderDomain", m.P2SenderDomain) - populateTimeRFC3339(objectMap, "receiveDate", m.ReceiveDate) + populateDateTimeRFC3339(objectMap, "receiveDate", m.ReceiveDate) populate(objectMap, "recipient", m.Recipient) populate(objectMap, "senderIP", m.SenderIP) populate(objectMap, "subject", m.Subject) @@ -10011,7 +10010,7 @@ func (m *MailMessageEntityProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "P2SenderDomain", &m.P2SenderDomain) delete(rawMsg, key) case "receiveDate": - err = unpopulateTimeRFC3339(val, "ReceiveDate", &m.ReceiveDate) + err = unpopulateDateTimeRFC3339(val, "ReceiveDate", &m.ReceiveDate) delete(rawMsg, key) case "recipient": err = unpopulate(val, "Recipient", &m.Recipient) @@ -10828,7 +10827,7 @@ func (m MicrosoftSecurityIncidentCreationAlertRuleProperties) MarshalJSON() ([]b populate(objectMap, "displayNamesExcludeFilter", m.DisplayNamesExcludeFilter) populate(objectMap, "displayNamesFilter", m.DisplayNamesFilter) populate(objectMap, "enabled", m.Enabled) - populateTimeRFC3339(objectMap, "lastModifiedUtc", m.LastModifiedUTC) + populateDateTimeRFC3339(objectMap, "lastModifiedUtc", m.LastModifiedUTC) populate(objectMap, "productFilter", m.ProductFilter) populate(objectMap, "severitiesFilter", m.SeveritiesFilter) return json.Marshal(objectMap) @@ -10862,7 +10861,7 @@ func (m *MicrosoftSecurityIncidentCreationAlertRuleProperties) UnmarshalJSON(dat err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) case "lastModifiedUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedUTC", &m.LastModifiedUTC) + err = unpopulateDateTimeRFC3339(val, "LastModifiedUTC", &m.LastModifiedUTC) delete(rawMsg, key) case "productFilter": err = unpopulate(val, "ProductFilter", &m.ProductFilter) @@ -10929,12 +10928,12 @@ func (m *MicrosoftSecurityIncidentCreationAlertRuleTemplate) UnmarshalJSON(data func (m MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "alertRulesCreatedByTemplateCount", m.AlertRulesCreatedByTemplateCount) - populateTimeRFC3339(objectMap, "createdDateUTC", m.CreatedDateUTC) + populateDateTimeRFC3339(objectMap, "createdDateUTC", m.CreatedDateUTC) populate(objectMap, "description", m.Description) populate(objectMap, "displayName", m.DisplayName) populate(objectMap, "displayNamesExcludeFilter", m.DisplayNamesExcludeFilter) populate(objectMap, "displayNamesFilter", m.DisplayNamesFilter) - populateTimeRFC3339(objectMap, "lastUpdatedDateUTC", m.LastUpdatedDateUTC) + populateDateTimeRFC3339(objectMap, "lastUpdatedDateUTC", m.LastUpdatedDateUTC) populate(objectMap, "productFilter", m.ProductFilter) populate(objectMap, "requiredDataConnectors", m.RequiredDataConnectors) populate(objectMap, "severitiesFilter", m.SeveritiesFilter) @@ -10955,7 +10954,7 @@ func (m *MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties) Unmarshal err = unpopulate(val, "AlertRulesCreatedByTemplateCount", &m.AlertRulesCreatedByTemplateCount) delete(rawMsg, key) case "createdDateUTC": - err = unpopulateTimeRFC3339(val, "CreatedDateUTC", &m.CreatedDateUTC) + err = unpopulateDateTimeRFC3339(val, "CreatedDateUTC", &m.CreatedDateUTC) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &m.Description) @@ -10970,7 +10969,7 @@ func (m *MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties) Unmarshal err = unpopulate(val, "DisplayNamesFilter", &m.DisplayNamesFilter) delete(rawMsg, key) case "lastUpdatedDateUTC": - err = unpopulateTimeRFC3339(val, "LastUpdatedDateUTC", &m.LastUpdatedDateUTC) + err = unpopulateDateTimeRFC3339(val, "LastUpdatedDateUTC", &m.LastUpdatedDateUTC) delete(rawMsg, key) case "productFilter": err = unpopulate(val, "ProductFilter", &m.ProductFilter) @@ -11176,7 +11175,7 @@ func (n NrtAlertRuleProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "entityMappings", n.EntityMappings) populate(objectMap, "eventGroupingSettings", n.EventGroupingSettings) populate(objectMap, "incidentConfiguration", n.IncidentConfiguration) - populateTimeRFC3339(objectMap, "lastModifiedUtc", n.LastModifiedUTC) + populateDateTimeRFC3339(objectMap, "lastModifiedUtc", n.LastModifiedUTC) populate(objectMap, "query", n.Query) populate(objectMap, "severity", n.Severity) populate(objectMap, "suppressionDuration", n.SuppressionDuration) @@ -11224,7 +11223,7 @@ func (n *NrtAlertRuleProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "IncidentConfiguration", &n.IncidentConfiguration) delete(rawMsg, key) case "lastModifiedUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedUTC", &n.LastModifiedUTC) + err = unpopulateDateTimeRFC3339(val, "LastModifiedUTC", &n.LastModifiedUTC) delete(rawMsg, key) case "query": err = unpopulate(val, "Query", &n.Query) @@ -11307,13 +11306,13 @@ func (n NrtAlertRuleTemplateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "alertDetailsOverride", n.AlertDetailsOverride) populate(objectMap, "alertRulesCreatedByTemplateCount", n.AlertRulesCreatedByTemplateCount) - populateTimeRFC3339(objectMap, "createdDateUTC", n.CreatedDateUTC) + populateDateTimeRFC3339(objectMap, "createdDateUTC", n.CreatedDateUTC) populate(objectMap, "customDetails", n.CustomDetails) populate(objectMap, "description", n.Description) populate(objectMap, "displayName", n.DisplayName) populate(objectMap, "entityMappings", n.EntityMappings) populate(objectMap, "eventGroupingSettings", n.EventGroupingSettings) - populateTimeRFC3339(objectMap, "lastUpdatedDateUTC", n.LastUpdatedDateUTC) + populateDateTimeRFC3339(objectMap, "lastUpdatedDateUTC", n.LastUpdatedDateUTC) populate(objectMap, "query", n.Query) populate(objectMap, "requiredDataConnectors", n.RequiredDataConnectors) populate(objectMap, "severity", n.Severity) @@ -11340,7 +11339,7 @@ func (n *NrtAlertRuleTemplateProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AlertRulesCreatedByTemplateCount", &n.AlertRulesCreatedByTemplateCount) delete(rawMsg, key) case "createdDateUTC": - err = unpopulateTimeRFC3339(val, "CreatedDateUTC", &n.CreatedDateUTC) + err = unpopulateDateTimeRFC3339(val, "CreatedDateUTC", &n.CreatedDateUTC) delete(rawMsg, key) case "customDetails": err = unpopulate(val, "CustomDetails", &n.CustomDetails) @@ -11358,7 +11357,7 @@ func (n *NrtAlertRuleTemplateProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "EventGroupingSettings", &n.EventGroupingSettings) delete(rawMsg, key) case "lastUpdatedDateUTC": - err = unpopulateTimeRFC3339(val, "LastUpdatedDateUTC", &n.LastUpdatedDateUTC) + err = unpopulateDateTimeRFC3339(val, "LastUpdatedDateUTC", &n.LastUpdatedDateUTC) delete(rawMsg, key) case "query": err = unpopulate(val, "Query", &n.Query) @@ -12658,7 +12657,7 @@ func (p ProcessEntityProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "accountEntityId", p.AccountEntityID) populate(objectMap, "additionalData", p.AdditionalData) populate(objectMap, "commandLine", p.CommandLine) - populateTimeRFC3339(objectMap, "creationTimeUtc", p.CreationTimeUTC) + populateDateTimeRFC3339(objectMap, "creationTimeUtc", p.CreationTimeUTC) populate(objectMap, "elevationToken", p.ElevationToken) populate(objectMap, "friendlyName", p.FriendlyName) populate(objectMap, "hostEntityId", p.HostEntityID) @@ -12688,7 +12687,7 @@ func (p *ProcessEntityProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CommandLine", &p.CommandLine) delete(rawMsg, key) case "creationTimeUtc": - err = unpopulateTimeRFC3339(val, "CreationTimeUTC", &p.CreationTimeUTC) + err = unpopulateDateTimeRFC3339(val, "CreationTimeUTC", &p.CreationTimeUTC) delete(rawMsg, key) case "elevationToken": err = unpopulate(val, "ElevationToken", &p.ElevationToken) @@ -13386,7 +13385,7 @@ func (s ScheduledAlertRuleProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "entityMappings", s.EntityMappings) populate(objectMap, "eventGroupingSettings", s.EventGroupingSettings) populate(objectMap, "incidentConfiguration", s.IncidentConfiguration) - populateTimeRFC3339(objectMap, "lastModifiedUtc", s.LastModifiedUTC) + populateDateTimeRFC3339(objectMap, "lastModifiedUtc", s.LastModifiedUTC) populate(objectMap, "query", s.Query) populate(objectMap, "queryFrequency", s.QueryFrequency) populate(objectMap, "queryPeriod", s.QueryPeriod) @@ -13438,7 +13437,7 @@ func (s *ScheduledAlertRuleProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "IncidentConfiguration", &s.IncidentConfiguration) delete(rawMsg, key) case "lastModifiedUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedUTC", &s.LastModifiedUTC) + err = unpopulateDateTimeRFC3339(val, "LastModifiedUTC", &s.LastModifiedUTC) delete(rawMsg, key) case "query": err = unpopulate(val, "Query", &s.Query) @@ -13533,13 +13532,13 @@ func (s ScheduledAlertRuleTemplateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "alertDetailsOverride", s.AlertDetailsOverride) populate(objectMap, "alertRulesCreatedByTemplateCount", s.AlertRulesCreatedByTemplateCount) - populateTimeRFC3339(objectMap, "createdDateUTC", s.CreatedDateUTC) + populateDateTimeRFC3339(objectMap, "createdDateUTC", s.CreatedDateUTC) populate(objectMap, "customDetails", s.CustomDetails) populate(objectMap, "description", s.Description) populate(objectMap, "displayName", s.DisplayName) populate(objectMap, "entityMappings", s.EntityMappings) populate(objectMap, "eventGroupingSettings", s.EventGroupingSettings) - populateTimeRFC3339(objectMap, "lastUpdatedDateUTC", s.LastUpdatedDateUTC) + populateDateTimeRFC3339(objectMap, "lastUpdatedDateUTC", s.LastUpdatedDateUTC) populate(objectMap, "query", s.Query) populate(objectMap, "queryFrequency", s.QueryFrequency) populate(objectMap, "queryPeriod", s.QueryPeriod) @@ -13570,7 +13569,7 @@ func (s *ScheduledAlertRuleTemplateProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "AlertRulesCreatedByTemplateCount", &s.AlertRulesCreatedByTemplateCount) delete(rawMsg, key) case "createdDateUTC": - err = unpopulateTimeRFC3339(val, "CreatedDateUTC", &s.CreatedDateUTC) + err = unpopulateDateTimeRFC3339(val, "CreatedDateUTC", &s.CreatedDateUTC) delete(rawMsg, key) case "customDetails": err = unpopulate(val, "CustomDetails", &s.CustomDetails) @@ -13588,7 +13587,7 @@ func (s *ScheduledAlertRuleTemplateProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "EventGroupingSettings", &s.EventGroupingSettings) delete(rawMsg, key) case "lastUpdatedDateUTC": - err = unpopulateTimeRFC3339(val, "LastUpdatedDateUTC", &s.LastUpdatedDateUTC) + err = unpopulateDateTimeRFC3339(val, "LastUpdatedDateUTC", &s.LastUpdatedDateUTC) delete(rawMsg, key) case "query": err = unpopulate(val, "Query", &s.Query) @@ -13691,10 +13690,10 @@ func (s SecurityAlertProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "confidenceScore", s.ConfidenceScore) populate(objectMap, "confidenceScoreStatus", s.ConfidenceScoreStatus) populate(objectMap, "description", s.Description) - populateTimeRFC3339(objectMap, "endTimeUtc", s.EndTimeUTC) + populateDateTimeRFC3339(objectMap, "endTimeUtc", s.EndTimeUTC) populate(objectMap, "friendlyName", s.FriendlyName) populate(objectMap, "intent", s.Intent) - populateTimeRFC3339(objectMap, "processingEndTime", s.ProcessingEndTime) + populateDateTimeRFC3339(objectMap, "processingEndTime", s.ProcessingEndTime) populate(objectMap, "productComponentName", s.ProductComponentName) populate(objectMap, "productName", s.ProductName) populate(objectMap, "productVersion", s.ProductVersion) @@ -13702,11 +13701,11 @@ func (s SecurityAlertProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "remediationSteps", s.RemediationSteps) populate(objectMap, "resourceIdentifiers", s.ResourceIdentifiers) populate(objectMap, "severity", s.Severity) - populateTimeRFC3339(objectMap, "startTimeUtc", s.StartTimeUTC) + populateDateTimeRFC3339(objectMap, "startTimeUtc", s.StartTimeUTC) populate(objectMap, "status", s.Status) populate(objectMap, "systemAlertId", s.SystemAlertID) populate(objectMap, "tactics", s.Tactics) - populateTimeRFC3339(objectMap, "timeGenerated", s.TimeGenerated) + populateDateTimeRFC3339(objectMap, "timeGenerated", s.TimeGenerated) populate(objectMap, "vendorName", s.VendorName) return json.Marshal(objectMap) } @@ -13751,7 +13750,7 @@ func (s *SecurityAlertProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Description", &s.Description) delete(rawMsg, key) case "endTimeUtc": - err = unpopulateTimeRFC3339(val, "EndTimeUTC", &s.EndTimeUTC) + err = unpopulateDateTimeRFC3339(val, "EndTimeUTC", &s.EndTimeUTC) delete(rawMsg, key) case "friendlyName": err = unpopulate(val, "FriendlyName", &s.FriendlyName) @@ -13760,7 +13759,7 @@ func (s *SecurityAlertProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Intent", &s.Intent) delete(rawMsg, key) case "processingEndTime": - err = unpopulateTimeRFC3339(val, "ProcessingEndTime", &s.ProcessingEndTime) + err = unpopulateDateTimeRFC3339(val, "ProcessingEndTime", &s.ProcessingEndTime) delete(rawMsg, key) case "productComponentName": err = unpopulate(val, "ProductComponentName", &s.ProductComponentName) @@ -13784,7 +13783,7 @@ func (s *SecurityAlertProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Severity", &s.Severity) delete(rawMsg, key) case "startTimeUtc": - err = unpopulateTimeRFC3339(val, "StartTimeUTC", &s.StartTimeUTC) + err = unpopulateDateTimeRFC3339(val, "StartTimeUTC", &s.StartTimeUTC) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &s.Status) @@ -13796,7 +13795,7 @@ func (s *SecurityAlertProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Tactics", &s.Tactics) delete(rawMsg, key) case "timeGenerated": - err = unpopulateTimeRFC3339(val, "TimeGenerated", &s.TimeGenerated) + err = unpopulateDateTimeRFC3339(val, "TimeGenerated", &s.TimeGenerated) delete(rawMsg, key) case "vendorName": err = unpopulate(val, "VendorName", &s.VendorName) @@ -13847,12 +13846,12 @@ func (s SecurityAlertTimelineItem) MarshalJSON() ([]byte, error) { populate(objectMap, "azureResourceId", s.AzureResourceID) populate(objectMap, "description", s.Description) populate(objectMap, "displayName", s.DisplayName) - populateTimeRFC3339(objectMap, "endTimeUtc", s.EndTimeUTC) + populateDateTimeRFC3339(objectMap, "endTimeUtc", s.EndTimeUTC) objectMap["kind"] = EntityTimelineKindSecurityAlert populate(objectMap, "productName", s.ProductName) populate(objectMap, "severity", s.Severity) - populateTimeRFC3339(objectMap, "startTimeUtc", s.StartTimeUTC) - populateTimeRFC3339(objectMap, "timeGenerated", s.TimeGenerated) + populateDateTimeRFC3339(objectMap, "startTimeUtc", s.StartTimeUTC) + populateDateTimeRFC3339(objectMap, "timeGenerated", s.TimeGenerated) return json.Marshal(objectMap) } @@ -13878,7 +13877,7 @@ func (s *SecurityAlertTimelineItem) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DisplayName", &s.DisplayName) delete(rawMsg, key) case "endTimeUtc": - err = unpopulateTimeRFC3339(val, "EndTimeUTC", &s.EndTimeUTC) + err = unpopulateDateTimeRFC3339(val, "EndTimeUTC", &s.EndTimeUTC) delete(rawMsg, key) case "kind": err = unpopulate(val, "Kind", &s.Kind) @@ -13890,10 +13889,10 @@ func (s *SecurityAlertTimelineItem) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Severity", &s.Severity) delete(rawMsg, key) case "startTimeUtc": - err = unpopulateTimeRFC3339(val, "StartTimeUTC", &s.StartTimeUTC) + err = unpopulateDateTimeRFC3339(val, "StartTimeUTC", &s.StartTimeUTC) delete(rawMsg, key) case "timeGenerated": - err = unpopulateTimeRFC3339(val, "TimeGenerated", &s.TimeGenerated) + err = unpopulateDateTimeRFC3339(val, "TimeGenerated", &s.TimeGenerated) delete(rawMsg, key) } if err != nil { @@ -14472,10 +14471,10 @@ func (s SubmissionMailEntityProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "sender", s.Sender) populate(objectMap, "senderIp", s.SenderIP) populate(objectMap, "subject", s.Subject) - populateTimeRFC3339(objectMap, "submissionDate", s.SubmissionDate) + populateDateTimeRFC3339(objectMap, "submissionDate", s.SubmissionDate) populate(objectMap, "submissionId", s.SubmissionID) populate(objectMap, "submitter", s.Submitter) - populateTimeRFC3339(objectMap, "timestamp", s.Timestamp) + populateDateTimeRFC3339(objectMap, "timestamp", s.Timestamp) return json.Marshal(objectMap) } @@ -14513,7 +14512,7 @@ func (s *SubmissionMailEntityProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Subject", &s.Subject) delete(rawMsg, key) case "submissionDate": - err = unpopulateTimeRFC3339(val, "SubmissionDate", &s.SubmissionDate) + err = unpopulateDateTimeRFC3339(val, "SubmissionDate", &s.SubmissionDate) delete(rawMsg, key) case "submissionId": err = unpopulate(val, "SubmissionID", &s.SubmissionID) @@ -14522,7 +14521,7 @@ func (s *SubmissionMailEntityProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Submitter", &s.Submitter) delete(rawMsg, key) case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &s.Timestamp) + err = unpopulateDateTimeRFC3339(val, "Timestamp", &s.Timestamp) delete(rawMsg, key) } if err != nil { @@ -14535,10 +14534,10 @@ func (s *SubmissionMailEntityProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -14554,7 +14553,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -14563,7 +14562,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) @@ -14747,7 +14746,7 @@ func (t TIDataConnectorProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "dataTypes", t.DataTypes) populate(objectMap, "tenantId", t.TenantID) - populateTimeRFC3339(objectMap, "tipLookbackPeriod", t.TipLookbackPeriod) + populateDateTimeRFC3339(objectMap, "tipLookbackPeriod", t.TipLookbackPeriod) return json.Marshal(objectMap) } @@ -14767,7 +14766,7 @@ func (t *TIDataConnectorProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "TenantID", &t.TenantID) delete(rawMsg, key) case "tipLookbackPeriod": - err = unpopulateTimeRFC3339(val, "TipLookbackPeriod", &t.TipLookbackPeriod) + err = unpopulateDateTimeRFC3339(val, "TipLookbackPeriod", &t.TipLookbackPeriod) delete(rawMsg, key) } if err != nil { @@ -14783,7 +14782,7 @@ func (t TeamInformation) MarshalJSON() ([]byte, error) { populate(objectMap, "description", t.Description) populate(objectMap, "name", t.Name) populate(objectMap, "primaryChannelUrl", t.PrimaryChannelURL) - populateTimeRFC3339(objectMap, "teamCreationTimeUtc", t.TeamCreationTimeUTC) + populateDateTimeRFC3339(objectMap, "teamCreationTimeUtc", t.TeamCreationTimeUTC) populate(objectMap, "teamId", t.TeamID) return json.Marshal(objectMap) } @@ -14807,7 +14806,7 @@ func (t *TeamInformation) UnmarshalJSON(data []byte) error { err = unpopulate(val, "PrimaryChannelURL", &t.PrimaryChannelURL) delete(rawMsg, key) case "teamCreationTimeUtc": - err = unpopulateTimeRFC3339(val, "TeamCreationTimeUTC", &t.TeamCreationTimeUTC) + err = unpopulateDateTimeRFC3339(val, "TeamCreationTimeUTC", &t.TeamCreationTimeUTC) delete(rawMsg, key) case "teamId": err = unpopulate(val, "TeamID", &t.TeamID) @@ -14964,7 +14963,7 @@ func (t ThreatIntelligenceAlertRuleProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "description", t.Description) populate(objectMap, "displayName", t.DisplayName) populate(objectMap, "enabled", t.Enabled) - populateTimeRFC3339(objectMap, "lastModifiedUtc", t.LastModifiedUTC) + populateDateTimeRFC3339(objectMap, "lastModifiedUtc", t.LastModifiedUTC) populate(objectMap, "severity", t.Severity) populate(objectMap, "tactics", t.Tactics) populate(objectMap, "techniques", t.Techniques) @@ -14993,7 +14992,7 @@ func (t *ThreatIntelligenceAlertRuleProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "Enabled", &t.Enabled) delete(rawMsg, key) case "lastModifiedUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedUTC", &t.LastModifiedUTC) + err = unpopulateDateTimeRFC3339(val, "LastModifiedUTC", &t.LastModifiedUTC) delete(rawMsg, key) case "severity": err = unpopulate(val, "Severity", &t.Severity) @@ -15063,10 +15062,10 @@ func (t *ThreatIntelligenceAlertRuleTemplate) UnmarshalJSON(data []byte) error { func (t ThreatIntelligenceAlertRuleTemplateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "alertRulesCreatedByTemplateCount", t.AlertRulesCreatedByTemplateCount) - populateTimeRFC3339(objectMap, "createdDateUTC", t.CreatedDateUTC) + populateDateTimeRFC3339(objectMap, "createdDateUTC", t.CreatedDateUTC) populate(objectMap, "description", t.Description) populate(objectMap, "displayName", t.DisplayName) - populateTimeRFC3339(objectMap, "lastUpdatedDateUTC", t.LastUpdatedDateUTC) + populateDateTimeRFC3339(objectMap, "lastUpdatedDateUTC", t.LastUpdatedDateUTC) populate(objectMap, "requiredDataConnectors", t.RequiredDataConnectors) populate(objectMap, "severity", t.Severity) populate(objectMap, "status", t.Status) @@ -15088,7 +15087,7 @@ func (t *ThreatIntelligenceAlertRuleTemplateProperties) UnmarshalJSON(data []byt err = unpopulate(val, "AlertRulesCreatedByTemplateCount", &t.AlertRulesCreatedByTemplateCount) delete(rawMsg, key) case "createdDateUTC": - err = unpopulateTimeRFC3339(val, "CreatedDateUTC", &t.CreatedDateUTC) + err = unpopulateDateTimeRFC3339(val, "CreatedDateUTC", &t.CreatedDateUTC) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &t.Description) @@ -15097,7 +15096,7 @@ func (t *ThreatIntelligenceAlertRuleTemplateProperties) UnmarshalJSON(data []byt err = unpopulate(val, "DisplayName", &t.DisplayName) delete(rawMsg, key) case "lastUpdatedDateUTC": - err = unpopulateTimeRFC3339(val, "LastUpdatedDateUTC", &t.LastUpdatedDateUTC) + err = unpopulateDateTimeRFC3339(val, "LastUpdatedDateUTC", &t.LastUpdatedDateUTC) delete(rawMsg, key) case "requiredDataConnectors": err = unpopulate(val, "RequiredDataConnectors", &t.RequiredDataConnectors) @@ -15993,7 +15992,7 @@ func (t TiTaxiiDataConnectorProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "friendlyName", t.FriendlyName) populate(objectMap, "password", t.Password) populate(objectMap, "pollingFrequency", t.PollingFrequency) - populateTimeRFC3339(objectMap, "taxiiLookbackPeriod", t.TaxiiLookbackPeriod) + populateDateTimeRFC3339(objectMap, "taxiiLookbackPeriod", t.TaxiiLookbackPeriod) populate(objectMap, "taxiiServer", t.TaxiiServer) populate(objectMap, "tenantId", t.TenantID) populate(objectMap, "userName", t.UserName) @@ -16026,7 +16025,7 @@ func (t *TiTaxiiDataConnectorProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "PollingFrequency", &t.PollingFrequency) delete(rawMsg, key) case "taxiiLookbackPeriod": - err = unpopulateTimeRFC3339(val, "TaxiiLookbackPeriod", &t.TaxiiLookbackPeriod) + err = unpopulateDateTimeRFC3339(val, "TaxiiLookbackPeriod", &t.TaxiiLookbackPeriod) delete(rawMsg, key) case "taxiiServer": err = unpopulate(val, "TaxiiServer", &t.TaxiiServer) @@ -16503,13 +16502,13 @@ func (w *WatchlistItemList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WatchlistItemProperties. func (w WatchlistItemProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "created", w.Created) + populateDateTimeRFC3339(objectMap, "created", w.Created) populate(objectMap, "createdBy", w.CreatedBy) populate(objectMap, "entityMapping", w.EntityMapping) populate(objectMap, "isDeleted", w.IsDeleted) populate(objectMap, "itemsKeyValue", w.ItemsKeyValue) populate(objectMap, "tenantId", w.TenantID) - populateTimeRFC3339(objectMap, "updated", w.Updated) + populateDateTimeRFC3339(objectMap, "updated", w.Updated) populate(objectMap, "updatedBy", w.UpdatedBy) populate(objectMap, "watchlistItemId", w.WatchlistItemID) populate(objectMap, "watchlistItemType", w.WatchlistItemType) @@ -16526,7 +16525,7 @@ func (w *WatchlistItemProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "created": - err = unpopulateTimeRFC3339(val, "Created", &w.Created) + err = unpopulateDateTimeRFC3339(val, "Created", &w.Created) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &w.CreatedBy) @@ -16544,7 +16543,7 @@ func (w *WatchlistItemProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "TenantID", &w.TenantID) delete(rawMsg, key) case "updated": - err = unpopulateTimeRFC3339(val, "Updated", &w.Updated) + err = unpopulateDateTimeRFC3339(val, "Updated", &w.Updated) delete(rawMsg, key) case "updatedBy": err = unpopulate(val, "UpdatedBy", &w.UpdatedBy) @@ -16598,7 +16597,7 @@ func (w *WatchlistList) UnmarshalJSON(data []byte) error { func (w WatchlistProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "contentType", w.ContentType) - populateTimeRFC3339(objectMap, "created", w.Created) + populateDateTimeRFC3339(objectMap, "created", w.Created) populate(objectMap, "createdBy", w.CreatedBy) populate(objectMap, "defaultDuration", w.DefaultDuration) populate(objectMap, "description", w.Description) @@ -16612,7 +16611,7 @@ func (w WatchlistProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "source", w.Source) populate(objectMap, "sourceType", w.SourceType) populate(objectMap, "tenantId", w.TenantID) - populateTimeRFC3339(objectMap, "updated", w.Updated) + populateDateTimeRFC3339(objectMap, "updated", w.Updated) populate(objectMap, "updatedBy", w.UpdatedBy) populate(objectMap, "uploadStatus", w.UploadStatus) populate(objectMap, "watchlistAlias", w.WatchlistAlias) @@ -16634,7 +16633,7 @@ func (w *WatchlistProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ContentType", &w.ContentType) delete(rawMsg, key) case "created": - err = unpopulateTimeRFC3339(val, "Created", &w.Created) + err = unpopulateDateTimeRFC3339(val, "Created", &w.Created) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &w.CreatedBy) @@ -16676,7 +16675,7 @@ func (w *WatchlistProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "TenantID", &w.TenantID) delete(rawMsg, key) case "updated": - err = unpopulateTimeRFC3339(val, "Updated", &w.Updated) + err = unpopulateDateTimeRFC3339(val, "Updated", &w.Updated) delete(rawMsg, key) case "updatedBy": err = unpopulate(val, "UpdatedBy", &w.UpdatedBy) @@ -16750,8 +16749,18 @@ func populate(m map[string]any, k string, v any) { } } +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 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/securityinsights/armsecurityinsights/v2/officeconsents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/officeconsents_client.go index 0de2e6a0..bb99d89e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/officeconsents_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/officeconsents_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type OfficeConsentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOfficeConsentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OfficeConsentsClient, error) { - cl, err := arm.NewClient(moduleName+".OfficeConsentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,16 +52,22 @@ func NewOfficeConsentsClient(subscriptionID string, credential azcore.TokenCrede // - consentID - consent ID // - options - OfficeConsentsClientDeleteOptions contains the optional parameters for the OfficeConsentsClient.Delete method. func (client *OfficeConsentsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, consentID string, options *OfficeConsentsClientDeleteOptions) (OfficeConsentsClientDeleteResponse, error) { + var err error + const operationName = "OfficeConsentsClient.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, workspaceName, consentID, options) if err != nil { return OfficeConsentsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OfficeConsentsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return OfficeConsentsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return OfficeConsentsClientDeleteResponse{}, err } return OfficeConsentsClientDeleteResponse{}, nil } @@ -106,18 +111,25 @@ func (client *OfficeConsentsClient) deleteCreateRequest(ctx context.Context, res // - consentID - consent ID // - options - OfficeConsentsClientGetOptions contains the optional parameters for the OfficeConsentsClient.Get method. func (client *OfficeConsentsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, consentID string, options *OfficeConsentsClientGetOptions) (OfficeConsentsClientGetResponse, error) { + var err error + const operationName = "OfficeConsentsClient.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, consentID, options) if err != nil { return OfficeConsentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OfficeConsentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OfficeConsentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OfficeConsentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -171,25 +183,20 @@ func (client *OfficeConsentsClient) NewListPager(resourceGroupName string, works return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OfficeConsentsClientListResponse) (OfficeConsentsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OfficeConsentsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OfficeConsentsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 OfficeConsentsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OfficeConsentsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/operations_client.go index 1df99007..02431504 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,20 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/options.go new file mode 100644 index 00000000..c52cb198 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/options.go @@ -0,0 +1,689 @@ +//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 armsecurityinsights + +// ActionsClientCreateOrUpdateOptions contains the optional parameters for the ActionsClient.CreateOrUpdate method. +type ActionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ActionsClientDeleteOptions contains the optional parameters for the ActionsClient.Delete method. +type ActionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ActionsClientGetOptions contains the optional parameters for the ActionsClient.Get method. +type ActionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ActionsClientListByAlertRuleOptions contains the optional parameters for the ActionsClient.NewListByAlertRulePager method. +type ActionsClientListByAlertRuleOptions struct { + // placeholder for future optional parameters +} + +// AlertRuleTemplatesClientGetOptions contains the optional parameters for the AlertRuleTemplatesClient.Get method. +type AlertRuleTemplatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// AlertRuleTemplatesClientListOptions contains the optional parameters for the AlertRuleTemplatesClient.NewListPager method. +type AlertRuleTemplatesClientListOptions struct { + // placeholder for future optional parameters +} + +// AlertRulesClientCreateOrUpdateOptions contains the optional parameters for the AlertRulesClient.CreateOrUpdate method. +type AlertRulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// AlertRulesClientDeleteOptions contains the optional parameters for the AlertRulesClient.Delete method. +type AlertRulesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AlertRulesClientGetOptions contains the optional parameters for the AlertRulesClient.Get method. +type AlertRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// AlertRulesClientListOptions contains the optional parameters for the AlertRulesClient.NewListPager method. +type AlertRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// AutomationRulesClientCreateOrUpdateOptions contains the optional parameters for the AutomationRulesClient.CreateOrUpdate +// method. +type AutomationRulesClientCreateOrUpdateOptions struct { + // The automation rule + AutomationRuleToUpsert *AutomationRule +} + +// AutomationRulesClientDeleteOptions contains the optional parameters for the AutomationRulesClient.Delete method. +type AutomationRulesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AutomationRulesClientGetOptions contains the optional parameters for the AutomationRulesClient.Get method. +type AutomationRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// AutomationRulesClientListOptions contains the optional parameters for the AutomationRulesClient.NewListPager method. +type AutomationRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// BookmarkClientExpandOptions contains the optional parameters for the BookmarkClient.Expand method. +type BookmarkClientExpandOptions struct { + // placeholder for future optional parameters +} + +// BookmarkRelationsClientCreateOrUpdateOptions contains the optional parameters for the BookmarkRelationsClient.CreateOrUpdate +// method. +type BookmarkRelationsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// BookmarkRelationsClientDeleteOptions contains the optional parameters for the BookmarkRelationsClient.Delete method. +type BookmarkRelationsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// BookmarkRelationsClientGetOptions contains the optional parameters for the BookmarkRelationsClient.Get method. +type BookmarkRelationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BookmarkRelationsClientListOptions contains the optional parameters for the BookmarkRelationsClient.NewListPager method. +type BookmarkRelationsClientListOptions struct { + // Filters the results, based on a Boolean condition. Optional. + Filter *string + + // Sorts the results. Optional. + Orderby *string + + // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skiptoken parameter that + // specifies a starting point to use for subsequent calls. Optional. + SkipToken *string + + // Returns only the first n results. Optional. + Top *int32 +} + +// BookmarksClientCreateOrUpdateOptions contains the optional parameters for the BookmarksClient.CreateOrUpdate method. +type BookmarksClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// BookmarksClientDeleteOptions contains the optional parameters for the BookmarksClient.Delete method. +type BookmarksClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// BookmarksClientGetOptions contains the optional parameters for the BookmarksClient.Get method. +type BookmarksClientGetOptions struct { + // placeholder for future optional parameters +} + +// BookmarksClientListOptions contains the optional parameters for the BookmarksClient.NewListPager method. +type BookmarksClientListOptions struct { + // placeholder for future optional parameters +} + +// DataConnectorsCheckRequirementsClientPostOptions contains the optional parameters for the DataConnectorsCheckRequirementsClient.Post +// method. +type DataConnectorsCheckRequirementsClientPostOptions struct { + // placeholder for future optional parameters +} + +// DataConnectorsClientConnectOptions contains the optional parameters for the DataConnectorsClient.Connect method. +type DataConnectorsClientConnectOptions struct { + // placeholder for future optional parameters +} + +// DataConnectorsClientCreateOrUpdateOptions contains the optional parameters for the DataConnectorsClient.CreateOrUpdate +// method. +type DataConnectorsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// DataConnectorsClientDeleteOptions contains the optional parameters for the DataConnectorsClient.Delete method. +type DataConnectorsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DataConnectorsClientDisconnectOptions contains the optional parameters for the DataConnectorsClient.Disconnect method. +type DataConnectorsClientDisconnectOptions struct { + // placeholder for future optional parameters +} + +// DataConnectorsClientGetOptions contains the optional parameters for the DataConnectorsClient.Get method. +type DataConnectorsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DataConnectorsClientListOptions contains the optional parameters for the DataConnectorsClient.NewListPager method. +type DataConnectorsClientListOptions struct { + // placeholder for future optional parameters +} + +// DomainWhoisClientGetOptions contains the optional parameters for the DomainWhoisClient.Get method. +type DomainWhoisClientGetOptions struct { + // placeholder for future optional parameters +} + +// EntitiesClientExpandOptions contains the optional parameters for the EntitiesClient.Expand method. +type EntitiesClientExpandOptions struct { + // placeholder for future optional parameters +} + +// EntitiesClientGetInsightsOptions contains the optional parameters for the EntitiesClient.GetInsights method. +type EntitiesClientGetInsightsOptions struct { + // placeholder for future optional parameters +} + +// EntitiesClientGetOptions contains the optional parameters for the EntitiesClient.Get method. +type EntitiesClientGetOptions struct { + // placeholder for future optional parameters +} + +// EntitiesClientListOptions contains the optional parameters for the EntitiesClient.NewListPager method. +type EntitiesClientListOptions struct { + // placeholder for future optional parameters +} + +// EntitiesClientQueriesOptions contains the optional parameters for the EntitiesClient.Queries method. +type EntitiesClientQueriesOptions struct { + // placeholder for future optional parameters +} + +// EntitiesGetTimelineClientListOptions contains the optional parameters for the EntitiesGetTimelineClient.List method. +type EntitiesGetTimelineClientListOptions struct { + // placeholder for future optional parameters +} + +// EntitiesRelationsClientListOptions contains the optional parameters for the EntitiesRelationsClient.NewListPager method. +type EntitiesRelationsClientListOptions struct { + // Filters the results, based on a Boolean condition. Optional. + Filter *string + + // Sorts the results. Optional. + Orderby *string + + // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skiptoken parameter that + // specifies a starting point to use for subsequent calls. Optional. + SkipToken *string + + // Returns only the first n results. Optional. + Top *int32 +} + +// EntityQueriesClientCreateOrUpdateOptions contains the optional parameters for the EntityQueriesClient.CreateOrUpdate method. +type EntityQueriesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// EntityQueriesClientDeleteOptions contains the optional parameters for the EntityQueriesClient.Delete method. +type EntityQueriesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// EntityQueriesClientGetOptions contains the optional parameters for the EntityQueriesClient.Get method. +type EntityQueriesClientGetOptions struct { + // placeholder for future optional parameters +} + +// EntityQueriesClientListOptions contains the optional parameters for the EntityQueriesClient.NewListPager method. +type EntityQueriesClientListOptions struct { + // The entity query kind we want to fetch + Kind *Enum13 +} + +// EntityQueryTemplatesClientGetOptions contains the optional parameters for the EntityQueryTemplatesClient.Get method. +type EntityQueryTemplatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// EntityQueryTemplatesClientListOptions contains the optional parameters for the EntityQueryTemplatesClient.NewListPager +// method. +type EntityQueryTemplatesClientListOptions struct { + // The entity template query kind we want to fetch + Kind *Enum15 +} + +// EntityRelationsClientGetRelationOptions contains the optional parameters for the EntityRelationsClient.GetRelation method. +type EntityRelationsClientGetRelationOptions struct { + // placeholder for future optional parameters +} + +// FileImportsClientBeginDeleteOptions contains the optional parameters for the FileImportsClient.BeginDelete method. +type FileImportsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FileImportsClientCreateOptions contains the optional parameters for the FileImportsClient.Create method. +type FileImportsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// FileImportsClientGetOptions contains the optional parameters for the FileImportsClient.Get method. +type FileImportsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FileImportsClientListOptions contains the optional parameters for the FileImportsClient.NewListPager method. +type FileImportsClientListOptions struct { + // Filters the results, based on a Boolean condition. Optional. + Filter *string + + // Sorts the results. Optional. + Orderby *string + + // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skiptoken parameter that + // specifies a starting point to use for subsequent calls. Optional. + SkipToken *string + + // Returns only the first n results. Optional. + Top *int32 +} + +// IPGeodataClientGetOptions contains the optional parameters for the IPGeodataClient.Get method. +type IPGeodataClientGetOptions struct { + // placeholder for future optional parameters +} + +// IncidentCommentsClientCreateOrUpdateOptions contains the optional parameters for the IncidentCommentsClient.CreateOrUpdate +// method. +type IncidentCommentsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// IncidentCommentsClientDeleteOptions contains the optional parameters for the IncidentCommentsClient.Delete method. +type IncidentCommentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IncidentCommentsClientGetOptions contains the optional parameters for the IncidentCommentsClient.Get method. +type IncidentCommentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// IncidentCommentsClientListOptions contains the optional parameters for the IncidentCommentsClient.NewListPager method. +type IncidentCommentsClientListOptions struct { + // Filters the results, based on a Boolean condition. Optional. + Filter *string + + // Sorts the results. Optional. + Orderby *string + + // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skiptoken parameter that + // specifies a starting point to use for subsequent calls. Optional. + SkipToken *string + + // Returns only the first n results. Optional. + Top *int32 +} + +// IncidentRelationsClientCreateOrUpdateOptions contains the optional parameters for the IncidentRelationsClient.CreateOrUpdate +// method. +type IncidentRelationsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// IncidentRelationsClientDeleteOptions contains the optional parameters for the IncidentRelationsClient.Delete method. +type IncidentRelationsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IncidentRelationsClientGetOptions contains the optional parameters for the IncidentRelationsClient.Get method. +type IncidentRelationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// IncidentRelationsClientListOptions contains the optional parameters for the IncidentRelationsClient.NewListPager method. +type IncidentRelationsClientListOptions struct { + // Filters the results, based on a Boolean condition. Optional. + Filter *string + + // Sorts the results. Optional. + Orderby *string + + // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skiptoken parameter that + // specifies a starting point to use for subsequent calls. Optional. + SkipToken *string + + // Returns only the first n results. Optional. + Top *int32 +} + +// IncidentsClientCreateOrUpdateOptions contains the optional parameters for the IncidentsClient.CreateOrUpdate method. +type IncidentsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// IncidentsClientCreateTeamOptions contains the optional parameters for the IncidentsClient.CreateTeam method. +type IncidentsClientCreateTeamOptions struct { + // placeholder for future optional parameters +} + +// IncidentsClientDeleteOptions contains the optional parameters for the IncidentsClient.Delete method. +type IncidentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IncidentsClientGetOptions contains the optional parameters for the IncidentsClient.Get method. +type IncidentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// IncidentsClientListAlertsOptions contains the optional parameters for the IncidentsClient.ListAlerts method. +type IncidentsClientListAlertsOptions struct { + // placeholder for future optional parameters +} + +// IncidentsClientListBookmarksOptions contains the optional parameters for the IncidentsClient.ListBookmarks method. +type IncidentsClientListBookmarksOptions struct { + // placeholder for future optional parameters +} + +// IncidentsClientListEntitiesOptions contains the optional parameters for the IncidentsClient.ListEntities method. +type IncidentsClientListEntitiesOptions struct { + // placeholder for future optional parameters +} + +// IncidentsClientListOptions contains the optional parameters for the IncidentsClient.NewListPager method. +type IncidentsClientListOptions struct { + // Filters the results, based on a Boolean condition. Optional. + Filter *string + + // Sorts the results. Optional. + Orderby *string + + // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skiptoken parameter that + // specifies a starting point to use for subsequent calls. Optional. + SkipToken *string + + // Returns only the first n results. Optional. + Top *int32 +} + +// IncidentsClientRunPlaybookOptions contains the optional parameters for the IncidentsClient.RunPlaybook method. +type IncidentsClientRunPlaybookOptions struct { + RequestBody *ManualTriggerRequestBody +} + +// MetadataClientCreateOptions contains the optional parameters for the MetadataClient.Create method. +type MetadataClientCreateOptions struct { + // placeholder for future optional parameters +} + +// MetadataClientDeleteOptions contains the optional parameters for the MetadataClient.Delete method. +type MetadataClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// MetadataClientGetOptions contains the optional parameters for the MetadataClient.Get method. +type MetadataClientGetOptions struct { + // placeholder for future optional parameters +} + +// MetadataClientListOptions contains the optional parameters for the MetadataClient.NewListPager method. +type MetadataClientListOptions struct { + // Filters the results, based on a Boolean condition. Optional. + Filter *string + + // Sorts the results. Optional. + Orderby *string + + // Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results if there are any left. + Skip *int32 + + // Returns only the first n results. Optional. + Top *int32 +} + +// MetadataClientUpdateOptions contains the optional parameters for the MetadataClient.Update method. +type MetadataClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// OfficeConsentsClientDeleteOptions contains the optional parameters for the OfficeConsentsClient.Delete method. +type OfficeConsentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// OfficeConsentsClientGetOptions contains the optional parameters for the OfficeConsentsClient.Get method. +type OfficeConsentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// OfficeConsentsClientListOptions contains the optional parameters for the OfficeConsentsClient.NewListPager method. +type OfficeConsentsClientListOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ProductSettingsClientDeleteOptions contains the optional parameters for the ProductSettingsClient.Delete method. +type ProductSettingsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ProductSettingsClientGetOptions contains the optional parameters for the ProductSettingsClient.Get method. +type ProductSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProductSettingsClientListOptions contains the optional parameters for the ProductSettingsClient.List method. +type ProductSettingsClientListOptions struct { + // placeholder for future optional parameters +} + +// ProductSettingsClientUpdateOptions contains the optional parameters for the ProductSettingsClient.Update method. +type ProductSettingsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// SecurityMLAnalyticsSettingsClientCreateOrUpdateOptions contains the optional parameters for the SecurityMLAnalyticsSettingsClient.CreateOrUpdate +// method. +type SecurityMLAnalyticsSettingsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SecurityMLAnalyticsSettingsClientDeleteOptions contains the optional parameters for the SecurityMLAnalyticsSettingsClient.Delete +// method. +type SecurityMLAnalyticsSettingsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SecurityMLAnalyticsSettingsClientGetOptions contains the optional parameters for the SecurityMLAnalyticsSettingsClient.Get +// method. +type SecurityMLAnalyticsSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecurityMLAnalyticsSettingsClientListOptions contains the optional parameters for the SecurityMLAnalyticsSettingsClient.NewListPager +// method. +type SecurityMLAnalyticsSettingsClientListOptions struct { + // placeholder for future optional parameters +} + +// SentinelOnboardingStatesClientCreateOptions contains the optional parameters for the SentinelOnboardingStatesClient.Create +// method. +type SentinelOnboardingStatesClientCreateOptions struct { + // The Sentinel onboarding state parameter + SentinelOnboardingStateParameter *SentinelOnboardingState +} + +// SentinelOnboardingStatesClientDeleteOptions contains the optional parameters for the SentinelOnboardingStatesClient.Delete +// method. +type SentinelOnboardingStatesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SentinelOnboardingStatesClientGetOptions contains the optional parameters for the SentinelOnboardingStatesClient.Get method. +type SentinelOnboardingStatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SentinelOnboardingStatesClientListOptions contains the optional parameters for the SentinelOnboardingStatesClient.List +// method. +type SentinelOnboardingStatesClientListOptions struct { + // placeholder for future optional parameters +} + +// SourceControlClientListRepositoriesOptions contains the optional parameters for the SourceControlClient.NewListRepositoriesPager +// method. +type SourceControlClientListRepositoriesOptions struct { + // placeholder for future optional parameters +} + +// SourceControlsClientCreateOptions contains the optional parameters for the SourceControlsClient.Create method. +type SourceControlsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// SourceControlsClientDeleteOptions contains the optional parameters for the SourceControlsClient.Delete method. +type SourceControlsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SourceControlsClientGetOptions contains the optional parameters for the SourceControlsClient.Get method. +type SourceControlsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SourceControlsClientListOptions contains the optional parameters for the SourceControlsClient.NewListPager method. +type SourceControlsClientListOptions struct { + // placeholder for future optional parameters +} + +// ThreatIntelligenceIndicatorClientAppendTagsOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.AppendTags +// method. +type ThreatIntelligenceIndicatorClientAppendTagsOptions struct { + // placeholder for future optional parameters +} + +// ThreatIntelligenceIndicatorClientCreateIndicatorOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.CreateIndicator +// method. +type ThreatIntelligenceIndicatorClientCreateIndicatorOptions struct { + // placeholder for future optional parameters +} + +// ThreatIntelligenceIndicatorClientCreateOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.Create +// method. +type ThreatIntelligenceIndicatorClientCreateOptions struct { + // placeholder for future optional parameters +} + +// ThreatIntelligenceIndicatorClientDeleteOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.Delete +// method. +type ThreatIntelligenceIndicatorClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ThreatIntelligenceIndicatorClientGetOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.Get +// method. +type ThreatIntelligenceIndicatorClientGetOptions struct { + // placeholder for future optional parameters +} + +// ThreatIntelligenceIndicatorClientQueryIndicatorsOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.NewQueryIndicatorsPager +// method. +type ThreatIntelligenceIndicatorClientQueryIndicatorsOptions struct { + // placeholder for future optional parameters +} + +// ThreatIntelligenceIndicatorClientReplaceTagsOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.ReplaceTags +// method. +type ThreatIntelligenceIndicatorClientReplaceTagsOptions struct { + // placeholder for future optional parameters +} + +// ThreatIntelligenceIndicatorMetricsClientListOptions contains the optional parameters for the ThreatIntelligenceIndicatorMetricsClient.List +// method. +type ThreatIntelligenceIndicatorMetricsClientListOptions struct { + // placeholder for future optional parameters +} + +// ThreatIntelligenceIndicatorsClientListOptions contains the optional parameters for the ThreatIntelligenceIndicatorsClient.NewListPager +// method. +type ThreatIntelligenceIndicatorsClientListOptions struct { + // Filters the results, based on a Boolean condition. Optional. + Filter *string + + // Sorts the results. Optional. + Orderby *string + + // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skiptoken parameter that + // specifies a starting point to use for subsequent calls. Optional. + SkipToken *string + + // Returns only the first n results. Optional. + Top *int32 +} + +// WatchlistItemsClientCreateOrUpdateOptions contains the optional parameters for the WatchlistItemsClient.CreateOrUpdate +// method. +type WatchlistItemsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WatchlistItemsClientDeleteOptions contains the optional parameters for the WatchlistItemsClient.Delete method. +type WatchlistItemsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WatchlistItemsClientGetOptions contains the optional parameters for the WatchlistItemsClient.Get method. +type WatchlistItemsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WatchlistItemsClientListOptions contains the optional parameters for the WatchlistItemsClient.NewListPager method. +type WatchlistItemsClientListOptions struct { + // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skiptoken parameter that + // specifies a starting point to use for subsequent calls. Optional. + SkipToken *string +} + +// WatchlistsClientCreateOrUpdateOptions contains the optional parameters for the WatchlistsClient.CreateOrUpdate method. +type WatchlistsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WatchlistsClientDeleteOptions contains the optional parameters for the WatchlistsClient.Delete method. +type WatchlistsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WatchlistsClientGetOptions contains the optional parameters for the WatchlistsClient.Get method. +type WatchlistsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WatchlistsClientListOptions contains the optional parameters for the WatchlistsClient.NewListPager method. +type WatchlistsClientListOptions struct { + // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skiptoken parameter that + // specifies a starting point to use for subsequent calls. Optional. + SkipToken *string +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/polymorphic_helpers.go index e5ee76fc..5a07d8b5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/polymorphic_helpers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/polymorphic_helpers.go @@ -3,16 +3,15 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights import "encoding/json" func unmarshalAlertRuleClassification(rawMsg json.RawMessage) (AlertRuleClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -36,11 +35,14 @@ func unmarshalAlertRuleClassification(rawMsg json.RawMessage) (AlertRuleClassifi default: b = &AlertRule{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalAlertRuleClassificationArray(rawMsg json.RawMessage) ([]AlertRuleClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -59,7 +61,7 @@ func unmarshalAlertRuleClassificationArray(rawMsg json.RawMessage) ([]AlertRuleC } func unmarshalAlertRuleTemplateClassification(rawMsg json.RawMessage) (AlertRuleTemplateClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -83,11 +85,14 @@ func unmarshalAlertRuleTemplateClassification(rawMsg json.RawMessage) (AlertRule default: b = &AlertRuleTemplate{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalAlertRuleTemplateClassificationArray(rawMsg json.RawMessage) ([]AlertRuleTemplateClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -106,7 +111,7 @@ func unmarshalAlertRuleTemplateClassificationArray(rawMsg json.RawMessage) ([]Al } func unmarshalAutomationRuleActionClassification(rawMsg json.RawMessage) (AutomationRuleActionClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -122,11 +127,14 @@ func unmarshalAutomationRuleActionClassification(rawMsg json.RawMessage) (Automa default: b = &AutomationRuleAction{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalAutomationRuleActionClassificationArray(rawMsg json.RawMessage) ([]AutomationRuleActionClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -145,7 +153,7 @@ func unmarshalAutomationRuleActionClassificationArray(rawMsg json.RawMessage) ([ } func unmarshalAutomationRuleConditionClassification(rawMsg json.RawMessage) (AutomationRuleConditionClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -167,11 +175,14 @@ func unmarshalAutomationRuleConditionClassification(rawMsg json.RawMessage) (Aut default: b = &AutomationRuleCondition{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalAutomationRuleConditionClassificationArray(rawMsg json.RawMessage) ([]AutomationRuleConditionClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -190,7 +201,7 @@ func unmarshalAutomationRuleConditionClassificationArray(rawMsg json.RawMessage) } func unmarshalDataConnectorClassification(rawMsg json.RawMessage) (DataConnectorClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -242,11 +253,14 @@ func unmarshalDataConnectorClassification(rawMsg json.RawMessage) (DataConnector default: b = &DataConnector{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalDataConnectorClassificationArray(rawMsg json.RawMessage) ([]DataConnectorClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -265,7 +279,7 @@ func unmarshalDataConnectorClassificationArray(rawMsg json.RawMessage) ([]DataCo } func unmarshalEntityClassification(rawMsg json.RawMessage) (EntityClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -321,11 +335,14 @@ func unmarshalEntityClassification(rawMsg json.RawMessage) (EntityClassification default: b = &Entity{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalEntityClassificationArray(rawMsg json.RawMessage) ([]EntityClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -344,7 +361,7 @@ func unmarshalEntityClassificationArray(rawMsg json.RawMessage) ([]EntityClassif } func unmarshalEntityQueryClassification(rawMsg json.RawMessage) (EntityQueryClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -360,11 +377,14 @@ func unmarshalEntityQueryClassification(rawMsg json.RawMessage) (EntityQueryClas default: b = &EntityQuery{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalEntityQueryClassificationArray(rawMsg json.RawMessage) ([]EntityQueryClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -383,7 +403,7 @@ func unmarshalEntityQueryClassificationArray(rawMsg json.RawMessage) ([]EntityQu } func unmarshalEntityQueryItemClassification(rawMsg json.RawMessage) (EntityQueryItemClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -397,11 +417,14 @@ func unmarshalEntityQueryItemClassification(rawMsg json.RawMessage) (EntityQuery default: b = &EntityQueryItem{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalEntityQueryItemClassificationArray(rawMsg json.RawMessage) ([]EntityQueryItemClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -420,7 +443,7 @@ func unmarshalEntityQueryItemClassificationArray(rawMsg json.RawMessage) ([]Enti } func unmarshalEntityQueryTemplateClassification(rawMsg json.RawMessage) (EntityQueryTemplateClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -434,11 +457,14 @@ func unmarshalEntityQueryTemplateClassification(rawMsg json.RawMessage) (EntityQ default: b = &EntityQueryTemplate{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalEntityQueryTemplateClassificationArray(rawMsg json.RawMessage) ([]EntityQueryTemplateClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -457,7 +483,7 @@ func unmarshalEntityQueryTemplateClassificationArray(rawMsg json.RawMessage) ([] } func unmarshalEntityTimelineItemClassification(rawMsg json.RawMessage) (EntityTimelineItemClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -477,11 +503,14 @@ func unmarshalEntityTimelineItemClassification(rawMsg json.RawMessage) (EntityTi default: b = &EntityTimelineItem{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalEntityTimelineItemClassificationArray(rawMsg json.RawMessage) ([]EntityTimelineItemClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -500,7 +529,7 @@ func unmarshalEntityTimelineItemClassificationArray(rawMsg json.RawMessage) ([]E } func unmarshalSecurityMLAnalyticsSettingClassification(rawMsg json.RawMessage) (SecurityMLAnalyticsSettingClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -514,11 +543,14 @@ func unmarshalSecurityMLAnalyticsSettingClassification(rawMsg json.RawMessage) ( default: b = &SecurityMLAnalyticsSetting{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalSecurityMLAnalyticsSettingClassificationArray(rawMsg json.RawMessage) ([]SecurityMLAnalyticsSettingClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -537,7 +569,7 @@ func unmarshalSecurityMLAnalyticsSettingClassificationArray(rawMsg json.RawMessa } func unmarshalSettingsClassification(rawMsg json.RawMessage) (SettingsClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -557,11 +589,14 @@ func unmarshalSettingsClassification(rawMsg json.RawMessage) (SettingsClassifica default: b = &Settings{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalSettingsClassificationArray(rawMsg json.RawMessage) ([]SettingsClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -580,7 +615,7 @@ func unmarshalSettingsClassificationArray(rawMsg json.RawMessage) ([]SettingsCla } func unmarshalThreatIntelligenceInformationClassification(rawMsg json.RawMessage) (ThreatIntelligenceInformationClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -594,11 +629,14 @@ func unmarshalThreatIntelligenceInformationClassification(rawMsg json.RawMessage default: b = &ThreatIntelligenceInformation{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalThreatIntelligenceInformationClassificationArray(rawMsg json.RawMessage) ([]ThreatIntelligenceInformationClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/productsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/productsettings_client.go index 4bf11bee..285f671f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/productsettings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/productsettings_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type ProductSettingsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProductSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductSettingsClient, error) { - cl, err := arm.NewClient(moduleName+".ProductSettingsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,16 +52,22 @@ func NewProductSettingsClient(subscriptionID string, credential azcore.TokenCred // - settingsName - The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba // - options - ProductSettingsClientDeleteOptions contains the optional parameters for the ProductSettingsClient.Delete method. func (client *ProductSettingsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, settingsName string, options *ProductSettingsClientDeleteOptions) (ProductSettingsClientDeleteResponse, error) { + var err error + const operationName = "ProductSettingsClient.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, workspaceName, settingsName, options) if err != nil { return ProductSettingsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductSettingsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ProductSettingsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProductSettingsClientDeleteResponse{}, err } return ProductSettingsClientDeleteResponse{}, nil } @@ -106,18 +111,25 @@ func (client *ProductSettingsClient) deleteCreateRequest(ctx context.Context, re // - settingsName - The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba // - options - ProductSettingsClientGetOptions contains the optional parameters for the ProductSettingsClient.Get method. func (client *ProductSettingsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, settingsName string, options *ProductSettingsClientGetOptions) (ProductSettingsClientGetResponse, error) { + var err error + const operationName = "ProductSettingsClient.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, settingsName, options) if err != nil { return ProductSettingsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductSettingsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductSettingsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProductSettingsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -167,18 +179,25 @@ func (client *ProductSettingsClient) getHandleResponse(resp *http.Response) (Pro // - workspaceName - The name of the workspace. // - options - ProductSettingsClientListOptions contains the optional parameters for the ProductSettingsClient.List method. func (client *ProductSettingsClient) List(ctx context.Context, resourceGroupName string, workspaceName string, options *ProductSettingsClientListOptions) (ProductSettingsClientListResponse, error) { + var err error + const operationName = "ProductSettingsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return ProductSettingsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductSettingsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductSettingsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProductSettingsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -226,18 +245,25 @@ func (client *ProductSettingsClient) listHandleResponse(resp *http.Response) (Pr // - settings - The setting // - options - ProductSettingsClientUpdateOptions contains the optional parameters for the ProductSettingsClient.Update method. func (client *ProductSettingsClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, settingsName string, settings SettingsClassification, options *ProductSettingsClientUpdateOptions) (ProductSettingsClientUpdateResponse, error) { + var err error + const operationName = "ProductSettingsClient.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, workspaceName, settingsName, settings, options) if err != nil { return ProductSettingsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductSettingsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductSettingsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProductSettingsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -267,7 +293,10 @@ func (client *ProductSettingsClient) updateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, settings) + if err := runtime.MarshalAsJSON(req, settings); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/responses.go similarity index 88% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/response_types.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/responses.go index 1cca71c3..d6afad42 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/responses.go @@ -3,14 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights // ActionsClientCreateOrUpdateResponse contains the response from method ActionsClient.CreateOrUpdate. type ActionsClientCreateOrUpdateResponse struct { + // Action for alert rule. ActionResponse } @@ -21,16 +21,19 @@ type ActionsClientDeleteResponse struct { // ActionsClientGetResponse contains the response from method ActionsClient.Get. type ActionsClientGetResponse struct { + // Action for alert rule. ActionResponse } // ActionsClientListByAlertRuleResponse contains the response from method ActionsClient.NewListByAlertRulePager. type ActionsClientListByAlertRuleResponse struct { + // List all the actions. ActionsList } // AlertRuleTemplatesClientGetResponse contains the response from method AlertRuleTemplatesClient.Get. type AlertRuleTemplatesClientGetResponse struct { + // Alert rule template. AlertRuleTemplateClassification } @@ -46,11 +49,13 @@ func (a *AlertRuleTemplatesClientGetResponse) UnmarshalJSON(data []byte) error { // AlertRuleTemplatesClientListResponse contains the response from method AlertRuleTemplatesClient.NewListPager. type AlertRuleTemplatesClientListResponse struct { + // List all the alert rule templates. AlertRuleTemplatesList } // AlertRulesClientCreateOrUpdateResponse contains the response from method AlertRulesClient.CreateOrUpdate. type AlertRulesClientCreateOrUpdateResponse struct { + // Alert rule. AlertRuleClassification } @@ -71,6 +76,7 @@ type AlertRulesClientDeleteResponse struct { // AlertRulesClientGetResponse contains the response from method AlertRulesClient.Get. type AlertRulesClientGetResponse struct { + // Alert rule. AlertRuleClassification } @@ -86,6 +92,7 @@ func (a *AlertRulesClientGetResponse) UnmarshalJSON(data []byte) error { // AlertRulesClientListResponse contains the response from method AlertRulesClient.NewListPager. type AlertRulesClientListResponse struct { + // List all the alert rules. AlertRulesList } @@ -112,11 +119,13 @@ type AutomationRulesClientListResponse struct { // BookmarkClientExpandResponse contains the response from method BookmarkClient.Expand. type BookmarkClientExpandResponse struct { + // The entity expansion result operation response. BookmarkExpandResponse } // BookmarkRelationsClientCreateOrUpdateResponse contains the response from method BookmarkRelationsClient.CreateOrUpdate. type BookmarkRelationsClientCreateOrUpdateResponse struct { + // Represents a relation between two resources Relation } @@ -127,16 +136,19 @@ type BookmarkRelationsClientDeleteResponse struct { // BookmarkRelationsClientGetResponse contains the response from method BookmarkRelationsClient.Get. type BookmarkRelationsClientGetResponse struct { + // Represents a relation between two resources Relation } // BookmarkRelationsClientListResponse contains the response from method BookmarkRelationsClient.NewListPager. type BookmarkRelationsClientListResponse struct { + // List of relations. RelationList } // BookmarksClientCreateOrUpdateResponse contains the response from method BookmarksClient.CreateOrUpdate. type BookmarksClientCreateOrUpdateResponse struct { + // Represents a bookmark in Azure Security Insights. Bookmark } @@ -147,16 +159,19 @@ type BookmarksClientDeleteResponse struct { // BookmarksClientGetResponse contains the response from method BookmarksClient.Get. type BookmarksClientGetResponse struct { + // Represents a bookmark in Azure Security Insights. Bookmark } // BookmarksClientListResponse contains the response from method BookmarksClient.NewListPager. type BookmarksClientListResponse struct { + // List all the bookmarks. BookmarkList } // DataConnectorsCheckRequirementsClientPostResponse contains the response from method DataConnectorsCheckRequirementsClient.Post. type DataConnectorsCheckRequirementsClientPostResponse struct { + // Data connector requirements status. DataConnectorRequirementsState } @@ -167,6 +182,7 @@ type DataConnectorsClientConnectResponse struct { // DataConnectorsClientCreateOrUpdateResponse contains the response from method DataConnectorsClient.CreateOrUpdate. type DataConnectorsClientCreateOrUpdateResponse struct { + // Data connector DataConnectorClassification } @@ -192,6 +208,7 @@ type DataConnectorsClientDisconnectResponse struct { // DataConnectorsClientGetResponse contains the response from method DataConnectorsClient.Get. type DataConnectorsClientGetResponse struct { + // Data connector DataConnectorClassification } @@ -207,26 +224,31 @@ func (d *DataConnectorsClientGetResponse) UnmarshalJSON(data []byte) error { // DataConnectorsClientListResponse contains the response from method DataConnectorsClient.NewListPager. type DataConnectorsClientListResponse struct { + // List all the data connectors. DataConnectorList } // DomainWhoisClientGetResponse contains the response from method DomainWhoisClient.Get. type DomainWhoisClientGetResponse struct { + // Whois information for a given domain and associated metadata EnrichmentDomainWhois } // EntitiesClientExpandResponse contains the response from method EntitiesClient.Expand. type EntitiesClientExpandResponse struct { + // The entity expansion result operation response. EntityExpandResponse } // EntitiesClientGetInsightsResponse contains the response from method EntitiesClient.GetInsights. type EntitiesClientGetInsightsResponse struct { + // The Get Insights result operation response. EntityGetInsightsResponse } // EntitiesClientGetResponse contains the response from method EntitiesClient.Get. type EntitiesClientGetResponse struct { + // Specific entity. EntityClassification } @@ -242,26 +264,31 @@ func (e *EntitiesClientGetResponse) UnmarshalJSON(data []byte) error { // EntitiesClientListResponse contains the response from method EntitiesClient.NewListPager. type EntitiesClientListResponse struct { + // List of all the entities. EntityList } // EntitiesClientQueriesResponse contains the response from method EntitiesClient.Queries. type EntitiesClientQueriesResponse struct { + // Retrieve queries for entity result operation response. GetQueriesResponse } // EntitiesGetTimelineClientListResponse contains the response from method EntitiesGetTimelineClient.List. type EntitiesGetTimelineClientListResponse struct { + // The entity timeline result operation response. EntityTimelineResponse } // EntitiesRelationsClientListResponse contains the response from method EntitiesRelationsClient.NewListPager. type EntitiesRelationsClientListResponse struct { + // List of relations. RelationList } // EntityQueriesClientCreateOrUpdateResponse contains the response from method EntityQueriesClient.CreateOrUpdate. type EntityQueriesClientCreateOrUpdateResponse struct { + // Specific entity query. EntityQueryClassification } @@ -282,6 +309,7 @@ type EntityQueriesClientDeleteResponse struct { // EntityQueriesClientGetResponse contains the response from method EntityQueriesClient.Get. type EntityQueriesClientGetResponse struct { + // Specific entity query. EntityQueryClassification } @@ -297,11 +325,13 @@ func (e *EntityQueriesClientGetResponse) UnmarshalJSON(data []byte) error { // EntityQueriesClientListResponse contains the response from method EntityQueriesClient.NewListPager. type EntityQueriesClientListResponse struct { + // List of all the entity queries. EntityQueryList } // EntityQueryTemplatesClientGetResponse contains the response from method EntityQueryTemplatesClient.Get. type EntityQueryTemplatesClientGetResponse struct { + // Specific entity query template. EntityQueryTemplateClassification } @@ -317,41 +347,49 @@ func (e *EntityQueryTemplatesClientGetResponse) UnmarshalJSON(data []byte) error // EntityQueryTemplatesClientListResponse contains the response from method EntityQueryTemplatesClient.NewListPager. type EntityQueryTemplatesClientListResponse struct { + // List of all the entity query templates. EntityQueryTemplateList } // EntityRelationsClientGetRelationResponse contains the response from method EntityRelationsClient.GetRelation. type EntityRelationsClientGetRelationResponse struct { + // Represents a relation between two resources Relation } // FileImportsClientCreateResponse contains the response from method FileImportsClient.Create. type FileImportsClientCreateResponse struct { + // Represents a file import in Azure Security Insights. FileImport } // FileImportsClientDeleteResponse contains the response from method FileImportsClient.BeginDelete. type FileImportsClientDeleteResponse struct { + // Represents a file import in Azure Security Insights. FileImport } // FileImportsClientGetResponse contains the response from method FileImportsClient.Get. type FileImportsClientGetResponse struct { + // Represents a file import in Azure Security Insights. FileImport } // FileImportsClientListResponse contains the response from method FileImportsClient.NewListPager. type FileImportsClientListResponse struct { + // List all the file imports. FileImportList } // IPGeodataClientGetResponse contains the response from method IPGeodataClient.Get. type IPGeodataClientGetResponse struct { + // Geodata information for a given IP address EnrichmentIPGeodata } // IncidentCommentsClientCreateOrUpdateResponse contains the response from method IncidentCommentsClient.CreateOrUpdate. type IncidentCommentsClientCreateOrUpdateResponse struct { + // Represents an incident comment IncidentComment } @@ -362,16 +400,19 @@ type IncidentCommentsClientDeleteResponse struct { // IncidentCommentsClientGetResponse contains the response from method IncidentCommentsClient.Get. type IncidentCommentsClientGetResponse struct { + // Represents an incident comment IncidentComment } // IncidentCommentsClientListResponse contains the response from method IncidentCommentsClient.NewListPager. type IncidentCommentsClientListResponse struct { + // List of incident comments. IncidentCommentList } // IncidentRelationsClientCreateOrUpdateResponse contains the response from method IncidentRelationsClient.CreateOrUpdate. type IncidentRelationsClientCreateOrUpdateResponse struct { + // Represents a relation between two resources Relation } @@ -382,21 +423,25 @@ type IncidentRelationsClientDeleteResponse struct { // IncidentRelationsClientGetResponse contains the response from method IncidentRelationsClient.Get. type IncidentRelationsClientGetResponse struct { + // Represents a relation between two resources Relation } // IncidentRelationsClientListResponse contains the response from method IncidentRelationsClient.NewListPager. type IncidentRelationsClientListResponse struct { + // List of relations. RelationList } // IncidentsClientCreateOrUpdateResponse contains the response from method IncidentsClient.CreateOrUpdate. type IncidentsClientCreateOrUpdateResponse struct { + // Represents an incident in Azure Security Insights. Incident } // IncidentsClientCreateTeamResponse contains the response from method IncidentsClient.CreateTeam. type IncidentsClientCreateTeamResponse struct { + // Describes team information TeamInformation } @@ -407,26 +452,31 @@ type IncidentsClientDeleteResponse struct { // IncidentsClientGetResponse contains the response from method IncidentsClient.Get. type IncidentsClientGetResponse struct { + // Represents an incident in Azure Security Insights. Incident } // IncidentsClientListAlertsResponse contains the response from method IncidentsClient.ListAlerts. type IncidentsClientListAlertsResponse struct { + // List of incident alerts. IncidentAlertList } // IncidentsClientListBookmarksResponse contains the response from method IncidentsClient.ListBookmarks. type IncidentsClientListBookmarksResponse struct { + // List of incident bookmarks. IncidentBookmarkList } // IncidentsClientListEntitiesResponse contains the response from method IncidentsClient.ListEntities. type IncidentsClientListEntitiesResponse struct { + // The incident related entities response. IncidentEntitiesResponse } // IncidentsClientListResponse contains the response from method IncidentsClient.NewListPager. type IncidentsClientListResponse struct { + // List all the incidents. IncidentList } @@ -438,6 +488,7 @@ type IncidentsClientRunPlaybookResponse struct { // MetadataClientCreateResponse contains the response from method MetadataClient.Create. type MetadataClientCreateResponse struct { + // Metadata resource definition. MetadataModel } @@ -448,16 +499,19 @@ type MetadataClientDeleteResponse struct { // MetadataClientGetResponse contains the response from method MetadataClient.Get. type MetadataClientGetResponse struct { + // Metadata resource definition. MetadataModel } // MetadataClientListResponse contains the response from method MetadataClient.NewListPager. type MetadataClientListResponse struct { + // List of all the metadata. MetadataList } // MetadataClientUpdateResponse contains the response from method MetadataClient.Update. type MetadataClientUpdateResponse struct { + // Metadata resource definition. MetadataModel } @@ -468,16 +522,19 @@ type OfficeConsentsClientDeleteResponse struct { // OfficeConsentsClientGetResponse contains the response from method OfficeConsentsClient.Get. type OfficeConsentsClientGetResponse struct { + // Consent for Office365 tenant that already made. OfficeConsent } // OfficeConsentsClientListResponse contains the response from method OfficeConsentsClient.NewListPager. type OfficeConsentsClientListResponse struct { + // List of all the office365 consents. OfficeConsentList } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Lists the operations available in the SecurityInsights RP. OperationsList } @@ -488,6 +545,7 @@ type ProductSettingsClientDeleteResponse struct { // ProductSettingsClientGetResponse contains the response from method ProductSettingsClient.Get. type ProductSettingsClientGetResponse struct { + // The Setting. SettingsClassification } @@ -503,11 +561,13 @@ func (p *ProductSettingsClientGetResponse) UnmarshalJSON(data []byte) error { // ProductSettingsClientListResponse contains the response from method ProductSettingsClient.List. type ProductSettingsClientListResponse struct { + // List of all the settings. SettingList } // ProductSettingsClientUpdateResponse contains the response from method ProductSettingsClient.Update. type ProductSettingsClientUpdateResponse struct { + // The Setting. SettingsClassification } @@ -523,6 +583,7 @@ func (p *ProductSettingsClientUpdateResponse) UnmarshalJSON(data []byte) error { // SecurityMLAnalyticsSettingsClientCreateOrUpdateResponse contains the response from method SecurityMLAnalyticsSettingsClient.CreateOrUpdate. type SecurityMLAnalyticsSettingsClientCreateOrUpdateResponse struct { + // Security ML Analytics Setting SecurityMLAnalyticsSettingClassification } @@ -543,6 +604,7 @@ type SecurityMLAnalyticsSettingsClientDeleteResponse struct { // SecurityMLAnalyticsSettingsClientGetResponse contains the response from method SecurityMLAnalyticsSettingsClient.Get. type SecurityMLAnalyticsSettingsClientGetResponse struct { + // Security ML Analytics Setting SecurityMLAnalyticsSettingClassification } @@ -558,11 +620,13 @@ func (s *SecurityMLAnalyticsSettingsClientGetResponse) UnmarshalJSON(data []byte // SecurityMLAnalyticsSettingsClientListResponse contains the response from method SecurityMLAnalyticsSettingsClient.NewListPager. type SecurityMLAnalyticsSettingsClientListResponse struct { + // List all the SecurityMLAnalyticsSettings SecurityMLAnalyticsSettingsList } // SentinelOnboardingStatesClientCreateResponse contains the response from method SentinelOnboardingStatesClient.Create. type SentinelOnboardingStatesClientCreateResponse struct { + // Sentinel onboarding state SentinelOnboardingState } @@ -573,21 +637,25 @@ type SentinelOnboardingStatesClientDeleteResponse struct { // SentinelOnboardingStatesClientGetResponse contains the response from method SentinelOnboardingStatesClient.Get. type SentinelOnboardingStatesClientGetResponse struct { + // Sentinel onboarding state SentinelOnboardingState } // SentinelOnboardingStatesClientListResponse contains the response from method SentinelOnboardingStatesClient.List. type SentinelOnboardingStatesClientListResponse struct { + // List of the Sentinel onboarding states SentinelOnboardingStatesList } // SourceControlClientListRepositoriesResponse contains the response from method SourceControlClient.NewListRepositoriesPager. type SourceControlClientListRepositoriesResponse struct { + // List all the source controls. RepoList } // SourceControlsClientCreateResponse contains the response from method SourceControlsClient.Create. type SourceControlsClientCreateResponse struct { + // Represents a SourceControl in Azure Security Insights. SourceControl } @@ -598,11 +666,13 @@ type SourceControlsClientDeleteResponse struct { // SourceControlsClientGetResponse contains the response from method SourceControlsClient.Get. type SourceControlsClientGetResponse struct { + // Represents a SourceControl in Azure Security Insights. SourceControl } // SourceControlsClientListResponse contains the response from method SourceControlsClient.NewListPager. type SourceControlsClientListResponse struct { + // List all the source controls. SourceControlList } @@ -613,6 +683,7 @@ type ThreatIntelligenceIndicatorClientAppendTagsResponse struct { // ThreatIntelligenceIndicatorClientCreateIndicatorResponse contains the response from method ThreatIntelligenceIndicatorClient.CreateIndicator. type ThreatIntelligenceIndicatorClientCreateIndicatorResponse struct { + // Threat intelligence information object. ThreatIntelligenceInformationClassification } @@ -628,6 +699,7 @@ func (t *ThreatIntelligenceIndicatorClientCreateIndicatorResponse) UnmarshalJSON // ThreatIntelligenceIndicatorClientCreateResponse contains the response from method ThreatIntelligenceIndicatorClient.Create. type ThreatIntelligenceIndicatorClientCreateResponse struct { + // Threat intelligence information object. ThreatIntelligenceInformationClassification } @@ -648,6 +720,7 @@ type ThreatIntelligenceIndicatorClientDeleteResponse struct { // ThreatIntelligenceIndicatorClientGetResponse contains the response from method ThreatIntelligenceIndicatorClient.Get. type ThreatIntelligenceIndicatorClientGetResponse struct { + // Threat intelligence information object. ThreatIntelligenceInformationClassification } @@ -663,11 +736,13 @@ func (t *ThreatIntelligenceIndicatorClientGetResponse) UnmarshalJSON(data []byte // ThreatIntelligenceIndicatorClientQueryIndicatorsResponse contains the response from method ThreatIntelligenceIndicatorClient.NewQueryIndicatorsPager. type ThreatIntelligenceIndicatorClientQueryIndicatorsResponse struct { + // List of all the threat intelligence information objects. ThreatIntelligenceInformationList } // ThreatIntelligenceIndicatorClientReplaceTagsResponse contains the response from method ThreatIntelligenceIndicatorClient.ReplaceTags. type ThreatIntelligenceIndicatorClientReplaceTagsResponse struct { + // Threat intelligence information object. ThreatIntelligenceInformationClassification } @@ -683,16 +758,19 @@ func (t *ThreatIntelligenceIndicatorClientReplaceTagsResponse) UnmarshalJSON(dat // ThreatIntelligenceIndicatorMetricsClientListResponse contains the response from method ThreatIntelligenceIndicatorMetricsClient.List. type ThreatIntelligenceIndicatorMetricsClientListResponse struct { + // List of all the threat intelligence metric fields (type/threat type/source). ThreatIntelligenceMetricsList } // ThreatIntelligenceIndicatorsClientListResponse contains the response from method ThreatIntelligenceIndicatorsClient.NewListPager. type ThreatIntelligenceIndicatorsClientListResponse struct { + // List of all the threat intelligence information objects. ThreatIntelligenceInformationList } // WatchlistItemsClientCreateOrUpdateResponse contains the response from method WatchlistItemsClient.CreateOrUpdate. type WatchlistItemsClientCreateOrUpdateResponse struct { + // Represents a Watchlist item in Azure Security Insights. WatchlistItem } @@ -703,17 +781,21 @@ type WatchlistItemsClientDeleteResponse struct { // WatchlistItemsClientGetResponse contains the response from method WatchlistItemsClient.Get. type WatchlistItemsClientGetResponse struct { + // Represents a Watchlist item in Azure Security Insights. WatchlistItem } // WatchlistItemsClientListResponse contains the response from method WatchlistItemsClient.NewListPager. type WatchlistItemsClientListResponse struct { + // List all the watchlist items. WatchlistItemList } // WatchlistsClientCreateOrUpdateResponse contains the response from method WatchlistsClient.CreateOrUpdate. type WatchlistsClientCreateOrUpdateResponse struct { + // Represents a Watchlist in Azure Security Insights. Watchlist + // AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response. AzureAsyncOperation *string } @@ -726,10 +808,12 @@ type WatchlistsClientDeleteResponse struct { // WatchlistsClientGetResponse contains the response from method WatchlistsClient.Get. type WatchlistsClientGetResponse struct { + // Represents a Watchlist in Azure Security Insights. Watchlist } // WatchlistsClientListResponse contains the response from method WatchlistsClient.NewListPager. type WatchlistsClientListResponse struct { + // List all the watchlists. WatchlistList } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/securitymlanalyticssettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/securitymlanalyticssettings_client.go index 1ebf6057..3a99d0e4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/securitymlanalyticssettings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/securitymlanalyticssettings_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type SecurityMLAnalyticsSettingsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSecurityMLAnalyticsSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityMLAnalyticsSettingsClient, error) { - cl, err := arm.NewClient(moduleName+".SecurityMLAnalyticsSettingsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewSecurityMLAnalyticsSettingsClient(subscriptionID string, credential azco // - options - SecurityMLAnalyticsSettingsClientCreateOrUpdateOptions contains the optional parameters for the SecurityMLAnalyticsSettingsClient.CreateOrUpdate // method. func (client *SecurityMLAnalyticsSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, settingsResourceName string, securityMLAnalyticsSetting SecurityMLAnalyticsSettingClassification, options *SecurityMLAnalyticsSettingsClientCreateOrUpdateOptions) (SecurityMLAnalyticsSettingsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SecurityMLAnalyticsSettingsClient.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, workspaceName, settingsResourceName, securityMLAnalyticsSetting, options) if err != nil { return SecurityMLAnalyticsSettingsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecurityMLAnalyticsSettingsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SecurityMLAnalyticsSettingsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SecurityMLAnalyticsSettingsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *SecurityMLAnalyticsSettingsClient) createOrUpdateCreateRequest(ctx reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, securityMLAnalyticsSetting) + if err := runtime.MarshalAsJSON(req, securityMLAnalyticsSetting); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *SecurityMLAnalyticsSettingsClient) createOrUpdateHandleResponse(re // - options - SecurityMLAnalyticsSettingsClientDeleteOptions contains the optional parameters for the SecurityMLAnalyticsSettingsClient.Delete // method. func (client *SecurityMLAnalyticsSettingsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, settingsResourceName string, options *SecurityMLAnalyticsSettingsClientDeleteOptions) (SecurityMLAnalyticsSettingsClientDeleteResponse, error) { + var err error + const operationName = "SecurityMLAnalyticsSettingsClient.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, workspaceName, settingsResourceName, options) if err != nil { return SecurityMLAnalyticsSettingsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecurityMLAnalyticsSettingsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SecurityMLAnalyticsSettingsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SecurityMLAnalyticsSettingsClientDeleteResponse{}, err } return SecurityMLAnalyticsSettingsClientDeleteResponse{}, nil } @@ -172,18 +187,25 @@ func (client *SecurityMLAnalyticsSettingsClient) deleteCreateRequest(ctx context // - options - SecurityMLAnalyticsSettingsClientGetOptions contains the optional parameters for the SecurityMLAnalyticsSettingsClient.Get // method. func (client *SecurityMLAnalyticsSettingsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, settingsResourceName string, options *SecurityMLAnalyticsSettingsClientGetOptions) (SecurityMLAnalyticsSettingsClientGetResponse, error) { + var err error + const operationName = "SecurityMLAnalyticsSettingsClient.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, settingsResourceName, options) if err != nil { return SecurityMLAnalyticsSettingsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecurityMLAnalyticsSettingsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityMLAnalyticsSettingsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecurityMLAnalyticsSettingsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -238,25 +260,20 @@ func (client *SecurityMLAnalyticsSettingsClient) NewListPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SecurityMLAnalyticsSettingsClientListResponse) (SecurityMLAnalyticsSettingsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityMLAnalyticsSettingsClient.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 SecurityMLAnalyticsSettingsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SecurityMLAnalyticsSettingsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityMLAnalyticsSettingsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/sentinelonboardingstates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/sentinelonboardingstates_client.go index b3108450..024986c4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/sentinelonboardingstates_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/sentinelonboardingstates_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type SentinelOnboardingStatesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSentinelOnboardingStatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SentinelOnboardingStatesClient, error) { - cl, err := arm.NewClient(moduleName+".SentinelOnboardingStatesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewSentinelOnboardingStatesClient(subscriptionID string, credential azcore. // - options - SentinelOnboardingStatesClientCreateOptions contains the optional parameters for the SentinelOnboardingStatesClient.Create // method. func (client *SentinelOnboardingStatesClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, sentinelOnboardingStateName string, options *SentinelOnboardingStatesClientCreateOptions) (SentinelOnboardingStatesClientCreateResponse, error) { + var err error + const operationName = "SentinelOnboardingStatesClient.Create" + 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, workspaceName, sentinelOnboardingStateName, options) if err != nil { return SentinelOnboardingStatesClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SentinelOnboardingStatesClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SentinelOnboardingStatesClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SentinelOnboardingStatesClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -96,7 +102,10 @@ func (client *SentinelOnboardingStatesClient) createCreateRequest(ctx context.Co req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.SentinelOnboardingStateParameter != nil { - return req, runtime.MarshalAsJSON(req, *options.SentinelOnboardingStateParameter) + if err := runtime.MarshalAsJSON(req, *options.SentinelOnboardingStateParameter); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -120,16 +129,22 @@ func (client *SentinelOnboardingStatesClient) createHandleResponse(resp *http.Re // - options - SentinelOnboardingStatesClientDeleteOptions contains the optional parameters for the SentinelOnboardingStatesClient.Delete // method. func (client *SentinelOnboardingStatesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, sentinelOnboardingStateName string, options *SentinelOnboardingStatesClientDeleteOptions) (SentinelOnboardingStatesClientDeleteResponse, error) { + var err error + const operationName = "SentinelOnboardingStatesClient.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, workspaceName, sentinelOnboardingStateName, options) if err != nil { return SentinelOnboardingStatesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SentinelOnboardingStatesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SentinelOnboardingStatesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SentinelOnboardingStatesClientDeleteResponse{}, err } return SentinelOnboardingStatesClientDeleteResponse{}, nil } @@ -174,18 +189,25 @@ func (client *SentinelOnboardingStatesClient) deleteCreateRequest(ctx context.Co // - options - SentinelOnboardingStatesClientGetOptions contains the optional parameters for the SentinelOnboardingStatesClient.Get // method. func (client *SentinelOnboardingStatesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sentinelOnboardingStateName string, options *SentinelOnboardingStatesClientGetOptions) (SentinelOnboardingStatesClientGetResponse, error) { + var err error + const operationName = "SentinelOnboardingStatesClient.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, sentinelOnboardingStateName, options) if err != nil { return SentinelOnboardingStatesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SentinelOnboardingStatesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SentinelOnboardingStatesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SentinelOnboardingStatesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -236,18 +258,25 @@ func (client *SentinelOnboardingStatesClient) getHandleResponse(resp *http.Respo // - options - SentinelOnboardingStatesClientListOptions contains the optional parameters for the SentinelOnboardingStatesClient.List // method. func (client *SentinelOnboardingStatesClient) List(ctx context.Context, resourceGroupName string, workspaceName string, options *SentinelOnboardingStatesClientListOptions) (SentinelOnboardingStatesClientListResponse, error) { + var err error + const operationName = "SentinelOnboardingStatesClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return SentinelOnboardingStatesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SentinelOnboardingStatesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SentinelOnboardingStatesClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SentinelOnboardingStatesClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/sourcecontrol_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/sourcecontrol_client.go index 384feee8..bce65ab3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/sourcecontrol_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/sourcecontrol_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type SourceControlClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSourceControlClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SourceControlClient, error) { - cl, err := arm.NewClient(moduleName+".SourceControlClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,25 +57,20 @@ func (client *SourceControlClient) NewListRepositoriesPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SourceControlClientListRepositoriesResponse) (SourceControlClientListRepositoriesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listRepositoriesCreateRequest(ctx, resourceGroupName, workspaceName, repoType, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SourceControlClient.NewListRepositoriesPager") + 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.listRepositoriesCreateRequest(ctx, resourceGroupName, workspaceName, repoType, options) + }, nil) if err != nil { return SourceControlClientListRepositoriesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SourceControlClientListRepositoriesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlClientListRepositoriesResponse{}, runtime.NewResponseError(resp) - } return client.listRepositoriesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -103,7 +97,10 @@ func (client *SourceControlClient) listRepositoriesCreateRequest(ctx context.Con reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, repoType) + if err := runtime.MarshalAsJSON(req, repoType); err != nil { + return nil, err + } + return req, nil } // listRepositoriesHandleResponse handles the ListRepositories response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/sourcecontrols_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/sourcecontrols_client.go index e78d3b8a..f875f863 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/sourcecontrols_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/sourcecontrols_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type SourceControlsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSourceControlsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SourceControlsClient, error) { - cl, err := arm.NewClient(moduleName+".SourceControlsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewSourceControlsClient(subscriptionID string, credential azcore.TokenCrede // - sourceControl - The SourceControl // - options - SourceControlsClientCreateOptions contains the optional parameters for the SourceControlsClient.Create method. func (client *SourceControlsClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, sourceControlID string, sourceControl SourceControl, options *SourceControlsClientCreateOptions) (SourceControlsClientCreateResponse, error) { + var err error + const operationName = "SourceControlsClient.Create" + 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, workspaceName, sourceControlID, sourceControl, options) if err != nil { return SourceControlsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SourceControlsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SourceControlsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -95,7 +101,10 @@ func (client *SourceControlsClient) createCreateRequest(ctx context.Context, res reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, sourceControl) + if err := runtime.MarshalAsJSON(req, sourceControl); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -116,16 +125,22 @@ func (client *SourceControlsClient) createHandleResponse(resp *http.Response) (S // - sourceControlID - Source control Id // - options - SourceControlsClientDeleteOptions contains the optional parameters for the SourceControlsClient.Delete method. func (client *SourceControlsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, sourceControlID string, options *SourceControlsClientDeleteOptions) (SourceControlsClientDeleteResponse, error) { + var err error + const operationName = "SourceControlsClient.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, workspaceName, sourceControlID, options) if err != nil { return SourceControlsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SourceControlsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SourceControlsClientDeleteResponse{}, err } return SourceControlsClientDeleteResponse{}, nil } @@ -169,18 +184,25 @@ func (client *SourceControlsClient) deleteCreateRequest(ctx context.Context, res // - sourceControlID - Source control Id // - options - SourceControlsClientGetOptions contains the optional parameters for the SourceControlsClient.Get method. func (client *SourceControlsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sourceControlID string, options *SourceControlsClientGetOptions) (SourceControlsClientGetResponse, error) { + var err error + const operationName = "SourceControlsClient.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, sourceControlID, options) if err != nil { return SourceControlsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SourceControlsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -234,25 +256,20 @@ func (client *SourceControlsClient) NewListPager(resourceGroupName string, works return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SourceControlsClientListResponse) (SourceControlsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SourceControlsClient.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 SourceControlsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SourceControlsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/threatintelligenceindicator_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/threatintelligenceindicator_client.go index 911eaa25..338e1e12 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/threatintelligenceindicator_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/threatintelligenceindicator_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type ThreatIntelligenceIndicatorClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewThreatIntelligenceIndicatorClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ThreatIntelligenceIndicatorClient, error) { - cl, err := arm.NewClient(moduleName+".ThreatIntelligenceIndicatorClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,16 +54,22 @@ func NewThreatIntelligenceIndicatorClient(subscriptionID string, credential azco // - options - ThreatIntelligenceIndicatorClientAppendTagsOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.AppendTags // method. func (client *ThreatIntelligenceIndicatorClient) AppendTags(ctx context.Context, resourceGroupName string, workspaceName string, name string, threatIntelligenceAppendTags ThreatIntelligenceAppendTags, options *ThreatIntelligenceIndicatorClientAppendTagsOptions) (ThreatIntelligenceIndicatorClientAppendTagsResponse, error) { + var err error + const operationName = "ThreatIntelligenceIndicatorClient.AppendTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.appendTagsCreateRequest(ctx, resourceGroupName, workspaceName, name, threatIntelligenceAppendTags, options) if err != nil { return ThreatIntelligenceIndicatorClientAppendTagsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ThreatIntelligenceIndicatorClientAppendTagsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ThreatIntelligenceIndicatorClientAppendTagsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ThreatIntelligenceIndicatorClientAppendTagsResponse{}, err } return ThreatIntelligenceIndicatorClientAppendTagsResponse{}, nil } @@ -96,7 +101,10 @@ func (client *ThreatIntelligenceIndicatorClient) appendTagsCreateRequest(ctx con reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, threatIntelligenceAppendTags) + if err := runtime.MarshalAsJSON(req, threatIntelligenceAppendTags); err != nil { + return nil, err + } + return req, nil } // Create - Update a threat Intelligence indicator. @@ -110,18 +118,25 @@ func (client *ThreatIntelligenceIndicatorClient) appendTagsCreateRequest(ctx con // - options - ThreatIntelligenceIndicatorClientCreateOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.Create // method. func (client *ThreatIntelligenceIndicatorClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, name string, threatIntelligenceProperties ThreatIntelligenceIndicatorModel, options *ThreatIntelligenceIndicatorClientCreateOptions) (ThreatIntelligenceIndicatorClientCreateResponse, error) { + var err error + const operationName = "ThreatIntelligenceIndicatorClient.Create" + 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, workspaceName, name, threatIntelligenceProperties, options) if err != nil { return ThreatIntelligenceIndicatorClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ThreatIntelligenceIndicatorClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ThreatIntelligenceIndicatorClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ThreatIntelligenceIndicatorClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -151,7 +166,10 @@ func (client *ThreatIntelligenceIndicatorClient) createCreateRequest(ctx context reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, threatIntelligenceProperties) + if err := runtime.MarshalAsJSON(req, threatIntelligenceProperties); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -173,18 +191,25 @@ func (client *ThreatIntelligenceIndicatorClient) createHandleResponse(resp *http // - options - ThreatIntelligenceIndicatorClientCreateIndicatorOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.CreateIndicator // method. func (client *ThreatIntelligenceIndicatorClient) CreateIndicator(ctx context.Context, resourceGroupName string, workspaceName string, threatIntelligenceProperties ThreatIntelligenceIndicatorModel, options *ThreatIntelligenceIndicatorClientCreateIndicatorOptions) (ThreatIntelligenceIndicatorClientCreateIndicatorResponse, error) { + var err error + const operationName = "ThreatIntelligenceIndicatorClient.CreateIndicator" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createIndicatorCreateRequest(ctx, resourceGroupName, workspaceName, threatIntelligenceProperties, options) if err != nil { return ThreatIntelligenceIndicatorClientCreateIndicatorResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ThreatIntelligenceIndicatorClientCreateIndicatorResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ThreatIntelligenceIndicatorClientCreateIndicatorResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ThreatIntelligenceIndicatorClientCreateIndicatorResponse{}, err } - return client.createIndicatorHandleResponse(resp) + resp, err := client.createIndicatorHandleResponse(httpResp) + return resp, err } // createIndicatorCreateRequest creates the CreateIndicator request. @@ -210,7 +235,10 @@ func (client *ThreatIntelligenceIndicatorClient) createIndicatorCreateRequest(ct reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, threatIntelligenceProperties) + if err := runtime.MarshalAsJSON(req, threatIntelligenceProperties); err != nil { + return nil, err + } + return req, nil } // createIndicatorHandleResponse handles the CreateIndicator response. @@ -232,16 +260,22 @@ func (client *ThreatIntelligenceIndicatorClient) createIndicatorHandleResponse(r // - options - ThreatIntelligenceIndicatorClientDeleteOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.Delete // method. func (client *ThreatIntelligenceIndicatorClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ThreatIntelligenceIndicatorClientDeleteOptions) (ThreatIntelligenceIndicatorClientDeleteResponse, error) { + var err error + const operationName = "ThreatIntelligenceIndicatorClient.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, workspaceName, name, options) if err != nil { return ThreatIntelligenceIndicatorClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ThreatIntelligenceIndicatorClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ThreatIntelligenceIndicatorClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ThreatIntelligenceIndicatorClientDeleteResponse{}, err } return ThreatIntelligenceIndicatorClientDeleteResponse{}, nil } @@ -286,18 +320,25 @@ func (client *ThreatIntelligenceIndicatorClient) deleteCreateRequest(ctx context // - options - ThreatIntelligenceIndicatorClientGetOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.Get // method. func (client *ThreatIntelligenceIndicatorClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ThreatIntelligenceIndicatorClientGetOptions) (ThreatIntelligenceIndicatorClientGetResponse, error) { + var err error + const operationName = "ThreatIntelligenceIndicatorClient.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 ThreatIntelligenceIndicatorClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ThreatIntelligenceIndicatorClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ThreatIntelligenceIndicatorClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ThreatIntelligenceIndicatorClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -353,25 +394,20 @@ func (client *ThreatIntelligenceIndicatorClient) NewQueryIndicatorsPager(resourc return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ThreatIntelligenceIndicatorClientQueryIndicatorsResponse) (ThreatIntelligenceIndicatorClientQueryIndicatorsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.queryIndicatorsCreateRequest(ctx, resourceGroupName, workspaceName, threatIntelligenceFilteringCriteria, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ThreatIntelligenceIndicatorClientQueryIndicatorsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ThreatIntelligenceIndicatorClient.NewQueryIndicatorsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.queryIndicatorsCreateRequest(ctx, resourceGroupName, workspaceName, threatIntelligenceFilteringCriteria, options) + }, nil) if err != nil { return ThreatIntelligenceIndicatorClientQueryIndicatorsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ThreatIntelligenceIndicatorClientQueryIndicatorsResponse{}, runtime.NewResponseError(resp) - } return client.queryIndicatorsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -398,7 +434,10 @@ func (client *ThreatIntelligenceIndicatorClient) queryIndicatorsCreateRequest(ct reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, threatIntelligenceFilteringCriteria) + if err := runtime.MarshalAsJSON(req, threatIntelligenceFilteringCriteria); err != nil { + return nil, err + } + return req, nil } // queryIndicatorsHandleResponse handles the QueryIndicators response. @@ -421,18 +460,25 @@ func (client *ThreatIntelligenceIndicatorClient) queryIndicatorsHandleResponse(r // - options - ThreatIntelligenceIndicatorClientReplaceTagsOptions contains the optional parameters for the ThreatIntelligenceIndicatorClient.ReplaceTags // method. func (client *ThreatIntelligenceIndicatorClient) ReplaceTags(ctx context.Context, resourceGroupName string, workspaceName string, name string, threatIntelligenceReplaceTags ThreatIntelligenceIndicatorModel, options *ThreatIntelligenceIndicatorClientReplaceTagsOptions) (ThreatIntelligenceIndicatorClientReplaceTagsResponse, error) { + var err error + const operationName = "ThreatIntelligenceIndicatorClient.ReplaceTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.replaceTagsCreateRequest(ctx, resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags, options) if err != nil { return ThreatIntelligenceIndicatorClientReplaceTagsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ThreatIntelligenceIndicatorClientReplaceTagsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ThreatIntelligenceIndicatorClientReplaceTagsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ThreatIntelligenceIndicatorClientReplaceTagsResponse{}, err } - return client.replaceTagsHandleResponse(resp) + resp, err := client.replaceTagsHandleResponse(httpResp) + return resp, err } // replaceTagsCreateRequest creates the ReplaceTags request. @@ -462,7 +508,10 @@ func (client *ThreatIntelligenceIndicatorClient) replaceTagsCreateRequest(ctx co reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, threatIntelligenceReplaceTags) + if err := runtime.MarshalAsJSON(req, threatIntelligenceReplaceTags); err != nil { + return nil, err + } + return req, nil } // replaceTagsHandleResponse handles the ReplaceTags response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/threatintelligenceindicatormetrics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/threatintelligenceindicatormetrics_client.go index dc24345d..f1251c15 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/threatintelligenceindicatormetrics_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/threatintelligenceindicatormetrics_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type ThreatIntelligenceIndicatorMetricsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewThreatIntelligenceIndicatorMetricsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ThreatIntelligenceIndicatorMetricsClient, error) { - cl, err := arm.NewClient(moduleName+".ThreatIntelligenceIndicatorMetricsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewThreatIntelligenceIndicatorMetricsClient(subscriptionID string, credenti // - options - ThreatIntelligenceIndicatorMetricsClientListOptions contains the optional parameters for the ThreatIntelligenceIndicatorMetricsClient.List // method. func (client *ThreatIntelligenceIndicatorMetricsClient) List(ctx context.Context, resourceGroupName string, workspaceName string, options *ThreatIntelligenceIndicatorMetricsClientListOptions) (ThreatIntelligenceIndicatorMetricsClientListResponse, error) { + var err error + const operationName = "ThreatIntelligenceIndicatorMetricsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return ThreatIntelligenceIndicatorMetricsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ThreatIntelligenceIndicatorMetricsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ThreatIntelligenceIndicatorMetricsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ThreatIntelligenceIndicatorMetricsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/threatintelligenceindicators_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/threatintelligenceindicators_client.go index 034c7415..0c46a424 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/threatintelligenceindicators_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/threatintelligenceindicators_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -34,7 +33,7 @@ type ThreatIntelligenceIndicatorsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewThreatIntelligenceIndicatorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ThreatIntelligenceIndicatorsClient, error) { - cl, err := arm.NewClient(moduleName+".ThreatIntelligenceIndicatorsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,25 +57,20 @@ func (client *ThreatIntelligenceIndicatorsClient) NewListPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ThreatIntelligenceIndicatorsClientListResponse) (ThreatIntelligenceIndicatorsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ThreatIntelligenceIndicatorsClient.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 ThreatIntelligenceIndicatorsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ThreatIntelligenceIndicatorsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ThreatIntelligenceIndicatorsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -100,19 +94,19 @@ func (client *ThreatIntelligenceIndicatorsClient) listCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } 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.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2022-09-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/securityinsights/armsecurityinsights/v2/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/time_rfc3339.go index 13803847..0cbb5478 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -19,50 +18,74 @@ import ( "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 ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + 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 + `"` ) -// 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+)*"*$`) - -type timeRFC3339 time.Time +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON +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 *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(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 *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +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) { @@ -71,14 +94,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/watchlistitems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/watchlistitems_client.go index 1746061f..16773e24 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/watchlistitems_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/watchlistitems_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type WatchlistItemsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWatchlistItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WatchlistItemsClient, error) { - cl, err := arm.NewClient(moduleName+".WatchlistItemsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewWatchlistItemsClient(subscriptionID string, credential azcore.TokenCrede // - options - WatchlistItemsClientCreateOrUpdateOptions contains the optional parameters for the WatchlistItemsClient.CreateOrUpdate // method. func (client *WatchlistItemsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, watchlistAlias string, watchlistItemID string, watchlistItem WatchlistItem, options *WatchlistItemsClientCreateOrUpdateOptions) (WatchlistItemsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WatchlistItemsClient.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, workspaceName, watchlistAlias, watchlistItemID, watchlistItem, options) if err != nil { return WatchlistItemsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatchlistItemsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WatchlistItemsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WatchlistItemsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -101,7 +107,10 @@ func (client *WatchlistItemsClient) createOrUpdateCreateRequest(ctx context.Cont reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, watchlistItem) + if err := runtime.MarshalAsJSON(req, watchlistItem); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -123,16 +132,22 @@ func (client *WatchlistItemsClient) createOrUpdateHandleResponse(resp *http.Resp // - watchlistItemID - Watchlist Item Id (GUID) // - options - WatchlistItemsClientDeleteOptions contains the optional parameters for the WatchlistItemsClient.Delete method. func (client *WatchlistItemsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, watchlistAlias string, watchlistItemID string, options *WatchlistItemsClientDeleteOptions) (WatchlistItemsClientDeleteResponse, error) { + var err error + const operationName = "WatchlistItemsClient.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, workspaceName, watchlistAlias, watchlistItemID, options) if err != nil { return WatchlistItemsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatchlistItemsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WatchlistItemsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WatchlistItemsClientDeleteResponse{}, err } return WatchlistItemsClientDeleteResponse{}, nil } @@ -181,18 +196,25 @@ func (client *WatchlistItemsClient) deleteCreateRequest(ctx context.Context, res // - watchlistItemID - Watchlist Item Id (GUID) // - options - WatchlistItemsClientGetOptions contains the optional parameters for the WatchlistItemsClient.Get method. func (client *WatchlistItemsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, watchlistAlias string, watchlistItemID string, options *WatchlistItemsClientGetOptions) (WatchlistItemsClientGetResponse, error) { + var err error + const operationName = "WatchlistItemsClient.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, watchlistAlias, watchlistItemID, options) if err != nil { return WatchlistItemsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatchlistItemsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatchlistItemsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatchlistItemsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -251,25 +273,20 @@ func (client *WatchlistItemsClient) NewListPager(resourceGroupName string, works return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WatchlistItemsClientListResponse) (WatchlistItemsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, watchlistAlias, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WatchlistItemsClient.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, watchlistAlias, options) + }, nil) if err != nil { return WatchlistItemsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WatchlistItemsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatchlistItemsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -297,10 +314,10 @@ func (client *WatchlistItemsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01-preview") if options != nil && options.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } + reqQP.Set("api-version", "2022-09-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/securityinsights/armsecurityinsights/v2/watchlists_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/watchlists_client.go index 9eb70648..66f0e39a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/watchlists_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2/watchlists_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsecurityinsights @@ -33,7 +32,7 @@ type WatchlistsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWatchlistsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WatchlistsClient, error) { - cl, err := arm.NewClient(moduleName+".WatchlistsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,18 +59,25 @@ func NewWatchlistsClient(subscriptionID string, credential azcore.TokenCredentia // - options - WatchlistsClientCreateOrUpdateOptions contains the optional parameters for the WatchlistsClient.CreateOrUpdate // method. func (client *WatchlistsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, watchlistAlias string, watchlist Watchlist, options *WatchlistsClientCreateOrUpdateOptions) (WatchlistsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WatchlistsClient.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, workspaceName, watchlistAlias, watchlist, options) if err != nil { return WatchlistsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatchlistsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WatchlistsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WatchlistsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -101,7 +107,10 @@ func (client *WatchlistsClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2022-09-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, watchlist) + if err := runtime.MarshalAsJSON(req, watchlist); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -125,18 +134,25 @@ func (client *WatchlistsClient) createOrUpdateHandleResponse(resp *http.Response // - watchlistAlias - Watchlist Alias // - options - WatchlistsClientDeleteOptions contains the optional parameters for the WatchlistsClient.Delete method. func (client *WatchlistsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, watchlistAlias string, options *WatchlistsClientDeleteOptions) (WatchlistsClientDeleteResponse, error) { + var err error + const operationName = "WatchlistsClient.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, workspaceName, watchlistAlias, options) if err != nil { return WatchlistsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatchlistsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WatchlistsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WatchlistsClientDeleteResponse{}, err } - return client.deleteHandleResponse(resp) + resp, err := client.deleteHandleResponse(httpResp) + return resp, err } // deleteCreateRequest creates the Delete request. @@ -187,18 +203,25 @@ func (client *WatchlistsClient) deleteHandleResponse(resp *http.Response) (Watch // - watchlistAlias - Watchlist Alias // - options - WatchlistsClientGetOptions contains the optional parameters for the WatchlistsClient.Get method. func (client *WatchlistsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, watchlistAlias string, options *WatchlistsClientGetOptions) (WatchlistsClientGetResponse, error) { + var err error + const operationName = "WatchlistsClient.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, watchlistAlias, options) if err != nil { return WatchlistsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatchlistsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatchlistsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatchlistsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -252,25 +275,20 @@ func (client *WatchlistsClient) NewListPager(resourceGroupName string, workspace return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WatchlistsClientListResponse) (WatchlistsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WatchlistsClient.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 WatchlistsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WatchlistsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatchlistsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -294,10 +312,10 @@ func (client *WatchlistsClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01-preview") if options != nil && options.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } + reqQP.Set("api-version", "2022-09-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/storage/armstorage/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/CHANGELOG.md index 3c41d4ca..fa3cf068 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/CHANGELOG.md @@ -1,5 +1,131 @@ # Release History +## 1.7.0 (2025-02-27) +### Features Added + +- New value `SKUNamePremiumV2LRS`, `SKUNamePremiumV2ZRS`, `SKUNameStandardV2GRS`, `SKUNameStandardV2GZRS`, `SKUNameStandardV2LRS`, `SKUNameStandardV2ZRS` added to enum type `SKUName` +- New function `*FileServicesClient.GetServiceUsage(context.Context, string, string, *FileServicesClientGetServiceUsageOptions) (FileServicesClientGetServiceUsageResponse, error)` +- New function `*FileServicesClient.NewListServiceUsagesPager(string, string, *FileServicesClientListServiceUsagesOptions) *runtime.Pager[FileServicesClientListServiceUsagesResponse]` +- New struct `AccountLimits` +- New struct `AccountUsage` +- New struct `AccountUsageElements` +- New struct `BurstingConstants` +- New struct `FileServiceUsage` +- New struct `FileServiceUsageProperties` +- New struct `FileServiceUsages` +- New struct `FileShareLimits` +- New struct `FileSharePropertiesFileSharePaidBursting` +- New struct `FileShareRecommendations` +- New struct `ObjectReplicationPolicyPropertiesMetrics` +- New field `FileSharePaidBursting`, `IncludedBurstIops`, `MaxBurstCreditsForIops`, `NextAllowedProvisionedBandwidthDowngradeTime`, `NextAllowedProvisionedIopsDowngradeTime`, `NextAllowedQuotaDowngradeTime`, `ProvisionedBandwidthMibps`, `ProvisionedIops` in struct `FileShareProperties` +- New field `Metrics` in struct `ObjectReplicationPolicyProperties` + + +## 1.6.0 (2024-06-28) +### Features Added + +- New value `AccessTierCold` added to enum type `AccessTier` +- New value `ExpirationActionBlock` added to enum type `ExpirationAction` +- New value `MinimumTLSVersionTLS13` added to enum type `MinimumTLSVersion` +- New value `ProvisioningStateCanceled`, `ProvisioningStateDeleting`, `ProvisioningStateFailed`, `ProvisioningStateValidateSubscriptionQuotaBegin`, `ProvisioningStateValidateSubscriptionQuotaEnd` added to enum type `ProvisioningState` +- New value `PublicNetworkAccessSecuredByPerimeter` added to enum type `PublicNetworkAccess` +- New enum type `IssueType` with values `IssueTypeConfigurationPropagationFailure`, `IssueTypeUnknown` +- New enum type `ListLocalUserIncludeParam` with values `ListLocalUserIncludeParamNfsv3` +- New enum type `NetworkSecurityPerimeterConfigurationProvisioningState` with values `NetworkSecurityPerimeterConfigurationProvisioningStateAccepted`, `NetworkSecurityPerimeterConfigurationProvisioningStateCanceled`, `NetworkSecurityPerimeterConfigurationProvisioningStateDeleting`, `NetworkSecurityPerimeterConfigurationProvisioningStateFailed`, `NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded` +- New enum type `NspAccessRuleDirection` with values `NspAccessRuleDirectionInbound`, `NspAccessRuleDirectionOutbound` +- New enum type `ResourceAssociationAccessMode` with values `ResourceAssociationAccessModeAudit`, `ResourceAssociationAccessModeEnforced`, `ResourceAssociationAccessModeLearning` +- New enum type `RunResult` with values `RunResultFailed`, `RunResultSucceeded` +- New enum type `RunStatusEnum` with values `RunStatusEnumFinished`, `RunStatusEnumInProgress` +- New enum type `Severity` with values `SeverityError`, `SeverityWarning` +- New enum type `TriggerType` with values `TriggerTypeOnSchedule`, `TriggerTypeRunOnce` +- New function `*ClientFactory.NewNetworkSecurityPerimeterConfigurationsClient() *NetworkSecurityPerimeterConfigurationsClient` +- New function `*ClientFactory.NewTaskAssignmentInstancesReportClient() *TaskAssignmentInstancesReportClient` +- New function `*ClientFactory.NewTaskAssignmentsClient() *TaskAssignmentsClient` +- New function `*ClientFactory.NewTaskAssignmentsInstancesReportClient() *TaskAssignmentsInstancesReportClient` +- New function `NewTaskAssignmentInstancesReportClient(string, azcore.TokenCredential, *arm.ClientOptions) (*TaskAssignmentInstancesReportClient, error)` +- New function `*TaskAssignmentInstancesReportClient.NewListPager(string, string, string, *TaskAssignmentInstancesReportClientListOptions) *runtime.Pager[TaskAssignmentInstancesReportClientListResponse]` +- New function `NewTaskAssignmentsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*TaskAssignmentsClient, error)` +- New function `*TaskAssignmentsClient.BeginCreate(context.Context, string, string, string, TaskAssignment, *TaskAssignmentsClientBeginCreateOptions) (*runtime.Poller[TaskAssignmentsClientCreateResponse], error)` +- New function `*TaskAssignmentsClient.BeginDelete(context.Context, string, string, string, *TaskAssignmentsClientBeginDeleteOptions) (*runtime.Poller[TaskAssignmentsClientDeleteResponse], error)` +- New function `*TaskAssignmentsClient.Get(context.Context, string, string, string, *TaskAssignmentsClientGetOptions) (TaskAssignmentsClientGetResponse, error)` +- New function `*TaskAssignmentsClient.NewListPager(string, string, *TaskAssignmentsClientListOptions) *runtime.Pager[TaskAssignmentsClientListResponse]` +- New function `*TaskAssignmentsClient.BeginUpdate(context.Context, string, string, string, TaskAssignmentUpdateParameters, *TaskAssignmentsClientBeginUpdateOptions) (*runtime.Poller[TaskAssignmentsClientUpdateResponse], error)` +- New function `NewTaskAssignmentsInstancesReportClient(string, azcore.TokenCredential, *arm.ClientOptions) (*TaskAssignmentsInstancesReportClient, error)` +- New function `*TaskAssignmentsInstancesReportClient.NewListPager(string, string, *TaskAssignmentsInstancesReportClientListOptions) *runtime.Pager[TaskAssignmentsInstancesReportClientListResponse]` +- 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 `ExecutionTarget` +- New struct `ExecutionTrigger` +- New struct `ExecutionTriggerUpdate` +- New struct `NetworkSecurityPerimeter` +- New struct `NetworkSecurityPerimeterConfiguration` +- New struct `NetworkSecurityPerimeterConfigurationList` +- New struct `NetworkSecurityPerimeterConfigurationProperties` +- New struct `NetworkSecurityPerimeterConfigurationPropertiesProfile` +- New struct `NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation` +- New struct `NspAccessRule` +- New struct `NspAccessRuleProperties` +- New struct `NspAccessRulePropertiesSubscriptionsItem` +- New struct `ProvisioningIssue` +- New struct `ProvisioningIssueProperties` +- New struct `ProxyResourceAutoGenerated` +- New struct `ResourceAutoGenerated` +- New struct `TaskAssignment` +- New struct `TaskAssignmentExecutionContext` +- New struct `TaskAssignmentProperties` +- New struct `TaskAssignmentReport` +- New struct `TaskAssignmentUpdateExecutionContext` +- New struct `TaskAssignmentUpdateParameters` +- New struct `TaskAssignmentUpdateProperties` +- New struct `TaskAssignmentUpdateReport` +- New struct `TaskAssignmentsList` +- New struct `TaskReportInstance` +- New struct `TaskReportProperties` +- New struct `TaskReportSummary` +- New struct `TriggerParameters` +- New struct `TriggerParametersUpdate` +- New field `EnableExtendedGroups` in struct `AccountProperties` +- New field `EnableExtendedGroups` in struct `AccountPropertiesCreateParameters` +- New field `EnableExtendedGroups` in struct `AccountPropertiesUpdateParameters` +- New field `AllowACLAuthorization`, `ExtendedGroups`, `GroupID`, `IsNFSv3Enabled`, `UserID` in struct `LocalUserProperties` +- New field `NextLink` in struct `LocalUsers` +- New field `Filter`, `Include`, `Maxpagesize` in struct `LocalUsersClientListOptions` + + +## 1.5.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 1.5.0-beta.1 (2023-10-09) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + +## 1.4.0 (2023-08-25) +### Features Added + +- New value `CorsRuleAllowedMethodsItemCONNECT`, `CorsRuleAllowedMethodsItemTRACE` added to enum type `CorsRuleAllowedMethodsItem` +- New enum type `MigrationName` with values `MigrationNameDefault` +- New enum type `MigrationStatus` with values `MigrationStatusComplete`, `MigrationStatusFailed`, `MigrationStatusInProgress`, `MigrationStatusInvalid`, `MigrationStatusSubmittedForConversion` +- New enum type `PostFailoverRedundancy` with values `PostFailoverRedundancyStandardLRS`, `PostFailoverRedundancyStandardZRS` +- New enum type `PostPlannedFailoverRedundancy` with values `PostPlannedFailoverRedundancyStandardGRS`, `PostPlannedFailoverRedundancyStandardGZRS`, `PostPlannedFailoverRedundancyStandardRAGRS`, `PostPlannedFailoverRedundancyStandardRAGZRS` +- New function `*AccountsClient.BeginCustomerInitiatedMigration(context.Context, string, string, AccountMigration, *AccountsClientBeginCustomerInitiatedMigrationOptions) (*runtime.Poller[AccountsClientCustomerInitiatedMigrationResponse], error)` +- New function `*AccountsClient.GetCustomerInitiatedMigration(context.Context, string, string, MigrationName, *AccountsClientGetCustomerInitiatedMigrationOptions) (AccountsClientGetCustomerInitiatedMigrationResponse, error)` +- New struct `AccountMigration` +- New struct `AccountMigrationProperties` +- New struct `BlobInventoryCreationTime` +- New struct `ErrorAdditionalInfo` +- New struct `ErrorDetail` +- New struct `ErrorResponseAutoGenerated` +- New field `AccountMigrationInProgress`, `IsSKUConversionBlocked` in struct `AccountProperties` +- New field `CreationTime` in struct `BlobInventoryPolicyFilter` +- New field `CanPlannedFailover`, `PostFailoverRedundancy`, `PostPlannedFailoverRedundancy` in struct `GeoReplicationStats` + + ## 1.3.0 (2023-03-27) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/README.md index ebc91710..22f79112 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/README.md @@ -1,7 +1,5 @@ # Azure Storage Module for Go -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage) - The `armstorage` module provides operations for working with Azure Storage. [Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/storage/armstorage) @@ -25,7 +23,7 @@ go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage ## Authorization -When creating a client, you will need to provide a credential for authenticating with Azure Storage. 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 Storage. 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,15 +52,23 @@ clientFactory, err := armstorage.NewClientFactory(, cred, &opti ## 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() ``` +## 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 - [Blob](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/storage/blob) +- [Creating a Fake](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/resourcemanager/storage/armstorage/fake_example_test.go) - [File](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/storage/file) - [Management Policy](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/storage/managementpolicy) - [Queue](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/storage/queue) @@ -91,4 +97,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/storage/armstorage/accounts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/accounts_client.go index ad4cfd90..fa6783e4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/accounts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/accounts_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type AccountsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountsClient, error) { - cl, err := arm.NewClient(moduleName+".AccountsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +43,7 @@ func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, // BeginAbortHierarchicalNamespaceMigration - Abort live Migration of storage account to enable Hns // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -59,35 +55,45 @@ func (client *AccountsClient) BeginAbortHierarchicalNamespaceMigration(ctx conte if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientAbortHierarchicalNamespaceMigrationResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientAbortHierarchicalNamespaceMigrationResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AccountsClientAbortHierarchicalNamespaceMigrationResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientAbortHierarchicalNamespaceMigrationResponse]{ + Tracer: client.internal.Tracer(), + }) } } // AbortHierarchicalNamespaceMigration - Abort live Migration of storage account to enable Hns // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 func (client *AccountsClient) abortHierarchicalNamespaceMigration(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginAbortHierarchicalNamespaceMigration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.abortHierarchicalNamespaceMigrationCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // abortHierarchicalNamespaceMigrationCreateRequest creates the AbortHierarchicalNamespaceMigration request. -func (client *AccountsClient) abortHierarchicalNamespaceMigrationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions) (*policy.Request, error) { +func (client *AccountsClient) abortHierarchicalNamespaceMigrationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/aborthnsonmigration" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -106,7 +112,7 @@ func (client *AccountsClient) abortHierarchicalNamespaceMigrationCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,28 +121,35 @@ func (client *AccountsClient) abortHierarchicalNamespaceMigrationCreateRequest(c // CheckNameAvailability - Checks that the storage account name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - options - AccountsClientCheckNameAvailabilityOptions contains the optional parameters for the AccountsClient.CheckNameAvailability // method. func (client *AccountsClient) CheckNameAvailability(ctx context.Context, accountName AccountCheckNameAvailabilityParameters, options *AccountsClientCheckNameAvailabilityOptions) (AccountsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "AccountsClient.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, accountName, options) if err != nil { return AccountsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. -func (client *AccountsClient) checkNameAvailabilityCreateRequest(ctx context.Context, accountName AccountCheckNameAvailabilityParameters, options *AccountsClientCheckNameAvailabilityOptions) (*policy.Request, error) { +func (client *AccountsClient) checkNameAvailabilityCreateRequest(ctx context.Context, accountName AccountCheckNameAvailabilityParameters, _ *AccountsClientCheckNameAvailabilityOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -147,10 +160,13 @@ func (client *AccountsClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, accountName) + if err := runtime.MarshalAsJSON(req, accountName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -168,7 +184,7 @@ func (client *AccountsClient) checkNameAvailabilityHandleResponse(resp *http.Res // set of properties, the request will succeed. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -180,9 +196,14 @@ func (client *AccountsClient) BeginCreate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[AccountsClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AccountsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -192,24 +213,30 @@ func (client *AccountsClient) BeginCreate(ctx context.Context, resourceGroupName // set of properties, the request will succeed. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 func (client *AccountsClient) create(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters, options *AccountsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.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, accountName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. -func (client *AccountsClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters, options *AccountsClientBeginCreateOptions) (*policy.Request, error) { +func (client *AccountsClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters, _ *AccountsClientBeginCreateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -228,37 +255,134 @@ func (client *AccountsClient) createCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-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 +} + +// BeginCustomerInitiatedMigration - Account Migration request can be triggered for a storage account to change its redundancy +// level. The migration updates the non-zonal redundant storage account to a zonal redundant account or +// vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account +// synchronously across three Azure availability zones in the primary region. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - parameters - The request parameters required to perform storage account migration. +// - options - AccountsClientBeginCustomerInitiatedMigrationOptions contains the optional parameters for the AccountsClient.BeginCustomerInitiatedMigration +// method. +func (client *AccountsClient) BeginCustomerInitiatedMigration(ctx context.Context, resourceGroupName string, accountName string, parameters AccountMigration, options *AccountsClientBeginCustomerInitiatedMigrationOptions) (*runtime.Poller[AccountsClientCustomerInitiatedMigrationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.customerInitiatedMigration(ctx, resourceGroupName, accountName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientCustomerInitiatedMigrationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientCustomerInitiatedMigrationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CustomerInitiatedMigration - Account Migration request can be triggered for a storage account to change its redundancy +// level. The migration updates the non-zonal redundant storage account to a zonal redundant account or +// vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account +// synchronously across three Azure availability zones in the primary region. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +func (client *AccountsClient) customerInitiatedMigration(ctx context.Context, resourceGroupName string, accountName string, parameters AccountMigration, options *AccountsClientBeginCustomerInitiatedMigrationOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginCustomerInitiatedMigration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.customerInitiatedMigrationCreateRequest(ctx, resourceGroupName, accountName, 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 +} + +// customerInitiatedMigrationCreateRequest creates the CustomerInitiatedMigration request. +func (client *AccountsClient) customerInitiatedMigrationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters AccountMigration, _ *AccountsClientBeginCustomerInitiatedMigrationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration" + 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.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Delete - Deletes a storage account in Microsoft Azure. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - options - AccountsClientDeleteOptions contains the optional parameters for the AccountsClient.Delete method. func (client *AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientDeleteOptions) (AccountsClientDeleteResponse, error) { + var err error + const operationName = "AccountsClient.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, accountName, options) if err != nil { return AccountsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return AccountsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return AccountsClientDeleteResponse{}, err } return AccountsClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientDeleteOptions) (*policy.Request, error) { +func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *AccountsClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -277,7 +401,7 @@ func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -293,7 +417,7 @@ func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceG // 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -304,11 +428,15 @@ func (client *AccountsClient) BeginFailover(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientFailoverResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientFailoverResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AccountsClientFailoverResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -323,20 +451,26 @@ func (client *AccountsClient) BeginFailover(ctx context.Context, resourceGroupNa // 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 func (client *AccountsClient) failover(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginFailoverOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.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, accountName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // failoverCreateRequest creates the Failover request. @@ -359,7 +493,7 @@ func (client *AccountsClient) failoverCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") if options != nil && options.FailoverType != nil { reqQP.Set("failoverType", "Planned") } @@ -367,28 +501,106 @@ func (client *AccountsClient) failoverCreateRequest(ctx context.Context, resourc return req, nil } +// GetCustomerInitiatedMigration - Gets the status of the ongoing migration for the specified storage account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - migrationName - The name of the Storage Account Migration. It should always be 'default' +// - options - AccountsClientGetCustomerInitiatedMigrationOptions contains the optional parameters for the AccountsClient.GetCustomerInitiatedMigration +// method. +func (client *AccountsClient) GetCustomerInitiatedMigration(ctx context.Context, resourceGroupName string, accountName string, migrationName MigrationName, options *AccountsClientGetCustomerInitiatedMigrationOptions) (AccountsClientGetCustomerInitiatedMigrationResponse, error) { + var err error + const operationName = "AccountsClient.GetCustomerInitiatedMigration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCustomerInitiatedMigrationCreateRequest(ctx, resourceGroupName, accountName, migrationName, options) + if err != nil { + return AccountsClientGetCustomerInitiatedMigrationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AccountsClientGetCustomerInitiatedMigrationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountsClientGetCustomerInitiatedMigrationResponse{}, err + } + resp, err := client.getCustomerInitiatedMigrationHandleResponse(httpResp) + return resp, err +} + +// getCustomerInitiatedMigrationCreateRequest creates the GetCustomerInitiatedMigration request. +func (client *AccountsClient) getCustomerInitiatedMigrationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, migrationName MigrationName, _ *AccountsClientGetCustomerInitiatedMigrationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/accountMigrations/{migrationName}" + 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 migrationName == "" { + return nil, errors.New("parameter migrationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationName}", url.PathEscape(string(migrationName))) + if client.subscriptionID == "" { + return 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-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getCustomerInitiatedMigrationHandleResponse handles the GetCustomerInitiatedMigration response. +func (client *AccountsClient) getCustomerInitiatedMigrationHandleResponse(resp *http.Response) (AccountsClientGetCustomerInitiatedMigrationResponse, error) { + result := AccountsClientGetCustomerInitiatedMigrationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AccountMigration); err != nil { + return AccountsClientGetCustomerInitiatedMigrationResponse{}, err + } + return result, nil +} + // GetProperties - Returns the properties for the specified storage account including but not limited to name, SKU name, location, // and account status. The ListKeys operation should be used to retrieve storage keys. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - options - AccountsClientGetPropertiesOptions contains the optional parameters for the AccountsClient.GetProperties method. func (client *AccountsClient) GetProperties(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientGetPropertiesOptions) (AccountsClientGetPropertiesResponse, error) { + var err error + const operationName = "AccountsClient.GetProperties" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPropertiesCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return AccountsClientGetPropertiesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountsClientGetPropertiesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientGetPropertiesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountsClientGetPropertiesResponse{}, err } - return client.getPropertiesHandleResponse(resp) + resp, err := client.getPropertiesHandleResponse(httpResp) + return resp, err } // getPropertiesCreateRequest creates the GetProperties request. @@ -411,10 +623,10 @@ func (client *AccountsClient) getPropertiesCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", string(*options.Expand)) } + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -432,7 +644,7 @@ func (client *AccountsClient) getPropertiesHandleResponse(resp *http.Response) ( // BeginHierarchicalNamespaceMigration - Live Migration of storage account to enable Hns // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -447,35 +659,45 @@ func (client *AccountsClient) BeginHierarchicalNamespaceMigration(ctx context.Co if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientHierarchicalNamespaceMigrationResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientHierarchicalNamespaceMigrationResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AccountsClientHierarchicalNamespaceMigrationResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientHierarchicalNamespaceMigrationResponse]{ + Tracer: client.internal.Tracer(), + }) } } // HierarchicalNamespaceMigration - Live Migration of storage account to enable Hns // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 func (client *AccountsClient) hierarchicalNamespaceMigration(ctx context.Context, resourceGroupName string, accountName string, requestType string, options *AccountsClientBeginHierarchicalNamespaceMigrationOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginHierarchicalNamespaceMigration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.hierarchicalNamespaceMigrationCreateRequest(ctx, resourceGroupName, accountName, requestType, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // hierarchicalNamespaceMigrationCreateRequest creates the HierarchicalNamespaceMigration request. -func (client *AccountsClient) hierarchicalNamespaceMigrationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, requestType string, options *AccountsClientBeginHierarchicalNamespaceMigrationOptions) (*policy.Request, error) { +func (client *AccountsClient) hierarchicalNamespaceMigrationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, requestType string, _ *AccountsClientBeginHierarchicalNamespaceMigrationOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/hnsonmigration" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -494,7 +716,7 @@ func (client *AccountsClient) hierarchicalNamespaceMigrationCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") reqQP.Set("requestType", requestType) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -504,7 +726,7 @@ func (client *AccountsClient) hierarchicalNamespaceMigrationCreateRequest(ctx co // NewListPager - Lists all the storage accounts available under the subscription. Note that storage keys are not returned; // use the ListKeys operation for this. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-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]{ @@ -512,30 +734,25 @@ func (client *AccountsClient) NewListPager(options *AccountsClientListOptions) * return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AccountsClientListResponse) (AccountsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AccountsClient.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 AccountsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AccountsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listCreateRequest creates the List request. -func (client *AccountsClient) listCreateRequest(ctx context.Context, options *AccountsClientListOptions) (*policy.Request, error) { +func (client *AccountsClient) listCreateRequest(ctx context.Context, _ *AccountsClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -546,7 +763,7 @@ func (client *AccountsClient) listCreateRequest(ctx context.Context, options *Ac return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -564,29 +781,36 @@ func (client *AccountsClient) listHandleResponse(resp *http.Response) (AccountsC // ListAccountSAS - List SAS credentials of a storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - parameters - The parameters to provide to list SAS credentials for the storage account. // - options - AccountsClientListAccountSASOptions contains the optional parameters for the AccountsClient.ListAccountSAS method. func (client *AccountsClient) ListAccountSAS(ctx context.Context, resourceGroupName string, accountName string, parameters AccountSasParameters, options *AccountsClientListAccountSASOptions) (AccountsClientListAccountSASResponse, error) { + var err error + const operationName = "AccountsClient.ListAccountSAS" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listAccountSASCreateRequest(ctx, resourceGroupName, accountName, parameters, options) if err != nil { return AccountsClientListAccountSASResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountsClientListAccountSASResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientListAccountSASResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountsClientListAccountSASResponse{}, err } - return client.listAccountSASHandleResponse(resp) + resp, err := client.listAccountSASHandleResponse(httpResp) + return resp, err } // listAccountSASCreateRequest creates the ListAccountSAS request. -func (client *AccountsClient) listAccountSASCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters AccountSasParameters, options *AccountsClientListAccountSASOptions) (*policy.Request, error) { +func (client *AccountsClient) listAccountSASCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters AccountSasParameters, _ *AccountsClientListAccountSASOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -605,10 +829,13 @@ func (client *AccountsClient) listAccountSASCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // listAccountSASHandleResponse handles the ListAccountSAS response. @@ -623,7 +850,7 @@ func (client *AccountsClient) listAccountSASHandleResponse(resp *http.Response) // NewListByResourceGroupPager - Lists all the storage accounts available under the given resource group. Note that storage // keys are not returned; use the ListKeys operation for this. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - options - AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager // method. @@ -633,30 +860,25 @@ func (client *AccountsClient) NewListByResourceGroupPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AccountsClientListByResourceGroupResponse) (AccountsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AccountsClient.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 AccountsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AccountsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *AccountsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *AccountsClientListByResourceGroupOptions) (*policy.Request, error) { +func (client *AccountsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, _ *AccountsClientListByResourceGroupOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -671,7 +893,7 @@ func (client *AccountsClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -689,24 +911,31 @@ func (client *AccountsClient) listByResourceGroupHandleResponse(resp *http.Respo // ListKeys - Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - options - AccountsClientListKeysOptions contains the optional parameters for the AccountsClient.ListKeys method. func (client *AccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientListKeysOptions) (AccountsClientListKeysResponse, error) { + var err error + const operationName = "AccountsClient.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, accountName, options) if err != nil { return AccountsClientListKeysResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountsClientListKeysResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientListKeysResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountsClientListKeysResponse{}, err } - return client.listKeysHandleResponse(resp) + resp, err := client.listKeysHandleResponse(httpResp) + return resp, err } // listKeysCreateRequest creates the ListKeys request. @@ -729,10 +958,10 @@ func (client *AccountsClient) listKeysCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", "kerb") } + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -750,29 +979,36 @@ func (client *AccountsClient) listKeysHandleResponse(resp *http.Response) (Accou // ListServiceSAS - List service SAS credentials of a specific resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - parameters - The parameters to provide to list service SAS credentials. // - options - AccountsClientListServiceSASOptions contains the optional parameters for the AccountsClient.ListServiceSAS method. func (client *AccountsClient) ListServiceSAS(ctx context.Context, resourceGroupName string, accountName string, parameters ServiceSasParameters, options *AccountsClientListServiceSASOptions) (AccountsClientListServiceSASResponse, error) { + var err error + const operationName = "AccountsClient.ListServiceSAS" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listServiceSASCreateRequest(ctx, resourceGroupName, accountName, parameters, options) if err != nil { return AccountsClientListServiceSASResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountsClientListServiceSASResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientListServiceSASResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountsClientListServiceSASResponse{}, err } - return client.listServiceSASHandleResponse(resp) + resp, err := client.listServiceSASHandleResponse(httpResp) + return resp, err } // listServiceSASCreateRequest creates the ListServiceSAS request. -func (client *AccountsClient) listServiceSASCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters ServiceSasParameters, options *AccountsClientListServiceSASOptions) (*policy.Request, error) { +func (client *AccountsClient) listServiceSASCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters ServiceSasParameters, _ *AccountsClientListServiceSASOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -791,10 +1027,13 @@ func (client *AccountsClient) listServiceSASCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // listServiceSASHandleResponse handles the ListServiceSAS response. @@ -809,29 +1048,36 @@ func (client *AccountsClient) listServiceSASHandleResponse(resp *http.Response) // RegenerateKey - Regenerates one of the access keys or Kerberos keys for the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - regenerateKey - Specifies name of the key which should be regenerated -- key1, key2, kerb1, kerb2. // - options - AccountsClientRegenerateKeyOptions contains the optional parameters for the AccountsClient.RegenerateKey method. func (client *AccountsClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, regenerateKey AccountRegenerateKeyParameters, options *AccountsClientRegenerateKeyOptions) (AccountsClientRegenerateKeyResponse, error) { + var err error + const operationName = "AccountsClient.RegenerateKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regenerateKeyCreateRequest(ctx, resourceGroupName, accountName, regenerateKey, options) if err != nil { return AccountsClientRegenerateKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountsClientRegenerateKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientRegenerateKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountsClientRegenerateKeyResponse{}, err } - return client.regenerateKeyHandleResponse(resp) + resp, err := client.regenerateKeyHandleResponse(httpResp) + return resp, err } // regenerateKeyCreateRequest creates the RegenerateKey request. -func (client *AccountsClient) regenerateKeyCreateRequest(ctx context.Context, resourceGroupName string, accountName string, regenerateKey AccountRegenerateKeyParameters, options *AccountsClientRegenerateKeyOptions) (*policy.Request, error) { +func (client *AccountsClient) regenerateKeyCreateRequest(ctx context.Context, resourceGroupName string, accountName string, regenerateKey AccountRegenerateKeyParameters, _ *AccountsClientRegenerateKeyOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -850,10 +1096,13 @@ func (client *AccountsClient) regenerateKeyCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, regenerateKey) + if err := runtime.MarshalAsJSON(req, regenerateKey); err != nil { + return nil, err + } + return req, nil } // regenerateKeyHandleResponse handles the RegenerateKey response. @@ -868,7 +1117,7 @@ func (client *AccountsClient) regenerateKeyHandleResponse(resp *http.Response) ( // BeginRestoreBlobRanges - Restore blobs in the specified blob ranges // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -881,35 +1130,45 @@ func (client *AccountsClient) BeginRestoreBlobRanges(ctx context.Context, resour if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientRestoreBlobRangesResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientRestoreBlobRangesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AccountsClientRestoreBlobRangesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientRestoreBlobRangesResponse]{ + Tracer: client.internal.Tracer(), + }) } } // RestoreBlobRanges - Restore blobs in the specified blob ranges // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 func (client *AccountsClient) restoreBlobRanges(ctx context.Context, resourceGroupName string, accountName string, parameters BlobRestoreParameters, options *AccountsClientBeginRestoreBlobRangesOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginRestoreBlobRanges" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restoreBlobRangesCreateRequest(ctx, resourceGroupName, accountName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // restoreBlobRangesCreateRequest creates the RestoreBlobRanges request. -func (client *AccountsClient) restoreBlobRangesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters BlobRestoreParameters, options *AccountsClientBeginRestoreBlobRangesOptions) (*policy.Request, error) { +func (client *AccountsClient) restoreBlobRangesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters BlobRestoreParameters, _ *AccountsClientBeginRestoreBlobRangesOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/restoreBlobRanges" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -928,38 +1187,47 @@ func (client *AccountsClient) restoreBlobRangesCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // RevokeUserDelegationKeys - Revoke user delegation keys. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - options - AccountsClientRevokeUserDelegationKeysOptions contains the optional parameters for the AccountsClient.RevokeUserDelegationKeys // method. func (client *AccountsClient) RevokeUserDelegationKeys(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientRevokeUserDelegationKeysOptions) (AccountsClientRevokeUserDelegationKeysResponse, error) { + var err error + const operationName = "AccountsClient.RevokeUserDelegationKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.revokeUserDelegationKeysCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return AccountsClientRevokeUserDelegationKeysResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountsClientRevokeUserDelegationKeysResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientRevokeUserDelegationKeysResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountsClientRevokeUserDelegationKeysResponse{}, err } return AccountsClientRevokeUserDelegationKeysResponse{}, nil } // revokeUserDelegationKeysCreateRequest creates the RevokeUserDelegationKeys request. -func (client *AccountsClient) revokeUserDelegationKeysCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientRevokeUserDelegationKeysOptions) (*policy.Request, error) { +func (client *AccountsClient) revokeUserDelegationKeysCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *AccountsClientRevokeUserDelegationKeysOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -978,7 +1246,7 @@ func (client *AccountsClient) revokeUserDelegationKeysCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -992,29 +1260,36 @@ func (client *AccountsClient) revokeUserDelegationKeysCreateRequest(ctx context. // location and name of the storage account cannot be changed after creation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - parameters - The parameters to provide for the updated account. // - options - AccountsClientUpdateOptions contains the optional parameters for the AccountsClient.Update method. func (client *AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, parameters AccountUpdateParameters, options *AccountsClientUpdateOptions) (AccountsClientUpdateResponse, error) { + var err error + const operationName = "AccountsClient.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, parameters, options) if err != nil { return AccountsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *AccountsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters AccountUpdateParameters, options *AccountsClientUpdateOptions) (*policy.Request, error) { +func (client *AccountsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters AccountUpdateParameters, _ *AccountsClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -1033,10 +1308,13 @@ func (client *AccountsClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/assets.json index d4acd66b..00fd5e2b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/assets.json +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/storage/armstorage", - "Tag": "go/resourcemanager/storage/armstorage_d49f2aa92f" + "Tag": "go/resourcemanager/storage/armstorage_0044a0eabf" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/autorest.md index 6dcab772..6fc36ed8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/autorest.md @@ -5,10 +5,11 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/9d3547622288137fd36f086afcdaea5408dbe48c/specification/storage/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/9d3547622288137fd36f086afcdaea5408dbe48c/specification/storage/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.3.0 +module-version: 1.7.0 modelerfour: seal-single-value-enum-by-default: true -``` \ No newline at end of file +tag: package-2024-01 +``` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/blobcontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/blobcontainers_client.go index 0aca0793..b01dc92d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/blobcontainers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/blobcontainers_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type BlobContainersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBlobContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BlobContainersClient, error) { - cl, err := arm.NewClient(moduleName+".BlobContainersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,7 +44,7 @@ func NewBlobContainersClient(subscriptionID string, credential azcore.TokenCrede // clears out only the specified tags in the request. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -59,22 +55,29 @@ func NewBlobContainersClient(subscriptionID string, credential azcore.TokenCrede // - options - BlobContainersClientClearLegalHoldOptions contains the optional parameters for the BlobContainersClient.ClearLegalHold // method. func (client *BlobContainersClient) ClearLegalHold(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold, options *BlobContainersClientClearLegalHoldOptions) (BlobContainersClientClearLegalHoldResponse, error) { + var err error + const operationName = "BlobContainersClient.ClearLegalHold" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.clearLegalHoldCreateRequest(ctx, resourceGroupName, accountName, containerName, legalHold, options) if err != nil { return BlobContainersClientClearLegalHoldResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobContainersClientClearLegalHoldResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobContainersClientClearLegalHoldResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobContainersClientClearLegalHoldResponse{}, err } - return client.clearLegalHoldHandleResponse(resp) + resp, err := client.clearLegalHoldHandleResponse(httpResp) + return resp, err } // clearLegalHoldCreateRequest creates the ClearLegalHold request. -func (client *BlobContainersClient) clearLegalHoldCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold, options *BlobContainersClientClearLegalHoldOptions) (*policy.Request, error) { +func (client *BlobContainersClient) clearLegalHoldCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold, _ *BlobContainersClientClearLegalHoldOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -97,10 +100,13 @@ func (client *BlobContainersClient) clearLegalHoldCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, legalHold) + if err := runtime.MarshalAsJSON(req, legalHold); err != nil { + return nil, err + } + return req, nil } // clearLegalHoldHandleResponse handles the ClearLegalHold response. @@ -117,7 +123,7 @@ func (client *BlobContainersClient) clearLegalHoldHandleResponse(resp *http.Resp // contained by the container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -127,22 +133,29 @@ func (client *BlobContainersClient) clearLegalHoldHandleResponse(resp *http.Resp // - blobContainer - Properties of the blob container to create. // - options - BlobContainersClientCreateOptions contains the optional parameters for the BlobContainersClient.Create method. func (client *BlobContainersClient) Create(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer, options *BlobContainersClientCreateOptions) (BlobContainersClientCreateResponse, error) { + var err error + const operationName = "BlobContainersClient.Create" + 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, accountName, containerName, blobContainer, options) if err != nil { return BlobContainersClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobContainersClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return BlobContainersClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return BlobContainersClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. -func (client *BlobContainersClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer, options *BlobContainersClientCreateOptions) (*policy.Request, error) { +func (client *BlobContainersClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer, _ *BlobContainersClientCreateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -165,10 +178,13 @@ func (client *BlobContainersClient) createCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, blobContainer) + if err := runtime.MarshalAsJSON(req, blobContainer); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -184,7 +200,7 @@ func (client *BlobContainersClient) createHandleResponse(resp *http.Response) (B // but not required for this operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -194,18 +210,25 @@ func (client *BlobContainersClient) createHandleResponse(resp *http.Response) (B // - options - BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.CreateOrUpdateImmutabilityPolicy // method. func (client *BlobContainersClient) CreateOrUpdateImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions) (BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse, error) { + var err error + const operationName = "BlobContainersClient.CreateOrUpdateImmutabilityPolicy" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateImmutabilityPolicyCreateRequest(ctx, resourceGroupName, accountName, containerName, options) if err != nil { return BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse{}, err } - return client.createOrUpdateImmutabilityPolicyHandleResponse(resp) + resp, err := client.createOrUpdateImmutabilityPolicyHandleResponse(httpResp) + return resp, err } // createOrUpdateImmutabilityPolicyCreateRequest creates the CreateOrUpdateImmutabilityPolicy request. @@ -233,14 +256,17 @@ func (client *BlobContainersClient) createOrUpdateImmutabilityPolicyCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -260,7 +286,7 @@ func (client *BlobContainersClient) createOrUpdateImmutabilityPolicyHandleRespon // Delete - Deletes specified container under its account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -269,22 +295,28 @@ func (client *BlobContainersClient) createOrUpdateImmutabilityPolicyHandleRespon // dash (-) character must be immediately preceded and followed by a letter or number. // - options - BlobContainersClientDeleteOptions contains the optional parameters for the BlobContainersClient.Delete method. func (client *BlobContainersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientDeleteOptions) (BlobContainersClientDeleteResponse, error) { + var err error + const operationName = "BlobContainersClient.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, accountName, containerName, options) if err != nil { return BlobContainersClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobContainersClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return BlobContainersClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return BlobContainersClientDeleteResponse{}, err } return BlobContainersClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *BlobContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientDeleteOptions) (*policy.Request, error) { +func (client *BlobContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, _ *BlobContainersClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -307,7 +339,7 @@ func (client *BlobContainersClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -318,35 +350,42 @@ func (client *BlobContainersClient) deleteCreateRequest(ctx context.Context, res // container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - containerName - The name of the blob container within the specified storage account. Blob container names must be between // 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every // dash (-) character must be immediately preceded and followed by a letter or number. -// - ifMatch - The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the -// operation only if the immutability policy already exists. If omitted, this operation will -// always be applied. +// - ifMatch - The entity state (ETag) version of the immutability policy to update must be returned to the server for all update +// operations. The ETag value must include the leading and trailing double quotes as +// returned by the service. // - options - BlobContainersClientDeleteImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.DeleteImmutabilityPolicy // method. func (client *BlobContainersClient) DeleteImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, options *BlobContainersClientDeleteImmutabilityPolicyOptions) (BlobContainersClientDeleteImmutabilityPolicyResponse, error) { + var err error + const operationName = "BlobContainersClient.DeleteImmutabilityPolicy" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteImmutabilityPolicyCreateRequest(ctx, resourceGroupName, accountName, containerName, ifMatch, options) if err != nil { return BlobContainersClientDeleteImmutabilityPolicyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobContainersClientDeleteImmutabilityPolicyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobContainersClientDeleteImmutabilityPolicyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobContainersClientDeleteImmutabilityPolicyResponse{}, err } - return client.deleteImmutabilityPolicyHandleResponse(resp) + resp, err := client.deleteImmutabilityPolicyHandleResponse(httpResp) + return resp, err } // deleteImmutabilityPolicyCreateRequest creates the DeleteImmutabilityPolicy request. -func (client *BlobContainersClient) deleteImmutabilityPolicyCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, options *BlobContainersClientDeleteImmutabilityPolicyOptions) (*policy.Request, error) { +func (client *BlobContainersClient) deleteImmutabilityPolicyCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, _ *BlobContainersClientDeleteImmutabilityPolicyOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -370,10 +409,10 @@ func (client *BlobContainersClient) deleteImmutabilityPolicyCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } @@ -393,31 +432,38 @@ func (client *BlobContainersClient) deleteImmutabilityPolicyHandleResponse(resp // allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - containerName - The name of the blob container within the specified storage account. Blob container names must be between // 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every // dash (-) character must be immediately preceded and followed by a letter or number. -// - ifMatch - The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the -// operation only if the immutability policy already exists. If omitted, this operation will -// always be applied. +// - ifMatch - The entity state (ETag) version of the immutability policy to update must be returned to the server for all update +// operations. The ETag value must include the leading and trailing double quotes as +// returned by the service. // - options - BlobContainersClientExtendImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.ExtendImmutabilityPolicy // method. func (client *BlobContainersClient) ExtendImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, options *BlobContainersClientExtendImmutabilityPolicyOptions) (BlobContainersClientExtendImmutabilityPolicyResponse, error) { + var err error + const operationName = "BlobContainersClient.ExtendImmutabilityPolicy" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.extendImmutabilityPolicyCreateRequest(ctx, resourceGroupName, accountName, containerName, ifMatch, options) if err != nil { return BlobContainersClientExtendImmutabilityPolicyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobContainersClientExtendImmutabilityPolicyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobContainersClientExtendImmutabilityPolicyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobContainersClientExtendImmutabilityPolicyResponse{}, err } - return client.extendImmutabilityPolicyHandleResponse(resp) + resp, err := client.extendImmutabilityPolicyHandleResponse(httpResp) + return resp, err } // extendImmutabilityPolicyCreateRequest creates the ExtendImmutabilityPolicy request. @@ -444,12 +490,15 @@ func (client *BlobContainersClient) extendImmutabilityPolicyCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -469,7 +518,7 @@ func (client *BlobContainersClient) extendImmutabilityPolicyHandleResponse(resp // Get - Gets properties of a specified container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -478,22 +527,29 @@ func (client *BlobContainersClient) extendImmutabilityPolicyHandleResponse(resp // dash (-) character must be immediately preceded and followed by a letter or number. // - options - BlobContainersClientGetOptions contains the optional parameters for the BlobContainersClient.Get method. func (client *BlobContainersClient) Get(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientGetOptions) (BlobContainersClientGetResponse, error) { + var err error + const operationName = "BlobContainersClient.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, containerName, options) if err != nil { return BlobContainersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobContainersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobContainersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobContainersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *BlobContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientGetOptions) (*policy.Request, error) { +func (client *BlobContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, _ *BlobContainersClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -516,7 +572,7 @@ func (client *BlobContainersClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -535,7 +591,7 @@ func (client *BlobContainersClient) getHandleResponse(resp *http.Response) (Blob // body. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -545,18 +601,25 @@ func (client *BlobContainersClient) getHandleResponse(resp *http.Response) (Blob // - options - BlobContainersClientGetImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.GetImmutabilityPolicy // method. func (client *BlobContainersClient) GetImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientGetImmutabilityPolicyOptions) (BlobContainersClientGetImmutabilityPolicyResponse, error) { + var err error + const operationName = "BlobContainersClient.GetImmutabilityPolicy" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getImmutabilityPolicyCreateRequest(ctx, resourceGroupName, accountName, containerName, options) if err != nil { return BlobContainersClientGetImmutabilityPolicyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobContainersClientGetImmutabilityPolicyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobContainersClientGetImmutabilityPolicyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobContainersClientGetImmutabilityPolicyResponse{}, err } - return client.getImmutabilityPolicyHandleResponse(resp) + resp, err := client.getImmutabilityPolicyHandleResponse(httpResp) + return resp, err } // getImmutabilityPolicyCreateRequest creates the GetImmutabilityPolicy request. @@ -584,12 +647,12 @@ func (client *BlobContainersClient) getImmutabilityPolicyCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -609,7 +672,7 @@ func (client *BlobContainersClient) getImmutabilityPolicyHandleResponse(resp *ht // can be 15 to 60 seconds, or can be infinite. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -618,18 +681,25 @@ func (client *BlobContainersClient) getImmutabilityPolicyHandleResponse(resp *ht // dash (-) character must be immediately preceded and followed by a letter or number. // - options - BlobContainersClientLeaseOptions contains the optional parameters for the BlobContainersClient.Lease method. func (client *BlobContainersClient) Lease(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientLeaseOptions) (BlobContainersClientLeaseResponse, error) { + var err error + const operationName = "BlobContainersClient.Lease" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.leaseCreateRequest(ctx, resourceGroupName, accountName, containerName, options) if err != nil { return BlobContainersClientLeaseResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobContainersClientLeaseResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobContainersClientLeaseResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobContainersClientLeaseResponse{}, err } - return client.leaseHandleResponse(resp) + resp, err := client.leaseHandleResponse(httpResp) + return resp, err } // leaseCreateRequest creates the Lease request. @@ -656,11 +726,14 @@ func (client *BlobContainersClient) leaseCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -677,7 +750,7 @@ func (client *BlobContainersClient) leaseHandleResponse(resp *http.Response) (Bl // NewListPager - Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation // token. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -688,25 +761,20 @@ func (client *BlobContainersClient) NewListPager(resourceGroupName string, accou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *BlobContainersClientListResponse) (BlobContainersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, accountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BlobContainersClient.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 BlobContainersClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BlobContainersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobContainersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -730,16 +798,16 @@ func (client *BlobContainersClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") - if options != nil && options.Maxpagesize != nil { - reqQP.Set("$maxpagesize", *options.Maxpagesize) - } if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } if options != nil && options.Include != nil { reqQP.Set("$include", string(*options.Include)) } + if options != nil && options.Maxpagesize != nil { + reqQP.Set("$maxpagesize", *options.Maxpagesize) + } + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -758,35 +826,42 @@ func (client *BlobContainersClient) listHandleResponse(resp *http.Response) (Blo // action. ETag in If-Match is required for this operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - containerName - The name of the blob container within the specified storage account. Blob container names must be between // 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every // dash (-) character must be immediately preceded and followed by a letter or number. -// - ifMatch - The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the -// operation only if the immutability policy already exists. If omitted, this operation will -// always be applied. +// - ifMatch - The entity state (ETag) version of the immutability policy to update must be returned to the server for all update +// operations. The ETag value must include the leading and trailing double quotes as +// returned by the service. // - options - BlobContainersClientLockImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.LockImmutabilityPolicy // method. func (client *BlobContainersClient) LockImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, options *BlobContainersClientLockImmutabilityPolicyOptions) (BlobContainersClientLockImmutabilityPolicyResponse, error) { + var err error + const operationName = "BlobContainersClient.LockImmutabilityPolicy" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.lockImmutabilityPolicyCreateRequest(ctx, resourceGroupName, accountName, containerName, ifMatch, options) if err != nil { return BlobContainersClientLockImmutabilityPolicyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobContainersClientLockImmutabilityPolicyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobContainersClientLockImmutabilityPolicyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobContainersClientLockImmutabilityPolicyResponse{}, err } - return client.lockImmutabilityPolicyHandleResponse(resp) + resp, err := client.lockImmutabilityPolicyHandleResponse(httpResp) + return resp, err } // lockImmutabilityPolicyCreateRequest creates the LockImmutabilityPolicy request. -func (client *BlobContainersClient) lockImmutabilityPolicyCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, options *BlobContainersClientLockImmutabilityPolicyOptions) (*policy.Request, error) { +func (client *BlobContainersClient) lockImmutabilityPolicyCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, _ *BlobContainersClientLockImmutabilityPolicyOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/lock" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -809,10 +884,10 @@ func (client *BlobContainersClient) lockImmutabilityPolicyCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } @@ -833,7 +908,7 @@ func (client *BlobContainersClient) lockImmutabilityPolicyHandleResponse(resp *h // unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -848,11 +923,15 @@ func (client *BlobContainersClient) BeginObjectLevelWorm(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BlobContainersClientObjectLevelWormResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BlobContainersClientObjectLevelWormResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[BlobContainersClientObjectLevelWormResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BlobContainersClientObjectLevelWormResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -861,24 +940,30 @@ func (client *BlobContainersClient) BeginObjectLevelWorm(ctx context.Context, re // unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 func (client *BlobContainersClient) objectLevelWorm(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientBeginObjectLevelWormOptions) (*http.Response, error) { + var err error + const operationName = "BlobContainersClient.BeginObjectLevelWorm" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.objectLevelWormCreateRequest(ctx, resourceGroupName, accountName, containerName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // objectLevelWormCreateRequest creates the ObjectLevelWorm request. -func (client *BlobContainersClient) objectLevelWormCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientBeginObjectLevelWormOptions) (*policy.Request, error) { +func (client *BlobContainersClient) objectLevelWormCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, _ *BlobContainersClientBeginObjectLevelWormOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/migrate" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -901,7 +986,7 @@ func (client *BlobContainersClient) objectLevelWormCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -911,7 +996,7 @@ func (client *BlobContainersClient) objectLevelWormCreateRequest(ctx context.Con // pattern and does not clear out the existing tags that are not specified in the request. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -922,22 +1007,29 @@ func (client *BlobContainersClient) objectLevelWormCreateRequest(ctx context.Con // - options - BlobContainersClientSetLegalHoldOptions contains the optional parameters for the BlobContainersClient.SetLegalHold // method. func (client *BlobContainersClient) SetLegalHold(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold, options *BlobContainersClientSetLegalHoldOptions) (BlobContainersClientSetLegalHoldResponse, error) { + var err error + const operationName = "BlobContainersClient.SetLegalHold" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.setLegalHoldCreateRequest(ctx, resourceGroupName, accountName, containerName, legalHold, options) if err != nil { return BlobContainersClientSetLegalHoldResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobContainersClientSetLegalHoldResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobContainersClientSetLegalHoldResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobContainersClientSetLegalHoldResponse{}, err } - return client.setLegalHoldHandleResponse(resp) + resp, err := client.setLegalHoldHandleResponse(httpResp) + return resp, err } // setLegalHoldCreateRequest creates the SetLegalHold request. -func (client *BlobContainersClient) setLegalHoldCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold, options *BlobContainersClientSetLegalHoldOptions) (*policy.Request, error) { +func (client *BlobContainersClient) setLegalHoldCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold, _ *BlobContainersClientSetLegalHoldOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/setLegalHold" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -960,10 +1052,13 @@ func (client *BlobContainersClient) setLegalHoldCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, legalHold) + if err := runtime.MarshalAsJSON(req, legalHold); err != nil { + return nil, err + } + return req, nil } // setLegalHoldHandleResponse handles the SetLegalHold response. @@ -979,7 +1074,7 @@ func (client *BlobContainersClient) setLegalHoldHandleResponse(resp *http.Respon // Update fails if the specified container doesn't already exist. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -989,22 +1084,29 @@ func (client *BlobContainersClient) setLegalHoldHandleResponse(resp *http.Respon // - blobContainer - Properties to update for the blob container. // - options - BlobContainersClientUpdateOptions contains the optional parameters for the BlobContainersClient.Update method. func (client *BlobContainersClient) Update(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer, options *BlobContainersClientUpdateOptions) (BlobContainersClientUpdateResponse, error) { + var err error + const operationName = "BlobContainersClient.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, containerName, blobContainer, options) if err != nil { return BlobContainersClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobContainersClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobContainersClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobContainersClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *BlobContainersClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer, options *BlobContainersClientUpdateOptions) (*policy.Request, error) { +func (client *BlobContainersClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer, _ *BlobContainersClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -1027,10 +1129,13 @@ func (client *BlobContainersClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, blobContainer) + if err := runtime.MarshalAsJSON(req, blobContainer); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client.go index b590d272..d8cd8d27 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type BlobInventoryPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBlobInventoryPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BlobInventoryPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".BlobInventoryPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +43,7 @@ func NewBlobInventoryPoliciesClient(subscriptionID string, credential azcore.Tok // CreateOrUpdate - Sets the blob inventory policy to the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -56,22 +52,29 @@ func NewBlobInventoryPoliciesClient(subscriptionID string, credential azcore.Tok // - options - BlobInventoryPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BlobInventoryPoliciesClient.CreateOrUpdate // method. func (client *BlobInventoryPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, blobInventoryPolicyName BlobInventoryPolicyName, properties BlobInventoryPolicy, options *BlobInventoryPoliciesClientCreateOrUpdateOptions) (BlobInventoryPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "BlobInventoryPoliciesClient.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, blobInventoryPolicyName, properties, options) if err != nil { return BlobInventoryPoliciesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobInventoryPoliciesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobInventoryPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobInventoryPoliciesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *BlobInventoryPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, blobInventoryPolicyName BlobInventoryPolicyName, properties BlobInventoryPolicy, options *BlobInventoryPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *BlobInventoryPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, blobInventoryPolicyName BlobInventoryPolicyName, properties BlobInventoryPolicy, _ *BlobInventoryPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -94,10 +97,13 @@ func (client *BlobInventoryPoliciesClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,7 +118,7 @@ func (client *BlobInventoryPoliciesClient) createOrUpdateHandleResponse(resp *ht // Delete - Deletes the blob inventory policy associated with the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -120,22 +126,28 @@ func (client *BlobInventoryPoliciesClient) createOrUpdateHandleResponse(resp *ht // - options - BlobInventoryPoliciesClientDeleteOptions contains the optional parameters for the BlobInventoryPoliciesClient.Delete // method. func (client *BlobInventoryPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, blobInventoryPolicyName BlobInventoryPolicyName, options *BlobInventoryPoliciesClientDeleteOptions) (BlobInventoryPoliciesClientDeleteResponse, error) { + var err error + const operationName = "BlobInventoryPoliciesClient.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, accountName, blobInventoryPolicyName, options) if err != nil { return BlobInventoryPoliciesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobInventoryPoliciesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return BlobInventoryPoliciesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return BlobInventoryPoliciesClientDeleteResponse{}, err } return BlobInventoryPoliciesClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *BlobInventoryPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, blobInventoryPolicyName BlobInventoryPolicyName, options *BlobInventoryPoliciesClientDeleteOptions) (*policy.Request, error) { +func (client *BlobInventoryPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, blobInventoryPolicyName BlobInventoryPolicyName, _ *BlobInventoryPoliciesClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -158,7 +170,7 @@ func (client *BlobInventoryPoliciesClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -167,7 +179,7 @@ func (client *BlobInventoryPoliciesClient) deleteCreateRequest(ctx context.Conte // Get - Gets the blob inventory policy associated with the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -175,22 +187,29 @@ func (client *BlobInventoryPoliciesClient) deleteCreateRequest(ctx context.Conte // - options - BlobInventoryPoliciesClientGetOptions contains the optional parameters for the BlobInventoryPoliciesClient.Get // method. func (client *BlobInventoryPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, blobInventoryPolicyName BlobInventoryPolicyName, options *BlobInventoryPoliciesClientGetOptions) (BlobInventoryPoliciesClientGetResponse, error) { + var err error + const operationName = "BlobInventoryPoliciesClient.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, blobInventoryPolicyName, options) if err != nil { return BlobInventoryPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobInventoryPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobInventoryPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobInventoryPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *BlobInventoryPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, blobInventoryPolicyName BlobInventoryPolicyName, options *BlobInventoryPoliciesClientGetOptions) (*policy.Request, error) { +func (client *BlobInventoryPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, blobInventoryPolicyName BlobInventoryPolicyName, _ *BlobInventoryPoliciesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -213,7 +232,7 @@ func (client *BlobInventoryPoliciesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -230,7 +249,7 @@ func (client *BlobInventoryPoliciesClient) getHandleResponse(resp *http.Response // NewListPager - Gets the blob inventory policy associated with the specified storage account. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -242,6 +261,7 @@ func (client *BlobInventoryPoliciesClient) NewListPager(resourceGroupName string return false }, Fetcher: func(ctx context.Context, page *BlobInventoryPoliciesClientListResponse) (BlobInventoryPoliciesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BlobInventoryPoliciesClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return BlobInventoryPoliciesClientListResponse{}, err @@ -255,11 +275,12 @@ func (client *BlobInventoryPoliciesClient) NewListPager(resourceGroupName string } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listCreateRequest creates the List request. -func (client *BlobInventoryPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *BlobInventoryPoliciesClientListOptions) (*policy.Request, error) { +func (client *BlobInventoryPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *BlobInventoryPoliciesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -278,7 +299,7 @@ func (client *BlobInventoryPoliciesClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-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/storage/armstorage/blobservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/blobservices_client.go index a44211f7..21a7346b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/blobservices_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/blobservices_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type BlobServicesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBlobServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BlobServicesClient, error) { - cl, err := arm.NewClient(moduleName+".BlobServicesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,29 +44,36 @@ func NewBlobServicesClient(subscriptionID string, credential azcore.TokenCredent // and CORS (Cross-Origin Resource Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - options - BlobServicesClientGetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.GetServiceProperties // method. func (client *BlobServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, options *BlobServicesClientGetServicePropertiesOptions) (BlobServicesClientGetServicePropertiesResponse, error) { + var err error + const operationName = "BlobServicesClient.GetServiceProperties" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getServicePropertiesCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return BlobServicesClientGetServicePropertiesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobServicesClientGetServicePropertiesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobServicesClientGetServicePropertiesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobServicesClientGetServicePropertiesResponse{}, err } - return client.getServicePropertiesHandleResponse(resp) + resp, err := client.getServicePropertiesHandleResponse(httpResp) + return resp, err } // getServicePropertiesCreateRequest creates the GetServiceProperties request. -func (client *BlobServicesClient) getServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *BlobServicesClientGetServicePropertiesOptions) (*policy.Request, error) { +func (client *BlobServicesClient) getServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *BlobServicesClientGetServicePropertiesOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -90,7 +93,7 @@ func (client *BlobServicesClient) getServicePropertiesCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -107,7 +110,7 @@ func (client *BlobServicesClient) getServicePropertiesHandleResponse(resp *http. // NewListPager - List blob services of storage account. It returns a collection of one object named default. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -118,6 +121,7 @@ func (client *BlobServicesClient) NewListPager(resourceGroupName string, account return false }, Fetcher: func(ctx context.Context, page *BlobServicesClientListResponse) (BlobServicesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BlobServicesClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return BlobServicesClientListResponse{}, err @@ -131,11 +135,12 @@ func (client *BlobServicesClient) NewListPager(resourceGroupName string, account } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listCreateRequest creates the List request. -func (client *BlobServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *BlobServicesClientListOptions) (*policy.Request, error) { +func (client *BlobServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *BlobServicesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -154,7 +159,7 @@ func (client *BlobServicesClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -173,7 +178,7 @@ func (client *BlobServicesClient) listHandleResponse(resp *http.Response) (BlobS // and CORS (Cross-Origin Resource Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -182,22 +187,29 @@ func (client *BlobServicesClient) listHandleResponse(resp *http.Response) (BlobS // - options - BlobServicesClientSetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.SetServiceProperties // method. func (client *BlobServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters BlobServiceProperties, options *BlobServicesClientSetServicePropertiesOptions) (BlobServicesClientSetServicePropertiesResponse, error) { + var err error + const operationName = "BlobServicesClient.SetServiceProperties" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.setServicePropertiesCreateRequest(ctx, resourceGroupName, accountName, parameters, options) if err != nil { return BlobServicesClientSetServicePropertiesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BlobServicesClientSetServicePropertiesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BlobServicesClientSetServicePropertiesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BlobServicesClientSetServicePropertiesResponse{}, err } - return client.setServicePropertiesHandleResponse(resp) + resp, err := client.setServicePropertiesHandleResponse(httpResp) + return resp, err } // setServicePropertiesCreateRequest creates the SetServiceProperties request. -func (client *BlobServicesClient) setServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters BlobServiceProperties, options *BlobServicesClientSetServicePropertiesOptions) (*policy.Request, error) { +func (client *BlobServicesClient) setServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters BlobServiceProperties, _ *BlobServicesClientSetServicePropertiesOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -217,10 +229,13 @@ func (client *BlobServicesClient) setServicePropertiesCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // setServicePropertiesHandleResponse handles the SetServiceProperties response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/ci.yml index 56efca76..674a186b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/ci.yml +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/ci.yml @@ -21,8 +21,9 @@ pr: include: - sdk/resourcemanager/storage/armstorage/ -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/storage/armstorage' + UsePipelineProxy: false diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/client_factory.go index 51723786..5cb83062 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/client_factory.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -18,8 +14,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. @@ -28,112 +23,203 @@ 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+".ClientFactory", 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 } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient +// NewAccountsClient creates a new instance of AccountsClient. +func (c *ClientFactory) NewAccountsClient() *AccountsClient { + return &AccountsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewSKUsClient() *SKUsClient { - subClient, _ := NewSKUsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewBlobContainersClient creates a new instance of BlobContainersClient. +func (c *ClientFactory) NewBlobContainersClient() *BlobContainersClient { + return &BlobContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewAccountsClient() *AccountsClient { - subClient, _ := NewAccountsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewBlobInventoryPoliciesClient creates a new instance of BlobInventoryPoliciesClient. +func (c *ClientFactory) NewBlobInventoryPoliciesClient() *BlobInventoryPoliciesClient { + return &BlobInventoryPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewDeletedAccountsClient() *DeletedAccountsClient { - subClient, _ := NewDeletedAccountsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewBlobServicesClient creates a new instance of BlobServicesClient. +func (c *ClientFactory) NewBlobServicesClient() *BlobServicesClient { + return &BlobServicesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewUsagesClient() *UsagesClient { - subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewDeletedAccountsClient creates a new instance of DeletedAccountsClient. +func (c *ClientFactory) NewDeletedAccountsClient() *DeletedAccountsClient { + return &DeletedAccountsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewManagementPoliciesClient() *ManagementPoliciesClient { - subClient, _ := NewManagementPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewEncryptionScopesClient creates a new instance of EncryptionScopesClient. +func (c *ClientFactory) NewEncryptionScopesClient() *EncryptionScopesClient { + return &EncryptionScopesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewBlobInventoryPoliciesClient() *BlobInventoryPoliciesClient { - subClient, _ := NewBlobInventoryPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewFileServicesClient creates a new instance of FileServicesClient. +func (c *ClientFactory) NewFileServicesClient() *FileServicesClient { + return &FileServicesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewFileSharesClient creates a new instance of FileSharesClient. +func (c *ClientFactory) NewFileSharesClient() *FileSharesClient { + return &FileSharesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewLocalUsersClient creates a new instance of LocalUsersClient. +func (c *ClientFactory) NewLocalUsersClient() *LocalUsersClient { + return &LocalUsersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewObjectReplicationPoliciesClient() *ObjectReplicationPoliciesClient { - subClient, _ := NewObjectReplicationPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewManagementPoliciesClient creates a new instance of ManagementPoliciesClient. +func (c *ClientFactory) NewManagementPoliciesClient() *ManagementPoliciesClient { + return &ManagementPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewLocalUsersClient() *LocalUsersClient { - subClient, _ := NewLocalUsersClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewNetworkSecurityPerimeterConfigurationsClient creates a new instance of NetworkSecurityPerimeterConfigurationsClient. +func (c *ClientFactory) NewNetworkSecurityPerimeterConfigurationsClient() *NetworkSecurityPerimeterConfigurationsClient { + return &NetworkSecurityPerimeterConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewEncryptionScopesClient() *EncryptionScopesClient { - subClient, _ := NewEncryptionScopesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewObjectReplicationPoliciesClient creates a new instance of ObjectReplicationPoliciesClient. +func (c *ClientFactory) NewObjectReplicationPoliciesClient() *ObjectReplicationPoliciesClient { + return &ObjectReplicationPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewBlobServicesClient() *BlobServicesClient { - subClient, _ := NewBlobServicesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } } -func (c *ClientFactory) NewBlobContainersClient() *BlobContainersClient { - subClient, _ := NewBlobContainersClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient. +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + return &PrivateEndpointConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewFileServicesClient() *FileServicesClient { - subClient, _ := NewFileServicesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient. +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + return &PrivateLinkResourcesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewFileSharesClient() *FileSharesClient { - subClient, _ := NewFileSharesClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewQueueClient creates a new instance of QueueClient. +func (c *ClientFactory) NewQueueClient() *QueueClient { + return &QueueClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewQueueServicesClient creates a new instance of QueueServicesClient. func (c *ClientFactory) NewQueueServicesClient() *QueueServicesClient { - subClient, _ := NewQueueServicesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &QueueServicesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewQueueClient() *QueueClient { - subClient, _ := NewQueueClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewSKUsClient creates a new instance of SKUsClient. +func (c *ClientFactory) NewSKUsClient() *SKUsClient { + return &SKUsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } +// NewTableClient creates a new instance of TableClient. +func (c *ClientFactory) NewTableClient() *TableClient { + return &TableClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTableServicesClient creates a new instance of TableServicesClient. func (c *ClientFactory) NewTableServicesClient() *TableServicesClient { - subClient, _ := NewTableServicesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &TableServicesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } -func (c *ClientFactory) NewTableClient() *TableClient { - subClient, _ := NewTableClient(c.subscriptionID, c.credential, c.options) - return subClient +// NewTaskAssignmentInstancesReportClient creates a new instance of TaskAssignmentInstancesReportClient. +func (c *ClientFactory) NewTaskAssignmentInstancesReportClient() *TaskAssignmentInstancesReportClient { + return &TaskAssignmentInstancesReportClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTaskAssignmentsClient creates a new instance of TaskAssignmentsClient. +func (c *ClientFactory) NewTaskAssignmentsClient() *TaskAssignmentsClient { + return &TaskAssignmentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTaskAssignmentsInstancesReportClient creates a new instance of TaskAssignmentsInstancesReportClient. +func (c *ClientFactory) NewTaskAssignmentsInstancesReportClient() *TaskAssignmentsInstancesReportClient { + return &TaskAssignmentsInstancesReportClient{ + 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, + } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/constants.go index 6108502f..2f84c377 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/constants.go @@ -1,17 +1,13 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage const ( - moduleName = "armstorage" - moduleVersion = "v1.3.0" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" + moduleVersion = "v1.7.0" ) // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' @@ -20,16 +16,18 @@ const ( type AccessTier string const ( - AccessTierHot AccessTier = "Hot" + AccessTierCold AccessTier = "Cold" AccessTierCool AccessTier = "Cool" + AccessTierHot AccessTier = "Hot" AccessTierPremium AccessTier = "Premium" ) // PossibleAccessTierValues returns the possible values for the AccessTier const type. func PossibleAccessTierValues() []AccessTier { return []AccessTier{ - AccessTierHot, + AccessTierCold, AccessTierCool, + AccessTierHot, AccessTierPremium, } } @@ -162,6 +160,7 @@ func PossibleBypassValues() []Bypass { type CorsRuleAllowedMethodsItem string const ( + CorsRuleAllowedMethodsItemCONNECT CorsRuleAllowedMethodsItem = "CONNECT" CorsRuleAllowedMethodsItemDELETE CorsRuleAllowedMethodsItem = "DELETE" CorsRuleAllowedMethodsItemGET CorsRuleAllowedMethodsItem = "GET" CorsRuleAllowedMethodsItemHEAD CorsRuleAllowedMethodsItem = "HEAD" @@ -170,11 +169,13 @@ const ( CorsRuleAllowedMethodsItemPATCH CorsRuleAllowedMethodsItem = "PATCH" CorsRuleAllowedMethodsItemPOST CorsRuleAllowedMethodsItem = "POST" CorsRuleAllowedMethodsItemPUT CorsRuleAllowedMethodsItem = "PUT" + CorsRuleAllowedMethodsItemTRACE CorsRuleAllowedMethodsItem = "TRACE" ) // PossibleCorsRuleAllowedMethodsItemValues returns the possible values for the CorsRuleAllowedMethodsItem const type. func PossibleCorsRuleAllowedMethodsItemValues() []CorsRuleAllowedMethodsItem { return []CorsRuleAllowedMethodsItem{ + CorsRuleAllowedMethodsItemCONNECT, CorsRuleAllowedMethodsItemDELETE, CorsRuleAllowedMethodsItemGET, CorsRuleAllowedMethodsItemHEAD, @@ -183,6 +184,7 @@ func PossibleCorsRuleAllowedMethodsItemValues() []CorsRuleAllowedMethodsItem { CorsRuleAllowedMethodsItemPATCH, CorsRuleAllowedMethodsItemPOST, CorsRuleAllowedMethodsItemPUT, + CorsRuleAllowedMethodsItemTRACE, } } @@ -328,16 +330,20 @@ func PossibleEncryptionScopeStateValues() []EncryptionScopeState { } } -// ExpirationAction - The SAS expiration action. Can only be Log. +// ExpirationAction - The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. +// The 'Log' action can be used for audit purposes and the 'Block' action can be used to block +// and deny the usage of SAS tokens that do not adhere to the sas policy expiration period. type ExpirationAction string const ( - ExpirationActionLog ExpirationAction = "Log" + ExpirationActionBlock ExpirationAction = "Block" + ExpirationActionLog ExpirationAction = "Log" ) // PossibleExpirationActionValues returns the possible values for the ExpirationAction const type. func PossibleExpirationActionValues() []ExpirationAction { return []ExpirationAction{ + ExpirationActionBlock, ExpirationActionLog, } } @@ -397,15 +403,15 @@ func PossibleGeoReplicationStatusValues() []GeoReplicationStatus { type HTTPProtocol string const ( - HTTPProtocolHTTPSHTTP HTTPProtocol = "https,http" HTTPProtocolHTTPS HTTPProtocol = "https" + HTTPProtocolHTTPSHTTP HTTPProtocol = "https,http" ) // PossibleHTTPProtocolValues returns the possible values for the HTTPProtocol const type. func PossibleHTTPProtocolValues() []HTTPProtocol { return []HTTPProtocol{ - HTTPProtocolHTTPSHTTP, HTTPProtocolHTTPS, + HTTPProtocolHTTPSHTTP, } } @@ -478,19 +484,35 @@ func PossibleInventoryRuleTypeValues() []InventoryRuleType { } } +// IssueType - Type of issue +type IssueType string + +const ( + IssueTypeConfigurationPropagationFailure IssueType = "ConfigurationPropagationFailure" + IssueTypeUnknown IssueType = "Unknown" +) + +// PossibleIssueTypeValues returns the possible values for the IssueType const type. +func PossibleIssueTypeValues() []IssueType { + return []IssueType{ + IssueTypeConfigurationPropagationFailure, + IssueTypeUnknown, + } +} + // KeyPermission - Permissions for the key -- read-only or full permissions. type KeyPermission string const ( - KeyPermissionRead KeyPermission = "Read" KeyPermissionFull KeyPermission = "Full" + KeyPermissionRead KeyPermission = "Read" ) // PossibleKeyPermissionValues returns the possible values for the KeyPermission const type. func PossibleKeyPermissionValues() []KeyPermission { return []KeyPermission{ - KeyPermissionRead, KeyPermissionFull, + KeyPermissionRead, } } @@ -694,6 +716,19 @@ func PossibleListEncryptionScopesIncludeValues() []ListEncryptionScopesInclude { } } +type ListLocalUserIncludeParam string + +const ( + ListLocalUserIncludeParamNfsv3 ListLocalUserIncludeParam = "nfsv3" +) + +// PossibleListLocalUserIncludeParamValues returns the possible values for the ListLocalUserIncludeParam const type. +func PossibleListLocalUserIncludeParamValues() []ListLocalUserIncludeParam { + return []ListLocalUserIncludeParam{ + ListLocalUserIncludeParamNfsv3, + } +} + type ManagementPolicyName string const ( @@ -707,6 +742,19 @@ func PossibleManagementPolicyNameValues() []ManagementPolicyName { } } +type MigrationName string + +const ( + MigrationNameDefault MigrationName = "default" +) + +// PossibleMigrationNameValues returns the possible values for the MigrationName const type. +func PossibleMigrationNameValues() []MigrationName { + return []MigrationName{ + MigrationNameDefault, + } +} + // MigrationState - This property denotes the container level immutability to object level immutability migration state. type MigrationState string @@ -723,6 +771,28 @@ func PossibleMigrationStateValues() []MigrationState { } } +// MigrationStatus - Current status of migration +type MigrationStatus string + +const ( + MigrationStatusComplete MigrationStatus = "Complete" + MigrationStatusFailed MigrationStatus = "Failed" + MigrationStatusInProgress MigrationStatus = "InProgress" + MigrationStatusInvalid MigrationStatus = "Invalid" + MigrationStatusSubmittedForConversion MigrationStatus = "SubmittedForConversion" +) + +// PossibleMigrationStatusValues returns the possible values for the MigrationStatus const type. +func PossibleMigrationStatusValues() []MigrationStatus { + return []MigrationStatus{ + MigrationStatusComplete, + MigrationStatusFailed, + MigrationStatusInProgress, + MigrationStatusInvalid, + MigrationStatusSubmittedForConversion, + } +} + // MinimumTLSVersion - Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS // 1.0 for this property. type MinimumTLSVersion string @@ -731,6 +801,7 @@ const ( MinimumTLSVersionTLS10 MinimumTLSVersion = "TLS1_0" MinimumTLSVersionTLS11 MinimumTLSVersion = "TLS1_1" MinimumTLSVersionTLS12 MinimumTLSVersion = "TLS1_2" + MinimumTLSVersionTLS13 MinimumTLSVersion = "TLS1_3" ) // PossibleMinimumTLSVersionValues returns the possible values for the MinimumTLSVersion const type. @@ -739,6 +810,7 @@ func PossibleMinimumTLSVersionValues() []MinimumTLSVersion { MinimumTLSVersionTLS10, MinimumTLSVersionTLS11, MinimumTLSVersionTLS12, + MinimumTLSVersionTLS13, } } @@ -756,6 +828,45 @@ func PossibleNameValues() []Name { } } +// NetworkSecurityPerimeterConfigurationProvisioningState - Provisioning state of Network Security Perimeter configuration +// propagation +type NetworkSecurityPerimeterConfigurationProvisioningState string + +const ( + NetworkSecurityPerimeterConfigurationProvisioningStateAccepted NetworkSecurityPerimeterConfigurationProvisioningState = "Accepted" + NetworkSecurityPerimeterConfigurationProvisioningStateCanceled NetworkSecurityPerimeterConfigurationProvisioningState = "Canceled" + NetworkSecurityPerimeterConfigurationProvisioningStateDeleting NetworkSecurityPerimeterConfigurationProvisioningState = "Deleting" + NetworkSecurityPerimeterConfigurationProvisioningStateFailed NetworkSecurityPerimeterConfigurationProvisioningState = "Failed" + NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded NetworkSecurityPerimeterConfigurationProvisioningState = "Succeeded" +) + +// PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues returns the possible values for the NetworkSecurityPerimeterConfigurationProvisioningState const type. +func PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues() []NetworkSecurityPerimeterConfigurationProvisioningState { + return []NetworkSecurityPerimeterConfigurationProvisioningState{ + NetworkSecurityPerimeterConfigurationProvisioningStateAccepted, + NetworkSecurityPerimeterConfigurationProvisioningStateCanceled, + NetworkSecurityPerimeterConfigurationProvisioningStateDeleting, + NetworkSecurityPerimeterConfigurationProvisioningStateFailed, + NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded, + } +} + +// 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, + } +} + // ObjectType - This is a required field. This field specifies the scope of the inventory created either at the blob or container // level. type ObjectType string @@ -802,6 +913,42 @@ func PossiblePermissionsValues() []Permissions { } } +// PostFailoverRedundancy - The redundancy type of the account after an account failover is performed. +type PostFailoverRedundancy string + +const ( + PostFailoverRedundancyStandardLRS PostFailoverRedundancy = "Standard_LRS" + PostFailoverRedundancyStandardZRS PostFailoverRedundancy = "Standard_ZRS" +) + +// PossiblePostFailoverRedundancyValues returns the possible values for the PostFailoverRedundancy const type. +func PossiblePostFailoverRedundancyValues() []PostFailoverRedundancy { + return []PostFailoverRedundancy{ + PostFailoverRedundancyStandardLRS, + PostFailoverRedundancyStandardZRS, + } +} + +// PostPlannedFailoverRedundancy - The redundancy type of the account after a planned account failover is performed. +type PostPlannedFailoverRedundancy string + +const ( + PostPlannedFailoverRedundancyStandardGRS PostPlannedFailoverRedundancy = "Standard_GRS" + PostPlannedFailoverRedundancyStandardGZRS PostPlannedFailoverRedundancy = "Standard_GZRS" + PostPlannedFailoverRedundancyStandardRAGRS PostPlannedFailoverRedundancy = "Standard_RAGRS" + PostPlannedFailoverRedundancyStandardRAGZRS PostPlannedFailoverRedundancy = "Standard_RAGZRS" +) + +// PossiblePostPlannedFailoverRedundancyValues returns the possible values for the PostPlannedFailoverRedundancy const type. +func PossiblePostPlannedFailoverRedundancyValues() []PostPlannedFailoverRedundancy { + return []PostPlannedFailoverRedundancy{ + PostPlannedFailoverRedundancyStandardGRS, + PostPlannedFailoverRedundancyStandardGZRS, + PostPlannedFailoverRedundancyStandardRAGRS, + PostPlannedFailoverRedundancyStandardRAGZRS, + } +} + // PrivateEndpointConnectionProvisioningState - The current provisioning state. type PrivateEndpointConnectionProvisioningState string @@ -844,17 +991,27 @@ func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointSer type ProvisioningState string const ( - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateResolvingDNS ProvisioningState = "ResolvingDNS" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateResolvingDNS ProvisioningState = "ResolvingDNS" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateValidateSubscriptionQuotaBegin ProvisioningState = "ValidateSubscriptionQuotaBegin" + ProvisioningStateValidateSubscriptionQuotaEnd ProvisioningState = "ValidateSubscriptionQuotaEnd" ) // PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { return []ProvisioningState{ + ProvisioningStateCanceled, ProvisioningStateCreating, + ProvisioningStateDeleting, + ProvisioningStateFailed, ProvisioningStateResolvingDNS, ProvisioningStateSucceeded, + ProvisioningStateValidateSubscriptionQuotaBegin, + ProvisioningStateValidateSubscriptionQuotaEnd, } } @@ -862,27 +1019,29 @@ func PossibleProvisioningStateValues() []ProvisioningState { type PublicAccess string const ( - PublicAccessContainer PublicAccess = "Container" PublicAccessBlob PublicAccess = "Blob" + PublicAccessContainer PublicAccess = "Container" PublicAccessNone PublicAccess = "None" ) // PossiblePublicAccessValues returns the possible values for the PublicAccess const type. func PossiblePublicAccessValues() []PublicAccess { return []PublicAccess{ - PublicAccessContainer, PublicAccessBlob, + PublicAccessContainer, PublicAccessNone, } } -// PublicNetworkAccess - Allow or disallow public network access to Storage Account. Value is optional but if passed in, must -// be 'Enabled' or 'Disabled'. +// PublicNetworkAccess - Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access +// to Storage Account. Value is optional but if passed in, must be 'Enabled', 'Disabled' or +// 'SecuredByPerimeter'. type PublicNetworkAccess string const ( - PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" - PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" + PublicNetworkAccessSecuredByPerimeter PublicNetworkAccess = "SecuredByPerimeter" ) // PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type. @@ -890,6 +1049,7 @@ func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { return []PublicNetworkAccess{ PublicNetworkAccessDisabled, PublicNetworkAccessEnabled, + PublicNetworkAccessSecuredByPerimeter, } } @@ -928,6 +1088,24 @@ func PossibleReasonCodeValues() []ReasonCode { } } +// ResourceAssociationAccessMode - Access Mode of the resource association +type ResourceAssociationAccessMode string + +const ( + ResourceAssociationAccessModeAudit ResourceAssociationAccessMode = "Audit" + ResourceAssociationAccessModeEnforced ResourceAssociationAccessMode = "Enforced" + ResourceAssociationAccessModeLearning ResourceAssociationAccessMode = "Learning" +) + +// PossibleResourceAssociationAccessModeValues returns the possible values for the ResourceAssociationAccessMode const type. +func PossibleResourceAssociationAccessModeValues() []ResourceAssociationAccessMode { + return []ResourceAssociationAccessMode{ + ResourceAssociationAccessModeAudit, + ResourceAssociationAccessModeEnforced, + ResourceAssociationAccessModeLearning, + } +} + // RootSquashType - The property is for NFS share only. The default is NoRootSquash. type RootSquashType string @@ -976,6 +1154,38 @@ func PossibleRuleTypeValues() []RuleType { } } +// RunResult - Represents the overall result of the execution for the run instance +type RunResult string + +const ( + RunResultFailed RunResult = "Failed" + RunResultSucceeded RunResult = "Succeeded" +) + +// PossibleRunResultValues returns the possible values for the RunResult const type. +func PossibleRunResultValues() []RunResult { + return []RunResult{ + RunResultFailed, + RunResultSucceeded, + } +} + +// RunStatusEnum - Represents the status of the execution. +type RunStatusEnum string + +const ( + RunStatusEnumFinished RunStatusEnum = "Finished" + RunStatusEnumInProgress RunStatusEnum = "InProgress" +) + +// PossibleRunStatusEnumValues returns the possible values for the RunStatusEnum const type. +func PossibleRunStatusEnumValues() []RunStatusEnum { + return []RunStatusEnum{ + RunStatusEnumFinished, + RunStatusEnumInProgress, + } +} + // SKUConversionStatus - This property indicates the current sku conversion status. type SKUConversionStatus string @@ -1000,12 +1210,18 @@ type SKUName string const ( SKUNamePremiumLRS SKUName = "Premium_LRS" + SKUNamePremiumV2LRS SKUName = "PremiumV2_LRS" + SKUNamePremiumV2ZRS SKUName = "PremiumV2_ZRS" SKUNamePremiumZRS SKUName = "Premium_ZRS" SKUNameStandardGRS SKUName = "Standard_GRS" SKUNameStandardGZRS SKUName = "Standard_GZRS" SKUNameStandardLRS SKUName = "Standard_LRS" SKUNameStandardRAGRS SKUName = "Standard_RAGRS" SKUNameStandardRAGZRS SKUName = "Standard_RAGZRS" + SKUNameStandardV2GRS SKUName = "StandardV2_GRS" + SKUNameStandardV2GZRS SKUName = "StandardV2_GZRS" + SKUNameStandardV2LRS SKUName = "StandardV2_LRS" + SKUNameStandardV2ZRS SKUName = "StandardV2_ZRS" SKUNameStandardZRS SKUName = "Standard_ZRS" ) @@ -1013,12 +1229,18 @@ const ( func PossibleSKUNameValues() []SKUName { return []SKUName{ SKUNamePremiumLRS, + SKUNamePremiumV2LRS, + SKUNamePremiumV2ZRS, SKUNamePremiumZRS, SKUNameStandardGRS, SKUNameStandardGZRS, SKUNameStandardLRS, SKUNameStandardRAGRS, SKUNameStandardRAGZRS, + SKUNameStandardV2GRS, + SKUNameStandardV2GZRS, + SKUNameStandardV2LRS, + SKUNameStandardV2ZRS, SKUNameStandardZRS, } } @@ -1027,15 +1249,15 @@ func PossibleSKUNameValues() []SKUName { type SKUTier string const ( - SKUTierStandard SKUTier = "Standard" SKUTierPremium SKUTier = "Premium" + SKUTierStandard SKUTier = "Standard" ) // PossibleSKUTierValues returns the possible values for the SKUTier const type. func PossibleSKUTierValues() []SKUTier { return []SKUTier{ - SKUTierStandard, SKUTierPremium, + SKUTierStandard, } } @@ -1076,6 +1298,22 @@ func PossibleServicesValues() []Services { } } +// Severity - Severity of the issue. +type Severity string + +const ( + SeverityError Severity = "Error" + SeverityWarning Severity = "Warning" +) + +// PossibleSeverityValues returns the possible values for the Severity const type. +func PossibleSeverityValues() []Severity { + return []Severity{ + SeverityError, + SeverityWarning, + } +} + // ShareAccessTier - Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, // and Cool. FileStorage account can choose Premium. type ShareAccessTier string @@ -1163,15 +1401,31 @@ func PossibleStateValues() []State { type StorageAccountExpand string const ( - StorageAccountExpandGeoReplicationStats StorageAccountExpand = "geoReplicationStats" StorageAccountExpandBlobRestoreStatus StorageAccountExpand = "blobRestoreStatus" + StorageAccountExpandGeoReplicationStats StorageAccountExpand = "geoReplicationStats" ) // PossibleStorageAccountExpandValues returns the possible values for the StorageAccountExpand const type. func PossibleStorageAccountExpandValues() []StorageAccountExpand { return []StorageAccountExpand{ - StorageAccountExpandGeoReplicationStats, StorageAccountExpandBlobRestoreStatus, + StorageAccountExpandGeoReplicationStats, + } +} + +// TriggerType - The trigger type of the storage task assignment execution +type TriggerType string + +const ( + TriggerTypeOnSchedule TriggerType = "OnSchedule" + TriggerTypeRunOnce TriggerType = "RunOnce" +) + +// PossibleTriggerTypeValues returns the possible values for the TriggerType const type. +func PossibleTriggerTypeValues() []TriggerType { + return []TriggerType{ + TriggerTypeOnSchedule, + TriggerTypeRunOnce, } } @@ -1179,22 +1433,22 @@ func PossibleStorageAccountExpandValues() []StorageAccountExpand { type UsageUnit string const ( - UsageUnitCount UsageUnit = "Count" UsageUnitBytes UsageUnit = "Bytes" - UsageUnitSeconds UsageUnit = "Seconds" - UsageUnitPercent UsageUnit = "Percent" - UsageUnitCountsPerSecond UsageUnit = "CountsPerSecond" UsageUnitBytesPerSecond UsageUnit = "BytesPerSecond" + UsageUnitCount UsageUnit = "Count" + UsageUnitCountsPerSecond UsageUnit = "CountsPerSecond" + UsageUnitPercent UsageUnit = "Percent" + UsageUnitSeconds UsageUnit = "Seconds" ) // PossibleUsageUnitValues returns the possible values for the UsageUnit const type. func PossibleUsageUnitValues() []UsageUnit { return []UsageUnit{ - UsageUnitCount, UsageUnitBytes, - UsageUnitSeconds, - UsageUnitPercent, - UsageUnitCountsPerSecond, UsageUnitBytesPerSecond, + UsageUnitCount, + UsageUnitCountsPerSecond, + UsageUnitPercent, + UsageUnitSeconds, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/deletedaccounts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/deletedaccounts_client.go index 0d836b55..ec49f138 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/deletedaccounts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/deletedaccounts_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type DeletedAccountsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDeletedAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedAccountsClient, error) { - cl, err := arm.NewClient(moduleName+".DeletedAccountsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,27 +43,34 @@ func NewDeletedAccountsClient(subscriptionID string, credential azcore.TokenCred // Get - Get properties of specified deleted account resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - deletedAccountName - Name of the deleted storage account. // - location - The location of the deleted storage account. // - options - DeletedAccountsClientGetOptions contains the optional parameters for the DeletedAccountsClient.Get method. func (client *DeletedAccountsClient) Get(ctx context.Context, deletedAccountName string, location string, options *DeletedAccountsClientGetOptions) (DeletedAccountsClientGetResponse, error) { + var err error + const operationName = "DeletedAccountsClient.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, deletedAccountName, location, options) if err != nil { return DeletedAccountsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DeletedAccountsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeletedAccountsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DeletedAccountsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *DeletedAccountsClient) getCreateRequest(ctx context.Context, deletedAccountName string, location string, options *DeletedAccountsClientGetOptions) (*policy.Request, error) { +func (client *DeletedAccountsClient) getCreateRequest(ctx context.Context, deletedAccountName string, location string, _ *DeletedAccountsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/deletedAccounts/{deletedAccountName}" if deletedAccountName == "" { return nil, errors.New("parameter deletedAccountName cannot be empty") @@ -86,7 +89,7 @@ func (client *DeletedAccountsClient) getCreateRequest(ctx context.Context, delet return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -103,7 +106,7 @@ func (client *DeletedAccountsClient) getHandleResponse(resp *http.Response) (Del // NewListPager - Lists deleted accounts under the subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - options - DeletedAccountsClientListOptions contains the optional parameters for the DeletedAccountsClient.NewListPager // method. func (client *DeletedAccountsClient) NewListPager(options *DeletedAccountsClientListOptions) *runtime.Pager[DeletedAccountsClientListResponse] { @@ -112,30 +115,25 @@ func (client *DeletedAccountsClient) NewListPager(options *DeletedAccountsClient return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DeletedAccountsClientListResponse) (DeletedAccountsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DeletedAccountsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeletedAccountsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 DeletedAccountsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeletedAccountsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listCreateRequest creates the List request. -func (client *DeletedAccountsClient) listCreateRequest(ctx context.Context, options *DeletedAccountsClientListOptions) (*policy.Request, error) { +func (client *DeletedAccountsClient) listCreateRequest(ctx context.Context, _ *DeletedAccountsClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/deletedAccounts" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -146,7 +144,7 @@ func (client *DeletedAccountsClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-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/storage/armstorage/encryptionscopes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/encryptionscopes_client.go index 9ea42a46..71e79851 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/encryptionscopes_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/encryptionscopes_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -34,7 +30,7 @@ type EncryptionScopesClient struct { // - 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+".EncryptionScopesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,7 +44,7 @@ func NewEncryptionScopesClient(subscriptionID string, credential azcore.TokenCre // Get - Returns the properties for the specified encryption scope. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -57,22 +53,29 @@ func NewEncryptionScopesClient(subscriptionID string, credential azcore.TokenCre // dash (-) character must be immediately preceded and followed by a letter or number. // - 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 } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EncryptionScopesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EncryptionScopesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EncryptionScopesClientGetResponse{}, err } - return client.getHandleResponse(resp) + 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) { +func (client *EncryptionScopesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, _ *EncryptionScopesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -95,7 +98,7 @@ func (client *EncryptionScopesClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -112,7 +115,7 @@ func (client *EncryptionScopesClient) getHandleResponse(resp *http.Response) (En // NewListPager - Lists all the encryption scopes available under the specified storage account. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -124,25 +127,20 @@ func (client *EncryptionScopesClient) NewListPager(resourceGroupName string, acc return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EncryptionScopesClientListResponse) (EncryptionScopesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, accountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EncryptionScopesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EncryptionScopesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EncryptionScopesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -166,16 +164,16 @@ func (client *EncryptionScopesClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") - if options != nil && options.Maxpagesize != nil { - reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) - } if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } if options != nil && options.Include != nil { reqQP.Set("$include", string(*options.Include)) } + if options != nil && options.Maxpagesize != nil { + reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) + } + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -194,7 +192,7 @@ func (client *EncryptionScopesClient) listHandleResponse(resp *http.Response) (E // does not already exist. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -204,22 +202,29 @@ func (client *EncryptionScopesClient) listHandleResponse(resp *http.Response) (E // - encryptionScope - Encryption scope properties to be used for the update. // - options - EncryptionScopesClientPatchOptions contains the optional parameters for the EncryptionScopesClient.Patch method. func (client *EncryptionScopesClient) Patch(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope, options *EncryptionScopesClientPatchOptions) (EncryptionScopesClientPatchResponse, error) { + var err error + const operationName = "EncryptionScopesClient.Patch" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.patchCreateRequest(ctx, resourceGroupName, accountName, encryptionScopeName, encryptionScope, options) if err != nil { return EncryptionScopesClientPatchResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EncryptionScopesClientPatchResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EncryptionScopesClientPatchResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EncryptionScopesClientPatchResponse{}, err } - return client.patchHandleResponse(resp) + resp, err := client.patchHandleResponse(httpResp) + return resp, err } // patchCreateRequest creates the Patch request. -func (client *EncryptionScopesClient) patchCreateRequest(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope, options *EncryptionScopesClientPatchOptions) (*policy.Request, error) { +func (client *EncryptionScopesClient) patchCreateRequest(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope, _ *EncryptionScopesClientPatchOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -242,10 +247,13 @@ func (client *EncryptionScopesClient) patchCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, encryptionScope) + if err := runtime.MarshalAsJSON(req, encryptionScope); err != nil { + return nil, err + } + return req, nil } // patchHandleResponse handles the Patch response. @@ -262,7 +270,7 @@ func (client *EncryptionScopesClient) patchHandleResponse(resp *http.Response) ( // encryption scope properties will be updated per the specified request. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -272,22 +280,29 @@ func (client *EncryptionScopesClient) patchHandleResponse(resp *http.Response) ( // - encryptionScope - Encryption scope properties to be used for the create or update. // - options - EncryptionScopesClientPutOptions contains the optional parameters for the EncryptionScopesClient.Put method. func (client *EncryptionScopesClient) Put(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope, options *EncryptionScopesClientPutOptions) (EncryptionScopesClientPutResponse, error) { + var err error + const operationName = "EncryptionScopesClient.Put" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.putCreateRequest(ctx, resourceGroupName, accountName, encryptionScopeName, encryptionScope, options) if err != nil { return EncryptionScopesClientPutResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EncryptionScopesClientPutResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return EncryptionScopesClientPutResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return EncryptionScopesClientPutResponse{}, err } - return client.putHandleResponse(resp) + resp, err := client.putHandleResponse(httpResp) + return resp, err } // putCreateRequest creates the Put request. -func (client *EncryptionScopesClient) putCreateRequest(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope, options *EncryptionScopesClientPutOptions) (*policy.Request, error) { +func (client *EncryptionScopesClient) putCreateRequest(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope, _ *EncryptionScopesClientPutOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -310,10 +325,13 @@ func (client *EncryptionScopesClient) putCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, encryptionScope) + if err := runtime.MarshalAsJSON(req, encryptionScope); err != nil { + return nil, err + } + return req, nil } // putHandleResponse handles the Put response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/fileservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/fileservices_client.go index b0970cfd..0ce4ce54 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/fileservices_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/fileservices_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -18,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" + "strconv" "strings" ) @@ -33,7 +30,7 @@ type FileServicesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFileServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FileServicesClient, error) { - cl, err := arm.NewClient(moduleName+".FileServicesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,29 +45,36 @@ func NewFileServicesClient(subscriptionID string, credential azcore.TokenCredent // Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - options - FileServicesClientGetServicePropertiesOptions contains the optional parameters for the FileServicesClient.GetServiceProperties // method. func (client *FileServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, options *FileServicesClientGetServicePropertiesOptions) (FileServicesClientGetServicePropertiesResponse, error) { + var err error + const operationName = "FileServicesClient.GetServiceProperties" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getServicePropertiesCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return FileServicesClientGetServicePropertiesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FileServicesClientGetServicePropertiesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FileServicesClientGetServicePropertiesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FileServicesClientGetServicePropertiesResponse{}, err } - return client.getServicePropertiesHandleResponse(resp) + resp, err := client.getServicePropertiesHandleResponse(httpResp) + return resp, err } // getServicePropertiesCreateRequest creates the GetServiceProperties request. -func (client *FileServicesClient) getServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *FileServicesClientGetServicePropertiesOptions) (*policy.Request, error) { +func (client *FileServicesClient) getServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *FileServicesClientGetServicePropertiesOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -90,7 +94,7 @@ func (client *FileServicesClient) getServicePropertiesCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -105,31 +109,107 @@ func (client *FileServicesClient) getServicePropertiesHandleResponse(resp *http. return result, nil } +// GetServiceUsage - Gets the usage of file service in storage account including account limits, file share limits and constants +// used in recommendations and bursting formula. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - options - FileServicesClientGetServiceUsageOptions contains the optional parameters for the FileServicesClient.GetServiceUsage +// method. +func (client *FileServicesClient) GetServiceUsage(ctx context.Context, resourceGroupName string, accountName string, options *FileServicesClientGetServiceUsageOptions) (FileServicesClientGetServiceUsageResponse, error) { + var err error + const operationName = "FileServicesClient.GetServiceUsage" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getServiceUsageCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return FileServicesClientGetServiceUsageResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FileServicesClientGetServiceUsageResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FileServicesClientGetServiceUsageResponse{}, err + } + resp, err := client.getServiceUsageHandleResponse(httpResp) + return resp, err +} + +// getServiceUsageCreateRequest creates the GetServiceUsage request. +func (client *FileServicesClient) getServiceUsageCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *FileServicesClientGetServiceUsageOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}/usages/{fileServiceUsagesName}" + 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)) + urlPath = strings.ReplaceAll(urlPath, "{FileServicesName}", url.PathEscape("default")) + urlPath = strings.ReplaceAll(urlPath, "{fileServiceUsagesName}", 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", "2024-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getServiceUsageHandleResponse handles the GetServiceUsage response. +func (client *FileServicesClient) getServiceUsageHandleResponse(resp *http.Response) (FileServicesClientGetServiceUsageResponse, error) { + result := FileServicesClientGetServiceUsageResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FileServiceUsage); err != nil { + return FileServicesClientGetServiceUsageResponse{}, err + } + return result, nil +} + // List - List all file services in storage accounts // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - options - FileServicesClientListOptions contains the optional parameters for the FileServicesClient.List method. func (client *FileServicesClient) List(ctx context.Context, resourceGroupName string, accountName string, options *FileServicesClientListOptions) (FileServicesClientListResponse, error) { + var err error + const operationName = "FileServicesClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return FileServicesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FileServicesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FileServicesClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FileServicesClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. -func (client *FileServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *FileServicesClientListOptions) (*policy.Request, error) { +func (client *FileServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *FileServicesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -148,7 +228,7 @@ func (client *FileServicesClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -163,11 +243,81 @@ func (client *FileServicesClient) listHandleResponse(resp *http.Response) (FileS return result, nil } +// NewListServiceUsagesPager - Gets the usages of file service in storage account. +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - options - FileServicesClientListServiceUsagesOptions contains the optional parameters for the FileServicesClient.NewListServiceUsagesPager +// method. +func (client *FileServicesClient) NewListServiceUsagesPager(resourceGroupName string, accountName string, options *FileServicesClientListServiceUsagesOptions) *runtime.Pager[FileServicesClientListServiceUsagesResponse] { + return runtime.NewPager(runtime.PagingHandler[FileServicesClientListServiceUsagesResponse]{ + More: func(page FileServicesClientListServiceUsagesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FileServicesClientListServiceUsagesResponse) (FileServicesClientListServiceUsagesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FileServicesClient.NewListServiceUsagesPager") + 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.listServiceUsagesCreateRequest(ctx, resourceGroupName, accountName, options) + }, nil) + if err != nil { + return FileServicesClientListServiceUsagesResponse{}, err + } + return client.listServiceUsagesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listServiceUsagesCreateRequest creates the ListServiceUsages request. +func (client *FileServicesClient) listServiceUsagesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *FileServicesClientListServiceUsagesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}/usages" + 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)) + urlPath = strings.ReplaceAll(urlPath, "{FileServicesName}", 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() + if options != nil && options.Maxpagesize != nil { + reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) + } + reqQP.Set("api-version", "2024-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listServiceUsagesHandleResponse handles the ListServiceUsages response. +func (client *FileServicesClient) listServiceUsagesHandleResponse(resp *http.Response) (FileServicesClientListServiceUsagesResponse, error) { + result := FileServicesClientListServiceUsagesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FileServiceUsages); err != nil { + return FileServicesClientListServiceUsagesResponse{}, err + } + return result, nil +} + // SetServiceProperties - Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource // Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -175,22 +325,29 @@ func (client *FileServicesClient) listHandleResponse(resp *http.Response) (FileS // - options - FileServicesClientSetServicePropertiesOptions contains the optional parameters for the FileServicesClient.SetServiceProperties // method. func (client *FileServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters FileServiceProperties, options *FileServicesClientSetServicePropertiesOptions) (FileServicesClientSetServicePropertiesResponse, error) { + var err error + const operationName = "FileServicesClient.SetServiceProperties" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.setServicePropertiesCreateRequest(ctx, resourceGroupName, accountName, parameters, options) if err != nil { return FileServicesClientSetServicePropertiesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FileServicesClientSetServicePropertiesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FileServicesClientSetServicePropertiesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FileServicesClientSetServicePropertiesResponse{}, err } - return client.setServicePropertiesHandleResponse(resp) + resp, err := client.setServicePropertiesHandleResponse(httpResp) + return resp, err } // setServicePropertiesCreateRequest creates the SetServiceProperties request. -func (client *FileServicesClient) setServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters FileServiceProperties, options *FileServicesClientSetServicePropertiesOptions) (*policy.Request, error) { +func (client *FileServicesClient) setServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters FileServiceProperties, _ *FileServicesClientSetServicePropertiesOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -210,10 +367,13 @@ func (client *FileServicesClient) setServicePropertiesCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // setServicePropertiesHandleResponse handles the SetServiceProperties response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/fileshares_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/fileshares_client.go index 1c414dda..a063e282 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/fileshares_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/fileshares_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type FileSharesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFileSharesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FileSharesClient, error) { - cl, err := arm.NewClient(moduleName+".FileSharesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,7 +45,7 @@ func NewFileSharesClient(subscriptionID string, credential azcore.TokenCredentia // the share. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -59,18 +55,25 @@ func NewFileSharesClient(subscriptionID string, credential azcore.TokenCredentia // - fileShare - Properties of the file share to create. // - options - FileSharesClientCreateOptions contains the optional parameters for the FileSharesClient.Create method. func (client *FileSharesClient) Create(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare, options *FileSharesClientCreateOptions) (FileSharesClientCreateResponse, error) { + var err error + const operationName = "FileSharesClient.Create" + 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, accountName, shareName, fileShare, options) if err != nil { return FileSharesClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FileSharesClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return FileSharesClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return FileSharesClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -100,10 +103,13 @@ func (client *FileSharesClient) createCreateRequest(ctx context.Context, resourc if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, fileShare) + if err := runtime.MarshalAsJSON(req, fileShare); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -118,7 +124,7 @@ func (client *FileSharesClient) createHandleResponse(resp *http.Response) (FileS // Delete - Deletes specified share under its account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -127,16 +133,22 @@ func (client *FileSharesClient) createHandleResponse(resp *http.Response) (FileS // character must be immediately preceded and followed by a letter or number. // - options - FileSharesClientDeleteOptions contains the optional parameters for the FileSharesClient.Delete method. func (client *FileSharesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string, options *FileSharesClientDeleteOptions) (FileSharesClientDeleteResponse, error) { + var err error + const operationName = "FileSharesClient.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, accountName, shareName, options) if err != nil { return FileSharesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FileSharesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return FileSharesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return FileSharesClientDeleteResponse{}, err } return FileSharesClientDeleteResponse{}, nil } @@ -165,22 +177,22 @@ func (client *FileSharesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") if options != nil && options.Include != nil { reqQP.Set("$include", *options.Include) } + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.XMSSnapshot != nil { req.Raw().Header["x-ms-snapshot"] = []string{*options.XMSSnapshot} } - req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Gets properties of a specified share. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -189,18 +201,25 @@ func (client *FileSharesClient) deleteCreateRequest(ctx context.Context, resourc // character must be immediately preceded and followed by a letter or number. // - options - FileSharesClientGetOptions contains the optional parameters for the FileSharesClient.Get method. func (client *FileSharesClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, options *FileSharesClientGetOptions) (FileSharesClientGetResponse, error) { + var err error + const operationName = "FileSharesClient.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, shareName, options) if err != nil { return FileSharesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FileSharesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FileSharesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FileSharesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -227,15 +246,15 @@ func (client *FileSharesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.XMSSnapshot != nil { req.Raw().Header["x-ms-snapshot"] = []string{*options.XMSSnapshot} } - req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -252,7 +271,7 @@ func (client *FileSharesClient) getHandleResponse(resp *http.Response) (FileShar // be 15 to 60 seconds, or can be infinite. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -261,18 +280,25 @@ func (client *FileSharesClient) getHandleResponse(resp *http.Response) (FileShar // character must be immediately preceded and followed by a letter or number. // - options - FileSharesClientLeaseOptions contains the optional parameters for the FileSharesClient.Lease method. func (client *FileSharesClient) Lease(ctx context.Context, resourceGroupName string, accountName string, shareName string, options *FileSharesClientLeaseOptions) (FileSharesClientLeaseResponse, error) { + var err error + const operationName = "FileSharesClient.Lease" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.leaseCreateRequest(ctx, resourceGroupName, accountName, shareName, options) if err != nil { return FileSharesClientLeaseResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FileSharesClientLeaseResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FileSharesClientLeaseResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FileSharesClientLeaseResponse{}, err } - return client.leaseHandleResponse(resp) + resp, err := client.leaseHandleResponse(httpResp) + return resp, err } // leaseCreateRequest creates the Lease request. @@ -299,14 +325,17 @@ func (client *FileSharesClient) leaseCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.XMSSnapshot != nil { req.Raw().Header["x-ms-snapshot"] = []string{*options.XMSSnapshot} } - req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -325,7 +354,7 @@ func (client *FileSharesClient) leaseHandleResponse(resp *http.Response) (FileSh // NewListPager - Lists all shares. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -336,25 +365,20 @@ func (client *FileSharesClient) NewListPager(resourceGroupName string, accountNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *FileSharesClientListResponse) (FileSharesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, accountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FileSharesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FileSharesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 FileSharesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FileSharesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -378,16 +402,16 @@ func (client *FileSharesClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") - if options != nil && options.Maxpagesize != nil { - reqQP.Set("$maxpagesize", *options.Maxpagesize) + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) } if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) + if options != nil && options.Maxpagesize != nil { + reqQP.Set("$maxpagesize", *options.Maxpagesize) } + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -405,7 +429,7 @@ func (client *FileSharesClient) listHandleResponse(resp *http.Response) (FileSha // Restore - Restore a file share within a valid retention days if share soft delete is enabled // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -414,22 +438,28 @@ func (client *FileSharesClient) listHandleResponse(resp *http.Response) (FileSha // character must be immediately preceded and followed by a letter or number. // - options - FileSharesClientRestoreOptions contains the optional parameters for the FileSharesClient.Restore method. func (client *FileSharesClient) Restore(ctx context.Context, resourceGroupName string, accountName string, shareName string, deletedShare DeletedShare, options *FileSharesClientRestoreOptions) (FileSharesClientRestoreResponse, error) { + var err error + const operationName = "FileSharesClient.Restore" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restoreCreateRequest(ctx, resourceGroupName, accountName, shareName, deletedShare, options) if err != nil { return FileSharesClientRestoreResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FileSharesClientRestoreResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FileSharesClientRestoreResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FileSharesClientRestoreResponse{}, err } return FileSharesClientRestoreResponse{}, nil } // restoreCreateRequest creates the Restore request. -func (client *FileSharesClient) restoreCreateRequest(ctx context.Context, resourceGroupName string, accountName string, shareName string, deletedShare DeletedShare, options *FileSharesClientRestoreOptions) (*policy.Request, error) { +func (client *FileSharesClient) restoreCreateRequest(ctx context.Context, resourceGroupName string, accountName string, shareName string, deletedShare DeletedShare, _ *FileSharesClientRestoreOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/restore" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -452,17 +482,20 @@ func (client *FileSharesClient) restoreCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, deletedShare) + if err := runtime.MarshalAsJSON(req, deletedShare); err != nil { + return nil, err + } + return req, nil } // Update - Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. // Update fails if the specified share does not already exist. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -472,22 +505,29 @@ func (client *FileSharesClient) restoreCreateRequest(ctx context.Context, resour // - fileShare - Properties to update for the file share. // - options - FileSharesClientUpdateOptions contains the optional parameters for the FileSharesClient.Update method. func (client *FileSharesClient) Update(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare, options *FileSharesClientUpdateOptions) (FileSharesClientUpdateResponse, error) { + var err error + const operationName = "FileSharesClient.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, shareName, fileShare, options) if err != nil { return FileSharesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FileSharesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FileSharesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FileSharesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *FileSharesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare, options *FileSharesClientUpdateOptions) (*policy.Request, error) { +func (client *FileSharesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare, _ *FileSharesClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -510,10 +550,13 @@ func (client *FileSharesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, fileShare) + if err := runtime.MarshalAsJSON(req, fileShare); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/localusers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/localusers_client.go index 1855e77a..35c35f50 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/localusers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/localusers_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -18,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" + "strconv" "strings" ) @@ -33,7 +30,7 @@ type LocalUsersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLocalUsersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocalUsersClient, error) { - cl, err := arm.NewClient(moduleName+".LocalUsersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -44,10 +41,11 @@ func NewLocalUsersClient(subscriptionID string, credential azcore.TokenCredentia return client, nil } -// CreateOrUpdate - Create or update the properties of a local user associated with the storage account +// CreateOrUpdate - Create or update the properties of a local user associated with the storage account. Properties for NFSv3 +// enablement and extended groups cannot be set with other properties. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -57,22 +55,29 @@ func NewLocalUsersClient(subscriptionID string, credential azcore.TokenCredentia // - options - LocalUsersClientCreateOrUpdateOptions contains the optional parameters for the LocalUsersClient.CreateOrUpdate // method. func (client *LocalUsersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, username string, properties LocalUser, options *LocalUsersClientCreateOrUpdateOptions) (LocalUsersClientCreateOrUpdateResponse, error) { + var err error + const operationName = "LocalUsersClient.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, username, properties, options) if err != nil { return LocalUsersClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalUsersClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalUsersClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalUsersClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *LocalUsersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, username string, properties LocalUser, options *LocalUsersClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *LocalUsersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, username string, properties LocalUser, _ *LocalUsersClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -95,10 +100,13 @@ func (client *LocalUsersClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -113,7 +121,7 @@ func (client *LocalUsersClient) createOrUpdateHandleResponse(resp *http.Response // Delete - Deletes the local user associated with the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -121,22 +129,28 @@ func (client *LocalUsersClient) createOrUpdateHandleResponse(resp *http.Response // within the storage account. // - options - LocalUsersClientDeleteOptions contains the optional parameters for the LocalUsersClient.Delete method. func (client *LocalUsersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, username string, options *LocalUsersClientDeleteOptions) (LocalUsersClientDeleteResponse, error) { + var err error + const operationName = "LocalUsersClient.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, accountName, username, options) if err != nil { return LocalUsersClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalUsersClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return LocalUsersClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return LocalUsersClientDeleteResponse{}, err } return LocalUsersClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *LocalUsersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, username string, options *LocalUsersClientDeleteOptions) (*policy.Request, error) { +func (client *LocalUsersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, username string, _ *LocalUsersClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -159,7 +173,7 @@ func (client *LocalUsersClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -168,7 +182,7 @@ func (client *LocalUsersClient) deleteCreateRequest(ctx context.Context, resourc // Get - Get the local user of the storage account by username. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -176,22 +190,29 @@ func (client *LocalUsersClient) deleteCreateRequest(ctx context.Context, resourc // within the storage account. // - options - LocalUsersClientGetOptions contains the optional parameters for the LocalUsersClient.Get method. func (client *LocalUsersClient) Get(ctx context.Context, resourceGroupName string, accountName string, username string, options *LocalUsersClientGetOptions) (LocalUsersClientGetResponse, error) { + var err error + const operationName = "LocalUsersClient.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, username, options) if err != nil { return LocalUsersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalUsersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalUsersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalUsersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *LocalUsersClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, username string, options *LocalUsersClientGetOptions) (*policy.Request, error) { +func (client *LocalUsersClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, username string, _ *LocalUsersClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -214,7 +235,7 @@ func (client *LocalUsersClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -231,7 +252,7 @@ func (client *LocalUsersClient) getHandleResponse(resp *http.Response) (LocalUse // NewListPager - List the local users associated with the storage account. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -242,6 +263,7 @@ func (client *LocalUsersClient) NewListPager(resourceGroupName string, accountNa return false }, Fetcher: func(ctx context.Context, page *LocalUsersClientListResponse) (LocalUsersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LocalUsersClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return LocalUsersClientListResponse{}, err @@ -255,6 +277,7 @@ func (client *LocalUsersClient) NewListPager(resourceGroupName string, accountNa } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -278,7 +301,16 @@ func (client *LocalUsersClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Include != nil { + reqQP.Set("$include", string(*options.Include)) + } + if options != nil && options.Maxpagesize != nil { + reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) + } + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -296,7 +328,7 @@ func (client *LocalUsersClient) listHandleResponse(resp *http.Response) (LocalUs // ListKeys - List SSH authorized keys and shared key of the local user. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -304,22 +336,29 @@ func (client *LocalUsersClient) listHandleResponse(resp *http.Response) (LocalUs // within the storage account. // - options - LocalUsersClientListKeysOptions contains the optional parameters for the LocalUsersClient.ListKeys method. func (client *LocalUsersClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string, username string, options *LocalUsersClientListKeysOptions) (LocalUsersClientListKeysResponse, error) { + var err error + const operationName = "LocalUsersClient.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, accountName, username, options) if err != nil { return LocalUsersClientListKeysResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalUsersClientListKeysResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalUsersClientListKeysResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalUsersClientListKeysResponse{}, err } - return client.listKeysHandleResponse(resp) + resp, err := client.listKeysHandleResponse(httpResp) + return resp, err } // listKeysCreateRequest creates the ListKeys request. -func (client *LocalUsersClient) listKeysCreateRequest(ctx context.Context, resourceGroupName string, accountName string, username string, options *LocalUsersClientListKeysOptions) (*policy.Request, error) { +func (client *LocalUsersClient) listKeysCreateRequest(ctx context.Context, resourceGroupName string, accountName string, username string, _ *LocalUsersClientListKeysOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}/listKeys" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -342,7 +381,7 @@ func (client *LocalUsersClient) listKeysCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -360,7 +399,7 @@ func (client *LocalUsersClient) listKeysHandleResponse(resp *http.Response) (Loc // RegeneratePassword - Regenerate the local user SSH password. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -369,22 +408,29 @@ func (client *LocalUsersClient) listKeysHandleResponse(resp *http.Response) (Loc // - options - LocalUsersClientRegeneratePasswordOptions contains the optional parameters for the LocalUsersClient.RegeneratePassword // method. func (client *LocalUsersClient) RegeneratePassword(ctx context.Context, resourceGroupName string, accountName string, username string, options *LocalUsersClientRegeneratePasswordOptions) (LocalUsersClientRegeneratePasswordResponse, error) { + var err error + const operationName = "LocalUsersClient.RegeneratePassword" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regeneratePasswordCreateRequest(ctx, resourceGroupName, accountName, username, options) if err != nil { return LocalUsersClientRegeneratePasswordResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LocalUsersClientRegeneratePasswordResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalUsersClientRegeneratePasswordResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalUsersClientRegeneratePasswordResponse{}, err } - return client.regeneratePasswordHandleResponse(resp) + resp, err := client.regeneratePasswordHandleResponse(httpResp) + return resp, err } // regeneratePasswordCreateRequest creates the RegeneratePassword request. -func (client *LocalUsersClient) regeneratePasswordCreateRequest(ctx context.Context, resourceGroupName string, accountName string, username string, options *LocalUsersClientRegeneratePasswordOptions) (*policy.Request, error) { +func (client *LocalUsersClient) regeneratePasswordCreateRequest(ctx context.Context, resourceGroupName string, accountName string, username string, _ *LocalUsersClientRegeneratePasswordOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}/regeneratePassword" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -407,7 +453,7 @@ func (client *LocalUsersClient) regeneratePasswordCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-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/storage/armstorage/managementpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/managementpolicies_client.go index 5ef921e9..ca9da9f0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/managementpolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/managementpolicies_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type ManagementPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewManagementPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".ManagementPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +43,7 @@ func NewManagementPoliciesClient(subscriptionID string, credential azcore.TokenC // CreateOrUpdate - Sets the managementpolicy to the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -56,22 +52,29 @@ func NewManagementPoliciesClient(subscriptionID string, credential azcore.TokenC // - options - ManagementPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ManagementPoliciesClient.CreateOrUpdate // method. func (client *ManagementPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, managementPolicyName ManagementPolicyName, properties ManagementPolicy, options *ManagementPoliciesClientCreateOrUpdateOptions) (ManagementPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ManagementPoliciesClient.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, managementPolicyName, properties, options) if err != nil { return ManagementPoliciesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagementPoliciesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementPoliciesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ManagementPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, managementPolicyName ManagementPolicyName, properties ManagementPolicy, options *ManagementPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ManagementPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, managementPolicyName ManagementPolicyName, properties ManagementPolicy, _ *ManagementPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -94,10 +97,13 @@ func (client *ManagementPoliciesClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,7 +118,7 @@ func (client *ManagementPoliciesClient) createOrUpdateHandleResponse(resp *http. // Delete - Deletes the managementpolicy associated with the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -120,22 +126,28 @@ func (client *ManagementPoliciesClient) createOrUpdateHandleResponse(resp *http. // - options - ManagementPoliciesClientDeleteOptions contains the optional parameters for the ManagementPoliciesClient.Delete // method. func (client *ManagementPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, managementPolicyName ManagementPolicyName, options *ManagementPoliciesClientDeleteOptions) (ManagementPoliciesClientDeleteResponse, error) { + var err error + const operationName = "ManagementPoliciesClient.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, accountName, managementPolicyName, options) if err != nil { return ManagementPoliciesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagementPoliciesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ManagementPoliciesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ManagementPoliciesClientDeleteResponse{}, err } return ManagementPoliciesClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *ManagementPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, managementPolicyName ManagementPolicyName, options *ManagementPoliciesClientDeleteOptions) (*policy.Request, error) { +func (client *ManagementPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, managementPolicyName ManagementPolicyName, _ *ManagementPoliciesClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -158,7 +170,7 @@ func (client *ManagementPoliciesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -166,29 +178,36 @@ func (client *ManagementPoliciesClient) deleteCreateRequest(ctx context.Context, // Get - Gets the managementpolicy associated with the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - managementPolicyName - The name of the Storage Account Management Policy. It should always be 'default' // - options - ManagementPoliciesClientGetOptions contains the optional parameters for the ManagementPoliciesClient.Get method. func (client *ManagementPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, managementPolicyName ManagementPolicyName, options *ManagementPoliciesClientGetOptions) (ManagementPoliciesClientGetResponse, error) { + var err error + const operationName = "ManagementPoliciesClient.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, managementPolicyName, options) if err != nil { return ManagementPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagementPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *ManagementPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, managementPolicyName ManagementPolicyName, options *ManagementPoliciesClientGetOptions) (*policy.Request, error) { +func (client *ManagementPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, managementPolicyName ManagementPolicyName, _ *ManagementPoliciesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -211,7 +230,7 @@ func (client *ManagementPoliciesClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-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/storage/armstorage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/models.go index 681e79dc..320312c9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/models.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -13,86 +9,86 @@ import "time" type AccessPolicy struct { // Expiry time of the access policy - ExpiryTime *time.Time `json:"expiryTime,omitempty"` + ExpiryTime *time.Time // List of abbreviated permissions. - Permission *string `json:"permission,omitempty"` + Permission *string // Start time of the access policy - StartTime *time.Time `json:"startTime,omitempty"` + StartTime *time.Time } // Account - The storage account. type Account struct { // REQUIRED; The geo-location where the resource lives - Location *string `json:"location,omitempty"` + Location *string // The extendedLocation of the resource. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + ExtendedLocation *ExtendedLocation // The identity of the resource. - Identity *Identity `json:"identity,omitempty"` + Identity *Identity // Properties of the storage account. - Properties *AccountProperties `json:"properties,omitempty"` + Properties *AccountProperties // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Gets the Kind. - Kind *Kind `json:"kind,omitempty" azure:"ro"` + Kind *Kind // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Gets the SKU. - SKU *SKU `json:"sku,omitempty" azure:"ro"` + SKU *SKU // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // AccountCheckNameAvailabilityParameters - The parameters used to check the availability of the storage account name. type AccountCheckNameAvailabilityParameters struct { // REQUIRED; The storage account name. - Name *string `json:"name,omitempty"` + Name *string // CONSTANT; The type of resource, Microsoft.Storage/storageAccounts // Field has constant value "Microsoft.Storage/storageAccounts", any specified value is ignored. - Type *string `json:"type,omitempty"` + Type *string } // AccountCreateParameters - The parameters used when creating a storage account. type AccountCreateParameters struct { // REQUIRED; Required. Indicates the type of storage account. - Kind *Kind `json:"kind,omitempty"` + Kind *Kind // REQUIRED; Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo // Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource // cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; Required. Gets or sets the SKU name. - SKU *SKU `json:"sku,omitempty"` + SKU *SKU // Optional. Set the extended location of the resource. If not set, the storage account will be created in Azure main region. // Otherwise it will be created in the specified extended location - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + ExtendedLocation *ExtendedLocation // The identity of the resource. - Identity *Identity `json:"identity,omitempty"` + Identity *Identity // The parameters used to create the storage account. - Properties *AccountPropertiesCreateParameters `json:"properties,omitempty"` + Properties *AccountPropertiesCreateParameters // Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this // resource (across resource groups). A maximum of 15 tags can be provided for a // resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than // 256 characters. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // AccountImmutabilityPolicyProperties - This defines account-level immutability policy properties. @@ -100,218 +96,275 @@ type AccountImmutabilityPolicyProperties struct { // This property can only be changed for disabled and unlocked time-based retention policies. When enabled, new blocks can // be written to an append blob while maintaining immutability protection and // compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. - AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + AllowProtectedAppendWrites *bool // The immutability period for the blobs in the container since the policy creation, in days. - ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + ImmutabilityPeriodSinceCreationInDays *int32 // The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows // increase and decrease of immutability retention time and also allows toggling // allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy // can only be created in a Disabled or Unlocked state and can be toggled between // the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. - State *AccountImmutabilityPolicyState `json:"state,omitempty"` + State *AccountImmutabilityPolicyState } // AccountInternetEndpoints - The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via // a internet routing endpoint. type AccountInternetEndpoints struct { // READ-ONLY; Gets the blob endpoint. - Blob *string `json:"blob,omitempty" azure:"ro"` + Blob *string // READ-ONLY; Gets the dfs endpoint. - Dfs *string `json:"dfs,omitempty" azure:"ro"` + Dfs *string // READ-ONLY; Gets the file endpoint. - File *string `json:"file,omitempty" azure:"ro"` + File *string // READ-ONLY; Gets the web endpoint. - Web *string `json:"web,omitempty" azure:"ro"` + Web *string } // AccountKey - An access key for the storage account. type AccountKey struct { // READ-ONLY; Creation time of the key, in round trip date format. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; Name of the key. - KeyName *string `json:"keyName,omitempty" azure:"ro"` + KeyName *string // READ-ONLY; Permissions for the key -- read-only or full permissions. - Permissions *KeyPermission `json:"permissions,omitempty" azure:"ro"` + Permissions *KeyPermission // READ-ONLY; Base 64-encoded value of the key. - Value *string `json:"value,omitempty" azure:"ro"` + Value *string +} + +// AccountLimits - Maximum provisioned storage, IOPS, bandwidth and number of file shares limits for the storage account. +type AccountLimits struct { + // READ-ONLY; The maximum number of file shares limit for the storage account. + MaxFileShares *int32 + + // READ-ONLY; The maximum provisioned bandwidth limit in mebibytes per second for the storage account. + MaxProvisionedBandwidthMiBPerSec *int32 + + // READ-ONLY; The maximum provisioned IOPS limit for the storage account. + MaxProvisionedIOPS *int32 + + // READ-ONLY; The maximum provisioned storage quota limit in gibibytes for the storage account. + MaxProvisionedStorageGiB *int32 } // AccountListKeysResult - The response from the ListKeys operation. type AccountListKeysResult struct { // READ-ONLY; Gets the list of storage account keys and their properties for the specified storage account. - Keys []*AccountKey `json:"keys,omitempty" azure:"ro"` + Keys []*AccountKey } // AccountListResult - The response from the List Storage Accounts operation. type AccountListResult struct { // READ-ONLY; Request URL that can be used to query next page of storage accounts. Returned when total number of requested // storage accounts exceed maximum page size. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string // READ-ONLY; Gets the list of storage accounts and their properties. - Value []*Account `json:"value,omitempty" azure:"ro"` + Value []*Account } // AccountMicrosoftEndpoints - The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object // via a microsoft routing endpoint. type AccountMicrosoftEndpoints struct { // READ-ONLY; Gets the blob endpoint. - Blob *string `json:"blob,omitempty" azure:"ro"` + Blob *string // READ-ONLY; Gets the dfs endpoint. - Dfs *string `json:"dfs,omitempty" azure:"ro"` + Dfs *string // READ-ONLY; Gets the file endpoint. - File *string `json:"file,omitempty" azure:"ro"` + File *string // READ-ONLY; Gets the queue endpoint. - Queue *string `json:"queue,omitempty" azure:"ro"` + Queue *string // READ-ONLY; Gets the table endpoint. - Table *string `json:"table,omitempty" azure:"ro"` + Table *string // READ-ONLY; Gets the web endpoint. - Web *string `json:"web,omitempty" azure:"ro"` + Web *string +} + +// AccountMigration - The parameters or status associated with an ongoing or enqueued storage account migration in order to +// update its current SKU or region. +type AccountMigration struct { + // REQUIRED; The properties of a storage account’s ongoing or enqueued migration. + StorageAccountMigrationDetails *AccountMigrationProperties + + // current value is 'default' for customer initiated migration + Name *string + + // SrpAccountMigrationType in ARM contract which is 'accountMigrations' + Type *string + + // READ-ONLY; Migration Resource Id + ID *string +} + +// AccountMigrationProperties - The properties of a storage account’s ongoing or enqueued migration. +type AccountMigrationProperties struct { + // REQUIRED; Target sku name for the account + TargetSKUName *SKUName + + // READ-ONLY; Reason for migration failure + MigrationFailedDetailedReason *string + + // READ-ONLY; Error code for migration failure + MigrationFailedReason *string + + // READ-ONLY; Current status of migration + MigrationStatus *MigrationStatus } // AccountProperties - Properties of the storage account. type AccountProperties struct { - // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for - // this property. - AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` + // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is false + // for this property. + AllowBlobPublicAccess *bool - // Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. - AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + // Allow or disallow cross AAD tenant object replication. Set this property to true for new or existing accounts only if object + // replication policies will involve storage accounts in different AAD + // tenants. The default interpretation is false for new accounts to follow best security practices by default. + AllowCrossTenantReplication *bool // Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If // false, then all requests, including shared access signatures, must be authorized // with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true. - AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` + AllowSharedKeyAccess *bool // Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. - AllowedCopyScope *AllowedCopyScope `json:"allowedCopyScope,omitempty"` + AllowedCopyScope *AllowedCopyScope // Provides the identity based authentication settings for Azure Files. - AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` + AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication // Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, // which creates accounts in an Azure DNS Zone and the endpoint URL // will have an alphanumeric DNS Zone identifier. - DNSEndpointType *DNSEndpointType `json:"dnsEndpointType,omitempty"` + DNSEndpointType *DNSEndpointType // A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false // for this property. - DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + DefaultToOAuthAuthentication *bool + + // Enables extended group support with local users feature, if set to true + EnableExtendedGroups *bool // Allows https traffic only to storage service if sets to true. - EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + EnableHTTPSTrafficOnly *bool // NFS 3.0 protocol support enabled if set to true. - EnableNfsV3 *bool `json:"isNfsV3Enabled,omitempty"` + EnableNfsV3 *bool // The property is immutable and can only be set to true at the account creation time. When set to true, it enables object // level immutability for all the containers in the account by default. - ImmutableStorageWithVersioning *ImmutableStorageAccount `json:"immutableStorageWithVersioning,omitempty"` + ImmutableStorageWithVersioning *ImmutableStorageAccount // Account HierarchicalNamespace enabled if sets to true. - IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` + IsHnsEnabled *bool // Enables local users feature, if set to true - IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` + IsLocalUserEnabled *bool // Enables Secure File Transfer Protocol, if set to true - IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + IsSftpEnabled *bool // Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. - LargeFileSharesState *LargeFileSharesState `json:"largeFileSharesState,omitempty"` + LargeFileSharesState *LargeFileSharesState // Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. - MinimumTLSVersion *MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` + MinimumTLSVersion *MinimumTLSVersion - // Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + PublicNetworkAccess *PublicNetworkAccess // Maintains information about the network routing choice opted by the user for data transfer - RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` + RoutingPreference *RoutingPreference // This property is readOnly and is set by server during asynchronous storage account sku conversion operations. - StorageAccountSKUConversionStatus *AccountSKUConversionStatus `json:"storageAccountSkuConversionStatus,omitempty"` + StorageAccountSKUConversionStatus *AccountSKUConversionStatus // READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access // tier is the default value for premium block blobs storage account type and it cannot // be changed for the premium block blobs storage account type. - AccessTier *AccessTier `json:"accessTier,omitempty" azure:"ro"` + AccessTier *AccessTier + + // READ-ONLY; If customer initiated account migration is in progress, the value will be true else it will be null. + AccountMigrationInProgress *bool // READ-ONLY; Blob restore status - BlobRestoreStatus *BlobRestoreStatus `json:"blobRestoreStatus,omitempty" azure:"ro"` + BlobRestoreStatus *BlobRestoreStatus // READ-ONLY; Gets the creation date and time of the storage account in UTC. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; Gets the custom domain the user assigned to this storage account. - CustomDomain *CustomDomain `json:"customDomain,omitempty" azure:"ro"` + CustomDomain *CustomDomain // READ-ONLY; Encryption settings to be used for server-side encryption for the storage account. - Encryption *Encryption `json:"encryption,omitempty" azure:"ro"` + Encryption *Encryption // READ-ONLY; If the failover is in progress, the value will be true, otherwise, it will be null. - FailoverInProgress *bool `json:"failoverInProgress,omitempty" azure:"ro"` + FailoverInProgress *bool // READ-ONLY; Geo Replication Stats - GeoReplicationStats *GeoReplicationStats `json:"geoReplicationStats,omitempty" azure:"ro"` + GeoReplicationStats *GeoReplicationStats + + // READ-ONLY; This property will be set to true or false on an event of ongoing migration. Default value is null. + IsSKUConversionBlocked *bool // READ-ONLY; Storage account keys creation time. - KeyCreationTime *KeyCreationTime `json:"keyCreationTime,omitempty" azure:"ro"` + KeyCreationTime *KeyCreationTime // READ-ONLY; KeyPolicy assigned to the storage account. - KeyPolicy *KeyPolicy `json:"keyPolicy,omitempty" azure:"ro"` + KeyPolicy *KeyPolicy // READ-ONLY; Gets the timestamp of the most recent instance of a failover to the secondary location. Only the most recent // timestamp is retained. This element is not returned if there has never been a failover // instance. Only available if the accountType is StandardGRS or StandardRAGRS. - LastGeoFailoverTime *time.Time `json:"lastGeoFailoverTime,omitempty" azure:"ro"` + LastGeoFailoverTime *time.Time // READ-ONLY; Network rule set - NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty" azure:"ro"` + NetworkRuleSet *NetworkRuleSet // READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that StandardZRS // and PremiumLRS accounts only return the blob endpoint. - PrimaryEndpoints *Endpoints `json:"primaryEndpoints,omitempty" azure:"ro"` + PrimaryEndpoints *Endpoints // READ-ONLY; Gets the location of the primary data center for the storage account. - PrimaryLocation *string `json:"primaryLocation,omitempty" azure:"ro"` + PrimaryLocation *string // READ-ONLY; List of private endpoint connection associated with the specified storage account - PrivateEndpointConnections []*PrivateEndpointConnection `json:"privateEndpointConnections,omitempty" azure:"ro"` + PrivateEndpointConnections []*PrivateEndpointConnection // READ-ONLY; Gets the status of the storage account at the time the operation was called. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState // READ-ONLY; SasPolicy assigned to the storage account. - SasPolicy *SasPolicy `json:"sasPolicy,omitempty" azure:"ro"` + SasPolicy *SasPolicy // READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary // location of the storage account. Only available if the SKU name is Standard_RAGRS. - SecondaryEndpoints *Endpoints `json:"secondaryEndpoints,omitempty" azure:"ro"` + SecondaryEndpoints *Endpoints // READ-ONLY; Gets the location of the geo-replicated secondary for the storage account. Only available if the accountType // is StandardGRS or StandardRAGRS. - SecondaryLocation *string `json:"secondaryLocation,omitempty" azure:"ro"` + SecondaryLocation *string // READ-ONLY; Gets the status indicating whether the primary location of the storage account is available or unavailable. - StatusOfPrimary *AccountStatus `json:"statusOfPrimary,omitempty" azure:"ro"` + StatusOfPrimary *AccountStatus // READ-ONLY; Gets the status indicating whether the secondary location of the storage account is available or unavailable. // Only available if the SKU name is StandardGRS or StandardRAGRS. - StatusOfSecondary *AccountStatus `json:"statusOfSecondary,omitempty" azure:"ro"` + StatusOfSecondary *AccountStatus } // AccountPropertiesCreateParameters - The parameters used to create the storage account. @@ -319,82 +372,89 @@ type AccountPropertiesCreateParameters struct { // Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier // is the default value for premium block blobs storage account type and it cannot // be changed for the premium block blobs storage account type. - AccessTier *AccessTier `json:"accessTier,omitempty"` + AccessTier *AccessTier - // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for - // this property. - AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` + // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is false + // for this property. + AllowBlobPublicAccess *bool - // Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. - AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + // Allow or disallow cross AAD tenant object replication. Set this property to true for new or existing accounts only if object + // replication policies will involve storage accounts in different AAD + // tenants. The default interpretation is false for new accounts to follow best security practices by default. + AllowCrossTenantReplication *bool // Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If // false, then all requests, including shared access signatures, must be authorized // with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true. - AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` + AllowSharedKeyAccess *bool // Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. - AllowedCopyScope *AllowedCopyScope `json:"allowedCopyScope,omitempty"` + AllowedCopyScope *AllowedCopyScope // Provides the identity based authentication settings for Azure Files. - AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` + AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication // User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage // account at this time. To clear the existing custom domain, use an empty string // for the custom domain name property. - CustomDomain *CustomDomain `json:"customDomain,omitempty"` + CustomDomain *CustomDomain // Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, // which creates accounts in an Azure DNS Zone and the endpoint URL // will have an alphanumeric DNS Zone identifier. - DNSEndpointType *DNSEndpointType `json:"dnsEndpointType,omitempty"` + DNSEndpointType *DNSEndpointType // A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false // for this property. - DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + DefaultToOAuthAuthentication *bool + + // Enables extended group support with local users feature, if set to true + EnableExtendedGroups *bool // Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. - EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + EnableHTTPSTrafficOnly *bool // NFS 3.0 protocol support enabled if set to true. - EnableNfsV3 *bool `json:"isNfsV3Enabled,omitempty"` + EnableNfsV3 *bool // Encryption settings to be used for server-side encryption for the storage account. - Encryption *Encryption `json:"encryption,omitempty"` + Encryption *Encryption // The property is immutable and can only be set to true at the account creation time. When set to true, it enables object // level immutability for all the new containers in the account by default. - ImmutableStorageWithVersioning *ImmutableStorageAccount `json:"immutableStorageWithVersioning,omitempty"` + ImmutableStorageWithVersioning *ImmutableStorageAccount // Account HierarchicalNamespace enabled if sets to true. - IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` + IsHnsEnabled *bool // Enables local users feature, if set to true - IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` + IsLocalUserEnabled *bool // Enables Secure File Transfer Protocol, if set to true - IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + IsSftpEnabled *bool // KeyPolicy assigned to the storage account. - KeyPolicy *KeyPolicy `json:"keyPolicy,omitempty"` + KeyPolicy *KeyPolicy // Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. - LargeFileSharesState *LargeFileSharesState `json:"largeFileSharesState,omitempty"` + LargeFileSharesState *LargeFileSharesState // Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. - MinimumTLSVersion *MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` + MinimumTLSVersion *MinimumTLSVersion // Network rule set - NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` + NetworkRuleSet *NetworkRuleSet - // Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + // Value is optional but if passed in, must be 'Enabled', 'Disabled' or + // 'SecuredByPerimeter'. + PublicNetworkAccess *PublicNetworkAccess // Maintains information about the network routing choice opted by the user for data transfer - RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` + RoutingPreference *RoutingPreference // SasPolicy assigned to the storage account. - SasPolicy *SasPolicy `json:"sasPolicy,omitempty"` + SasPolicy *SasPolicy } // AccountPropertiesUpdateParameters - The parameters used when updating a storage account. @@ -402,464 +462,294 @@ type AccountPropertiesUpdateParameters struct { // Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier // is the default value for premium block blobs storage account type and it cannot // be changed for the premium block blobs storage account type. - AccessTier *AccessTier `json:"accessTier,omitempty"` + AccessTier *AccessTier - // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for - // this property. - AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` + // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is false + // for this property. + AllowBlobPublicAccess *bool - // Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. - AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + // Allow or disallow cross AAD tenant object replication. Set this property to true for new or existing accounts only if object + // replication policies will involve storage accounts in different AAD + // tenants. The default interpretation is false for new accounts to follow best security practices by default. + AllowCrossTenantReplication *bool // Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If // false, then all requests, including shared access signatures, must be authorized // with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true. - AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` + AllowSharedKeyAccess *bool // Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. - AllowedCopyScope *AllowedCopyScope `json:"allowedCopyScope,omitempty"` + AllowedCopyScope *AllowedCopyScope // Provides the identity based authentication settings for Azure Files. - AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` + AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication // Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported // per storage account at this time. To clear the existing custom domain, use an // empty string for the custom domain name property. - CustomDomain *CustomDomain `json:"customDomain,omitempty"` + CustomDomain *CustomDomain // Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, // which creates accounts in an Azure DNS Zone and the endpoint URL // will have an alphanumeric DNS Zone identifier. - DNSEndpointType *DNSEndpointType `json:"dnsEndpointType,omitempty"` + DNSEndpointType *DNSEndpointType // A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false // for this property. - DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + DefaultToOAuthAuthentication *bool + + // Enables extended group support with local users feature, if set to true + EnableExtendedGroups *bool // Allows https traffic only to storage service if sets to true. - EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + EnableHTTPSTrafficOnly *bool // Not applicable. Azure Storage encryption at rest is enabled by default for all storage accounts and cannot be disabled. - Encryption *Encryption `json:"encryption,omitempty"` + Encryption *Encryption // The property is immutable and can only be set to true at the account creation time. When set to true, it enables object // level immutability for all the containers in the account by default. - ImmutableStorageWithVersioning *ImmutableStorageAccount `json:"immutableStorageWithVersioning,omitempty"` + ImmutableStorageWithVersioning *ImmutableStorageAccount // Enables local users feature, if set to true - IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` + IsLocalUserEnabled *bool // Enables Secure File Transfer Protocol, if set to true - IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + IsSftpEnabled *bool // KeyPolicy assigned to the storage account. - KeyPolicy *KeyPolicy `json:"keyPolicy,omitempty"` + KeyPolicy *KeyPolicy // Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. - LargeFileSharesState *LargeFileSharesState `json:"largeFileSharesState,omitempty"` + LargeFileSharesState *LargeFileSharesState // Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. - MinimumTLSVersion *MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` + MinimumTLSVersion *MinimumTLSVersion // Network rule set - NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` + NetworkRuleSet *NetworkRuleSet - // Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + // Value is optional but if passed in, must be 'Enabled', 'Disabled' or + // 'SecuredByPerimeter'. + PublicNetworkAccess *PublicNetworkAccess // Maintains information about the network routing choice opted by the user for data transfer - RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` + RoutingPreference *RoutingPreference // SasPolicy assigned to the storage account. - SasPolicy *SasPolicy `json:"sasPolicy,omitempty"` + SasPolicy *SasPolicy } // AccountRegenerateKeyParameters - The parameters used to regenerate the storage account key. type AccountRegenerateKeyParameters struct { // REQUIRED; The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. - KeyName *string `json:"keyName,omitempty"` + KeyName *string } // AccountSKUConversionStatus - This defines the sku conversion status object for asynchronous sku conversions. type AccountSKUConversionStatus struct { // This property represents the target sku name to which the account sku is being converted asynchronously. - TargetSKUName *SKUName `json:"targetSkuName,omitempty"` + TargetSKUName *SKUName // READ-ONLY; This property represents the sku conversion end time. - EndTime *string `json:"endTime,omitempty" azure:"ro"` + EndTime *string // READ-ONLY; This property indicates the current sku conversion status. - SKUConversionStatus *SKUConversionStatus `json:"skuConversionStatus,omitempty" azure:"ro"` + SKUConversionStatus *SKUConversionStatus // READ-ONLY; This property represents the sku conversion start time. - StartTime *string `json:"startTime,omitempty" azure:"ro"` + StartTime *string } // AccountSasParameters - The parameters to list SAS credentials of a storage account. type AccountSasParameters struct { // REQUIRED; The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), // Add (a), Create (c), Update (u) and Process (p). - Permissions *Permissions `json:"signedPermission,omitempty"` + Permissions *Permissions // REQUIRED; The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; // Container (c): Access to container-level APIs; Object (o): Access to object-level APIs // for blobs, queue messages, table entities, and files. - ResourceTypes *SignedResourceTypes `json:"signedResourceTypes,omitempty"` + ResourceTypes *SignedResourceTypes // REQUIRED; The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), // File (f). - Services *Services `json:"signedServices,omitempty"` + Services *Services // REQUIRED; The time at which the shared access signature becomes invalid. - SharedAccessExpiryTime *time.Time `json:"signedExpiry,omitempty"` + SharedAccessExpiryTime *time.Time // An IP address or a range of IP addresses from which to accept requests. - IPAddressOrRange *string `json:"signedIp,omitempty"` + IPAddressOrRange *string // The key to sign the account SAS token with. - KeyToSign *string `json:"keyToSign,omitempty"` + KeyToSign *string // The protocol permitted for a request made with the account SAS. - Protocols *HTTPProtocol `json:"signedProtocol,omitempty"` + Protocols *HTTPProtocol // The time at which the SAS becomes valid. - SharedAccessStartTime *time.Time `json:"signedStart,omitempty"` + SharedAccessStartTime *time.Time } // AccountUpdateParameters - The parameters that can be provided when updating the storage account properties. type AccountUpdateParameters struct { // The identity of the resource. - Identity *Identity `json:"identity,omitempty"` + Identity *Identity // Optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. - Kind *Kind `json:"kind,omitempty"` + Kind *Kind // The parameters used when updating a storage account. - Properties *AccountPropertiesUpdateParameters `json:"properties,omitempty"` + Properties *AccountPropertiesUpdateParameters // Gets or sets the SKU name. Note that the SKU name cannot be updated to StandardZRS, PremiumLRS or Premium_ZRS, nor can // accounts of those SKU names be updated to any other value. - SKU *SKU `json:"sku,omitempty"` + SKU *SKU // Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this // resource (across resource groups). A maximum of 15 tags can be provided for a // resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. - Tags map[string]*string `json:"tags,omitempty"` -} - -// AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions contains the optional parameters for the AccountsClient.BeginAbortHierarchicalNamespaceMigration -// method. -type AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method. -type AccountsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountsClientBeginFailoverOptions contains the optional parameters for the AccountsClient.BeginFailover method. -type AccountsClientBeginFailoverOptions struct { - // The parameter is set to 'Planned' to indicate whether a Planned failover is requested.. Specifying any value will set the - // value to Planned. - FailoverType *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountsClientBeginHierarchicalNamespaceMigrationOptions contains the optional parameters for the AccountsClient.BeginHierarchicalNamespaceMigration -// method. -type AccountsClientBeginHierarchicalNamespaceMigrationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string + Tags map[string]*string } -// AccountsClientBeginRestoreBlobRangesOptions contains the optional parameters for the AccountsClient.BeginRestoreBlobRanges -// method. -type AccountsClientBeginRestoreBlobRangesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} +// AccountUsage - Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares and soft-deleted +// shares in the account. +type AccountUsage struct { + // READ-ONLY; Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares or soft-deleted + // shares in the account. + LiveShares *AccountUsageElements -// AccountsClientCheckNameAvailabilityOptions contains the optional parameters for the AccountsClient.CheckNameAvailability -// method. -type AccountsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters + // READ-ONLY; Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares or soft-deleted + // shares in the account. + SoftDeletedShares *AccountUsageElements } -// AccountsClientDeleteOptions contains the optional parameters for the AccountsClient.Delete method. -type AccountsClientDeleteOptions struct { - // placeholder for future optional parameters -} +// AccountUsageElements - Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares or +// soft-deleted shares in the account. +type AccountUsageElements struct { + // READ-ONLY; The total number of file shares. + FileShareCount *int32 -// AccountsClientGetPropertiesOptions contains the optional parameters for the AccountsClient.GetProperties method. -type AccountsClientGetPropertiesOptions struct { - // May be used to expand the properties within account's properties. By default, data is not included when fetching properties. - // Currently we only support geoReplicationStats and blobRestoreStatus. - Expand *StorageAccountExpand -} + // READ-ONLY; The total provisioned bandwidth in mebibytes per second. + ProvisionedBandwidthMiBPerSec *int32 -// AccountsClientListAccountSASOptions contains the optional parameters for the AccountsClient.ListAccountSAS method. -type AccountsClientListAccountSASOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager -// method. -type AccountsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientListKeysOptions contains the optional parameters for the AccountsClient.ListKeys method. -type AccountsClientListKeysOptions struct { - // Specifies type of the key to be listed. Possible value is kerb.. Specifying any value will set the value to kerb. - Expand *string -} - -// AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method. -type AccountsClientListOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientListServiceSASOptions contains the optional parameters for the AccountsClient.ListServiceSAS method. -type AccountsClientListServiceSASOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientRegenerateKeyOptions contains the optional parameters for the AccountsClient.RegenerateKey method. -type AccountsClientRegenerateKeyOptions struct { - // placeholder for future optional parameters -} + // READ-ONLY; The total provisioned IOPS. + ProvisionedIOPS *int32 -// AccountsClientRevokeUserDelegationKeysOptions contains the optional parameters for the AccountsClient.RevokeUserDelegationKeys -// method. -type AccountsClientRevokeUserDelegationKeysOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientUpdateOptions contains the optional parameters for the AccountsClient.Update method. -type AccountsClientUpdateOptions struct { - // placeholder for future optional parameters + // READ-ONLY; The total provisioned storage quota in gibibytes. + ProvisionedStorageGiB *int32 } // ActiveDirectoryProperties - Settings properties for Active Directory (AD). type ActiveDirectoryProperties struct { // REQUIRED; Specifies the domain GUID. - DomainGUID *string `json:"domainGuid,omitempty"` + DomainGUID *string // REQUIRED; Specifies the primary domain that the AD DNS server is authoritative for. - DomainName *string `json:"domainName,omitempty"` + DomainName *string // Specifies the Active Directory account type for Azure Storage. - AccountType *ActiveDirectoryPropertiesAccountType `json:"accountType,omitempty"` + AccountType *ActiveDirectoryPropertiesAccountType // Specifies the security identifier (SID) for Azure Storage. - AzureStorageSid *string `json:"azureStorageSid,omitempty"` + AzureStorageSid *string // Specifies the security identifier (SID). - DomainSid *string `json:"domainSid,omitempty"` + DomainSid *string // Specifies the Active Directory forest to get. - ForestName *string `json:"forestName,omitempty"` + ForestName *string // Specifies the NetBIOS domain name. - NetBiosDomainName *string `json:"netBiosDomainName,omitempty"` + NetBiosDomainName *string // Specifies the Active Directory SAMAccountName for Azure Storage. - SamAccountName *string `json:"samAccountName,omitempty"` + SamAccountName *string } // AzureEntityResource - The resource model definition for an Azure Resource Manager resource with an etag. type AzureEntityResource struct { // READ-ONLY; Resource Etag. - Etag *string `json:"etag,omitempty" azure:"ro"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // AzureFilesIdentityBasedAuthentication - Settings for Azure Files identity based authentication. type AzureFilesIdentityBasedAuthentication struct { // REQUIRED; Indicates the directory service used. Note that this enum may be extended in the future. - DirectoryServiceOptions *DirectoryServiceOptions `json:"directoryServiceOptions,omitempty"` + DirectoryServiceOptions *DirectoryServiceOptions // Required if directoryServiceOptions are AD, optional if they are AADKERB. - ActiveDirectoryProperties *ActiveDirectoryProperties `json:"activeDirectoryProperties,omitempty"` + ActiveDirectoryProperties *ActiveDirectoryProperties // Default share permission for users using Kerberos authentication if RBAC role is not assigned. - DefaultSharePermission *DefaultSharePermission `json:"defaultSharePermission,omitempty"` + DefaultSharePermission *DefaultSharePermission } // BlobContainer - Properties of the blob container, including Id, resource name, resource type, Etag. type BlobContainer struct { // Properties of the blob container. - ContainerProperties *ContainerProperties `json:"properties,omitempty"` + ContainerProperties *ContainerProperties // READ-ONLY; Resource Etag. - Etag *string `json:"etag,omitempty" azure:"ro"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BlobContainersClientBeginObjectLevelWormOptions contains the optional parameters for the BlobContainersClient.BeginObjectLevelWorm -// method. -type BlobContainersClientBeginObjectLevelWormOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BlobContainersClientClearLegalHoldOptions contains the optional parameters for the BlobContainersClient.ClearLegalHold -// method. -type BlobContainersClientClearLegalHoldOptions struct { - // placeholder for future optional parameters -} - -// BlobContainersClientCreateOptions contains the optional parameters for the BlobContainersClient.Create method. -type BlobContainersClientCreateOptions struct { - // placeholder for future optional parameters -} - -// BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.CreateOrUpdateImmutabilityPolicy -// method. -type BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions struct { - // The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation - // only if the immutability policy already exists. If omitted, this operation will - // always be applied. - IfMatch *string - // The ImmutabilityPolicy Properties that will be created or updated to a blob container. - Parameters *ImmutabilityPolicy -} - -// BlobContainersClientDeleteImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.DeleteImmutabilityPolicy -// method. -type BlobContainersClientDeleteImmutabilityPolicyOptions struct { - // placeholder for future optional parameters + Type *string } -// BlobContainersClientDeleteOptions contains the optional parameters for the BlobContainersClient.Delete method. -type BlobContainersClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// BlobContainersClientExtendImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.ExtendImmutabilityPolicy -// method. -type BlobContainersClientExtendImmutabilityPolicyOptions struct { - // The ImmutabilityPolicy Properties that will be extended for a blob container. - Parameters *ImmutabilityPolicy -} - -// BlobContainersClientGetImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.GetImmutabilityPolicy -// method. -type BlobContainersClientGetImmutabilityPolicyOptions struct { - // The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation - // only if the immutability policy already exists. If omitted, this operation will - // always be applied. - IfMatch *string -} - -// BlobContainersClientGetOptions contains the optional parameters for the BlobContainersClient.Get method. -type BlobContainersClientGetOptions struct { - // placeholder for future optional parameters -} - -// BlobContainersClientLeaseOptions contains the optional parameters for the BlobContainersClient.Lease method. -type BlobContainersClientLeaseOptions struct { - // Lease Container request body. - Parameters *LeaseContainerRequest -} - -// BlobContainersClientListOptions contains the optional parameters for the BlobContainersClient.NewListPager method. -type BlobContainersClientListOptions struct { - // Optional. When specified, only container names starting with the filter will be listed. - Filter *string - // Optional, used to include the properties for soft deleted blob containers. - Include *ListContainersInclude - // Optional. Specified maximum number of containers that can be included in the list. - Maxpagesize *string -} - -// BlobContainersClientLockImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.LockImmutabilityPolicy -// method. -type BlobContainersClientLockImmutabilityPolicyOptions struct { - // placeholder for future optional parameters -} - -// BlobContainersClientSetLegalHoldOptions contains the optional parameters for the BlobContainersClient.SetLegalHold method. -type BlobContainersClientSetLegalHoldOptions struct { - // placeholder for future optional parameters -} - -// BlobContainersClientUpdateOptions contains the optional parameters for the BlobContainersClient.Update method. -type BlobContainersClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// BlobInventoryPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BlobInventoryPoliciesClient.CreateOrUpdate -// method. -type BlobInventoryPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// BlobInventoryPoliciesClientDeleteOptions contains the optional parameters for the BlobInventoryPoliciesClient.Delete method. -type BlobInventoryPoliciesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// BlobInventoryPoliciesClientGetOptions contains the optional parameters for the BlobInventoryPoliciesClient.Get method. -type BlobInventoryPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// BlobInventoryPoliciesClientListOptions contains the optional parameters for the BlobInventoryPoliciesClient.NewListPager -// method. -type BlobInventoryPoliciesClientListOptions struct { - // placeholder for future optional parameters +// BlobInventoryCreationTime - This property defines the creation time based filtering condition. Blob Inventory schema parameter +// 'Creation-Time' is mandatory with this filter. +type BlobInventoryCreationTime struct { + // When set the policy filters the objects that are created in the last N days. Where N is an integer value between 1 to 36500. + LastNDays *int32 } // BlobInventoryPolicy - The storage account blob inventory policy. type BlobInventoryPolicy struct { // Returns the storage account blob inventory policy rules. - Properties *BlobInventoryPolicyProperties `json:"properties,omitempty"` + Properties *BlobInventoryPolicyProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // BlobInventoryPolicyDefinition - An object that defines the blob inventory rule. type BlobInventoryPolicyDefinition struct { // REQUIRED; This is a required field, it specifies the format for the inventory files. - Format *Format `json:"format,omitempty"` + Format *Format // REQUIRED; This is a required field. This field specifies the scope of the inventory created either at the blob or container // level. - ObjectType *ObjectType `json:"objectType,omitempty"` + ObjectType *ObjectType // REQUIRED; This is a required field. This field is used to schedule an inventory formation. - Schedule *Schedule `json:"schedule,omitempty"` + Schedule *Schedule // REQUIRED; This is a required field. This field specifies the fields and properties of the object to be included in the // inventory. The Schema field value 'Name' is always required. The valid values for this @@ -878,10 +768,10 @@ type BlobInventoryPolicyDefinition struct { // ImmutableStorageWithVersioningEnabled, Deleted, Version, DeletedTime, RemainingRetentionDays'. Schema field values 'Expiry-Time, // hdiisfolder, Owner, Group, Permissions, Acl, DeletionId' are valid only // for Hns enabled accounts.Schema field values 'Tags, TagCount' are only valid for Non-Hns accounts. - SchemaFields []*string `json:"schemaFields,omitempty"` + SchemaFields []*string // An object that defines the filter set. - Filters *BlobInventoryPolicyFilter `json:"filters,omitempty"` + Filters *BlobInventoryPolicyFilter } // BlobInventoryPolicyFilter - An object that defines the blob inventory rule filter conditions. For 'Blob' definition.objectType @@ -891,314 +781,313 @@ type BlobInventoryPolicyFilter struct { // An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support // pageBlobs. This field is required when definition.objectType property is set to // 'Blob'. - BlobTypes []*string `json:"blobTypes,omitempty"` + BlobTypes []*string + + // This property is used to filter objects based on the object creation time + CreationTime *BlobInventoryCreationTime // An array of strings with maximum 10 blob prefixes to be excluded from the inventory. - ExcludePrefix []*string `json:"excludePrefix,omitempty"` + ExcludePrefix []*string // Includes blob versions in blob inventory when value is set to true. The definition.schemaFields values 'VersionId and IsCurrentVersion' // are required if this property is set to true, else they must be // excluded. - IncludeBlobVersions *bool `json:"includeBlobVersions,omitempty"` + IncludeBlobVersions *bool // For 'Container' definition.objectType the definition.schemaFields must include 'Deleted, Version, DeletedTime and RemainingRetentionDays'. // For 'Blob' definition.objectType and HNS enabled storage // accounts the definition.schemaFields must include 'DeletionId, Deleted, DeletedTime and RemainingRetentionDays' and for // Hns disabled accounts the definition.schemaFields must include 'Deleted and // RemainingRetentionDays', else it must be excluded. - IncludeDeleted *bool `json:"includeDeleted,omitempty"` + IncludeDeleted *bool // Includes blob snapshots in blob inventory when value is set to true. The definition.schemaFields value 'Snapshot' is required // if this property is set to true, else it must be excluded. - IncludeSnapshots *bool `json:"includeSnapshots,omitempty"` + IncludeSnapshots *bool // An array of strings with maximum 10 blob prefixes to be included in the inventory. - PrefixMatch []*string `json:"prefixMatch,omitempty"` + PrefixMatch []*string } // BlobInventoryPolicyProperties - The storage account blob inventory policy properties. type BlobInventoryPolicyProperties struct { // REQUIRED; The storage account blob inventory policy object. It is composed of policy rules. - Policy *BlobInventoryPolicySchema `json:"policy,omitempty"` + Policy *BlobInventoryPolicySchema // READ-ONLY; Returns the last modified date and time of the blob inventory policy. - LastModifiedTime *time.Time `json:"lastModifiedTime,omitempty" azure:"ro"` + LastModifiedTime *time.Time } // BlobInventoryPolicyRule - An object that wraps the blob inventory rule. Each rule is uniquely defined by name. type BlobInventoryPolicyRule struct { // REQUIRED; An object that defines the blob inventory policy rule. - Definition *BlobInventoryPolicyDefinition `json:"definition,omitempty"` + Definition *BlobInventoryPolicyDefinition // REQUIRED; Container name where blob inventory files are stored. Must be pre-created. - Destination *string `json:"destination,omitempty"` + Destination *string // REQUIRED; Rule is enabled when set to true. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // REQUIRED; A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be // unique within a policy. - Name *string `json:"name,omitempty"` + Name *string } // BlobInventoryPolicySchema - The storage account blob inventory policy rules. type BlobInventoryPolicySchema struct { // REQUIRED; Policy is enabled if set to true. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // REQUIRED; The storage account blob inventory policy rules. The rule is applied when it is enabled. - Rules []*BlobInventoryPolicyRule `json:"rules,omitempty"` + Rules []*BlobInventoryPolicyRule // REQUIRED; The valid value is Inventory - Type *InventoryRuleType `json:"type,omitempty"` + Type *InventoryRuleType // READ-ONLY; Deprecated Property from API version 2021-04-01 onwards, the required destination container name must be specified // at the rule level 'policy.rule.destination' - Destination *string `json:"destination,omitempty" azure:"ro"` + Destination *string } // BlobRestoreParameters - Blob restore parameters type BlobRestoreParameters struct { // REQUIRED; Blob ranges to restore. - BlobRanges []*BlobRestoreRange `json:"blobRanges,omitempty"` + BlobRanges []*BlobRestoreRange // REQUIRED; Restore blob to the specified time. - TimeToRestore *time.Time `json:"timeToRestore,omitempty"` + TimeToRestore *time.Time } // BlobRestoreRange - Blob range type BlobRestoreRange struct { // REQUIRED; Blob end range. This is exclusive. Empty means account end. - EndRange *string `json:"endRange,omitempty"` + EndRange *string // REQUIRED; Blob start range. This is inclusive. Empty means account start. - StartRange *string `json:"startRange,omitempty"` + StartRange *string } // BlobRestoreStatus - Blob restore status. type BlobRestoreStatus struct { // READ-ONLY; Failure reason when blob restore is failed. - FailureReason *string `json:"failureReason,omitempty" azure:"ro"` + FailureReason *string // READ-ONLY; Blob restore request parameters. - Parameters *BlobRestoreParameters `json:"parameters,omitempty" azure:"ro"` + Parameters *BlobRestoreParameters // READ-ONLY; Id for tracking blob restore request. - RestoreID *string `json:"restoreId,omitempty" azure:"ro"` + RestoreID *string // READ-ONLY; The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. // - Complete: Indicates that blob restore has been completed successfully. - Failed: // Indicates that blob restore is failed. - Status *BlobRestoreProgressStatus `json:"status,omitempty" azure:"ro"` + Status *BlobRestoreProgressStatus } type BlobServiceItems struct { // READ-ONLY; List of blob services returned. - Value []*BlobServiceProperties `json:"value,omitempty" azure:"ro"` + Value []*BlobServiceProperties } // BlobServiceProperties - The properties of a storage account’s Blob service. type BlobServiceProperties struct { // The properties of a storage account’s Blob service. - BlobServiceProperties *BlobServicePropertiesProperties `json:"properties,omitempty"` + BlobServiceProperties *BlobServicePropertiesProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Sku name and tier. - SKU *SKU `json:"sku,omitempty" azure:"ro"` + SKU *SKU // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // BlobServicePropertiesProperties - The properties of a storage account’s Blob service. type BlobServicePropertiesProperties struct { // Deprecated in favor of isVersioningEnabled property. - AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` + AutomaticSnapshotPolicyEnabled *bool // The blob service properties for change feed events. - ChangeFeed *ChangeFeed `json:"changeFeed,omitempty"` + ChangeFeed *ChangeFeed // The blob service properties for container soft delete. - ContainerDeleteRetentionPolicy *DeleteRetentionPolicy `json:"containerDeleteRetentionPolicy,omitempty"` + ContainerDeleteRetentionPolicy *DeleteRetentionPolicy // Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule // elements are included in the request body, all CORS rules will be deleted, and // CORS will be disabled for the Blob service. - Cors *CorsRules `json:"cors,omitempty"` + Cors *CorsRules // DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version // is not specified. Possible values include version 2008-10-27 and all more // recent versions. - DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty"` + DefaultServiceVersion *string // The blob service properties for blob soft delete. - DeleteRetentionPolicy *DeleteRetentionPolicy `json:"deleteRetentionPolicy,omitempty"` + DeleteRetentionPolicy *DeleteRetentionPolicy // Versioning is enabled if set to true. - IsVersioningEnabled *bool `json:"isVersioningEnabled,omitempty"` + IsVersioningEnabled *bool // The blob service property to configure last access time based tracking policy. - LastAccessTimeTrackingPolicy *LastAccessTimeTrackingPolicy `json:"lastAccessTimeTrackingPolicy,omitempty"` + LastAccessTimeTrackingPolicy *LastAccessTimeTrackingPolicy // The blob service properties for blob restore policy. - RestorePolicy *RestorePolicyProperties `json:"restorePolicy,omitempty"` + RestorePolicy *RestorePolicyProperties } -// BlobServicesClientGetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.GetServiceProperties -// method. -type BlobServicesClientGetServicePropertiesOptions struct { - // placeholder for future optional parameters -} +// BurstingConstants - Constants used for calculating included burst IOPS and maximum burst credits for IOPS for a file share +// in the storage account. +type BurstingConstants struct { + // READ-ONLY; The guaranteed floor of burst IOPS for small file shares. + BurstFloorIOPS *int32 -// BlobServicesClientListOptions contains the optional parameters for the BlobServicesClient.NewListPager method. -type BlobServicesClientListOptions struct { - // placeholder for future optional parameters -} + // READ-ONLY; The scalar against provisioned IOPS in the file share included burst IOPS formula. + BurstIOScalar *float64 -// BlobServicesClientSetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.SetServiceProperties -// method. -type BlobServicesClientSetServicePropertiesOptions struct { - // placeholder for future optional parameters + // READ-ONLY; The time frame for bursting in seconds in the file share maximum burst credits for IOPS formula. + BurstTimeframeSeconds *int32 } // ChangeFeed - The blob service properties for change feed events. type ChangeFeed struct { // Indicates whether change feed event logging is enabled for the Blob service. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // Indicates the duration of changeFeed retention in days. Minimum value is 1 day and maximum value is 146000 days (400 years). // A null value indicates an infinite retention of the change feed. - RetentionInDays *int32 `json:"retentionInDays,omitempty"` + RetentionInDays *int32 } // CheckNameAvailabilityResult - The CheckNameAvailability operation response. type CheckNameAvailabilityResult struct { // READ-ONLY; Gets an error message explaining the Reason value in more detail. - Message *string `json:"message,omitempty" azure:"ro"` + Message *string // READ-ONLY; Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. // If false, the name has already been taken or is invalid and cannot be used. - NameAvailable *bool `json:"nameAvailable,omitempty" azure:"ro"` + NameAvailable *bool // READ-ONLY; Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable // is false. - Reason *Reason `json:"reason,omitempty" azure:"ro"` + Reason *Reason } // ContainerProperties - The properties of a container. type ContainerProperties struct { // Default the container to use specified encryption scope for all writes. - DefaultEncryptionScope *string `json:"defaultEncryptionScope,omitempty"` + DefaultEncryptionScope *string // Block override of encryption scope from the container default. - DenyEncryptionScopeOverride *bool `json:"denyEncryptionScopeOverride,omitempty"` + DenyEncryptionScopeOverride *bool // Enable NFSv3 all squash on blob container. - EnableNfsV3AllSquash *bool `json:"enableNfsV3AllSquash,omitempty"` + EnableNfsV3AllSquash *bool // Enable NFSv3 root squash on blob container. - EnableNfsV3RootSquash *bool `json:"enableNfsV3RootSquash,omitempty"` + EnableNfsV3RootSquash *bool // The object level immutability property of the container. The property is immutable and can only be set to true at the container // creation time. Existing containers must undergo a migration process. - ImmutableStorageWithVersioning *ImmutableStorageWithVersioning `json:"immutableStorageWithVersioning,omitempty"` + ImmutableStorageWithVersioning *ImmutableStorageWithVersioning // A name-value pair to associate with the container as metadata. - Metadata map[string]*string `json:"metadata,omitempty"` + Metadata map[string]*string // Specifies whether data in the container may be accessed publicly and the level of access. - PublicAccess *PublicAccess `json:"publicAccess,omitempty"` + PublicAccess *PublicAccess // READ-ONLY; Indicates whether the blob container was deleted. - Deleted *bool `json:"deleted,omitempty" azure:"ro"` + Deleted *bool // READ-ONLY; Blob container deletion time. - DeletedTime *time.Time `json:"deletedTime,omitempty" azure:"ro"` + DeletedTime *time.Time // READ-ONLY; The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this // container. The hasImmutabilityPolicy public property is set to false by SRP if // ImmutabilityPolicy has not been created for this container. - HasImmutabilityPolicy *bool `json:"hasImmutabilityPolicy,omitempty" azure:"ro"` + HasImmutabilityPolicy *bool // READ-ONLY; The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold // public property is set to false by SRP if all existing legal hold tags are cleared out. // There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. - HasLegalHold *bool `json:"hasLegalHold,omitempty" azure:"ro"` + HasLegalHold *bool // READ-ONLY; The ImmutabilityPolicy property of the container. - ImmutabilityPolicy *ImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty" azure:"ro"` + ImmutabilityPolicy *ImmutabilityPolicyProperties // READ-ONLY; Returns the date and time the container was last modified. - LastModifiedTime *time.Time `json:"lastModifiedTime,omitempty" azure:"ro"` + LastModifiedTime *time.Time // READ-ONLY; Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased. - LeaseDuration *LeaseDuration `json:"leaseDuration,omitempty" azure:"ro"` + LeaseDuration *LeaseDuration // READ-ONLY; Lease state of the container. - LeaseState *LeaseState `json:"leaseState,omitempty" azure:"ro"` + LeaseState *LeaseState // READ-ONLY; The lease status of the container. - LeaseStatus *LeaseStatus `json:"leaseStatus,omitempty" azure:"ro"` + LeaseStatus *LeaseStatus // READ-ONLY; The LegalHold property of the container. - LegalHold *LegalHoldProperties `json:"legalHold,omitempty" azure:"ro"` + LegalHold *LegalHoldProperties // READ-ONLY; Remaining retention days for soft deleted blob container. - RemainingRetentionDays *int32 `json:"remainingRetentionDays,omitempty" azure:"ro"` + RemainingRetentionDays *int32 // READ-ONLY; The version of the deleted blob container. - Version *string `json:"version,omitempty" azure:"ro"` + Version *string } // CorsRule - Specifies a CORS rule for the Blob service. type CorsRule struct { // REQUIRED; Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request. - AllowedHeaders []*string `json:"allowedHeaders,omitempty"` + AllowedHeaders []*string // REQUIRED; Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin. - AllowedMethods []*CorsRuleAllowedMethodsItem `json:"allowedMethods,omitempty"` + AllowedMethods []*CorsRuleAllowedMethodsItem // REQUIRED; Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow // all domains - AllowedOrigins []*string `json:"allowedOrigins,omitempty"` + AllowedOrigins []*string // REQUIRED; Required if CorsRule element is present. A list of response headers to expose to CORS clients. - ExposedHeaders []*string `json:"exposedHeaders,omitempty"` + ExposedHeaders []*string // REQUIRED; Required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight // response. - MaxAgeInSeconds *int32 `json:"maxAgeInSeconds,omitempty"` + MaxAgeInSeconds *int32 } // CorsRules - Sets the CORS rules. You can include up to five CorsRule elements in the request. type CorsRules struct { // The List of CORS rules. You can include up to five CorsRule elements in the request. - CorsRules []*CorsRule `json:"corsRules,omitempty"` + CorsRules []*CorsRule } // CustomDomain - The custom domain assigned to this storage account. This can be set via Update. type CustomDomain struct { // REQUIRED; Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. - Name *string `json:"name,omitempty"` + Name *string // Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates. - UseSubDomainName *bool `json:"useSubDomainName,omitempty"` + UseSubDomainName *bool } // DateAfterCreation - Object to define snapshot and version action conditions. type DateAfterCreation struct { // REQUIRED; Value indicating the age in days after creation - DaysAfterCreationGreaterThan *float32 `json:"daysAfterCreationGreaterThan,omitempty"` + DaysAfterCreationGreaterThan *float32 // Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions // and requires daysAfterCreationGreaterThan to be set for snapshots and blob // version based actions. The blob will be archived if both the conditions are satisfied. - DaysAfterLastTierChangeGreaterThan *float32 `json:"daysAfterLastTierChangeGreaterThan,omitempty"` + DaysAfterLastTierChangeGreaterThan *float32 } // DateAfterModification - Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, @@ -1208,19 +1097,19 @@ type DateAfterCreation struct { // daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan. type DateAfterModification struct { // Value indicating the age in days after blob creation. - DaysAfterCreationGreaterThan *float32 `json:"daysAfterCreationGreaterThan,omitempty"` + DaysAfterCreationGreaterThan *float32 // Value indicating the age in days after last blob access. This property can only be used in conjunction with last access // time tracking policy - DaysAfterLastAccessTimeGreaterThan *float32 `json:"daysAfterLastAccessTimeGreaterThan,omitempty"` + DaysAfterLastAccessTimeGreaterThan *float32 // Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions // and requires daysAfterModificationGreaterThan to be set for baseBlobs // based actions. The blob will be archived if both the conditions are satisfied. - DaysAfterLastTierChangeGreaterThan *float32 `json:"daysAfterLastTierChangeGreaterThan,omitempty"` + DaysAfterLastTierChangeGreaterThan *float32 // Value indicating the age in days after last modification - DaysAfterModificationGreaterThan *float32 `json:"daysAfterModificationGreaterThan,omitempty"` + DaysAfterModificationGreaterThan *float32 } // DeleteRetentionPolicy - The service properties for soft delete. @@ -1228,129 +1117,119 @@ type DeleteRetentionPolicy struct { // This property when set to true allows deletion of the soft deleted blob versions and snapshots. This property cannot be // used blob restore policy. This property only applies to blob service and does // not apply to containers or file share. - AllowPermanentDelete *bool `json:"allowPermanentDelete,omitempty"` + AllowPermanentDelete *bool // Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum // value can be 365. - Days *int32 `json:"days,omitempty"` + Days *int32 // Indicates whether DeleteRetentionPolicy is enabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool } // DeletedAccount - Deleted storage account type DeletedAccount struct { // Properties of the deleted account. - Properties *DeletedAccountProperties `json:"properties,omitempty"` + Properties *DeletedAccountProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // DeletedAccountListResult - The response from the List Deleted Accounts operation. type DeletedAccountListResult struct { // READ-ONLY; Request URL that can be used to query next page of deleted accounts. Returned when total number of requested // deleted accounts exceed maximum page size. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string // READ-ONLY; Gets the list of deleted accounts and their properties. - Value []*DeletedAccount `json:"value,omitempty" azure:"ro"` + Value []*DeletedAccount } // DeletedAccountProperties - Attributes of a deleted storage account. type DeletedAccountProperties struct { // READ-ONLY; Creation time of the deleted account. - CreationTime *string `json:"creationTime,omitempty" azure:"ro"` + CreationTime *string // READ-ONLY; Deletion time of the deleted account. - DeletionTime *string `json:"deletionTime,omitempty" azure:"ro"` + DeletionTime *string // READ-ONLY; Location of the deleted account. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Can be used to attempt recovering this deleted account via PutStorageAccount API. - RestoreReference *string `json:"restoreReference,omitempty" azure:"ro"` + RestoreReference *string // READ-ONLY; Full resource id of the original storage account. - StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty" azure:"ro"` -} - -// DeletedAccountsClientGetOptions contains the optional parameters for the DeletedAccountsClient.Get method. -type DeletedAccountsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DeletedAccountsClientListOptions contains the optional parameters for the DeletedAccountsClient.NewListPager method. -type DeletedAccountsClientListOptions struct { - // placeholder for future optional parameters + StorageAccountResourceID *string } // DeletedShare - The deleted share to be restored. type DeletedShare struct { // REQUIRED; Required. Identify the name of the deleted share that will be restored. - DeletedShareName *string `json:"deletedShareName,omitempty"` + DeletedShareName *string // REQUIRED; Required. Identify the version of the deleted share that will be restored. - DeletedShareVersion *string `json:"deletedShareVersion,omitempty"` + DeletedShareVersion *string } // Dimension of blobs, possibly be blob type or access tier. type Dimension struct { // Display name of dimension. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Display name of dimension. - Name *string `json:"name,omitempty"` + Name *string } // Encryption - The encryption settings on the storage account. type Encryption struct { // The identity to be used with service-side encryption at rest. - EncryptionIdentity *EncryptionIdentity `json:"identity,omitempty"` + EncryptionIdentity *EncryptionIdentity // The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault - KeySource *KeySource `json:"keySource,omitempty"` + KeySource *KeySource // Properties provided by key vault. - KeyVaultProperties *KeyVaultProperties `json:"keyvaultproperties,omitempty"` + KeyVaultProperties *KeyVaultProperties // A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for // data at rest. - RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` + RequireInfrastructureEncryption *bool // List of services which support encryption. - Services *EncryptionServices `json:"services,omitempty"` + Services *EncryptionServices } // EncryptionIdentity - Encryption identity for the storage account. type EncryptionIdentity struct { // ClientId of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys // server-side encryption on the storage account. - EncryptionFederatedIdentityClientID *string `json:"federatedIdentityClientId,omitempty"` + EncryptionFederatedIdentityClientID *string // Resource identifier of the UserAssigned identity to be associated with server-side encryption on the storage account. - EncryptionUserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` + EncryptionUserAssignedIdentity *string } // EncryptionScope - The Encryption Scope resource. type EncryptionScope struct { // Properties of the encryption scope. - EncryptionScopeProperties *EncryptionScopeProperties `json:"properties,omitempty"` + EncryptionScopeProperties *EncryptionScopeProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // EncryptionScopeKeyVaultProperties - The key vault properties for the encryption scope. This is a required field if encryption @@ -1358,13 +1237,13 @@ type EncryptionScope struct { type EncryptionScopeKeyVaultProperties struct { // The object identifier for a key vault key object. When applied, the encryption scope will use the key referenced by the // identifier to enable customer-managed key support on this encryption scope. - KeyURI *string `json:"keyUri,omitempty"` + KeyURI *string // READ-ONLY; The object identifier of the current versioned Key Vault Key in use. - CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty" azure:"ro"` + CurrentVersionedKeyIdentifier *string // READ-ONLY; Timestamp of last rotation of the Key Vault Key. - LastKeyRotationTimestamp *time.Time `json:"lastKeyRotationTimestamp,omitempty" azure:"ro"` + LastKeyRotationTimestamp *time.Time } // EncryptionScopeListResult - List of encryption scopes requested, and if paging is required, a URL to the next page of encryption @@ -1372,162 +1251,200 @@ type EncryptionScopeKeyVaultProperties struct { type EncryptionScopeListResult struct { // READ-ONLY; Request URL that can be used to query next page of encryption scopes. Returned when total number of requested // encryption scopes exceeds the maximum page size. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string // READ-ONLY; List of encryption scopes requested. - Value []*EncryptionScope `json:"value,omitempty" azure:"ro"` + Value []*EncryptionScope } // EncryptionScopeProperties - Properties of the encryption scope. type EncryptionScopeProperties struct { // The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set // to 'Microsoft.KeyVault'. - KeyVaultProperties *EncryptionScopeKeyVaultProperties `json:"keyVaultProperties,omitempty"` + KeyVaultProperties *EncryptionScopeKeyVaultProperties // A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for // data at rest. - RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` + RequireInfrastructureEncryption *bool // The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. - Source *EncryptionScopeSource `json:"source,omitempty"` + Source *EncryptionScopeSource // The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. - State *EncryptionScopeState `json:"state,omitempty"` + State *EncryptionScopeState // READ-ONLY; Gets the creation date and time of the encryption scope in UTC. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; Gets the last modification date and time of the encryption scope in UTC. - LastModifiedTime *time.Time `json:"lastModifiedTime,omitempty" azure:"ro"` -} - -// 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 { - // Optional. When specified, only encryption scope names starting with the filter will be listed. - Filter *string - // Optional, when specified, will list encryption scopes with the specific state. Defaults to All - Include *ListEncryptionScopesInclude - // Optional, specifies the maximum number of encryption scopes that will be included in the list response. - Maxpagesize *int32 -} - -// EncryptionScopesClientPatchOptions contains the optional parameters for the EncryptionScopesClient.Patch method. -type EncryptionScopesClientPatchOptions struct { - // placeholder for future optional parameters -} - -// EncryptionScopesClientPutOptions contains the optional parameters for the EncryptionScopesClient.Put method. -type EncryptionScopesClientPutOptions struct { - // placeholder for future optional parameters + LastModifiedTime *time.Time } // EncryptionService - A service that allows server-side encryption to be used. type EncryptionService struct { // A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is enabled by default // today and cannot be disabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption // key will be used. 'Service' key type implies that a default service key is used. - KeyType *KeyType `json:"keyType,omitempty"` + KeyType *KeyType // READ-ONLY; Gets a rough estimate of the date/time when the encryption was last enabled by the user. Data is encrypted at // rest by default today and cannot be disabled. - LastEnabledTime *time.Time `json:"lastEnabledTime,omitempty" azure:"ro"` + LastEnabledTime *time.Time } // EncryptionServices - A list of services that support encryption. type EncryptionServices struct { // The encryption function of the blob storage service. - Blob *EncryptionService `json:"blob,omitempty"` + Blob *EncryptionService // The encryption function of the file storage service. - File *EncryptionService `json:"file,omitempty"` + File *EncryptionService // The encryption function of the queue storage service. - Queue *EncryptionService `json:"queue,omitempty"` + Queue *EncryptionService // The encryption function of the table storage service. - Table *EncryptionService `json:"table,omitempty"` + Table *EncryptionService } // Endpoints - The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object. type Endpoints struct { // Gets the internet routing storage endpoints - InternetEndpoints *AccountInternetEndpoints `json:"internetEndpoints,omitempty"` + InternetEndpoints *AccountInternetEndpoints // Gets the microsoft routing storage endpoints. - MicrosoftEndpoints *AccountMicrosoftEndpoints `json:"microsoftEndpoints,omitempty"` + MicrosoftEndpoints *AccountMicrosoftEndpoints // READ-ONLY; Gets the blob endpoint. - Blob *string `json:"blob,omitempty" azure:"ro"` + Blob *string // READ-ONLY; Gets the dfs endpoint. - Dfs *string `json:"dfs,omitempty" azure:"ro"` + Dfs *string // READ-ONLY; Gets the file endpoint. - File *string `json:"file,omitempty" azure:"ro"` + File *string // READ-ONLY; Gets the queue endpoint. - Queue *string `json:"queue,omitempty" azure:"ro"` + Queue *string // READ-ONLY; Gets the table endpoint. - Table *string `json:"table,omitempty" azure:"ro"` + Table *string // READ-ONLY; Gets the web endpoint. - Web *string `json:"web,omitempty" azure:"ro"` + Web *string +} + +// 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 - An error response from the storage resource provider. type ErrorResponse struct { // Azure Storage Resource Provider error response body. - Error *ErrorResponseBody `json:"error,omitempty"` + Error *ErrorResponseBody +} + +// ErrorResponseAutoGenerated - 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 ErrorResponseAutoGenerated struct { + // The error object. + Error *ErrorDetail } // ErrorResponseBody - Error response body contract. type ErrorResponseBody struct { // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` + Code *string // A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` + Message *string +} + +// ExecutionTarget - Target helps provide filter parameters for the objects in the storage account and forms the execution +// context for the storage task +type ExecutionTarget struct { + // List of object prefixes to be excluded from task execution. If there is a conflict between include and exclude prefixes, + // the exclude prefix will be the determining factor + ExcludePrefix []*string + + // Required list of object prefixes to be included for task execution + Prefix []*string +} + +// ExecutionTrigger - Execution trigger for storage task assignment +type ExecutionTrigger struct { + // REQUIRED; The trigger parameters of the storage task assignment execution + Parameters *TriggerParameters + + // REQUIRED; The trigger type of the storage task assignment execution + Type *TriggerType +} + +// ExecutionTriggerUpdate - Execution trigger update for storage task assignment +type ExecutionTriggerUpdate struct { + // The trigger parameters of the storage task assignment execution + Parameters *TriggerParametersUpdate + + // The trigger type of the storage task assignment execution + Type *TriggerType } // ExtendedLocation - The complex type of the extended location. type ExtendedLocation struct { // The name of the extended location. - Name *string `json:"name,omitempty"` + Name *string // The type of the extended location. - Type *ExtendedLocationTypes `json:"type,omitempty"` + Type *ExtendedLocationTypes } type FileServiceItems struct { // READ-ONLY; List of file services returned. - Value []*FileServiceProperties `json:"value,omitempty" azure:"ro"` + Value []*FileServiceProperties } // FileServiceProperties - The properties of File services in storage account. type FileServiceProperties struct { // The properties of File services in storage account. - FileServiceProperties *FileServicePropertiesProperties `json:"properties,omitempty"` + FileServiceProperties *FileServicePropertiesProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Sku name and tier. - SKU *SKU `json:"sku,omitempty" azure:"ro"` + SKU *SKU // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // FileServicePropertiesProperties - The properties of File services in storage account. @@ -1535,66 +1452,96 @@ type FileServicePropertiesProperties struct { // Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule // elements are included in the request body, all CORS rules will be deleted, and // CORS will be disabled for the File service. - Cors *CorsRules `json:"cors,omitempty"` + Cors *CorsRules // Protocol settings for file service - ProtocolSettings *ProtocolSettings `json:"protocolSettings,omitempty"` + ProtocolSettings *ProtocolSettings // The file service properties for share soft delete. - ShareDeleteRetentionPolicy *DeleteRetentionPolicy `json:"shareDeleteRetentionPolicy,omitempty"` + ShareDeleteRetentionPolicy *DeleteRetentionPolicy } -// FileServicesClientGetServicePropertiesOptions contains the optional parameters for the FileServicesClient.GetServiceProperties -// method. -type FileServicesClientGetServicePropertiesOptions struct { - // placeholder for future optional parameters +// FileServiceUsage - The usage of file service in storage account. +type FileServiceUsage 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; File service usage in storage account including account limits, file share limits and constants used in recommendations + // and bursting formula. + Properties *FileServiceUsageProperties + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string } -// FileServicesClientListOptions contains the optional parameters for the FileServicesClient.List method. -type FileServicesClientListOptions struct { - // placeholder for future optional parameters +// FileServiceUsageProperties - File service usage in storage account including account limits, file share limits and constants +// used in recommendations and bursting formula. +type FileServiceUsageProperties struct { + // READ-ONLY; Constants used for calculating included burst IOPS and maximum burst credits for IOPS for a file share in the + // storage account. + BurstingConstants *BurstingConstants + + // READ-ONLY; Minimum and maximum provisioned storage, IOPS and bandwidth limits for a file share in the storage account. + FileShareLimits *FileShareLimits + + // READ-ONLY; Constants used for calculating recommended provisioned IOPS and bandwidth for a file share in the storage account. + FileShareRecommendations *FileShareRecommendations + + // READ-ONLY; Maximum provisioned storage, IOPS, bandwidth and number of file shares limits for the storage account. + StorageAccountLimits *AccountLimits + + // READ-ONLY; Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares and soft-deleted + // shares in the account. + StorageAccountUsage *AccountUsage } -// FileServicesClientSetServicePropertiesOptions contains the optional parameters for the FileServicesClient.SetServiceProperties -// method. -type FileServicesClientSetServicePropertiesOptions struct { - // placeholder for future optional parameters +// FileServiceUsages - List file service usages schema. +type FileServiceUsages struct { + // READ-ONLY; Request URL that can be used to query next page of file service usages. Returned when total number of requested + // file service usages exceed maximum page size. + NextLink *string + + // READ-ONLY; List of file service usages returned. + Value []*FileServiceUsage } // FileShare - Properties of the file share, including Id, resource name, resource type, Etag. type FileShare struct { // Properties of the file share. - FileShareProperties *FileShareProperties `json:"properties,omitempty"` + FileShareProperties *FileShareProperties // READ-ONLY; Resource Etag. - Etag *string `json:"etag,omitempty" azure:"ro"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // FileShareItem - The file share properties be listed out. type FileShareItem struct { // The file share properties be listed out. - Properties *FileShareProperties `json:"properties,omitempty"` + Properties *FileShareProperties // READ-ONLY; Resource Etag. - Etag *string `json:"etag,omitempty" azure:"ro"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // FileShareItems - Response schema. Contains list of shares returned, and if paging is requested or required, a URL to next @@ -1602,201 +1549,243 @@ type FileShareItem struct { type FileShareItems struct { // READ-ONLY; Request URL that can be used to query next page of shares. Returned when total number of requested shares exceed // maximum page size. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string // READ-ONLY; List of file shares returned. - Value []*FileShareItem `json:"value,omitempty" azure:"ro"` + Value []*FileShareItem +} + +// FileShareLimits - Minimum and maximum provisioned storage, IOPS and bandwidth limits for a file share in the storage account. +type FileShareLimits struct { + // READ-ONLY; The maximum provisioned bandwidth limit in mebibytes per second for a file share in the storage account. + MaxProvisionedBandwidthMiBPerSec *int32 + + // READ-ONLY; The maximum provisioned IOPS limit for a file share in the storage account. + MaxProvisionedIOPS *int32 + + // READ-ONLY; The maximum provisioned storage quota limit in gibibytes for a file share in the storage account. + MaxProvisionedStorageGiB *int32 + + // READ-ONLY; The minimum provisioned bandwidth limit in mebibytes per second for a file share in the storage account. + MinProvisionedBandwidthMiBPerSec *int32 + + // READ-ONLY; The minimum provisioned IOPS limit for a file share in the storage account. + MinProvisionedIOPS *int32 + + // READ-ONLY; The minimum provisioned storage quota limit in gibibytes for a file share in the storage account. + MinProvisionedStorageGiB *int32 } // FileShareProperties - The properties of the file share. type FileShareProperties struct { // Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage // account can choose Premium. - AccessTier *ShareAccessTier `json:"accessTier,omitempty"` + AccessTier *ShareAccessTier // The authentication protocol that is used for the file share. Can only be specified when creating a share. - EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"` + EnabledProtocols *EnabledProtocols + + // File Share Paid Bursting properties. + FileSharePaidBursting *FileSharePropertiesFileSharePaidBursting // A name-value pair to associate with the share as metadata. - Metadata map[string]*string `json:"metadata,omitempty"` + Metadata map[string]*string + + // The provisioned bandwidth of the share, in mebibytes per second. This property is only for file shares created under Files + // Provisioned v2 account type. Please refer to the GetFileServiceUsage API + // response for the minimum and maximum allowed value for provisioned bandwidth. + ProvisionedBandwidthMibps *int32 + + // The provisioned IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. + // Please refer to the GetFileServiceUsage API response for the minimum and + // maximum allowed value for provisioned IOPS. + ProvisionedIops *int32 // The property is for NFS share only. The default is NoRootSquash. - RootSquash *RootSquashType `json:"rootSquash,omitempty"` + RootSquash *RootSquashType - // The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File - // Shares, the maximum size is 102400. - ShareQuota *int32 `json:"shareQuota,omitempty"` + // The provisioned size of the share, in gibibytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large + // File Shares, the maximum size is 102400. For file shares created under Files + // Provisioned v2 account type, please refer to the GetFileServiceUsage API response for the minimum and maximum allowed provisioned + // storage size. + ShareQuota *int32 // List of stored access policies specified on the share. - SignedIdentifiers []*SignedIdentifier `json:"signedIdentifiers,omitempty"` + SignedIdentifiers []*SignedIdentifier // READ-ONLY; Indicates the last modification time for share access tier. - AccessTierChangeTime *time.Time `json:"accessTierChangeTime,omitempty" azure:"ro"` + AccessTierChangeTime *time.Time // READ-ONLY; Indicates if there is a pending transition for access tier. - AccessTierStatus *string `json:"accessTierStatus,omitempty" azure:"ro"` + AccessTierStatus *string // READ-ONLY; Indicates whether the share was deleted. - Deleted *bool `json:"deleted,omitempty" azure:"ro"` + Deleted *bool // READ-ONLY; The deleted time if the share was deleted. - DeletedTime *time.Time `json:"deletedTime,omitempty" azure:"ro"` + DeletedTime *time.Time + + // READ-ONLY; The calculated burst IOPS of the share. This property is only for file shares created under Files Provisioned + // v2 account type. + IncludedBurstIops *int32 // READ-ONLY; Returns the date and time the share was last modified. - LastModifiedTime *time.Time `json:"lastModifiedTime,omitempty" azure:"ro"` + LastModifiedTime *time.Time // READ-ONLY; Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased. - LeaseDuration *LeaseDuration `json:"leaseDuration,omitempty" azure:"ro"` + LeaseDuration *LeaseDuration // READ-ONLY; Lease state of the share. - LeaseState *LeaseState `json:"leaseState,omitempty" azure:"ro"` + LeaseState *LeaseState // READ-ONLY; The lease status of the share. - LeaseStatus *LeaseStatus `json:"leaseStatus,omitempty" azure:"ro"` + LeaseStatus *LeaseStatus + + // READ-ONLY; The calculated maximum burst credits for the share. This property is only for file shares created under Files + // Provisioned v2 account type. + MaxBurstCreditsForIops *int64 + + // READ-ONLY; Returns the next allowed provisioned bandwidth downgrade time for the share. This property is only for file + // shares created under Files Provisioned v2 account type. + NextAllowedProvisionedBandwidthDowngradeTime *time.Time + + // READ-ONLY; Returns the next allowed provisioned IOPS downgrade time for the share. This property is only for file shares + // created under Files Provisioned v2 account type. + NextAllowedProvisionedIopsDowngradeTime *time.Time + + // READ-ONLY; Returns the next allowed provisioned storage size downgrade time for the share. This property is only for file + // shares created under Files Provisioned v1 SSD and Files Provisioned v2 account type + NextAllowedQuotaDowngradeTime *time.Time // READ-ONLY; Remaining retention days for share that was soft deleted. - RemainingRetentionDays *int32 `json:"remainingRetentionDays,omitempty" azure:"ro"` + RemainingRetentionDays *int32 // READ-ONLY; The approximate size of the data stored on the share. Note that this value may not include all recently created // or recently resized files. - ShareUsageBytes *int64 `json:"shareUsageBytes,omitempty" azure:"ro"` + ShareUsageBytes *int64 // READ-ONLY; Creation time of share snapshot returned in the response of list shares with expand param "snapshots". - SnapshotTime *time.Time `json:"snapshotTime,omitempty" azure:"ro"` + SnapshotTime *time.Time // READ-ONLY; The version of the share. - Version *string `json:"version,omitempty" azure:"ro"` + Version *string } -// FileSharesClientCreateOptions contains the optional parameters for the FileSharesClient.Create method. -type FileSharesClientCreateOptions struct { - // Optional, used to expand the properties within share's properties. Valid values are: snapshots. Should be passed as a string - // with delimiter ',' - Expand *string -} +// FileSharePropertiesFileSharePaidBursting - File Share Paid Bursting properties. +type FileSharePropertiesFileSharePaidBursting struct { + // Indicates whether paid bursting is enabled for the share. This property is only for file shares created under Files Provisioned + // v1 SSD account type. + PaidBurstingEnabled *bool -// FileSharesClientDeleteOptions contains the optional parameters for the FileSharesClient.Delete method. -type FileSharesClientDeleteOptions struct { - // Optional. Valid values are: snapshots, leased-snapshots, none. The default value is snapshots. For 'snapshots', the file - // share is deleted including all of its file share snapshots. If the file share - // contains leased-snapshots, the deletion fails. For 'leased-snapshots', the file share is deleted included all of its file - // share snapshots (leased/unleased). For 'none', the file share is deleted if it - // has no share snapshots. If the file share contains any snapshots (leased or unleased), the deletion fails. - Include *string - // Optional, used to delete a snapshot. - XMSSnapshot *string -} + // The maximum paid bursting bandwidth for the share, in mebibytes per second. This property is only for file shares created + // under Files Provisioned v1 SSD account type. The maximum allowed value is + // 10340 which is the maximum allowed bandwidth for a share. + PaidBurstingMaxBandwidthMibps *int32 -// FileSharesClientGetOptions contains the optional parameters for the FileSharesClient.Get method. -type FileSharesClientGetOptions struct { - // Optional, used to expand the properties within share's properties. Valid values are: stats. Should be passed as a string - // with delimiter ','. - Expand *string - // Optional, used to retrieve properties of a snapshot. - XMSSnapshot *string + // The maximum paid bursting IOPS for the share. This property is only for file shares created under Files Provisioned v1 + // SSD account type. The maximum allowed value is 102400 which is the maximum + // allowed IOPS for a share. + PaidBurstingMaxIops *int32 } -// FileSharesClientLeaseOptions contains the optional parameters for the FileSharesClient.Lease method. -type FileSharesClientLeaseOptions struct { - // Lease Share request body. - Parameters *LeaseShareRequest - // Optional. Specify the snapshot time to lease a snapshot. - XMSSnapshot *string -} +// FileShareRecommendations - Constants used for calculating recommended provisioned IOPS and bandwidth for a file share in +// the storage account. +type FileShareRecommendations struct { + // READ-ONLY; The scalar for bandwidth in the file share provisioned bandwidth recommendation formula. + BandwidthScalar *float64 -// FileSharesClientListOptions contains the optional parameters for the FileSharesClient.NewListPager method. -type FileSharesClientListOptions struct { - // Optional, used to expand the properties within share's properties. Valid values are: deleted, snapshots. Should be passed - // as a string with delimiter ',' - Expand *string - // Optional. When specified, only share names starting with the filter will be listed. - Filter *string - // Optional. Specified maximum number of shares that can be included in the list. - Maxpagesize *string -} + // READ-ONLY; The base bandwidth in the file share provisioned bandwidth recommendation formula. + BaseBandwidthMiBPerSec *int32 -// FileSharesClientRestoreOptions contains the optional parameters for the FileSharesClient.Restore method. -type FileSharesClientRestoreOptions struct { - // placeholder for future optional parameters -} + // READ-ONLY; The base IOPS in the file share provisioned IOPS recommendation formula. + BaseIOPS *int32 -// FileSharesClientUpdateOptions contains the optional parameters for the FileSharesClient.Update method. -type FileSharesClientUpdateOptions struct { - // placeholder for future optional parameters + // READ-ONLY; The scalar for IO in the file share provisioned IOPS recommendation formula. + IoScalar *float64 } // GeoReplicationStats - Statistics related to replication for storage account's Blob, Table, Queue and File services. It // is only available when geo-redundant replication is enabled for the storage account. type GeoReplicationStats struct { // READ-ONLY; A boolean flag which indicates whether or not account failover is supported for the account. - CanFailover *bool `json:"canFailover,omitempty" azure:"ro"` + CanFailover *bool + + // READ-ONLY; A boolean flag which indicates whether or not planned account failover is supported for the account. + CanPlannedFailover *bool // READ-ONLY; All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary // writes following this point in time may or may not be available for reads. Element may // be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap. - LastSyncTime *time.Time `json:"lastSyncTime,omitempty" azure:"ro"` + LastSyncTime *time.Time + + // READ-ONLY; The redundancy type of the account after an account failover is performed. + PostFailoverRedundancy *PostFailoverRedundancy + + // READ-ONLY; The redundancy type of the account after a planned account failover is performed. + PostPlannedFailoverRedundancy *PostPlannedFailoverRedundancy // READ-ONLY; The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is // active and operational. - Bootstrap: Indicates initial synchronization from the primary // location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: // Indicates that the secondary location is temporarily unavailable. - Status *GeoReplicationStatus `json:"status,omitempty" azure:"ro"` + Status *GeoReplicationStatus } // IPRule - IP rule with specific IP or IP range in CIDR format. type IPRule struct { - // REQUIRED; Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. - IPAddressOrRange *string `json:"value,omitempty"` + // CONSTANT; The action of IP ACL rule. + // Field has constant value "Allow", any specified value is ignored. + Action *string - // The action of IP ACL rule. - Action *string `json:"action,omitempty"` + // REQUIRED; Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + IPAddressOrRange *string } // Identity for the resource. type Identity struct { // REQUIRED; The identity type. - Type *IdentityType `json:"type,omitempty"` + Type *IdentityType // Gets or sets a list of key value pairs that describe the set of User Assigned identities that will be used with this storage // account. The key is the ARM resource identifier of the identity. Only 1 // User Assigned identity is permitted here. - UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` + UserAssignedIdentities map[string]*UserAssignedIdentity // READ-ONLY; The principal ID of resource identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` + PrincipalID *string // READ-ONLY; The tenant ID of resource. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` + TenantID *string } // ImmutabilityPolicy - The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. type ImmutabilityPolicy struct { // REQUIRED; The properties of an ImmutabilityPolicy of a blob container. - Properties *ImmutabilityPolicyProperty `json:"properties,omitempty"` + Properties *ImmutabilityPolicyProperty // READ-ONLY; Resource Etag. - Etag *string `json:"etag,omitempty" azure:"ro"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ImmutabilityPolicyProperties - The properties of an ImmutabilityPolicy of a blob container. type ImmutabilityPolicyProperties struct { // The properties of an ImmutabilityPolicy of a blob container. - Properties *ImmutabilityPolicyProperty `json:"properties,omitempty"` + Properties *ImmutabilityPolicyProperty // READ-ONLY; ImmutabilityPolicy Etag. - Etag *string `json:"etag,omitempty" azure:"ro"` + Etag *string // READ-ONLY; The ImmutabilityPolicy update history of the blob container. - UpdateHistory []*UpdateHistoryProperty `json:"updateHistory,omitempty" azure:"ro"` + UpdateHistory []*UpdateHistoryProperty } // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container. @@ -1805,20 +1794,20 @@ type ImmutabilityPolicyProperty struct { // an append blob while maintaining immutability protection and compliance. Only // new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy // API. - AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + AllowProtectedAppendWrites *bool // This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to // both 'Append and Bock Blobs' while maintaining immutability protection and // compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be // changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and // 'allowProtectedAppendWritesAll' properties are mutually exclusive. - AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + AllowProtectedAppendWritesAll *bool // The immutability period for the blobs in the container since the policy creation, in days. - ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + ImmutabilityPeriodSinceCreationInDays *int32 // READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. - State *ImmutabilityPolicyState `json:"state,omitempty" azure:"ro"` + State *ImmutabilityPolicyState } // ImmutableStorageAccount - This property enables and defines account-level immutability. Enabling the feature auto-enables @@ -1826,193 +1815,193 @@ type ImmutabilityPolicyProperty struct { type ImmutableStorageAccount struct { // A boolean flag which enables account-level immutability. All the containers under such an account have object-level immutability // enabled by default. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an // explicit immutability policy at the object level. The object-level immutability // policy has higher precedence than the container-level immutability policy, which has a higher precedence than the account-level // immutability policy. - ImmutabilityPolicy *AccountImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"` + ImmutabilityPolicy *AccountImmutabilityPolicyProperties } // ImmutableStorageWithVersioning - Object level immutability properties of the container. type ImmutableStorageWithVersioning struct { // This is an immutable property, when set to true it enables object level immutability at the container level. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // READ-ONLY; This property denotes the container level immutability to object level immutability migration state. - MigrationState *MigrationState `json:"migrationState,omitempty" azure:"ro"` + MigrationState *MigrationState // READ-ONLY; Returns the date and time the object level immutability was enabled. - TimeStamp *time.Time `json:"timeStamp,omitempty" azure:"ro"` + TimeStamp *time.Time } // KeyCreationTime - Storage account keys creation time. type KeyCreationTime struct { - Key1 *time.Time `json:"key1,omitempty"` - Key2 *time.Time `json:"key2,omitempty"` + Key1 *time.Time + Key2 *time.Time } // KeyPolicy assigned to the storage account. type KeyPolicy struct { // REQUIRED; The key expiration period in days. - KeyExpirationPeriodInDays *int32 `json:"keyExpirationPeriodInDays,omitempty"` + KeyExpirationPeriodInDays *int32 } // KeyVaultProperties - Properties of key vault. type KeyVaultProperties struct { // The name of KeyVault key. - KeyName *string `json:"keyname,omitempty"` + KeyName *string // The Uri of KeyVault. - KeyVaultURI *string `json:"keyvaulturi,omitempty"` + KeyVaultURI *string // The version of KeyVault key. - KeyVersion *string `json:"keyversion,omitempty"` + KeyVersion *string // READ-ONLY; This is a read only property that represents the expiration time of the current version of the customer managed // key used for encryption. - CurrentVersionedKeyExpirationTimestamp *time.Time `json:"currentVersionedKeyExpirationTimestamp,omitempty" azure:"ro"` + CurrentVersionedKeyExpirationTimestamp *time.Time // READ-ONLY; The object identifier of the current versioned Key Vault Key in use. - CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty" azure:"ro"` + CurrentVersionedKeyIdentifier *string // READ-ONLY; Timestamp of last rotation of the Key Vault Key. - LastKeyRotationTimestamp *time.Time `json:"lastKeyRotationTimestamp,omitempty" azure:"ro"` + LastKeyRotationTimestamp *time.Time } // LastAccessTimeTrackingPolicy - The blob service properties for Last access time based tracking policy. type LastAccessTimeTrackingPolicy struct { // REQUIRED; When set to true last access time based tracking is enabled. - Enable *bool `json:"enable,omitempty"` + Enable *bool // An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently read only - BlobType []*string `json:"blobType,omitempty"` + BlobType []*string // Name of the policy. The valid value is AccessTimeTracking. This field is currently read only - Name *Name `json:"name,omitempty"` + Name *Name // The field specifies blob object tracking granularity in days, typically how often the blob object should be tracked.This // field is currently read only with value as 1 - TrackingGranularityInDays *int32 `json:"trackingGranularityInDays,omitempty"` + TrackingGranularityInDays *int32 } // LeaseContainerRequest - Lease Container request schema. type LeaseContainerRequest struct { // REQUIRED; Specifies the lease action. Can be one of the available actions. - Action *LeaseContainerRequestAction `json:"action,omitempty"` + Action *LeaseContainerRequestAction // Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and // 60. - BreakPeriod *int32 `json:"breakPeriod,omitempty"` + BreakPeriod *int32 // Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. - LeaseDuration *int32 `json:"leaseDuration,omitempty"` + LeaseDuration *int32 // Identifies the lease. Can be specified in any valid GUID string format. - LeaseID *string `json:"leaseId,omitempty"` + LeaseID *string // Optional for acquire, required for change. Proposed lease ID, in a GUID string format. - ProposedLeaseID *string `json:"proposedLeaseId,omitempty"` + ProposedLeaseID *string } // LeaseContainerResponse - Lease Container response schema. type LeaseContainerResponse struct { // Returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release // the lease. - LeaseID *string `json:"leaseId,omitempty"` + LeaseID *string // Approximate time remaining in the lease period, in seconds. - LeaseTimeSeconds *string `json:"leaseTimeSeconds,omitempty"` + LeaseTimeSeconds *string } // LeaseShareRequest - Lease Share request schema. type LeaseShareRequest struct { // REQUIRED; Specifies the lease action. Can be one of the available actions. - Action *LeaseShareAction `json:"action,omitempty"` + Action *LeaseShareAction // Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and // 60. - BreakPeriod *int32 `json:"breakPeriod,omitempty"` + BreakPeriod *int32 // Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. - LeaseDuration *int32 `json:"leaseDuration,omitempty"` + LeaseDuration *int32 // Identifies the lease. Can be specified in any valid GUID string format. - LeaseID *string `json:"leaseId,omitempty"` + LeaseID *string // Optional for acquire, required for change. Proposed lease ID, in a GUID string format. - ProposedLeaseID *string `json:"proposedLeaseId,omitempty"` + ProposedLeaseID *string } // LeaseShareResponse - Lease Share response schema. type LeaseShareResponse struct { // Returned unique lease ID that must be included with any request to delete the share, or to renew, change, or release the // lease. - LeaseID *string `json:"leaseId,omitempty"` + LeaseID *string // Approximate time remaining in the lease period, in seconds. - LeaseTimeSeconds *string `json:"leaseTimeSeconds,omitempty"` + LeaseTimeSeconds *string } // LegalHold - The LegalHold property of a blob container. type LegalHold struct { // REQUIRED; Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. - Tags []*string `json:"tags,omitempty"` + Tags []*string // When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. // Only new blocks can be added and any existing blocks cannot be modified // or deleted. - AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + AllowProtectedAppendWritesAll *bool // READ-ONLY; The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold // public property is set to false by SRP if all existing legal hold tags are cleared out. // There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. - HasLegalHold *bool `json:"hasLegalHold,omitempty" azure:"ro"` + HasLegalHold *bool } // LegalHoldProperties - The LegalHold property of a blob container. type LegalHoldProperties struct { // Protected append blob writes history. - ProtectedAppendWritesHistory *ProtectedAppendWritesHistory `json:"protectedAppendWritesHistory,omitempty"` + ProtectedAppendWritesHistory *ProtectedAppendWritesHistory // The list of LegalHold tags of a blob container. - Tags []*TagProperty `json:"tags,omitempty"` + Tags []*TagProperty // READ-ONLY; The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold // public property is set to false by SRP if all existing legal hold tags are cleared out. // There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. - HasLegalHold *bool `json:"hasLegalHold,omitempty" azure:"ro"` + HasLegalHold *bool } // ListAccountSasResponse - The List SAS credentials operation response. type ListAccountSasResponse struct { // READ-ONLY; List SAS credentials of storage account. - AccountSasToken *string `json:"accountSasToken,omitempty" azure:"ro"` + AccountSasToken *string } // ListBlobInventoryPolicy - List of blob inventory policies returned. type ListBlobInventoryPolicy struct { // READ-ONLY; List of blob inventory policies. - Value []*BlobInventoryPolicy `json:"value,omitempty" azure:"ro"` + Value []*BlobInventoryPolicy } // ListContainerItem - The blob container properties be listed out. type ListContainerItem struct { // The blob container properties be listed out. - Properties *ContainerProperties `json:"properties,omitempty"` + Properties *ContainerProperties // READ-ONLY; Resource Etag. - Etag *string `json:"etag,omitempty" azure:"ro"` + Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ListContainerItems - Response schema. Contains list of blobs returned, and if paging is requested or required, a URL to @@ -2020,232 +2009,204 @@ type ListContainerItem struct { type ListContainerItems struct { // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers // exceed maximum page size. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string // READ-ONLY; List of blobs containers returned. - Value []*ListContainerItem `json:"value,omitempty" azure:"ro"` + Value []*ListContainerItem } type ListQueue struct { // List Queue resource properties. - QueueProperties *ListQueueProperties `json:"properties,omitempty"` + QueueProperties *ListQueueProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } type ListQueueProperties struct { // A name-value pair that represents queue metadata. - Metadata map[string]*string `json:"metadata,omitempty"` + Metadata map[string]*string } // ListQueueResource - Response schema. Contains list of queues returned type ListQueueResource struct { // READ-ONLY; Request URL that can be used to list next page of queues - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string // READ-ONLY; List of queues returned. - Value []*ListQueue `json:"value,omitempty" azure:"ro"` + Value []*ListQueue } type ListQueueServices struct { // READ-ONLY; List of queue services returned. - Value []*QueueServiceProperties `json:"value,omitempty" azure:"ro"` + Value []*QueueServiceProperties } // ListServiceSasResponse - The List service SAS credentials operation response. type ListServiceSasResponse struct { // READ-ONLY; List service SAS credentials of specific resource. - ServiceSasToken *string `json:"serviceSasToken,omitempty" azure:"ro"` + ServiceSasToken *string } // ListTableResource - Response schema. Contains list of tables returned type ListTableResource struct { // READ-ONLY; Request URL that can be used to query next page of tables - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string // READ-ONLY; List of tables returned. - Value []*Table `json:"value,omitempty" azure:"ro"` + Value []*Table } type ListTableServices struct { // READ-ONLY; List of table services returned. - Value []*TableServiceProperties `json:"value,omitempty" azure:"ro"` + Value []*TableServiceProperties } // LocalUser - The local user associated with the storage accounts. type LocalUser struct { // Storage account local user properties. - Properties *LocalUserProperties `json:"properties,omitempty"` + Properties *LocalUserProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // LocalUserKeys - The Storage Account Local User keys. type LocalUserKeys struct { // Optional, local user ssh authorized keys for SFTP. - SSHAuthorizedKeys []*SSHPublicKey `json:"sshAuthorizedKeys,omitempty"` + SSHAuthorizedKeys []*SSHPublicKey // READ-ONLY; Auto generated by the server for SMB authentication. - SharedKey *string `json:"sharedKey,omitempty" azure:"ro"` + SharedKey *string } // LocalUserProperties - The Storage Account Local User properties. type LocalUserProperties struct { + // Indicates whether ACL authorization is allowed for this user. Set it to false to disallow using ACL authorization. + AllowACLAuthorization *bool + + // Supplementary group membership. Only applicable for local users enabled for NFSv3 access. + ExtendedGroups []*int32 + + // An identifier for associating a group of users. + GroupID *int32 + // Indicates whether ssh key exists. Set it to false to remove existing SSH key. - HasSSHKey *bool `json:"hasSshKey,omitempty"` + HasSSHKey *bool // Indicates whether ssh password exists. Set it to false to remove existing SSH password. - HasSSHPassword *bool `json:"hasSshPassword,omitempty"` + HasSSHPassword *bool // Indicates whether shared key exists. Set it to false to remove existing shared key. - HasSharedKey *bool `json:"hasSharedKey,omitempty"` + HasSharedKey *bool // Optional, local user home directory. - HomeDirectory *string `json:"homeDirectory,omitempty"` + HomeDirectory *string + + // Indicates if the local user is enabled for access with NFSv3 protocol. + IsNFSv3Enabled *bool // The permission scopes of the local user. - PermissionScopes []*PermissionScope `json:"permissionScopes,omitempty"` + PermissionScopes []*PermissionScope // Optional, local user ssh authorized keys for SFTP. - SSHAuthorizedKeys []*SSHPublicKey `json:"sshAuthorizedKeys,omitempty"` + SSHAuthorizedKeys []*SSHPublicKey // READ-ONLY; A unique Security Identifier that is generated by the server. - Sid *string `json:"sid,omitempty" azure:"ro"` + Sid *string + + // READ-ONLY; A unique Identifier that is generated by the server. + UserID *int32 } // LocalUserRegeneratePasswordResult - The secrets of Storage Account Local User. type LocalUserRegeneratePasswordResult struct { // READ-ONLY; Auto generated password by the server for SSH authentication if hasSshPassword is set to true on the creation // of local user. - SSHPassword *string `json:"sshPassword,omitempty" azure:"ro"` + SSHPassword *string } -// LocalUsers - List storage account local users. +// LocalUsers - List of local users requested, and if paging is required, a URL to the next page of local users. type LocalUsers struct { - // The local users associated with the storage account. - Value []*LocalUser `json:"value,omitempty"` -} + // The list of local users associated with the storage account. + Value []*LocalUser -// LocalUsersClientCreateOrUpdateOptions contains the optional parameters for the LocalUsersClient.CreateOrUpdate method. -type LocalUsersClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// LocalUsersClientDeleteOptions contains the optional parameters for the LocalUsersClient.Delete method. -type LocalUsersClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// LocalUsersClientGetOptions contains the optional parameters for the LocalUsersClient.Get method. -type LocalUsersClientGetOptions struct { - // placeholder for future optional parameters -} - -// LocalUsersClientListKeysOptions contains the optional parameters for the LocalUsersClient.ListKeys method. -type LocalUsersClientListKeysOptions struct { - // placeholder for future optional parameters -} - -// LocalUsersClientListOptions contains the optional parameters for the LocalUsersClient.NewListPager method. -type LocalUsersClientListOptions struct { - // placeholder for future optional parameters -} - -// LocalUsersClientRegeneratePasswordOptions contains the optional parameters for the LocalUsersClient.RegeneratePassword -// method. -type LocalUsersClientRegeneratePasswordOptions struct { - // placeholder for future optional parameters -} - -// ManagementPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ManagementPoliciesClient.CreateOrUpdate -// method. -type ManagementPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ManagementPoliciesClientDeleteOptions contains the optional parameters for the ManagementPoliciesClient.Delete method. -type ManagementPoliciesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ManagementPoliciesClientGetOptions contains the optional parameters for the ManagementPoliciesClient.Get method. -type ManagementPoliciesClientGetOptions struct { - // placeholder for future optional parameters + // READ-ONLY; Request URL that can be used to query next page of local users. Returned when total number of requested local + // users exceeds the maximum page size. + NextLink *string } // ManagementPolicy - The Get Storage Account ManagementPolicies operation response. type ManagementPolicy struct { // Returns the Storage Account Data Policies Rules. - Properties *ManagementPolicyProperties `json:"properties,omitempty"` + Properties *ManagementPolicyProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ManagementPolicyAction - Actions are applied to the filtered blobs when the execution condition is met. type ManagementPolicyAction struct { // The management policy action for base blob - BaseBlob *ManagementPolicyBaseBlob `json:"baseBlob,omitempty"` + BaseBlob *ManagementPolicyBaseBlob // The management policy action for snapshot - Snapshot *ManagementPolicySnapShot `json:"snapshot,omitempty"` + Snapshot *ManagementPolicySnapShot // The management policy action for version - Version *ManagementPolicyVersion `json:"version,omitempty"` + Version *ManagementPolicyVersion } // ManagementPolicyBaseBlob - Management policy action for base blob. type ManagementPolicyBaseBlob struct { // The function to delete the blob - Delete *DateAfterModification `json:"delete,omitempty"` + Delete *DateAfterModification // This property enables auto tiering of a blob from cool to hot on a blob access. This property requires tierToCool.daysAfterLastAccessTimeGreaterThan. - EnableAutoTierToHotFromCool *bool `json:"enableAutoTierToHotFromCool,omitempty"` + EnableAutoTierToHotFromCool *bool // The function to tier blobs to archive storage. - TierToArchive *DateAfterModification `json:"tierToArchive,omitempty"` + TierToArchive *DateAfterModification // The function to tier blobs to cold storage. - TierToCold *DateAfterModification `json:"tierToCold,omitempty"` + TierToCold *DateAfterModification // The function to tier blobs to cool storage. - TierToCool *DateAfterModification `json:"tierToCool,omitempty"` + TierToCool *DateAfterModification // The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts - TierToHot *DateAfterModification `json:"tierToHot,omitempty"` + TierToHot *DateAfterModification } // ManagementPolicyDefinition - An object that defines the Lifecycle rule. Each definition is made up with a filters set and // an actions set. type ManagementPolicyDefinition struct { // REQUIRED; An object that defines the action set. - Actions *ManagementPolicyAction `json:"actions,omitempty"` + Actions *ManagementPolicyAction // An object that defines the filter set. - Filters *ManagementPolicyFilter `json:"filters,omitempty"` + Filters *ManagementPolicyFilter } // ManagementPolicyFilter - Filters limit rule actions to a subset of blobs within the storage account. If multiple filters @@ -2253,181 +2214,274 @@ type ManagementPolicyDefinition struct { type ManagementPolicyFilter struct { // REQUIRED; An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete // actions are supported for appendBlob. - BlobTypes []*string `json:"blobTypes,omitempty"` + BlobTypes []*string // An array of blob index tag based filters, there can be at most 10 tag filters - BlobIndexMatch []*TagFilter `json:"blobIndexMatch,omitempty"` + BlobIndexMatch []*TagFilter // An array of strings for prefixes to be match. - PrefixMatch []*string `json:"prefixMatch,omitempty"` + PrefixMatch []*string } // ManagementPolicyProperties - The Storage Account ManagementPolicy properties. type ManagementPolicyProperties struct { // REQUIRED; The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. - Policy *ManagementPolicySchema `json:"policy,omitempty"` + Policy *ManagementPolicySchema // READ-ONLY; Returns the date and time the ManagementPolicies was last modified. - LastModifiedTime *time.Time `json:"lastModifiedTime,omitempty" azure:"ro"` + LastModifiedTime *time.Time } // ManagementPolicyRule - An object that wraps the Lifecycle rule. Each rule is uniquely defined by name. type ManagementPolicyRule struct { // REQUIRED; An object that defines the Lifecycle rule. - Definition *ManagementPolicyDefinition `json:"definition,omitempty"` + Definition *ManagementPolicyDefinition // REQUIRED; A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be // unique within a policy. - Name *string `json:"name,omitempty"` + Name *string // REQUIRED; The valid value is Lifecycle - Type *RuleType `json:"type,omitempty"` + Type *RuleType // Rule is enabled if set to true. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool } // ManagementPolicySchema - The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. type ManagementPolicySchema struct { // REQUIRED; The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. - Rules []*ManagementPolicyRule `json:"rules,omitempty"` + Rules []*ManagementPolicyRule } // ManagementPolicySnapShot - Management policy action for snapshot. type ManagementPolicySnapShot struct { // The function to delete the blob snapshot - Delete *DateAfterCreation `json:"delete,omitempty"` + Delete *DateAfterCreation // The function to tier blob snapshot to archive storage. - TierToArchive *DateAfterCreation `json:"tierToArchive,omitempty"` + TierToArchive *DateAfterCreation // The function to tier blobs to cold storage. - TierToCold *DateAfterCreation `json:"tierToCold,omitempty"` + TierToCold *DateAfterCreation // The function to tier blob snapshot to cool storage. - TierToCool *DateAfterCreation `json:"tierToCool,omitempty"` + TierToCool *DateAfterCreation // The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts - TierToHot *DateAfterCreation `json:"tierToHot,omitempty"` + TierToHot *DateAfterCreation } // ManagementPolicyVersion - Management policy action for blob version. type ManagementPolicyVersion struct { // The function to delete the blob version - Delete *DateAfterCreation `json:"delete,omitempty"` + Delete *DateAfterCreation // The function to tier blob version to archive storage. - TierToArchive *DateAfterCreation `json:"tierToArchive,omitempty"` + TierToArchive *DateAfterCreation // The function to tier blobs to cold storage. - TierToCold *DateAfterCreation `json:"tierToCold,omitempty"` + TierToCold *DateAfterCreation // The function to tier blob version to cool storage. - TierToCool *DateAfterCreation `json:"tierToCool,omitempty"` + TierToCool *DateAfterCreation // The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts - TierToHot *DateAfterCreation `json:"tierToHot,omitempty"` + TierToHot *DateAfterCreation } // MetricSpecification - Metric specification of operation. type MetricSpecification struct { // Aggregation type could be Average. - AggregationType *string `json:"aggregationType,omitempty"` + AggregationType *string // The category this metric specification belong to, could be Capacity. - Category *string `json:"category,omitempty"` + Category *string // Dimensions of blobs, including blob type and access tier. - Dimensions []*Dimension `json:"dimensions,omitempty"` + Dimensions []*Dimension // Display description of metric specification. - DisplayDescription *string `json:"displayDescription,omitempty"` + DisplayDescription *string // Display name of metric specification. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // The property to decide fill gap with zero or not. - FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` + FillGapWithZero *bool // Name of metric specification. - Name *string `json:"name,omitempty"` + Name *string // Account Resource Id. - ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` + ResourceIDDimensionNameOverride *string // Unit could be Bytes or Count. - Unit *string `json:"unit,omitempty"` + Unit *string } // Multichannel setting. Applies to Premium FileStorage only. type Multichannel struct { // Indicates whether multichannel is enabled - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool } // NetworkRuleSet - Network rule set type NetworkRuleSet struct { // REQUIRED; Specifies the default action of allow or deny when no other rules match. - DefaultAction *DefaultAction `json:"defaultAction,omitempty"` + DefaultAction *DefaultAction // Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices // (For example, "Logging, Metrics"), or None to bypass none // of those traffics. - Bypass *Bypass `json:"bypass,omitempty"` + Bypass *Bypass // Sets the IP ACL rules - IPRules []*IPRule `json:"ipRules,omitempty"` + IPRules []*IPRule // Sets the resource access rules - ResourceAccessRules []*ResourceAccessRule `json:"resourceAccessRules,omitempty"` + ResourceAccessRules []*ResourceAccessRule // Sets the virtual network rules - VirtualNetworkRules []*VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` + VirtualNetworkRules []*VirtualNetworkRule } -// ObjectReplicationPolicies - List storage account object replication policies. -type ObjectReplicationPolicies struct { - // The replication policy between two storage accounts. - Value []*ObjectReplicationPolicy `json:"value,omitempty"` +// NetworkSecurityPerimeter related information +type NetworkSecurityPerimeter struct { + // The ARM identifier of the resource + ID *string + + // Location of the resource + Location *string + + // Guid of the resource + PerimeterGUID *string } -// ObjectReplicationPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ObjectReplicationPoliciesClient.CreateOrUpdate -// method. -type ObjectReplicationPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters +// NetworkSecurityPerimeterConfiguration - The Network Security Perimeter configuration resource. +type NetworkSecurityPerimeterConfiguration struct { + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Properties of the Network Security Perimeter Configuration + Properties *NetworkSecurityPerimeterConfigurationProperties + + // 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 +} + +// NetworkSecurityPerimeterConfigurationList - Result of the List Network Security Perimeter configuration operation. +type NetworkSecurityPerimeterConfigurationList struct { + // The URI that can be used to request the next set of paged results. + NextLink *string + + // READ-ONLY; A collection of Network Security Perimeter configurations + Value []*NetworkSecurityPerimeterConfiguration +} + +// NetworkSecurityPerimeterConfigurationProperties - Properties of the Network Security Perimeter Configuration +type NetworkSecurityPerimeterConfigurationProperties struct { + // READ-ONLY; NetworkSecurityPerimeter related information + NetworkSecurityPerimeter *NetworkSecurityPerimeter + + // READ-ONLY; Network Security Perimeter profile + Profile *NetworkSecurityPerimeterConfigurationPropertiesProfile + + // READ-ONLY; List of Provisioning Issues if any + ProvisioningIssues []*ProvisioningIssue + + // READ-ONLY; Provisioning state of Network Security Perimeter configuration propagation + ProvisioningState *NetworkSecurityPerimeterConfigurationProvisioningState + + // READ-ONLY; Information about resource association + ResourceAssociation *NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation +} + +// NetworkSecurityPerimeterConfigurationPropertiesProfile - Network Security Perimeter profile +type NetworkSecurityPerimeterConfigurationPropertiesProfile struct { + // List of Access Rules + AccessRules []*NspAccessRule + + // Current access rules version + AccessRulesVersion *float32 + + // Diagnostic settings version + DiagnosticSettingsVersion *float32 + + // Enabled logging categories + EnabledLogCategories []*string + + // Name of the resource + Name *string +} + +// NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation - Information about resource association +type NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation struct { + // Access Mode of the resource association + AccessMode *ResourceAssociationAccessMode + + // Name of the resource association + Name *string +} + +// NspAccessRule - Information of Access Rule in Network Security Perimeter profile +type NspAccessRule struct { + // Name of the resource + Name *string + + // READ-ONLY; Properties of Access Rule + Properties *NspAccessRuleProperties } -// ObjectReplicationPoliciesClientDeleteOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Delete -// method. -type ObjectReplicationPoliciesClientDeleteOptions struct { - // placeholder for future optional parameters +// NspAccessRuleProperties - Properties of Access Rule +type NspAccessRuleProperties struct { + // Address prefixes in the CIDR format for inbound rules + AddressPrefixes []*string + + // Direction of Access Rule + Direction *NspAccessRuleDirection + + // Subscriptions for inbound rules + Subscriptions []*NspAccessRulePropertiesSubscriptionsItem + + // READ-ONLY; FQDN for outbound rules + FullyQualifiedDomainNames []*string + + // READ-ONLY; NetworkSecurityPerimeters for inbound rules + NetworkSecurityPerimeters []*NetworkSecurityPerimeter } -// ObjectReplicationPoliciesClientGetOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Get -// method. -type ObjectReplicationPoliciesClientGetOptions struct { - // placeholder for future optional parameters +// NspAccessRulePropertiesSubscriptionsItem - Subscription for inbound rule +type NspAccessRulePropertiesSubscriptionsItem struct { + // The ARM identifier of subscription + ID *string } -// ObjectReplicationPoliciesClientListOptions contains the optional parameters for the ObjectReplicationPoliciesClient.NewListPager -// method. -type ObjectReplicationPoliciesClientListOptions struct { - // placeholder for future optional parameters +// ObjectReplicationPolicies - List storage account object replication policies. +type ObjectReplicationPolicies struct { + // The replication policy between two storage accounts. + Value []*ObjectReplicationPolicy } // ObjectReplicationPolicy - The replication policy between two storage accounts. Multiple rules can be defined in one policy. type ObjectReplicationPolicy struct { // Returns the Storage Account Object Replication Policy. - Properties *ObjectReplicationPolicyProperties `json:"properties,omitempty"` + Properties *ObjectReplicationPolicyProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ObjectReplicationPolicyFilter - Filters limit replication to a subset of blobs within the storage account. A logical OR @@ -2436,218 +2490,192 @@ type ObjectReplicationPolicy struct { type ObjectReplicationPolicyFilter struct { // Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. // Example: 2020-02-19T16:05:00Z - MinCreationTime *string `json:"minCreationTime,omitempty"` + MinCreationTime *string // Optional. Filters the results to replicate only blobs whose names begin with the specified prefix. - PrefixMatch []*string `json:"prefixMatch,omitempty"` + PrefixMatch []*string } // ObjectReplicationPolicyProperties - The Storage Account ObjectReplicationPolicy properties. type ObjectReplicationPolicyProperties struct { // REQUIRED; Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false. - DestinationAccount *string `json:"destinationAccount,omitempty"` + DestinationAccount *string // REQUIRED; Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false. - SourceAccount *string `json:"sourceAccount,omitempty"` + SourceAccount *string + + // Optional. The object replication policy metrics feature options. + Metrics *ObjectReplicationPolicyPropertiesMetrics // The storage account object replication rules. - Rules []*ObjectReplicationPolicyRule `json:"rules,omitempty"` + Rules []*ObjectReplicationPolicyRule // READ-ONLY; Indicates when the policy is enabled on the source account. - EnabledTime *time.Time `json:"enabledTime,omitempty" azure:"ro"` + EnabledTime *time.Time // READ-ONLY; A unique id for object replication policy. - PolicyID *string `json:"policyId,omitempty" azure:"ro"` + PolicyID *string +} + +// ObjectReplicationPolicyPropertiesMetrics - Optional. The object replication policy metrics feature options. +type ObjectReplicationPolicyPropertiesMetrics struct { + // Indicates whether object replication metrics feature is enabled for the policy. + Enabled *bool } // ObjectReplicationPolicyRule - The replication policy rule between two containers. type ObjectReplicationPolicyRule struct { // REQUIRED; Required. Destination container name. - DestinationContainer *string `json:"destinationContainer,omitempty"` + DestinationContainer *string // REQUIRED; Required. Source container name. - SourceContainer *string `json:"sourceContainer,omitempty"` + SourceContainer *string // Optional. An object that defines the filter set. - Filters *ObjectReplicationPolicyFilter `json:"filters,omitempty"` + Filters *ObjectReplicationPolicyFilter // Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account. - RuleID *string `json:"ruleId,omitempty"` + RuleID *string } // Operation - Storage REST API operation definition. type Operation struct { // Display metadata associated with the operation. - Display *OperationDisplay `json:"display,omitempty"` + Display *OperationDisplay // Operation name: {provider}/{resource}/{operation} - Name *string `json:"name,omitempty"` + Name *string // Properties of operation, include metric specifications. - OperationProperties *OperationProperties `json:"properties,omitempty"` + OperationProperties *OperationProperties // The origin of operations. - Origin *string `json:"origin,omitempty"` + Origin *string } // OperationDisplay - Display metadata associated with the operation. type OperationDisplay struct { // Description of the operation. - Description *string `json:"description,omitempty"` + Description *string // Type of operation: get, read, delete, etc. - Operation *string `json:"operation,omitempty"` + Operation *string // Service provider: Microsoft Storage. - Provider *string `json:"provider,omitempty"` + Provider *string // Resource on which the operation is performed etc. - Resource *string `json:"resource,omitempty"` + Resource *string } // OperationListResult - Result of the request to list Storage operations. It contains a list of operations and a URL link // to get the next set of results. type OperationListResult struct { // List of Storage operations supported by the Storage resource provider. - Value []*Operation `json:"value,omitempty"` + Value []*Operation } // OperationProperties - Properties of operation, include metric specifications. type OperationProperties struct { // One property of operation, include metric specifications. - ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters + ServiceSpecification *ServiceSpecification } type PermissionScope struct { - // REQUIRED; The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), and Create - // (c). - Permissions *string `json:"permissions,omitempty"` + // REQUIRED; The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), Create + // (c), Modify Ownership (o), and Modify Permissions (p). + Permissions *string // REQUIRED; The name of resource, normally the container name or the file share name, used by the local user. - ResourceName *string `json:"resourceName,omitempty"` + ResourceName *string // REQUIRED; The service used by the local user, e.g. blob, file. - Service *string `json:"service,omitempty"` + Service *string } // PrivateEndpoint - The Private Endpoint resource. type PrivateEndpoint struct { // READ-ONLY; The ARM identifier for Private Endpoint - ID *string `json:"id,omitempty" azure:"ro"` + ID *string } // PrivateEndpointConnection - The Private Endpoint Connection resource. type PrivateEndpointConnection struct { // Resource properties. - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + Properties *PrivateEndpointConnectionProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified storage account type PrivateEndpointConnectionListResult struct { // Array of private endpoint connections - Value []*PrivateEndpointConnection `json:"value,omitempty"` + Value []*PrivateEndpointConnection } // PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties. type PrivateEndpointConnectionProperties struct { // REQUIRED; A collection of information about the state of the connection between service consumer and provider. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState // The resource of private end point. - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateEndpoint *PrivateEndpoint // READ-ONLY; The provisioning state of the private endpoint connection resource. - ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete -// method. -type PrivateEndpointConnectionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. -type PrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager -// method. -type PrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put -// method. -type PrivateEndpointConnectionsClientPutOptions struct { - // placeholder for future optional parameters + ProvisioningState *PrivateEndpointConnectionProvisioningState } // PrivateLinkResource - A private link resource type PrivateLinkResource struct { // Resource properties. - Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` + Properties *PrivateLinkResourceProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // PrivateLinkResourceListResult - A list of private link resources type PrivateLinkResourceListResult struct { // Array of private link resources - Value []*PrivateLinkResource `json:"value,omitempty"` + Value []*PrivateLinkResource } // PrivateLinkResourceProperties - Properties of a private link resource. type PrivateLinkResourceProperties struct { // The private link resource Private link DNS zone name. - RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` + RequiredZoneNames []*string // READ-ONLY; The private link resource group id. - GroupID *string `json:"groupId,omitempty" azure:"ro"` + GroupID *string // READ-ONLY; The private link resource required member names. - RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` -} - -// PrivateLinkResourcesClientListByStorageAccountOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByStorageAccount -// method. -type PrivateLinkResourcesClientListByStorageAccountOptions struct { - // placeholder for future optional parameters + RequiredMembers []*string } // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer // and provider. type PrivateLinkServiceConnectionState struct { // A message indicating if changes on the service provider require any updates on the consumer. - ActionRequired *string `json:"actionRequired,omitempty"` + ActionRequired *string // The reason for approval/rejection of the connection. - Description *string `json:"description,omitempty"` + Description *string // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` + Status *PrivateEndpointServiceConnectionStatus } // ProtectedAppendWritesHistory - Protected append writes history setting for the blob container with Legal holds. @@ -2655,95 +2683,104 @@ type ProtectedAppendWritesHistory struct { // When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. // Only new blocks can be added and any existing blocks cannot be modified // or deleted. - AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + AllowProtectedAppendWritesAll *bool // READ-ONLY; Returns the date and time the tag was added. - Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` + Timestamp *time.Time } // ProtocolSettings - Protocol settings for file service type ProtocolSettings struct { // Setting for SMB protocol - Smb *SmbSetting `json:"smb,omitempty"` + Smb *SmbSetting +} + +// ProvisioningIssue - Describes provisioning issue for given NetworkSecurityPerimeterConfiguration +type ProvisioningIssue struct { + // Name of the issue + Name *string + + // READ-ONLY; Properties of provisioning issue + Properties *ProvisioningIssueProperties +} + +// ProvisioningIssueProperties - Properties of provisioning issue +type ProvisioningIssueProperties struct { + // Description of the issue + Description *string + + // Type of issue + IssueType *IssueType + + // Severity of the issue. + Severity *Severity } // 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 `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } -type Queue struct { - // Queue resource properties. - QueueProperties *QueueProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` +// ProxyResourceAutoGenerated - The resource model definition for a Azure Resource Manager proxy resource. It will not have +// tags and a location +type ProxyResourceAutoGenerated struct { + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData -// QueueClientCreateOptions contains the optional parameters for the QueueClient.Create method. -type QueueClientCreateOptions struct { - // placeholder for future optional parameters + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string } -// QueueClientDeleteOptions contains the optional parameters for the QueueClient.Delete method. -type QueueClientDeleteOptions struct { - // placeholder for future optional parameters -} +type Queue struct { + // Queue resource properties. + QueueProperties *QueueProperties -// QueueClientGetOptions contains the optional parameters for the QueueClient.Get method. -type QueueClientGetOptions struct { - // placeholder for future optional parameters -} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string -// QueueClientListOptions contains the optional parameters for the QueueClient.NewListPager method. -type QueueClientListOptions struct { - // Optional, When specified, only the queues with a name starting with the given filter will be listed. - Filter *string - // Optional, a maximum number of queues that should be included in a list queue response - Maxpagesize *string -} + // READ-ONLY; The name of the resource + Name *string -// QueueClientUpdateOptions contains the optional parameters for the QueueClient.Update method. -type QueueClientUpdateOptions struct { - // placeholder for future optional parameters + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string } type QueueProperties struct { // A name-value pair that represents queue metadata. - Metadata map[string]*string `json:"metadata,omitempty"` + Metadata map[string]*string // READ-ONLY; Integer indicating an approximate number of messages in the queue. This number is not lower than the actual // number of messages in the queue, but could be higher. - ApproximateMessageCount *int32 `json:"approximateMessageCount,omitempty" azure:"ro"` + ApproximateMessageCount *int32 } // QueueServiceProperties - The properties of a storage account’s Queue service. type QueueServiceProperties struct { // The properties of a storage account’s Queue service. - QueueServiceProperties *QueueServicePropertiesProperties `json:"properties,omitempty"` + QueueServiceProperties *QueueServicePropertiesProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // QueueServicePropertiesProperties - The properties of a storage account’s Queue service. @@ -2751,60 +2788,58 @@ type QueueServicePropertiesProperties struct { // Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no CorsRule // elements are included in the request body, all CORS rules will be deleted, and // CORS will be disabled for the Queue service. - Cors *CorsRules `json:"cors,omitempty"` -} - -// QueueServicesClientGetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.GetServiceProperties -// method. -type QueueServicesClientGetServicePropertiesOptions struct { - // placeholder for future optional parameters -} - -// QueueServicesClientListOptions contains the optional parameters for the QueueServicesClient.List method. -type QueueServicesClientListOptions struct { - // placeholder for future optional parameters -} - -// QueueServicesClientSetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.SetServiceProperties -// method. -type QueueServicesClientSetServicePropertiesOptions struct { - // placeholder for future optional parameters + Cors *CorsRules } // 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 `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ResourceAccessRule - Resource Access Rule. type ResourceAccessRule struct { // Resource Id - ResourceID *string `json:"resourceId,omitempty"` + ResourceID *string // Tenant Id - TenantID *string `json:"tenantId,omitempty"` + TenantID *string +} + +// ResourceAutoGenerated - Common fields that are returned in the response for all Azure Resource Manager resources +type ResourceAutoGenerated struct { + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/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 } // RestorePolicyProperties - The blob service properties for blob restore policy type RestorePolicyProperties struct { // REQUIRED; Blob restore is enabled if set to true. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. - Days *int32 `json:"days,omitempty"` + Days *int32 // READ-ONLY; Deprecated in favor of minRestoreTime property. - LastEnabledTime *time.Time `json:"lastEnabledTime,omitempty" azure:"ro"` + LastEnabledTime *time.Time // READ-ONLY; Returns the minimum date and time that the restore can be started. - MinRestoreTime *time.Time `json:"minRestoreTime,omitempty" azure:"ro"` + MinRestoreTime *time.Time } // Restriction - The restriction because of which SKU cannot be used. @@ -2812,37 +2847,37 @@ type Restriction struct { // The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". Quota Id is set when // the SKU has requiredQuotas parameter as the subscription does not belong to that // quota. The "NotAvailableForSubscription" is related to capacity at DC. - ReasonCode *ReasonCode `json:"reasonCode,omitempty"` + ReasonCode *ReasonCode // READ-ONLY; The type of restrictions. As of now only possible value for this is location. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string // READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where // the SKU is restricted. - Values []*string `json:"values,omitempty" azure:"ro"` + Values []*string } // RoutingPreference - Routing preference defines the type of network, either microsoft or internet routing to be used to // deliver the user data, the default option is microsoft routing type RoutingPreference struct { // A boolean flag which indicates whether internet routing storage endpoints are to be published - PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` + PublishInternetEndpoints *bool // A boolean flag which indicates whether microsoft routing storage endpoints are to be published - PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` + PublishMicrosoftEndpoints *bool // Routing Choice defines the kind of network routing opted by the user. - RoutingChoice *RoutingChoice `json:"routingChoice,omitempty"` + RoutingChoice *RoutingChoice } // SKU - The SKU of the storage account. type SKU struct { // REQUIRED; The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called // accountType. - Name *SKUName `json:"name,omitempty"` + Name *SKUName // READ-ONLY; The SKU tier. This is based on the SKU name. - Tier *SKUTier `json:"tier,omitempty" azure:"ro"` + Tier *SKUTier } // SKUCapability - The capability information in the specified SKU, including file encryption, network ACLs, change notification, @@ -2850,259 +2885,229 @@ type SKU struct { type SKUCapability struct { // READ-ONLY; The name of capability, The capability information in the specified SKU, including file encryption, network // ACLs, change notification, etc. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; A string value to indicate states of given capability. Possibly 'true' or 'false'. - Value *string `json:"value,omitempty" azure:"ro"` + Value *string } // SKUInformation - Storage SKU and its properties type SKUInformation struct { // REQUIRED; The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called // accountType. - Name *SKUName `json:"name,omitempty"` + Name *SKUName // The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. - Restrictions []*Restriction `json:"restrictions,omitempty"` + Restrictions []*Restriction // READ-ONLY; The capability information in the specified SKU, including file encryption, network ACLs, change notification, // etc. - Capabilities []*SKUCapability `json:"capabilities,omitempty" azure:"ro"` + Capabilities []*SKUCapability // READ-ONLY; Indicates the type of storage account. - Kind *Kind `json:"kind,omitempty" azure:"ro"` + Kind *Kind // READ-ONLY; The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. // West US, East US, Southeast Asia, etc.). - Locations []*string `json:"locations,omitempty" azure:"ro"` + Locations []*string // READ-ONLY; The type of the resource, usually it is 'storageAccounts'. - ResourceType *string `json:"resourceType,omitempty" azure:"ro"` + ResourceType *string // READ-ONLY; The SKU tier. This is based on the SKU name. - Tier *SKUTier `json:"tier,omitempty" azure:"ro"` + Tier *SKUTier } // SKUListResult - The response from the List Storage SKUs operation. type SKUListResult struct { // READ-ONLY; Get the list result of storage SKUs and their properties. - Value []*SKUInformation `json:"value,omitempty" azure:"ro"` -} - -// SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. -type SKUsClientListOptions struct { - // placeholder for future optional parameters + Value []*SKUInformation } type SSHPublicKey struct { // Optional. It is used to store the function/usage of the key - Description *string `json:"description,omitempty"` + Description *string // Ssh public key base64 encoded. The format should be: ' ', e.g. ssh-rsa AAAABBBB - Key *string `json:"key,omitempty"` + Key *string } // SasPolicy assigned to the storage account. type SasPolicy struct { - // REQUIRED; The SAS expiration action. Can only be Log. - ExpirationAction *ExpirationAction `json:"expirationAction,omitempty"` + // REQUIRED; The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. + // The 'Log' action can be used for audit purposes and the 'Block' action can be used to block + // and deny the usage of SAS tokens that do not adhere to the sas policy expiration period. + ExpirationAction *ExpirationAction // REQUIRED; The SAS expiration period, DD.HH:MM:SS. - SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"` + SasExpirationPeriod *string } // ServiceSasParameters - The parameters to list service SAS credentials of a specific resource. type ServiceSasParameters struct { // REQUIRED; The canonical path to the signed resource. - CanonicalizedResource *string `json:"canonicalizedResource,omitempty"` + CanonicalizedResource *string // The response header override for cache control. - CacheControl *string `json:"rscc,omitempty"` + CacheControl *string // The response header override for content disposition. - ContentDisposition *string `json:"rscd,omitempty"` + ContentDisposition *string // The response header override for content encoding. - ContentEncoding *string `json:"rsce,omitempty"` + ContentEncoding *string // The response header override for content language. - ContentLanguage *string `json:"rscl,omitempty"` + ContentLanguage *string // The response header override for content type. - ContentType *string `json:"rsct,omitempty"` + ContentType *string // An IP address or a range of IP addresses from which to accept requests. - IPAddressOrRange *string `json:"signedIp,omitempty"` + IPAddressOrRange *string // A unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or // table. - Identifier *string `json:"signedIdentifier,omitempty"` + Identifier *string // The key to sign the account SAS token with. - KeyToSign *string `json:"keyToSign,omitempty"` + KeyToSign *string // The end of partition key. - PartitionKeyEnd *string `json:"endPk,omitempty"` + PartitionKeyEnd *string // The start of partition key. - PartitionKeyStart *string `json:"startPk,omitempty"` + PartitionKeyStart *string // The signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), // Create (c), Update (u) and Process (p). - Permissions *Permissions `json:"signedPermission,omitempty"` + Permissions *Permissions // The protocol permitted for a request made with the account SAS. - Protocols *HTTPProtocol `json:"signedProtocol,omitempty"` + Protocols *HTTPProtocol // The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share // (s). - Resource *SignedResource `json:"signedResource,omitempty"` + Resource *SignedResource // The end of row key. - RowKeyEnd *string `json:"endRk,omitempty"` + RowKeyEnd *string // The start of row key. - RowKeyStart *string `json:"startRk,omitempty"` + RowKeyStart *string // The time at which the shared access signature becomes invalid. - SharedAccessExpiryTime *time.Time `json:"signedExpiry,omitempty"` + SharedAccessExpiryTime *time.Time // The time at which the SAS becomes valid. - SharedAccessStartTime *time.Time `json:"signedStart,omitempty"` + SharedAccessStartTime *time.Time } // ServiceSpecification - One property of operation, include metric specifications. type ServiceSpecification struct { // Metric specifications of operation. - MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"` + MetricSpecifications []*MetricSpecification } type SignedIdentifier struct { // Access policy - AccessPolicy *AccessPolicy `json:"accessPolicy,omitempty"` + AccessPolicy *AccessPolicy // An unique identifier of the stored access policy. - ID *string `json:"id,omitempty"` + ID *string } // SmbSetting - Setting for SMB protocol type SmbSetting struct { // SMB authentication methods supported by server. Valid values are NTLMv2, Kerberos. Should be passed as a string with delimiter // ';'. - AuthenticationMethods *string `json:"authenticationMethods,omitempty"` + AuthenticationMethods *string // SMB channel encryption supported by server. Valid values are AES-128-CCM, AES-128-GCM, AES-256-GCM. Should be passed as // a string with delimiter ';'. - ChannelEncryption *string `json:"channelEncryption,omitempty"` + ChannelEncryption *string // Kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256. Should be passed as a string with delimiter // ';' - KerberosTicketEncryption *string `json:"kerberosTicketEncryption,omitempty"` + KerberosTicketEncryption *string // Multichannel setting. Applies to Premium FileStorage only. - Multichannel *Multichannel `json:"multichannel,omitempty"` + Multichannel *Multichannel // SMB protocol versions supported by server. Valid values are SMB2.1, SMB3.0, SMB3.1.1. Should be passed as a string with // delimiter ';'. - Versions *string `json:"versions,omitempty"` + Versions *string } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` + CreatedAt *time.Time // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` + CreatedBy *string // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` + CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` + LastModifiedAt *time.Time // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedBy *string // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` + LastModifiedByType *CreatedByType } // Table - Properties of the table, including Id, resource name, resource type. type Table struct { // Table resource properties. - TableProperties *TableProperties `json:"properties,omitempty"` + TableProperties *TableProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // TableAccessPolicy - Table Access Policy Properties Object. type TableAccessPolicy struct { // REQUIRED; Required. List of abbreviated permissions. Supported permission values include 'r','a','u','d' - Permission *string `json:"permission,omitempty"` + Permission *string // Expiry time of the access policy - ExpiryTime *time.Time `json:"expiryTime,omitempty"` + ExpiryTime *time.Time // Start time of the access policy - StartTime *time.Time `json:"startTime,omitempty"` -} - -// TableClientCreateOptions contains the optional parameters for the TableClient.Create method. -type TableClientCreateOptions struct { - // The parameters to provide to create a table. - Parameters *Table -} - -// TableClientDeleteOptions contains the optional parameters for the TableClient.Delete method. -type TableClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// TableClientGetOptions contains the optional parameters for the TableClient.Get method. -type TableClientGetOptions struct { - // placeholder for future optional parameters -} - -// TableClientListOptions contains the optional parameters for the TableClient.NewListPager method. -type TableClientListOptions struct { - // placeholder for future optional parameters -} - -// TableClientUpdateOptions contains the optional parameters for the TableClient.Update method. -type TableClientUpdateOptions struct { - // The parameters to provide to create a table. - Parameters *Table + StartTime *time.Time } type TableProperties struct { // List of stored access policies specified on the table. - SignedIdentifiers []*TableSignedIdentifier `json:"signedIdentifiers,omitempty"` + SignedIdentifiers []*TableSignedIdentifier // READ-ONLY; Table name under the specified account - TableName *string `json:"tableName,omitempty" azure:"ro"` + TableName *string } // TableServiceProperties - The properties of a storage account’s Table service. type TableServiceProperties struct { // The properties of a storage account’s Table service. - TableServiceProperties *TableServicePropertiesProperties `json:"properties,omitempty"` + TableServiceProperties *TableServicePropertiesProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // TableServicePropertiesProperties - The properties of a storage account’s Table service. @@ -3110,83 +3115,308 @@ type TableServicePropertiesProperties struct { // Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no CorsRule // elements are included in the request body, all CORS rules will be deleted, and // CORS will be disabled for the Table service. - Cors *CorsRules `json:"cors,omitempty"` -} - -// TableServicesClientGetServicePropertiesOptions contains the optional parameters for the TableServicesClient.GetServiceProperties -// method. -type TableServicesClientGetServicePropertiesOptions struct { - // placeholder for future optional parameters -} - -// TableServicesClientListOptions contains the optional parameters for the TableServicesClient.List method. -type TableServicesClientListOptions struct { - // placeholder for future optional parameters -} - -// TableServicesClientSetServicePropertiesOptions contains the optional parameters for the TableServicesClient.SetServiceProperties -// method. -type TableServicesClientSetServicePropertiesOptions struct { - // placeholder for future optional parameters + Cors *CorsRules } // TableSignedIdentifier - Object to set Table Access Policy. type TableSignedIdentifier struct { // REQUIRED; unique-64-character-value of the stored access policy. - ID *string `json:"id,omitempty"` + ID *string // Access policy - AccessPolicy *TableAccessPolicy `json:"accessPolicy,omitempty"` + AccessPolicy *TableAccessPolicy } // TagFilter - Blob index tag based filtering for blob objects type TagFilter struct { // REQUIRED; This is the filter tag name, it can have 1 - 128 characters - Name *string `json:"name,omitempty"` + Name *string // REQUIRED; This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) // is currently supported - Op *string `json:"op,omitempty"` + Op *string // REQUIRED; This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters - Value *string `json:"value,omitempty"` + Value *string } // TagProperty - A tag of the LegalHold of a blob container. type TagProperty struct { // READ-ONLY; Returns the Object ID of the user who added the tag. - ObjectIdentifier *string `json:"objectIdentifier,omitempty" azure:"ro"` + ObjectIdentifier *string // READ-ONLY; The tag value. - Tag *string `json:"tag,omitempty" azure:"ro"` + Tag *string // READ-ONLY; Returns the Tenant ID that issued the token for the user who added the tag. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` + TenantID *string // READ-ONLY; Returns the date and time the tag was added. - Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` + Timestamp *time.Time // READ-ONLY; Returns the User Principal Name of the user who added the tag. - Upn *string `json:"upn,omitempty" azure:"ro"` + Upn *string +} + +// TaskAssignment - The storage task assignment. +type TaskAssignment struct { + // REQUIRED; Properties of the storage task assignment. + Properties *TaskAssignmentProperties + + // 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 +} + +// TaskAssignmentExecutionContext - Execution context of the storage task assignment. +type TaskAssignmentExecutionContext struct { + // REQUIRED; Execution trigger of the storage task assignment + Trigger *ExecutionTrigger + + // Execution target of the storage task assignment + Target *ExecutionTarget +} + +// TaskAssignmentProperties - Properties of the storage task assignment. +type TaskAssignmentProperties struct { + // REQUIRED; Text that describes the purpose of the storage task assignment + Description *string + + // REQUIRED; Whether the storage task assignment is enabled or not + Enabled *bool + + // REQUIRED; The storage task assignment execution context + ExecutionContext *TaskAssignmentExecutionContext + + // REQUIRED; The storage task assignment report + Report *TaskAssignmentReport + + // REQUIRED; Id of the corresponding storage task + TaskID *string + + // Run status of storage task assignment + RunStatus *TaskReportProperties + + // READ-ONLY; Represents the provisioning state of the storage task assignment. + ProvisioningState *ProvisioningState +} + +// TaskAssignmentReport - The storage task assignment report +type TaskAssignmentReport struct { + // REQUIRED; The container prefix for the location of storage task assignment report + Prefix *string +} + +// TaskAssignmentUpdateExecutionContext - Execution context of the storage task assignment update. +type TaskAssignmentUpdateExecutionContext struct { + // Execution target of the storage task assignment + Target *ExecutionTarget + + // Execution trigger of the storage task assignment + Trigger *ExecutionTriggerUpdate +} + +// TaskAssignmentUpdateParameters - Parameters of the storage task assignment update request +type TaskAssignmentUpdateParameters struct { + // Properties of the storage task assignment. + Properties *TaskAssignmentUpdateProperties +} + +// TaskAssignmentUpdateProperties - Properties of the storage task update assignment. +type TaskAssignmentUpdateProperties struct { + // Text that describes the purpose of the storage task assignment + Description *string + + // Whether the storage task assignment is enabled or not + Enabled *bool + + // The storage task assignment execution context + ExecutionContext *TaskAssignmentUpdateExecutionContext + + // The storage task assignment report + Report *TaskAssignmentUpdateReport + + // Run status of storage task assignment + RunStatus *TaskReportProperties + + // READ-ONLY; Represents the provisioning state of the storage task assignment. + ProvisioningState *ProvisioningState + + // READ-ONLY; Id of the corresponding storage task + TaskID *string +} + +// TaskAssignmentUpdateReport - The storage task assignment report +type TaskAssignmentUpdateReport struct { + // The prefix of the storage task assignment report + Prefix *string +} + +// TaskAssignmentsList - List of storage task assignments for the storage account +type TaskAssignmentsList struct { + // READ-ONLY; Request URL that can be used to query next page of storage task assignments. Returned when total number of requested + // storage task assignments exceed maximum page size. + NextLink *string + + // READ-ONLY; Gets the list of storage task assignments and their properties. + Value []*TaskAssignment +} + +// TaskReportInstance - Storage Tasks run report instance +type TaskReportInstance struct { + // Storage task execution report for a run instance. + Properties *TaskReportProperties + + // 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 +} + +// TaskReportProperties - Storage task execution report for a run instance. +type TaskReportProperties struct { + // READ-ONLY; End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + // operators can be used as described for DateTime properties in + // https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + FinishTime *string + + // READ-ONLY; Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount + // eq 0 and other comparison operators can be used as described for Numerical properties + // in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + ObjectFailedCount *string + + // READ-ONLY; Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as + // objectsOperatedOnCount ge 100 and other comparison operators can be used as described for + // Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + ObjectsOperatedOnCount *string + + // READ-ONLY; Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + // gt 150 and other comparison operators can be used as described for Numerical + // properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + ObjectsSucceededCount *string + + // READ-ONLY; Total number of objects that meet the condition as defined in the storage task assignment execution context. + // Filter options such as objectsTargetedCount gt 50 and other comparison operators can be + // used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + ObjectsTargetedCount *string + + // READ-ONLY; Represents the overall result of the execution for the run instance + RunResult *RunResult + + // READ-ONLY; Represents the status of the execution. + RunStatusEnum *RunStatusEnum + + // READ-ONLY; Well known Azure Storage error code that represents the error encountered during execution of the run instance. + RunStatusError *string + + // READ-ONLY; Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other + // comparison operators can be used as described for DateTime properties in + // https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + StartTime *string + + // READ-ONLY; Represents the Storage Account Id where the storage task definition was applied and executed. + StorageAccountID *string + + // READ-ONLY; Full path to the verbose report stored in the reporting container as specified in the assignment execution context + // for the storage account. + SummaryReportPath *string + + // READ-ONLY; Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + TaskAssignmentID *string + + // READ-ONLY; Storage Task Arm Id. + TaskID *string + + // READ-ONLY; Storage Task Version + TaskVersion *string +} + +// TaskReportSummary - Fetch Storage Tasks Run Summary. +type TaskReportSummary struct { + // READ-ONLY; Request URL that can be used to query next page of storage task run results summary. Returned when the number + // of run instances and summary reports exceed maximum page size. + NextLink *string + + // READ-ONLY; Gets storage tasks run result summary. + Value []*TaskReportInstance } // 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 `json:"location,omitempty"` + Location *string // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string +} + +// TriggerParameters - The trigger parameters update for the storage task assignment execution +type TriggerParameters struct { + // CONSTANT; Run interval unit of task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; + // this property should not be present when ExecutionTrigger.properties.type is + // 'RunOnce' + // Field has constant value "Days", any specified value is ignored. + IntervalUnit *string + + // When to end task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property + // should not be present when ExecutionTrigger.properties.type is 'RunOnce' + EndBy *time.Time + + // Run interval of task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property + // should not be present when ExecutionTrigger.properties.type is 'RunOnce' + Interval *int32 + + // When to start task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property + // should not be present when ExecutionTrigger.properties.type is 'RunOnce' + StartFrom *time.Time + + // When to start task execution. This is an optional field when ExecutionTrigger.properties.type is 'RunOnce'; this property + // should not be present when ExecutionTrigger.properties.type is 'OnSchedule' + StartOn *time.Time +} + +// TriggerParametersUpdate - The trigger parameters update for the storage task assignment execution +type TriggerParametersUpdate struct { + // CONSTANT; Run interval unit of task execution. This is a mutable field when ExecutionTrigger.properties.type is 'OnSchedule'; + // this property should not be present when ExecutionTrigger.properties.type is + // 'RunOnce' + // Field has constant value "Days", any specified value is ignored. + IntervalUnit *string + + // When to end task execution. This is a mutable field when ExecutionTrigger.properties.type is 'OnSchedule'; this property + // should not be present when ExecutionTrigger.properties.type is 'RunOnce' + EndBy *time.Time + + // Run interval of task execution. This is a mutable field when ExecutionTrigger.properties.type is 'OnSchedule'; this property + // should not be present when ExecutionTrigger.properties.type is 'RunOnce' + Interval *int32 + + // When to start task execution. This is a mutable field when ExecutionTrigger.properties.type is 'OnSchedule'; this property + // should not be present when ExecutionTrigger.properties.type is 'RunOnce' + StartFrom *time.Time + + // When to start task execution. This is a mutable field when ExecutionTrigger.properties.type is 'RunOnce'; this property + // should not be present when ExecutionTrigger.properties.type is 'OnSchedule' + StartOn *time.Time } // UpdateHistoryProperty - An update history of the ImmutabilityPolicy of a blob container. @@ -3195,86 +3425,82 @@ type UpdateHistoryProperty struct { // an append blob while maintaining immutability protection and compliance. Only // new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy // API. - AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + AllowProtectedAppendWrites *bool // This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to // both 'Append and Bock Blobs' while maintaining immutability protection and // compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be // changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and // 'allowProtectedAppendWritesAll' properties are mutually exclusive. - AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + AllowProtectedAppendWritesAll *bool // READ-ONLY; The immutability period for the blobs in the container since the policy creation, in days. - ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty" azure:"ro"` + ImmutabilityPeriodSinceCreationInDays *int32 // READ-ONLY; Returns the Object ID of the user who updated the ImmutabilityPolicy. - ObjectIdentifier *string `json:"objectIdentifier,omitempty" azure:"ro"` + ObjectIdentifier *string // READ-ONLY; Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` + TenantID *string // READ-ONLY; Returns the date and time the ImmutabilityPolicy was updated. - Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` + Timestamp *time.Time // READ-ONLY; The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend. - Update *ImmutabilityPolicyUpdateType `json:"update,omitempty" azure:"ro"` + Update *ImmutabilityPolicyUpdateType // READ-ONLY; Returns the User Principal Name of the user who updated the ImmutabilityPolicy. - Upn *string `json:"upn,omitempty" azure:"ro"` + Upn *string } // Usage - Describes Storage Resource Usage. type Usage struct { // READ-ONLY; Gets the current count of the allocated resources in the subscription. - CurrentValue *int32 `json:"currentValue,omitempty" azure:"ro"` + CurrentValue *int32 // READ-ONLY; Gets the maximum count of the resources that can be allocated in the subscription. - Limit *int32 `json:"limit,omitempty" azure:"ro"` + Limit *int32 // READ-ONLY; Gets the name of the type of usage. - Name *UsageName `json:"name,omitempty" azure:"ro"` + Name *UsageName // READ-ONLY; Gets the unit of measurement. - Unit *UsageUnit `json:"unit,omitempty" azure:"ro"` + Unit *UsageUnit } // UsageListResult - The response from the List Usages operation. type UsageListResult struct { // Gets or sets the list of Storage Resource Usages. - Value []*Usage `json:"value,omitempty"` + Value []*Usage } // UsageName - The usage names that can be used; currently limited to StorageAccount. type UsageName struct { // READ-ONLY; Gets a localized string describing the resource name. - LocalizedValue *string `json:"localizedValue,omitempty" azure:"ro"` + LocalizedValue *string // READ-ONLY; Gets a string describing the resource name. - Value *string `json:"value,omitempty" azure:"ro"` -} - -// UsagesClientListByLocationOptions contains the optional parameters for the UsagesClient.NewListByLocationPager method. -type UsagesClientListByLocationOptions struct { - // placeholder for future optional parameters + Value *string } // UserAssignedIdentity for the resource. type UserAssignedIdentity struct { // READ-ONLY; The client ID of the identity. - ClientID *string `json:"clientId,omitempty" azure:"ro"` + ClientID *string // READ-ONLY; The principal ID of the identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` + PrincipalID *string } // VirtualNetworkRule - Virtual Network rule. type VirtualNetworkRule struct { - // REQUIRED; Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. - VirtualNetworkResourceID *string `json:"id,omitempty"` + // CONSTANT; The action of virtual network rule. + // Field has constant value "Allow", any specified value is ignored. + Action *string - // The action of virtual network rule. - Action *string `json:"action,omitempty"` + // REQUIRED; Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + VirtualNetworkResourceID *string // Gets the state of virtual network rule. - State *State `json:"state,omitempty"` + State *State } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/models_serde.go index da77c61a..3840973e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/models_serde.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -19,9 +15,9 @@ import ( // MarshalJSON implements the json.Marshaller interface for type AccessPolicy. func (a AccessPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "expiryTime", a.ExpiryTime) + populateDateTimeRFC3339(objectMap, "expiryTime", a.ExpiryTime) populate(objectMap, "permission", a.Permission) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", a.StartTime) return json.Marshal(objectMap) } @@ -35,13 +31,13 @@ func (a *AccessPolicy) UnmarshalJSON(data []byte) error { var err error switch key { case "expiryTime": - err = unpopulateTimeRFC3339(val, "ExpiryTime", &a.ExpiryTime) + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &a.ExpiryTime) delete(rawMsg, key) case "permission": err = unpopulate(val, "Permission", &a.Permission) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &a.StartTime) delete(rawMsg, key) } if err != nil { @@ -273,7 +269,7 @@ func (a *AccountInternetEndpoints) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AccountKey. func (a AccountKey) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", a.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", a.CreationTime) populate(objectMap, "keyName", a.KeyName) populate(objectMap, "permissions", a.Permissions) populate(objectMap, "value", a.Value) @@ -290,7 +286,7 @@ func (a *AccountKey) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &a.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &a.CreationTime) delete(rawMsg, key) case "keyName": err = unpopulate(val, "KeyName", &a.KeyName) @@ -309,6 +305,45 @@ func (a *AccountKey) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AccountLimits. +func (a AccountLimits) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxFileShares", a.MaxFileShares) + populate(objectMap, "maxProvisionedBandwidthMiBPerSec", a.MaxProvisionedBandwidthMiBPerSec) + populate(objectMap, "maxProvisionedIOPS", a.MaxProvisionedIOPS) + populate(objectMap, "maxProvisionedStorageGiB", a.MaxProvisionedStorageGiB) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountLimits. +func (a *AccountLimits) UnmarshalJSON(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 "maxFileShares": + err = unpopulate(val, "MaxFileShares", &a.MaxFileShares) + delete(rawMsg, key) + case "maxProvisionedBandwidthMiBPerSec": + err = unpopulate(val, "MaxProvisionedBandwidthMiBPerSec", &a.MaxProvisionedBandwidthMiBPerSec) + delete(rawMsg, key) + case "maxProvisionedIOPS": + err = unpopulate(val, "MaxProvisionedIOPS", &a.MaxProvisionedIOPS) + delete(rawMsg, key) + case "maxProvisionedStorageGiB": + err = unpopulate(val, "MaxProvisionedStorageGiB", &a.MaxProvisionedStorageGiB) + 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 AccountListKeysResult. func (a AccountListKeysResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -414,20 +449,100 @@ func (a *AccountMicrosoftEndpoints) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AccountMigration. +func (a AccountMigration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.StorageAccountMigrationDetails) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountMigration. +func (a *AccountMigration) UnmarshalJSON(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, "StorageAccountMigrationDetails", &a.StorageAccountMigrationDetails) + 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 AccountMigrationProperties. +func (a AccountMigrationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "migrationFailedDetailedReason", a.MigrationFailedDetailedReason) + populate(objectMap, "migrationFailedReason", a.MigrationFailedReason) + populate(objectMap, "migrationStatus", a.MigrationStatus) + populate(objectMap, "targetSkuName", a.TargetSKUName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountMigrationProperties. +func (a *AccountMigrationProperties) UnmarshalJSON(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 "migrationFailedDetailedReason": + err = unpopulate(val, "MigrationFailedDetailedReason", &a.MigrationFailedDetailedReason) + delete(rawMsg, key) + case "migrationFailedReason": + err = unpopulate(val, "MigrationFailedReason", &a.MigrationFailedReason) + delete(rawMsg, key) + case "migrationStatus": + err = unpopulate(val, "MigrationStatus", &a.MigrationStatus) + delete(rawMsg, key) + case "targetSkuName": + err = unpopulate(val, "TargetSKUName", &a.TargetSKUName) + 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 AccountProperties. func (a AccountProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "accessTier", a.AccessTier) + populate(objectMap, "accountMigrationInProgress", a.AccountMigrationInProgress) populate(objectMap, "allowBlobPublicAccess", a.AllowBlobPublicAccess) populate(objectMap, "allowCrossTenantReplication", a.AllowCrossTenantReplication) populate(objectMap, "allowSharedKeyAccess", a.AllowSharedKeyAccess) populate(objectMap, "allowedCopyScope", a.AllowedCopyScope) populate(objectMap, "azureFilesIdentityBasedAuthentication", a.AzureFilesIdentityBasedAuthentication) populate(objectMap, "blobRestoreStatus", a.BlobRestoreStatus) - populateTimeRFC3339(objectMap, "creationTime", a.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", a.CreationTime) populate(objectMap, "customDomain", a.CustomDomain) populate(objectMap, "dnsEndpointType", a.DNSEndpointType) populate(objectMap, "defaultToOAuthAuthentication", a.DefaultToOAuthAuthentication) + populate(objectMap, "enableExtendedGroups", a.EnableExtendedGroups) populate(objectMap, "supportsHttpsTrafficOnly", a.EnableHTTPSTrafficOnly) populate(objectMap, "isNfsV3Enabled", a.EnableNfsV3) populate(objectMap, "encryption", a.Encryption) @@ -436,11 +551,12 @@ func (a AccountProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "immutableStorageWithVersioning", a.ImmutableStorageWithVersioning) populate(objectMap, "isHnsEnabled", a.IsHnsEnabled) populate(objectMap, "isLocalUserEnabled", a.IsLocalUserEnabled) + populate(objectMap, "isSkuConversionBlocked", a.IsSKUConversionBlocked) populate(objectMap, "isSftpEnabled", a.IsSftpEnabled) populate(objectMap, "keyCreationTime", a.KeyCreationTime) populate(objectMap, "keyPolicy", a.KeyPolicy) populate(objectMap, "largeFileSharesState", a.LargeFileSharesState) - populateTimeRFC3339(objectMap, "lastGeoFailoverTime", a.LastGeoFailoverTime) + populateDateTimeRFC3339(objectMap, "lastGeoFailoverTime", a.LastGeoFailoverTime) populate(objectMap, "minimumTlsVersion", a.MinimumTLSVersion) populate(objectMap, "networkAcls", a.NetworkRuleSet) populate(objectMap, "primaryEndpoints", a.PrimaryEndpoints) @@ -470,6 +586,9 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { case "accessTier": err = unpopulate(val, "AccessTier", &a.AccessTier) delete(rawMsg, key) + case "accountMigrationInProgress": + err = unpopulate(val, "AccountMigrationInProgress", &a.AccountMigrationInProgress) + delete(rawMsg, key) case "allowBlobPublicAccess": err = unpopulate(val, "AllowBlobPublicAccess", &a.AllowBlobPublicAccess) delete(rawMsg, key) @@ -489,7 +608,7 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "BlobRestoreStatus", &a.BlobRestoreStatus) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &a.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &a.CreationTime) delete(rawMsg, key) case "customDomain": err = unpopulate(val, "CustomDomain", &a.CustomDomain) @@ -500,6 +619,9 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { case "defaultToOAuthAuthentication": err = unpopulate(val, "DefaultToOAuthAuthentication", &a.DefaultToOAuthAuthentication) delete(rawMsg, key) + case "enableExtendedGroups": + err = unpopulate(val, "EnableExtendedGroups", &a.EnableExtendedGroups) + delete(rawMsg, key) case "supportsHttpsTrafficOnly": err = unpopulate(val, "EnableHTTPSTrafficOnly", &a.EnableHTTPSTrafficOnly) delete(rawMsg, key) @@ -524,6 +646,9 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { case "isLocalUserEnabled": err = unpopulate(val, "IsLocalUserEnabled", &a.IsLocalUserEnabled) delete(rawMsg, key) + case "isSkuConversionBlocked": + err = unpopulate(val, "IsSKUConversionBlocked", &a.IsSKUConversionBlocked) + delete(rawMsg, key) case "isSftpEnabled": err = unpopulate(val, "IsSftpEnabled", &a.IsSftpEnabled) delete(rawMsg, key) @@ -537,7 +662,7 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "LargeFileSharesState", &a.LargeFileSharesState) delete(rawMsg, key) case "lastGeoFailoverTime": - err = unpopulateTimeRFC3339(val, "LastGeoFailoverTime", &a.LastGeoFailoverTime) + err = unpopulateDateTimeRFC3339(val, "LastGeoFailoverTime", &a.LastGeoFailoverTime) delete(rawMsg, key) case "minimumTlsVersion": err = unpopulate(val, "MinimumTLSVersion", &a.MinimumTLSVersion) @@ -601,6 +726,7 @@ func (a AccountPropertiesCreateParameters) MarshalJSON() ([]byte, error) { populate(objectMap, "customDomain", a.CustomDomain) populate(objectMap, "dnsEndpointType", a.DNSEndpointType) populate(objectMap, "defaultToOAuthAuthentication", a.DefaultToOAuthAuthentication) + populate(objectMap, "enableExtendedGroups", a.EnableExtendedGroups) populate(objectMap, "supportsHttpsTrafficOnly", a.EnableHTTPSTrafficOnly) populate(objectMap, "isNfsV3Enabled", a.EnableNfsV3) populate(objectMap, "encryption", a.Encryption) @@ -654,6 +780,9 @@ func (a *AccountPropertiesCreateParameters) UnmarshalJSON(data []byte) error { case "defaultToOAuthAuthentication": err = unpopulate(val, "DefaultToOAuthAuthentication", &a.DefaultToOAuthAuthentication) delete(rawMsg, key) + case "enableExtendedGroups": + err = unpopulate(val, "EnableExtendedGroups", &a.EnableExtendedGroups) + delete(rawMsg, key) case "supportsHttpsTrafficOnly": err = unpopulate(val, "EnableHTTPSTrafficOnly", &a.EnableHTTPSTrafficOnly) delete(rawMsg, key) @@ -716,6 +845,7 @@ func (a AccountPropertiesUpdateParameters) MarshalJSON() ([]byte, error) { populate(objectMap, "customDomain", a.CustomDomain) populate(objectMap, "dnsEndpointType", a.DNSEndpointType) populate(objectMap, "defaultToOAuthAuthentication", a.DefaultToOAuthAuthentication) + populate(objectMap, "enableExtendedGroups", a.EnableExtendedGroups) populate(objectMap, "supportsHttpsTrafficOnly", a.EnableHTTPSTrafficOnly) populate(objectMap, "encryption", a.Encryption) populate(objectMap, "immutableStorageWithVersioning", a.ImmutableStorageWithVersioning) @@ -767,6 +897,9 @@ func (a *AccountPropertiesUpdateParameters) UnmarshalJSON(data []byte) error { case "defaultToOAuthAuthentication": err = unpopulate(val, "DefaultToOAuthAuthentication", &a.DefaultToOAuthAuthentication) delete(rawMsg, key) + case "enableExtendedGroups": + err = unpopulate(val, "EnableExtendedGroups", &a.EnableExtendedGroups) + delete(rawMsg, key) case "supportsHttpsTrafficOnly": err = unpopulate(val, "EnableHTTPSTrafficOnly", &a.EnableHTTPSTrafficOnly) delete(rawMsg, key) @@ -886,8 +1019,8 @@ func (a AccountSasParameters) MarshalJSON() ([]byte, error) { populate(objectMap, "signedProtocol", a.Protocols) populate(objectMap, "signedResourceTypes", a.ResourceTypes) populate(objectMap, "signedServices", a.Services) - populateTimeRFC3339(objectMap, "signedExpiry", a.SharedAccessExpiryTime) - populateTimeRFC3339(objectMap, "signedStart", a.SharedAccessStartTime) + populateDateTimeRFC3339(objectMap, "signedExpiry", a.SharedAccessExpiryTime) + populateDateTimeRFC3339(objectMap, "signedStart", a.SharedAccessStartTime) return json.Marshal(objectMap) } @@ -919,10 +1052,10 @@ func (a *AccountSasParameters) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Services", &a.Services) delete(rawMsg, key) case "signedExpiry": - err = unpopulateTimeRFC3339(val, "SharedAccessExpiryTime", &a.SharedAccessExpiryTime) + err = unpopulateDateTimeRFC3339(val, "SharedAccessExpiryTime", &a.SharedAccessExpiryTime) delete(rawMsg, key) case "signedStart": - err = unpopulateTimeRFC3339(val, "SharedAccessStartTime", &a.SharedAccessStartTime) + err = unpopulateDateTimeRFC3339(val, "SharedAccessStartTime", &a.SharedAccessStartTime) delete(rawMsg, key) } if err != nil { @@ -975,6 +1108,76 @@ func (a *AccountUpdateParameters) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AccountUsage. +func (a AccountUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "liveShares", a.LiveShares) + populate(objectMap, "softDeletedShares", a.SoftDeletedShares) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountUsage. +func (a *AccountUsage) UnmarshalJSON(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 "liveShares": + err = unpopulate(val, "LiveShares", &a.LiveShares) + delete(rawMsg, key) + case "softDeletedShares": + err = unpopulate(val, "SoftDeletedShares", &a.SoftDeletedShares) + 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 AccountUsageElements. +func (a AccountUsageElements) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fileShareCount", a.FileShareCount) + populate(objectMap, "provisionedBandwidthMiBPerSec", a.ProvisionedBandwidthMiBPerSec) + populate(objectMap, "provisionedIOPS", a.ProvisionedIOPS) + populate(objectMap, "provisionedStorageGiB", a.ProvisionedStorageGiB) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountUsageElements. +func (a *AccountUsageElements) UnmarshalJSON(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 "fileShareCount": + err = unpopulate(val, "FileShareCount", &a.FileShareCount) + delete(rawMsg, key) + case "provisionedBandwidthMiBPerSec": + err = unpopulate(val, "ProvisionedBandwidthMiBPerSec", &a.ProvisionedBandwidthMiBPerSec) + delete(rawMsg, key) + case "provisionedIOPS": + err = unpopulate(val, "ProvisionedIOPS", &a.ProvisionedIOPS) + delete(rawMsg, key) + case "provisionedStorageGiB": + err = unpopulate(val, "ProvisionedStorageGiB", &a.ProvisionedStorageGiB) + 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 ActiveDirectoryProperties. func (a ActiveDirectoryProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1147,6 +1350,33 @@ func (b *BlobContainer) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type BlobInventoryCreationTime. +func (b BlobInventoryCreationTime) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "lastNDays", b.LastNDays) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BlobInventoryCreationTime. +func (b *BlobInventoryCreationTime) UnmarshalJSON(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 "lastNDays": + err = unpopulate(val, "LastNDays", &b.LastNDays) + 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 BlobInventoryPolicy. func (b BlobInventoryPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1237,6 +1467,7 @@ func (b *BlobInventoryPolicyDefinition) UnmarshalJSON(data []byte) error { func (b BlobInventoryPolicyFilter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "blobTypes", b.BlobTypes) + populate(objectMap, "creationTime", b.CreationTime) populate(objectMap, "excludePrefix", b.ExcludePrefix) populate(objectMap, "includeBlobVersions", b.IncludeBlobVersions) populate(objectMap, "includeDeleted", b.IncludeDeleted) @@ -1257,6 +1488,9 @@ func (b *BlobInventoryPolicyFilter) UnmarshalJSON(data []byte) error { case "blobTypes": err = unpopulate(val, "BlobTypes", &b.BlobTypes) delete(rawMsg, key) + case "creationTime": + err = unpopulate(val, "CreationTime", &b.CreationTime) + delete(rawMsg, key) case "excludePrefix": err = unpopulate(val, "ExcludePrefix", &b.ExcludePrefix) delete(rawMsg, key) @@ -1283,7 +1517,7 @@ func (b *BlobInventoryPolicyFilter) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BlobInventoryPolicyProperties. func (b BlobInventoryPolicyProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "lastModifiedTime", b.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", b.LastModifiedTime) populate(objectMap, "policy", b.Policy) return json.Marshal(objectMap) } @@ -1298,7 +1532,7 @@ func (b *BlobInventoryPolicyProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &b.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &b.LastModifiedTime) delete(rawMsg, key) case "policy": err = unpopulate(val, "Policy", &b.Policy) @@ -1393,7 +1627,7 @@ func (b *BlobInventoryPolicySchema) UnmarshalJSON(data []byte) error { func (b BlobRestoreParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "blobRanges", b.BlobRanges) - populateTimeRFC3339(objectMap, "timeToRestore", b.TimeToRestore) + populateDateTimeRFC3339(objectMap, "timeToRestore", b.TimeToRestore) return json.Marshal(objectMap) } @@ -1410,7 +1644,7 @@ func (b *BlobRestoreParameters) UnmarshalJSON(data []byte) error { err = unpopulate(val, "BlobRanges", &b.BlobRanges) delete(rawMsg, key) case "timeToRestore": - err = unpopulateTimeRFC3339(val, "TimeToRestore", &b.TimeToRestore) + err = unpopulateDateTimeRFC3339(val, "TimeToRestore", &b.TimeToRestore) delete(rawMsg, key) } if err != nil { @@ -1619,6 +1853,41 @@ func (b *BlobServicePropertiesProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type BurstingConstants. +func (b BurstingConstants) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "burstFloorIOPS", b.BurstFloorIOPS) + populate(objectMap, "burstIOScalar", b.BurstIOScalar) + populate(objectMap, "burstTimeframeSeconds", b.BurstTimeframeSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BurstingConstants. +func (b *BurstingConstants) UnmarshalJSON(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 "burstFloorIOPS": + err = unpopulate(val, "BurstFloorIOPS", &b.BurstFloorIOPS) + delete(rawMsg, key) + case "burstIOScalar": + err = unpopulate(val, "BurstIOScalar", &b.BurstIOScalar) + delete(rawMsg, key) + case "burstTimeframeSeconds": + err = unpopulate(val, "BurstTimeframeSeconds", &b.BurstTimeframeSeconds) + 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 ChangeFeed. func (c ChangeFeed) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1690,7 +1959,7 @@ func (c ContainerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "defaultEncryptionScope", c.DefaultEncryptionScope) populate(objectMap, "deleted", c.Deleted) - populateTimeRFC3339(objectMap, "deletedTime", c.DeletedTime) + populateDateTimeRFC3339(objectMap, "deletedTime", c.DeletedTime) populate(objectMap, "denyEncryptionScopeOverride", c.DenyEncryptionScopeOverride) populate(objectMap, "enableNfsV3AllSquash", c.EnableNfsV3AllSquash) populate(objectMap, "enableNfsV3RootSquash", c.EnableNfsV3RootSquash) @@ -1698,7 +1967,7 @@ func (c ContainerProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "hasLegalHold", c.HasLegalHold) populate(objectMap, "immutabilityPolicy", c.ImmutabilityPolicy) populate(objectMap, "immutableStorageWithVersioning", c.ImmutableStorageWithVersioning) - populateTimeRFC3339(objectMap, "lastModifiedTime", c.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", c.LastModifiedTime) populate(objectMap, "leaseDuration", c.LeaseDuration) populate(objectMap, "leaseState", c.LeaseState) populate(objectMap, "leaseStatus", c.LeaseStatus) @@ -1726,7 +1995,7 @@ func (c *ContainerProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Deleted", &c.Deleted) delete(rawMsg, key) case "deletedTime": - err = unpopulateTimeRFC3339(val, "DeletedTime", &c.DeletedTime) + err = unpopulateDateTimeRFC3339(val, "DeletedTime", &c.DeletedTime) delete(rawMsg, key) case "denyEncryptionScopeOverride": err = unpopulate(val, "DenyEncryptionScopeOverride", &c.DenyEncryptionScopeOverride) @@ -1750,7 +2019,7 @@ func (c *ContainerProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ImmutableStorageWithVersioning", &c.ImmutableStorageWithVersioning) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &c.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &c.LastModifiedTime) delete(rawMsg, key) case "leaseDuration": err = unpopulate(val, "LeaseDuration", &c.LeaseDuration) @@ -2283,7 +2552,7 @@ func (e EncryptionScopeKeyVaultProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "currentVersionedKeyIdentifier", e.CurrentVersionedKeyIdentifier) populate(objectMap, "keyUri", e.KeyURI) - populateTimeRFC3339(objectMap, "lastKeyRotationTimestamp", e.LastKeyRotationTimestamp) + populateDateTimeRFC3339(objectMap, "lastKeyRotationTimestamp", e.LastKeyRotationTimestamp) return json.Marshal(objectMap) } @@ -2303,7 +2572,7 @@ func (e *EncryptionScopeKeyVaultProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "KeyURI", &e.KeyURI) delete(rawMsg, key) case "lastKeyRotationTimestamp": - err = unpopulateTimeRFC3339(val, "LastKeyRotationTimestamp", &e.LastKeyRotationTimestamp) + err = unpopulateDateTimeRFC3339(val, "LastKeyRotationTimestamp", &e.LastKeyRotationTimestamp) delete(rawMsg, key) } if err != nil { @@ -2347,9 +2616,9 @@ func (e *EncryptionScopeListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EncryptionScopeProperties. func (e EncryptionScopeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", e.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", e.CreationTime) populate(objectMap, "keyVaultProperties", e.KeyVaultProperties) - populateTimeRFC3339(objectMap, "lastModifiedTime", e.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", e.LastModifiedTime) populate(objectMap, "requireInfrastructureEncryption", e.RequireInfrastructureEncryption) populate(objectMap, "source", e.Source) populate(objectMap, "state", e.State) @@ -2366,13 +2635,13 @@ func (e *EncryptionScopeProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &e.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &e.CreationTime) delete(rawMsg, key) case "keyVaultProperties": err = unpopulate(val, "KeyVaultProperties", &e.KeyVaultProperties) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &e.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &e.LastModifiedTime) delete(rawMsg, key) case "requireInfrastructureEncryption": err = unpopulate(val, "RequireInfrastructureEncryption", &e.RequireInfrastructureEncryption) @@ -2396,7 +2665,7 @@ func (e EncryptionService) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "enabled", e.Enabled) populate(objectMap, "keyType", e.KeyType) - populateTimeRFC3339(objectMap, "lastEnabledTime", e.LastEnabledTime) + populateDateTimeRFC3339(objectMap, "lastEnabledTime", e.LastEnabledTime) return json.Marshal(objectMap) } @@ -2416,7 +2685,7 @@ func (e *EncryptionService) UnmarshalJSON(data []byte) error { err = unpopulate(val, "KeyType", &e.KeyType) delete(rawMsg, key) case "lastEnabledTime": - err = unpopulateTimeRFC3339(val, "LastEnabledTime", &e.LastEnabledTime) + err = unpopulateDateTimeRFC3339(val, "LastEnabledTime", &e.LastEnabledTime) delete(rawMsg, key) } if err != nil { @@ -2520,15 +2789,16 @@ func (e *Endpoints) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. -func (e ErrorResponse) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. +func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "error", e.Error) + populateAny(objectMap, "info", e.Info) + populate(objectMap, "type", e.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. -func (e *ErrorResponse) UnmarshalJSON(data []byte) error { +// 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) @@ -2536,8 +2806,11 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "error": - err = unpopulate(val, "Error", &e.Error) + 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 { @@ -2547,16 +2820,19 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ErrorResponseBody. -func (e ErrorResponseBody) MarshalJSON() ([]byte, error) { +// 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 ErrorResponseBody. -func (e *ErrorResponseBody) UnmarshalJSON(data []byte) error { +// 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) @@ -2564,12 +2840,21 @@ func (e *ErrorResponseBody) UnmarshalJSON(data []byte) error { 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) @@ -2578,16 +2863,15 @@ func (e *ErrorResponseBody) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ExtendedLocation. -func (e ExtendedLocation) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. +func (e ErrorResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", e.Name) - populate(objectMap, "type", e.Type) + populate(objectMap, "error", e.Error) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation. -func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { +// 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) @@ -2595,11 +2879,8 @@ func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) + case "error": + err = unpopulate(val, "Error", &e.Error) delete(rawMsg, key) } if err != nil { @@ -2609,64 +2890,246 @@ func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type FileServiceItems. -func (f FileServiceItems) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ErrorResponseAutoGenerated. +func (e ErrorResponseAutoGenerated) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", f.Value) + populate(objectMap, "error", e.Error) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type FileServiceItems. -func (f *FileServiceItems) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseAutoGenerated. +func (e *ErrorResponseAutoGenerated) UnmarshalJSON(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) + 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", &f.Value) + case "error": + err = unpopulate(val, "Error", &e.Error) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) + return fmt.Errorf("unmarshalling type %T: %v", e, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type FileServiceProperties. -func (f FileServiceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ErrorResponseBody. +func (e ErrorResponseBody) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "properties", f.FileServiceProperties) - populate(objectMap, "id", f.ID) - populate(objectMap, "name", f.Name) - populate(objectMap, "sku", f.SKU) - populate(objectMap, "type", f.Type) + populate(objectMap, "code", e.Code) + populate(objectMap, "message", e.Message) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type FileServiceProperties. -func (f *FileServiceProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseBody. +func (e *ErrorResponseBody) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", e, err) } for key, val := range rawMsg { var err error switch key { - case "properties": - err = unpopulate(val, "FileServiceProperties", &f.FileServiceProperties) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &f.ID) + case "code": + err = unpopulate(val, "Code", &e.Code) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &f.Name) + case "message": + err = unpopulate(val, "Message", &e.Message) delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &f.SKU) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExecutionTarget. +func (e ExecutionTarget) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "excludePrefix", e.ExcludePrefix) + populate(objectMap, "prefix", e.Prefix) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExecutionTarget. +func (e *ExecutionTarget) UnmarshalJSON(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 "excludePrefix": + err = unpopulate(val, "ExcludePrefix", &e.ExcludePrefix) + delete(rawMsg, key) + case "prefix": + err = unpopulate(val, "Prefix", &e.Prefix) + 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 ExecutionTrigger. +func (e ExecutionTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "parameters", e.Parameters) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExecutionTrigger. +func (e *ExecutionTrigger) UnmarshalJSON(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 "parameters": + err = unpopulate(val, "Parameters", &e.Parameters) + 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 ExecutionTriggerUpdate. +func (e ExecutionTriggerUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "parameters", e.Parameters) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExecutionTriggerUpdate. +func (e *ExecutionTriggerUpdate) UnmarshalJSON(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 "parameters": + err = unpopulate(val, "Parameters", &e.Parameters) + 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 ExtendedLocation. +func (e ExtendedLocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", e.Name) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation. +func (e *ExtendedLocation) UnmarshalJSON(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 "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 FileServiceItems. +func (f FileServiceItems) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileServiceItems. +func (f *FileServiceItems) UnmarshalJSON(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 "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 FileServiceProperties. +func (f FileServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", f.FileServiceProperties) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "sku", f.SKU) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileServiceProperties. +func (f *FileServiceProperties) UnmarshalJSON(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, "FileServiceProperties", &f.FileServiceProperties) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &f.SKU) delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &f.Type) @@ -2714,6 +3177,119 @@ func (f *FileServicePropertiesProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type FileServiceUsage. +func (f FileServiceUsage) 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 FileServiceUsage. +func (f *FileServiceUsage) UnmarshalJSON(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 FileServiceUsageProperties. +func (f FileServiceUsageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "burstingConstants", f.BurstingConstants) + populate(objectMap, "fileShareLimits", f.FileShareLimits) + populate(objectMap, "fileShareRecommendations", f.FileShareRecommendations) + populate(objectMap, "storageAccountLimits", f.StorageAccountLimits) + populate(objectMap, "storageAccountUsage", f.StorageAccountUsage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileServiceUsageProperties. +func (f *FileServiceUsageProperties) UnmarshalJSON(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 "burstingConstants": + err = unpopulate(val, "BurstingConstants", &f.BurstingConstants) + delete(rawMsg, key) + case "fileShareLimits": + err = unpopulate(val, "FileShareLimits", &f.FileShareLimits) + delete(rawMsg, key) + case "fileShareRecommendations": + err = unpopulate(val, "FileShareRecommendations", &f.FileShareRecommendations) + delete(rawMsg, key) + case "storageAccountLimits": + err = unpopulate(val, "StorageAccountLimits", &f.StorageAccountLimits) + delete(rawMsg, key) + case "storageAccountUsage": + err = unpopulate(val, "StorageAccountUsage", &f.StorageAccountUsage) + 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 FileServiceUsages. +func (f FileServiceUsages) 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 FileServiceUsages. +func (f *FileServiceUsages) UnmarshalJSON(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 FileShare. func (f FileShare) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2831,26 +3407,81 @@ func (f *FileShareItems) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type FileShareProperties. +// MarshalJSON implements the json.Marshaller interface for type FileShareLimits. +func (f FileShareLimits) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxProvisionedBandwidthMiBPerSec", f.MaxProvisionedBandwidthMiBPerSec) + populate(objectMap, "maxProvisionedIOPS", f.MaxProvisionedIOPS) + populate(objectMap, "maxProvisionedStorageGiB", f.MaxProvisionedStorageGiB) + populate(objectMap, "minProvisionedBandwidthMiBPerSec", f.MinProvisionedBandwidthMiBPerSec) + populate(objectMap, "minProvisionedIOPS", f.MinProvisionedIOPS) + populate(objectMap, "minProvisionedStorageGiB", f.MinProvisionedStorageGiB) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileShareLimits. +func (f *FileShareLimits) UnmarshalJSON(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 "maxProvisionedBandwidthMiBPerSec": + err = unpopulate(val, "MaxProvisionedBandwidthMiBPerSec", &f.MaxProvisionedBandwidthMiBPerSec) + delete(rawMsg, key) + case "maxProvisionedIOPS": + err = unpopulate(val, "MaxProvisionedIOPS", &f.MaxProvisionedIOPS) + delete(rawMsg, key) + case "maxProvisionedStorageGiB": + err = unpopulate(val, "MaxProvisionedStorageGiB", &f.MaxProvisionedStorageGiB) + delete(rawMsg, key) + case "minProvisionedBandwidthMiBPerSec": + err = unpopulate(val, "MinProvisionedBandwidthMiBPerSec", &f.MinProvisionedBandwidthMiBPerSec) + delete(rawMsg, key) + case "minProvisionedIOPS": + err = unpopulate(val, "MinProvisionedIOPS", &f.MinProvisionedIOPS) + delete(rawMsg, key) + case "minProvisionedStorageGiB": + err = unpopulate(val, "MinProvisionedStorageGiB", &f.MinProvisionedStorageGiB) + 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 FileShareProperties. func (f FileShareProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "accessTier", f.AccessTier) - populateTimeRFC3339(objectMap, "accessTierChangeTime", f.AccessTierChangeTime) + populateDateTimeRFC3339(objectMap, "accessTierChangeTime", f.AccessTierChangeTime) populate(objectMap, "accessTierStatus", f.AccessTierStatus) populate(objectMap, "deleted", f.Deleted) - populateTimeRFC3339(objectMap, "deletedTime", f.DeletedTime) + populateDateTimeRFC3339(objectMap, "deletedTime", f.DeletedTime) populate(objectMap, "enabledProtocols", f.EnabledProtocols) - populateTimeRFC3339(objectMap, "lastModifiedTime", f.LastModifiedTime) + populate(objectMap, "fileSharePaidBursting", f.FileSharePaidBursting) + populate(objectMap, "includedBurstIops", f.IncludedBurstIops) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", f.LastModifiedTime) populate(objectMap, "leaseDuration", f.LeaseDuration) populate(objectMap, "leaseState", f.LeaseState) populate(objectMap, "leaseStatus", f.LeaseStatus) + populate(objectMap, "maxBurstCreditsForIops", f.MaxBurstCreditsForIops) populate(objectMap, "metadata", f.Metadata) + populateDateTimeRFC1123(objectMap, "nextAllowedProvisionedBandwidthDowngradeTime", f.NextAllowedProvisionedBandwidthDowngradeTime) + populateDateTimeRFC1123(objectMap, "nextAllowedProvisionedIopsDowngradeTime", f.NextAllowedProvisionedIopsDowngradeTime) + populateDateTimeRFC1123(objectMap, "nextAllowedQuotaDowngradeTime", f.NextAllowedQuotaDowngradeTime) + populate(objectMap, "provisionedBandwidthMibps", f.ProvisionedBandwidthMibps) + populate(objectMap, "provisionedIops", f.ProvisionedIops) populate(objectMap, "remainingRetentionDays", f.RemainingRetentionDays) populate(objectMap, "rootSquash", f.RootSquash) populate(objectMap, "shareQuota", f.ShareQuota) populate(objectMap, "shareUsageBytes", f.ShareUsageBytes) populate(objectMap, "signedIdentifiers", f.SignedIdentifiers) - populateTimeRFC3339(objectMap, "snapshotTime", f.SnapshotTime) + populateDateTimeRFC3339(objectMap, "snapshotTime", f.SnapshotTime) populate(objectMap, "version", f.Version) return json.Marshal(objectMap) } @@ -2868,7 +3499,7 @@ func (f *FileShareProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AccessTier", &f.AccessTier) delete(rawMsg, key) case "accessTierChangeTime": - err = unpopulateTimeRFC3339(val, "AccessTierChangeTime", &f.AccessTierChangeTime) + err = unpopulateDateTimeRFC3339(val, "AccessTierChangeTime", &f.AccessTierChangeTime) delete(rawMsg, key) case "accessTierStatus": err = unpopulate(val, "AccessTierStatus", &f.AccessTierStatus) @@ -2877,13 +3508,19 @@ func (f *FileShareProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Deleted", &f.Deleted) delete(rawMsg, key) case "deletedTime": - err = unpopulateTimeRFC3339(val, "DeletedTime", &f.DeletedTime) + err = unpopulateDateTimeRFC3339(val, "DeletedTime", &f.DeletedTime) delete(rawMsg, key) case "enabledProtocols": err = unpopulate(val, "EnabledProtocols", &f.EnabledProtocols) delete(rawMsg, key) + case "fileSharePaidBursting": + err = unpopulate(val, "FileSharePaidBursting", &f.FileSharePaidBursting) + delete(rawMsg, key) + case "includedBurstIops": + err = unpopulate(val, "IncludedBurstIops", &f.IncludedBurstIops) + delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &f.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &f.LastModifiedTime) delete(rawMsg, key) case "leaseDuration": err = unpopulate(val, "LeaseDuration", &f.LeaseDuration) @@ -2894,9 +3531,27 @@ func (f *FileShareProperties) UnmarshalJSON(data []byte) error { case "leaseStatus": err = unpopulate(val, "LeaseStatus", &f.LeaseStatus) delete(rawMsg, key) + case "maxBurstCreditsForIops": + err = unpopulate(val, "MaxBurstCreditsForIops", &f.MaxBurstCreditsForIops) + delete(rawMsg, key) case "metadata": err = unpopulate(val, "Metadata", &f.Metadata) delete(rawMsg, key) + case "nextAllowedProvisionedBandwidthDowngradeTime": + err = unpopulateDateTimeRFC1123(val, "NextAllowedProvisionedBandwidthDowngradeTime", &f.NextAllowedProvisionedBandwidthDowngradeTime) + delete(rawMsg, key) + case "nextAllowedProvisionedIopsDowngradeTime": + err = unpopulateDateTimeRFC1123(val, "NextAllowedProvisionedIopsDowngradeTime", &f.NextAllowedProvisionedIopsDowngradeTime) + delete(rawMsg, key) + case "nextAllowedQuotaDowngradeTime": + err = unpopulateDateTimeRFC1123(val, "NextAllowedQuotaDowngradeTime", &f.NextAllowedQuotaDowngradeTime) + delete(rawMsg, key) + case "provisionedBandwidthMibps": + err = unpopulate(val, "ProvisionedBandwidthMibps", &f.ProvisionedBandwidthMibps) + delete(rawMsg, key) + case "provisionedIops": + err = unpopulate(val, "ProvisionedIops", &f.ProvisionedIops) + delete(rawMsg, key) case "remainingRetentionDays": err = unpopulate(val, "RemainingRetentionDays", &f.RemainingRetentionDays) delete(rawMsg, key) @@ -2913,7 +3568,7 @@ func (f *FileShareProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "SignedIdentifiers", &f.SignedIdentifiers) delete(rawMsg, key) case "snapshotTime": - err = unpopulateTimeRFC3339(val, "SnapshotTime", &f.SnapshotTime) + err = unpopulateDateTimeRFC3339(val, "SnapshotTime", &f.SnapshotTime) delete(rawMsg, key) case "version": err = unpopulate(val, "Version", &f.Version) @@ -2926,11 +3581,88 @@ func (f *FileShareProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type FileSharePropertiesFileSharePaidBursting. +func (f FileSharePropertiesFileSharePaidBursting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "paidBurstingEnabled", f.PaidBurstingEnabled) + populate(objectMap, "paidBurstingMaxBandwidthMibps", f.PaidBurstingMaxBandwidthMibps) + populate(objectMap, "paidBurstingMaxIops", f.PaidBurstingMaxIops) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileSharePropertiesFileSharePaidBursting. +func (f *FileSharePropertiesFileSharePaidBursting) UnmarshalJSON(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 "paidBurstingEnabled": + err = unpopulate(val, "PaidBurstingEnabled", &f.PaidBurstingEnabled) + delete(rawMsg, key) + case "paidBurstingMaxBandwidthMibps": + err = unpopulate(val, "PaidBurstingMaxBandwidthMibps", &f.PaidBurstingMaxBandwidthMibps) + delete(rawMsg, key) + case "paidBurstingMaxIops": + err = unpopulate(val, "PaidBurstingMaxIops", &f.PaidBurstingMaxIops) + 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 FileShareRecommendations. +func (f FileShareRecommendations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bandwidthScalar", f.BandwidthScalar) + populate(objectMap, "baseBandwidthMiBPerSec", f.BaseBandwidthMiBPerSec) + populate(objectMap, "baseIOPS", f.BaseIOPS) + populate(objectMap, "ioScalar", f.IoScalar) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileShareRecommendations. +func (f *FileShareRecommendations) UnmarshalJSON(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 "bandwidthScalar": + err = unpopulate(val, "BandwidthScalar", &f.BandwidthScalar) + delete(rawMsg, key) + case "baseBandwidthMiBPerSec": + err = unpopulate(val, "BaseBandwidthMiBPerSec", &f.BaseBandwidthMiBPerSec) + delete(rawMsg, key) + case "baseIOPS": + err = unpopulate(val, "BaseIOPS", &f.BaseIOPS) + delete(rawMsg, key) + case "ioScalar": + err = unpopulate(val, "IoScalar", &f.IoScalar) + 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 GeoReplicationStats. func (g GeoReplicationStats) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "canFailover", g.CanFailover) - populateTimeRFC3339(objectMap, "lastSyncTime", g.LastSyncTime) + populate(objectMap, "canPlannedFailover", g.CanPlannedFailover) + populateDateTimeRFC3339(objectMap, "lastSyncTime", g.LastSyncTime) + populate(objectMap, "postFailoverRedundancy", g.PostFailoverRedundancy) + populate(objectMap, "postPlannedFailoverRedundancy", g.PostPlannedFailoverRedundancy) populate(objectMap, "status", g.Status) return json.Marshal(objectMap) } @@ -2947,8 +3679,17 @@ func (g *GeoReplicationStats) UnmarshalJSON(data []byte) error { case "canFailover": err = unpopulate(val, "CanFailover", &g.CanFailover) delete(rawMsg, key) + case "canPlannedFailover": + err = unpopulate(val, "CanPlannedFailover", &g.CanPlannedFailover) + delete(rawMsg, key) case "lastSyncTime": - err = unpopulateTimeRFC3339(val, "LastSyncTime", &g.LastSyncTime) + err = unpopulateDateTimeRFC3339(val, "LastSyncTime", &g.LastSyncTime) + delete(rawMsg, key) + case "postFailoverRedundancy": + err = unpopulate(val, "PostFailoverRedundancy", &g.PostFailoverRedundancy) + delete(rawMsg, key) + case "postPlannedFailoverRedundancy": + err = unpopulate(val, "PostPlannedFailoverRedundancy", &g.PostPlannedFailoverRedundancy) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &g.Status) @@ -3184,7 +3925,7 @@ func (i ImmutableStorageWithVersioning) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "enabled", i.Enabled) populate(objectMap, "migrationState", i.MigrationState) - populateTimeRFC3339(objectMap, "timeStamp", i.TimeStamp) + populateDateTimeRFC3339(objectMap, "timeStamp", i.TimeStamp) return json.Marshal(objectMap) } @@ -3204,7 +3945,7 @@ func (i *ImmutableStorageWithVersioning) UnmarshalJSON(data []byte) error { err = unpopulate(val, "MigrationState", &i.MigrationState) delete(rawMsg, key) case "timeStamp": - err = unpopulateTimeRFC3339(val, "TimeStamp", &i.TimeStamp) + err = unpopulateDateTimeRFC3339(val, "TimeStamp", &i.TimeStamp) delete(rawMsg, key) } if err != nil { @@ -3217,8 +3958,8 @@ func (i *ImmutableStorageWithVersioning) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type KeyCreationTime. func (k KeyCreationTime) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "key1", k.Key1) - populateTimeRFC3339(objectMap, "key2", k.Key2) + populateDateTimeRFC3339(objectMap, "key1", k.Key1) + populateDateTimeRFC3339(objectMap, "key2", k.Key2) return json.Marshal(objectMap) } @@ -3232,10 +3973,10 @@ func (k *KeyCreationTime) UnmarshalJSON(data []byte) error { var err error switch key { case "key1": - err = unpopulateTimeRFC3339(val, "Key1", &k.Key1) + err = unpopulateDateTimeRFC3339(val, "Key1", &k.Key1) delete(rawMsg, key) case "key2": - err = unpopulateTimeRFC3339(val, "Key2", &k.Key2) + err = unpopulateDateTimeRFC3339(val, "Key2", &k.Key2) delete(rawMsg, key) } if err != nil { @@ -3275,12 +4016,12 @@ func (k *KeyPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties. func (k KeyVaultProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "currentVersionedKeyExpirationTimestamp", k.CurrentVersionedKeyExpirationTimestamp) + populateDateTimeRFC3339(objectMap, "currentVersionedKeyExpirationTimestamp", k.CurrentVersionedKeyExpirationTimestamp) populate(objectMap, "currentVersionedKeyIdentifier", k.CurrentVersionedKeyIdentifier) populate(objectMap, "keyname", k.KeyName) populate(objectMap, "keyvaulturi", k.KeyVaultURI) populate(objectMap, "keyversion", k.KeyVersion) - populateTimeRFC3339(objectMap, "lastKeyRotationTimestamp", k.LastKeyRotationTimestamp) + populateDateTimeRFC3339(objectMap, "lastKeyRotationTimestamp", k.LastKeyRotationTimestamp) return json.Marshal(objectMap) } @@ -3294,7 +4035,7 @@ func (k *KeyVaultProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "currentVersionedKeyExpirationTimestamp": - err = unpopulateTimeRFC3339(val, "CurrentVersionedKeyExpirationTimestamp", &k.CurrentVersionedKeyExpirationTimestamp) + err = unpopulateDateTimeRFC3339(val, "CurrentVersionedKeyExpirationTimestamp", &k.CurrentVersionedKeyExpirationTimestamp) delete(rawMsg, key) case "currentVersionedKeyIdentifier": err = unpopulate(val, "CurrentVersionedKeyIdentifier", &k.CurrentVersionedKeyIdentifier) @@ -3309,7 +4050,7 @@ func (k *KeyVaultProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "KeyVersion", &k.KeyVersion) delete(rawMsg, key) case "lastKeyRotationTimestamp": - err = unpopulateTimeRFC3339(val, "LastKeyRotationTimestamp", &k.LastKeyRotationTimestamp) + err = unpopulateDateTimeRFC3339(val, "LastKeyRotationTimestamp", &k.LastKeyRotationTimestamp) delete(rawMsg, key) } if err != nil { @@ -3990,13 +4731,18 @@ func (l *LocalUserKeys) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LocalUserProperties. func (l LocalUserProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "allowAclAuthorization", l.AllowACLAuthorization) + populate(objectMap, "extendedGroups", l.ExtendedGroups) + populate(objectMap, "groupId", l.GroupID) populate(objectMap, "hasSshKey", l.HasSSHKey) populate(objectMap, "hasSshPassword", l.HasSSHPassword) populate(objectMap, "hasSharedKey", l.HasSharedKey) populate(objectMap, "homeDirectory", l.HomeDirectory) + populate(objectMap, "isNFSv3Enabled", l.IsNFSv3Enabled) populate(objectMap, "permissionScopes", l.PermissionScopes) populate(objectMap, "sshAuthorizedKeys", l.SSHAuthorizedKeys) populate(objectMap, "sid", l.Sid) + populate(objectMap, "userId", l.UserID) return json.Marshal(objectMap) } @@ -4009,6 +4755,15 @@ func (l *LocalUserProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "allowAclAuthorization": + err = unpopulate(val, "AllowACLAuthorization", &l.AllowACLAuthorization) + delete(rawMsg, key) + case "extendedGroups": + err = unpopulate(val, "ExtendedGroups", &l.ExtendedGroups) + delete(rawMsg, key) + case "groupId": + err = unpopulate(val, "GroupID", &l.GroupID) + delete(rawMsg, key) case "hasSshKey": err = unpopulate(val, "HasSSHKey", &l.HasSSHKey) delete(rawMsg, key) @@ -4021,6 +4776,9 @@ func (l *LocalUserProperties) UnmarshalJSON(data []byte) error { case "homeDirectory": err = unpopulate(val, "HomeDirectory", &l.HomeDirectory) delete(rawMsg, key) + case "isNFSv3Enabled": + err = unpopulate(val, "IsNFSv3Enabled", &l.IsNFSv3Enabled) + delete(rawMsg, key) case "permissionScopes": err = unpopulate(val, "PermissionScopes", &l.PermissionScopes) delete(rawMsg, key) @@ -4030,6 +4788,9 @@ func (l *LocalUserProperties) UnmarshalJSON(data []byte) error { case "sid": err = unpopulate(val, "Sid", &l.Sid) delete(rawMsg, key) + case "userId": + err = unpopulate(val, "UserID", &l.UserID) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", l, err) @@ -4068,6 +4829,7 @@ func (l *LocalUserRegeneratePasswordResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LocalUsers. func (l LocalUsers) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) } @@ -4081,6 +4843,9 @@ func (l *LocalUsers) UnmarshalJSON(data []byte) error { 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) @@ -4282,7 +5047,7 @@ func (m *ManagementPolicyFilter) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagementPolicyProperties. func (m ManagementPolicyProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "lastModifiedTime", m.LastModifiedTime) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", m.LastModifiedTime) populate(objectMap, "policy", m.Policy) return json.Marshal(objectMap) } @@ -4297,7 +5062,7 @@ func (m *ManagementPolicyProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, "LastModifiedTime", &m.LastModifiedTime) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &m.LastModifiedTime) delete(rawMsg, key) case "policy": err = unpopulate(val, "Policy", &m.Policy) @@ -4591,626 +5356,686 @@ func (n *NetworkRuleSet) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ObjectReplicationPolicies. -func (o ObjectReplicationPolicies) 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, "value", o.Value) + 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 ObjectReplicationPolicies. -func (o *ObjectReplicationPolicies) UnmarshalJSON(data []byte) error { +// 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", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &o.Value) + 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", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ObjectReplicationPolicy. -func (o ObjectReplicationPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfiguration. +func (n NetworkSecurityPerimeterConfiguration) 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) + populate(objectMap, "id", n.ID) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "systemData", n.SystemData) + populate(objectMap, "type", n.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ObjectReplicationPolicy. -func (o *ObjectReplicationPolicy) UnmarshalJSON(data []byte) error { +// 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", o, 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", &o.ID) + err = unpopulate(val, "ID", &n.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &o.Name) + err = unpopulate(val, "Name", &n.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &o.Properties) + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &n.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &o.Type) + err = unpopulate(val, "Type", &n.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ObjectReplicationPolicyFilter. -func (o ObjectReplicationPolicyFilter) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationList. +func (n NetworkSecurityPerimeterConfigurationList) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "minCreationTime", o.MinCreationTime) - populate(objectMap, "prefixMatch", o.PrefixMatch) + populate(objectMap, "nextLink", n.NextLink) + populate(objectMap, "value", n.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ObjectReplicationPolicyFilter. -func (o *ObjectReplicationPolicyFilter) UnmarshalJSON(data []byte) error { +// 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", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "minCreationTime": - err = unpopulate(val, "MinCreationTime", &o.MinCreationTime) + case "nextLink": + err = unpopulate(val, "NextLink", &n.NextLink) delete(rawMsg, key) - case "prefixMatch": - err = unpopulate(val, "PrefixMatch", &o.PrefixMatch) + case "value": + err = unpopulate(val, "Value", &n.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ObjectReplicationPolicyProperties. -func (o ObjectReplicationPolicyProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationProperties. +func (n NetworkSecurityPerimeterConfigurationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "destinationAccount", o.DestinationAccount) - populateTimeRFC3339(objectMap, "enabledTime", o.EnabledTime) - populate(objectMap, "policyId", o.PolicyID) - populate(objectMap, "rules", o.Rules) - populate(objectMap, "sourceAccount", o.SourceAccount) + 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 ObjectReplicationPolicyProperties. -func (o *ObjectReplicationPolicyProperties) UnmarshalJSON(data []byte) error { +// 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", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "destinationAccount": - err = unpopulate(val, "DestinationAccount", &o.DestinationAccount) + case "networkSecurityPerimeter": + err = unpopulate(val, "NetworkSecurityPerimeter", &n.NetworkSecurityPerimeter) delete(rawMsg, key) - case "enabledTime": - err = unpopulateTimeRFC3339(val, "EnabledTime", &o.EnabledTime) + case "profile": + err = unpopulate(val, "Profile", &n.Profile) delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &o.PolicyID) + case "provisioningIssues": + err = unpopulate(val, "ProvisioningIssues", &n.ProvisioningIssues) delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &o.Rules) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &n.ProvisioningState) delete(rawMsg, key) - case "sourceAccount": - err = unpopulate(val, "SourceAccount", &o.SourceAccount) + case "resourceAssociation": + err = unpopulate(val, "ResourceAssociation", &n.ResourceAssociation) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ObjectReplicationPolicyRule. -func (o ObjectReplicationPolicyRule) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationPropertiesProfile. +func (n NetworkSecurityPerimeterConfigurationPropertiesProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "destinationContainer", o.DestinationContainer) - populate(objectMap, "filters", o.Filters) - populate(objectMap, "ruleId", o.RuleID) - populate(objectMap, "sourceContainer", o.SourceContainer) + 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 ObjectReplicationPolicyRule. -func (o *ObjectReplicationPolicyRule) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationPropertiesProfile. +func (n *NetworkSecurityPerimeterConfigurationPropertiesProfile) UnmarshalJSON(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", n, err) } for key, val := range rawMsg { var err error switch key { - case "destinationContainer": - err = unpopulate(val, "DestinationContainer", &o.DestinationContainer) + case "accessRules": + err = unpopulate(val, "AccessRules", &n.AccessRules) delete(rawMsg, key) - case "filters": - err = unpopulate(val, "Filters", &o.Filters) + case "accessRulesVersion": + err = unpopulate(val, "AccessRulesVersion", &n.AccessRulesVersion) delete(rawMsg, key) - case "ruleId": - err = unpopulate(val, "RuleID", &o.RuleID) + case "diagnosticSettingsVersion": + err = unpopulate(val, "DiagnosticSettingsVersion", &n.DiagnosticSettingsVersion) delete(rawMsg, key) - case "sourceContainer": - err = unpopulate(val, "SourceContainer", &o.SourceContainer) + 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", o, err) + 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) { +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation. +func (n NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "display", o.Display) - populate(objectMap, "name", o.Name) - populate(objectMap, "properties", o.OperationProperties) - populate(objectMap, "origin", o.Origin) + populate(objectMap, "accessMode", n.AccessMode) + populate(objectMap, "name", n.Name) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. -func (o *Operation) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation. +func (n *NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) UnmarshalJSON(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", n, err) } for key, val := range rawMsg { var err error switch key { - case "display": - err = unpopulate(val, "Display", &o.Display) + case "accessMode": + err = unpopulate(val, "AccessMode", &n.AccessMode) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "OperationProperties", &o.OperationProperties) - delete(rawMsg, key) - case "origin": - err = unpopulate(val, "Origin", &o.Origin) + err = unpopulate(val, "Name", &n.Name) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. -func (o OperationDisplay) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NspAccessRule. +func (n NspAccessRule) 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) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. -func (o *OperationDisplay) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NspAccessRule. +func (n *NspAccessRule) UnmarshalJSON(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", n, 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) + case "name": + err = unpopulate(val, "Name", &n.Name) delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &o.Resource) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OperationListResult. -func (o OperationListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NspAccessRuleProperties. +func (n NspAccessRuleProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", o.Value) + 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 OperationListResult. -func (o *OperationListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NspAccessRuleProperties. +func (n *NspAccessRuleProperties) UnmarshalJSON(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", n, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &o.Value) + 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", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OperationProperties. -func (o OperationProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NspAccessRulePropertiesSubscriptionsItem. +func (n NspAccessRulePropertiesSubscriptionsItem) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "serviceSpecification", o.ServiceSpecification) + populate(objectMap, "id", n.ID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties. -func (o *OperationProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NspAccessRulePropertiesSubscriptionsItem. +func (n *NspAccessRulePropertiesSubscriptionsItem) UnmarshalJSON(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", n, err) } for key, val := range rawMsg { var err error switch key { - case "serviceSpecification": - err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) + case "id": + err = unpopulate(val, "ID", &n.ID) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PermissionScope. -func (p PermissionScope) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ObjectReplicationPolicies. +func (o ObjectReplicationPolicies) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "permissions", p.Permissions) - populate(objectMap, "resourceName", p.ResourceName) - populate(objectMap, "service", p.Service) + populate(objectMap, "value", o.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PermissionScope. -func (p *PermissionScope) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ObjectReplicationPolicies. +func (o *ObjectReplicationPolicies) UnmarshalJSON(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", o, err) } for key, val := range rawMsg { var err error switch key { - case "permissions": - err = unpopulate(val, "Permissions", &p.Permissions) - delete(rawMsg, key) - case "resourceName": - err = unpopulate(val, "ResourceName", &p.ResourceName) - delete(rawMsg, key) - case "service": - err = unpopulate(val, "Service", &p.Service) + case "value": + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, 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 ObjectReplicationPolicy. +func (o ObjectReplicationPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) + 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 PrivateEndpoint. -func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ObjectReplicationPolicy. +func (o *ObjectReplicationPolicy) UnmarshalJSON(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", o, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, "ID", &p.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", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, 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 ObjectReplicationPolicyFilter. +func (o ObjectReplicationPolicyFilter) 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, "minCreationTime", o.MinCreationTime) + populate(objectMap, "prefixMatch", o.PrefixMatch) 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 ObjectReplicationPolicyFilter. +func (o *ObjectReplicationPolicyFilter) UnmarshalJSON(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", o, 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) + case "minCreationTime": + err = unpopulate(val, "MinCreationTime", &o.MinCreationTime) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) + case "prefixMatch": + err = unpopulate(val, "PrefixMatch", &o.PrefixMatch) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, 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 ObjectReplicationPolicyProperties. +func (o ObjectReplicationPolicyProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", p.Value) + populate(objectMap, "destinationAccount", o.DestinationAccount) + populateDateTimeRFC3339(objectMap, "enabledTime", o.EnabledTime) + populate(objectMap, "metrics", o.Metrics) + populate(objectMap, "policyId", o.PolicyID) + populate(objectMap, "rules", o.Rules) + populate(objectMap, "sourceAccount", o.SourceAccount) 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 ObjectReplicationPolicyProperties. +func (o *ObjectReplicationPolicyProperties) UnmarshalJSON(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", o, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) + case "destinationAccount": + err = unpopulate(val, "DestinationAccount", &o.DestinationAccount) + delete(rawMsg, key) + case "enabledTime": + err = unpopulateDateTimeRFC3339(val, "EnabledTime", &o.EnabledTime) + delete(rawMsg, key) + case "metrics": + err = unpopulate(val, "Metrics", &o.Metrics) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &o.PolicyID) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &o.Rules) + delete(rawMsg, key) + case "sourceAccount": + err = unpopulate(val, "SourceAccount", &o.SourceAccount) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, 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 ObjectReplicationPolicyPropertiesMetrics. +func (o ObjectReplicationPolicyPropertiesMetrics) 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, "enabled", o.Enabled) 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 ObjectReplicationPolicyPropertiesMetrics. +func (o *ObjectReplicationPolicyPropertiesMetrics) UnmarshalJSON(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", o, 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) + case "enabled": + err = unpopulate(val, "Enabled", &o.Enabled) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, 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 ObjectReplicationPolicyRule. +func (o ObjectReplicationPolicyRule) 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, "destinationContainer", o.DestinationContainer) + populate(objectMap, "filters", o.Filters) + populate(objectMap, "ruleId", o.RuleID) + populate(objectMap, "sourceContainer", o.SourceContainer) 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 ObjectReplicationPolicyRule. +func (o *ObjectReplicationPolicyRule) UnmarshalJSON(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", o, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) + case "destinationContainer": + err = unpopulate(val, "DestinationContainer", &o.DestinationContainer) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) + case "filters": + err = unpopulate(val, "Filters", &o.Filters) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) + case "ruleId": + err = unpopulate(val, "RuleID", &o.RuleID) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) + case "sourceContainer": + err = unpopulate(val, "SourceContainer", &o.SourceContainer) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, 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 Operation. +func (o Operation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", p.Value) + populate(objectMap, "display", o.Display) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.OperationProperties) + populate(objectMap, "origin", o.Origin) 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 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", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "OperationProperties", &o.OperationProperties) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, 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 OperationDisplay. +func (o OperationDisplay) 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, "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 PrivateLinkResourceProperties. -func (p *PrivateLinkResourceProperties) 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", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "groupId": - err = unpopulate(val, "GroupID", &p.GroupID) + case "description": + err = unpopulate(val, "Description", &o.Description) delete(rawMsg, key) - case "requiredMembers": - err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) delete(rawMsg, key) - case "requiredZoneNames": - err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + 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", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, 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 OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "actionRequired", p.ActionRequired) - populate(objectMap, "description", p.Description) - populate(objectMap, "status", p.Status) + populate(objectMap, "value", o.Value) 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 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", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "actionRequired": - err = unpopulate(val, "ActionRequired", &p.ActionRequired) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) + case "value": + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationProperties. +func (o OperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", o.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties. +func (o *OperationProperties) UnmarshalJSON(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 "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ProtectedAppendWritesHistory. -func (p ProtectedAppendWritesHistory) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PermissionScope. +func (p PermissionScope) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "allowProtectedAppendWritesAll", p.AllowProtectedAppendWritesAll) - populateTimeRFC3339(objectMap, "timestamp", p.Timestamp) + populate(objectMap, "permissions", p.Permissions) + populate(objectMap, "resourceName", p.ResourceName) + populate(objectMap, "service", p.Service) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectedAppendWritesHistory. -func (p *ProtectedAppendWritesHistory) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PermissionScope. +func (p *PermissionScope) UnmarshalJSON(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) @@ -5218,11 +6043,14 @@ func (p *ProtectedAppendWritesHistory) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "allowProtectedAppendWritesAll": - err = unpopulate(val, "AllowProtectedAppendWritesAll", &p.AllowProtectedAppendWritesAll) + case "permissions": + err = unpopulate(val, "Permissions", &p.Permissions) delete(rawMsg, key) - case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &p.Timestamp) + case "resourceName": + err = unpopulate(val, "ResourceName", &p.ResourceName) + delete(rawMsg, key) + case "service": + err = unpopulate(val, "Service", &p.Service) delete(rawMsg, key) } if err != nil { @@ -5232,15 +6060,15 @@ func (p *ProtectedAppendWritesHistory) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ProtocolSettings. -func (p ProtocolSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. +func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "smb", p.Smb) + populate(objectMap, "id", p.ID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtocolSettings. -func (p *ProtocolSettings) 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", p, err) @@ -5248,8 +6076,8 @@ func (p *ProtocolSettings) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "smb": - err = unpopulate(val, "Smb", &p.Smb) + case "id": + err = unpopulate(val, "ID", &p.ID) delete(rawMsg, key) } if err != nil { @@ -5259,17 +6087,18 @@ func (p *ProtocolSettings) UnmarshalJSON(data []byte) error { 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 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 ProxyResource. -func (p *ProxyResource) 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", p, err) @@ -5283,6 +6112,9 @@ func (p *ProxyResource) UnmarshalJSON(data []byte) error { 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) @@ -5294,540 +6126,975 @@ func (p *ProxyResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Queue. -func (q Queue) 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, "id", q.ID) - populate(objectMap, "name", q.Name) - populate(objectMap, "properties", q.QueueProperties) - populate(objectMap, "type", q.Type) + populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Queue. -func (q *Queue) 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", q, 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", &q.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &q.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "QueueProperties", &q.QueueProperties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &q.Type) + case "value": + err = unpopulate(val, "Value", &p.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type QueueProperties. -func (q QueueProperties) 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, "approximateMessageCount", q.ApproximateMessageCount) - populate(objectMap, "metadata", q.Metadata) + 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 QueueProperties. -func (q *QueueProperties) 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", q, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "approximateMessageCount": - err = unpopulate(val, "ApproximateMessageCount", &q.ApproximateMessageCount) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &q.Metadata) + 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", q, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type QueueServiceProperties. -func (q QueueServiceProperties) 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, "id", q.ID) - populate(objectMap, "name", q.Name) - populate(objectMap, "properties", q.QueueServiceProperties) - populate(objectMap, "type", q.Type) + 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 QueueServiceProperties. -func (q *QueueServiceProperties) 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", q, 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", &q.ID) + err = unpopulate(val, "ID", &p.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &q.Name) + err = unpopulate(val, "Name", &p.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "QueueServiceProperties", &q.QueueServiceProperties) + err = unpopulate(val, "Properties", &p.Properties) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &q.Type) + err = unpopulate(val, "Type", &p.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type QueueServicePropertiesProperties. -func (q QueueServicePropertiesProperties) 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, "cors", q.Cors) + populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type QueueServicePropertiesProperties. -func (q *QueueServicePropertiesProperties) 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", q, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "cors": - err = unpopulate(val, "Cors", &q.Cors) + case "value": + err = unpopulate(val, "Value", &p.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) + return fmt.Errorf("unmarshalling type %T: %v", p, 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 PrivateLinkResourceProperties. +func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "type", r.Type) + 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 Resource. -func (r *Resource) 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", r, 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", &r.ID) + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ResourceAccessRule. -func (r ResourceAccessRule) 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, "resourceId", r.ResourceID) - populate(objectMap, "tenantId", r.TenantID) + populate(objectMap, "actionRequired", p.ActionRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceAccessRule. -func (r *ResourceAccessRule) 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", r, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "resourceId": - err = unpopulate(val, "ResourceID", &r.ResourceID) + case "actionRequired": + err = unpopulate(val, "ActionRequired", &p.ActionRequired) delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &r.TenantID) + 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", r, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type RestorePolicyProperties. -func (r RestorePolicyProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ProtectedAppendWritesHistory. +func (p ProtectedAppendWritesHistory) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "days", r.Days) - populate(objectMap, "enabled", r.Enabled) - populateTimeRFC3339(objectMap, "lastEnabledTime", r.LastEnabledTime) - populateTimeRFC3339(objectMap, "minRestoreTime", r.MinRestoreTime) + populate(objectMap, "allowProtectedAppendWritesAll", p.AllowProtectedAppendWritesAll) + populateDateTimeRFC3339(objectMap, "timestamp", p.Timestamp) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePolicyProperties. -func (r *RestorePolicyProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectedAppendWritesHistory. +func (p *ProtectedAppendWritesHistory) UnmarshalJSON(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", p, err) } for key, val := range rawMsg { var err error switch key { - case "days": - err = unpopulate(val, "Days", &r.Days) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &r.Enabled) - delete(rawMsg, key) - case "lastEnabledTime": - err = unpopulateTimeRFC3339(val, "LastEnabledTime", &r.LastEnabledTime) + case "allowProtectedAppendWritesAll": + err = unpopulate(val, "AllowProtectedAppendWritesAll", &p.AllowProtectedAppendWritesAll) delete(rawMsg, key) - case "minRestoreTime": - err = unpopulateTimeRFC3339(val, "MinRestoreTime", &r.MinRestoreTime) + case "timestamp": + err = unpopulateDateTimeRFC3339(val, "Timestamp", &p.Timestamp) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Restriction. -func (r Restriction) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ProtocolSettings. +func (p ProtocolSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "reasonCode", r.ReasonCode) - populate(objectMap, "type", r.Type) - populate(objectMap, "values", r.Values) + populate(objectMap, "smb", p.Smb) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Restriction. -func (r *Restriction) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtocolSettings. +func (p *ProtocolSettings) UnmarshalJSON(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", p, err) } for key, val := range rawMsg { var err error switch key { - case "reasonCode": - err = unpopulate(val, "ReasonCode", &r.ReasonCode) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - case "values": - err = unpopulate(val, "Values", &r.Values) + case "smb": + err = unpopulate(val, "Smb", &p.Smb) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type RoutingPreference. -func (r RoutingPreference) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ProvisioningIssue. +func (p ProvisioningIssue) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "publishInternetEndpoints", r.PublishInternetEndpoints) - populate(objectMap, "publishMicrosoftEndpoints", r.PublishMicrosoftEndpoints) - populate(objectMap, "routingChoice", r.RoutingChoice) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingPreference. -func (r *RoutingPreference) UnmarshalJSON(data []byte) error { +// 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", r, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "publishInternetEndpoints": - err = unpopulate(val, "PublishInternetEndpoints", &r.PublishInternetEndpoints) - delete(rawMsg, key) - case "publishMicrosoftEndpoints": - err = unpopulate(val, "PublishMicrosoftEndpoints", &r.PublishMicrosoftEndpoints) + case "name": + err = unpopulate(val, "Name", &p.Name) delete(rawMsg, key) - case "routingChoice": - err = unpopulate(val, "RoutingChoice", &r.RoutingChoice) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } 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 ProvisioningIssueProperties. +func (p ProvisioningIssueProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", s.Name) - populate(objectMap, "tier", s.Tier) + populate(objectMap, "description", p.Description) + populate(objectMap, "issueType", p.IssueType) + populate(objectMap, "severity", p.Severity) 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 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", s, err) + 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", &s.Name) + case "description": + err = unpopulate(val, "Description", &p.Description) delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &s.Tier) + case "issueType": + err = unpopulate(val, "IssueType", &p.IssueType) + delete(rawMsg, key) + case "severity": + err = unpopulate(val, "Severity", &p.Severity) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type SKUCapability. -func (s SKUCapability) 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, "name", s.Name) - populate(objectMap, "value", s.Value) + 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 SKUCapability. -func (s *SKUCapability) 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", s, 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", &p.ID) + delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &s.Name) + err = unpopulate(val, "Name", &p.Name) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) + case "type": + err = unpopulate(val, "Type", &p.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type SKUInformation. -func (s SKUInformation) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ProxyResourceAutoGenerated. +func (p ProxyResourceAutoGenerated) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "capabilities", s.Capabilities) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "locations", s.Locations) - populate(objectMap, "name", s.Name) - populate(objectMap, "resourceType", s.ResourceType) - populate(objectMap, "restrictions", s.Restrictions) - populate(objectMap, "tier", s.Tier) + 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 SKUInformation. -func (s *SKUInformation) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResourceAutoGenerated. +func (p *ProxyResourceAutoGenerated) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "capabilities": - err = unpopulate(val, "Capabilities", &s.Capabilities) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &s.Kind) - delete(rawMsg, key) - case "locations": - err = unpopulate(val, "Locations", &s.Locations) + case "id": + err = unpopulate(val, "ID", &p.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &s.ResourceType) + err = unpopulate(val, "Name", &p.Name) delete(rawMsg, key) - case "restrictions": - err = unpopulate(val, "Restrictions", &s.Restrictions) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &s.Tier) + case "type": + err = unpopulate(val, "Type", &p.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type SKUListResult. -func (s SKUListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Queue. +func (q Queue) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", s.Value) + populate(objectMap, "id", q.ID) + populate(objectMap, "name", q.Name) + populate(objectMap, "properties", q.QueueProperties) + populate(objectMap, "type", q.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SKUListResult. -func (s *SKUListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Queue. +func (q *Queue) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", q, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &s.Value) + 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, "QueueProperties", &q.QueueProperties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &q.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", q, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type SSHPublicKey. -func (s SSHPublicKey) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type QueueProperties. +func (q QueueProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", s.Description) - populate(objectMap, "key", s.Key) + populate(objectMap, "approximateMessageCount", q.ApproximateMessageCount) + populate(objectMap, "metadata", q.Metadata) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKey. -func (s *SSHPublicKey) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type QueueProperties. +func (q *QueueProperties) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", q, err) } for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &s.Description) + case "approximateMessageCount": + err = unpopulate(val, "ApproximateMessageCount", &q.ApproximateMessageCount) delete(rawMsg, key) - case "key": - err = unpopulate(val, "Key", &s.Key) + case "metadata": + err = unpopulate(val, "Metadata", &q.Metadata) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", q, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type SasPolicy. -func (s SasPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type QueueServiceProperties. +func (q QueueServiceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "expirationAction", s.ExpirationAction) - populate(objectMap, "sasExpirationPeriod", s.SasExpirationPeriod) + populate(objectMap, "id", q.ID) + populate(objectMap, "name", q.Name) + populate(objectMap, "properties", q.QueueServiceProperties) + populate(objectMap, "type", q.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SasPolicy. -func (s *SasPolicy) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type QueueServiceProperties. +func (q *QueueServiceProperties) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", q, err) } for key, val := range rawMsg { var err error switch key { - case "expirationAction": - err = unpopulate(val, "ExpirationAction", &s.ExpirationAction) + case "id": + err = unpopulate(val, "ID", &q.ID) delete(rawMsg, key) - case "sasExpirationPeriod": - err = unpopulate(val, "SasExpirationPeriod", &s.SasExpirationPeriod) + case "name": + err = unpopulate(val, "Name", &q.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "QueueServiceProperties", &q.QueueServiceProperties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &q.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", q, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ServiceSasParameters. -func (s ServiceSasParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type QueueServicePropertiesProperties. +func (q QueueServicePropertiesProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "rscc", s.CacheControl) - populate(objectMap, "canonicalizedResource", s.CanonicalizedResource) - populate(objectMap, "rscd", s.ContentDisposition) - populate(objectMap, "rsce", s.ContentEncoding) - populate(objectMap, "rscl", s.ContentLanguage) - populate(objectMap, "rsct", s.ContentType) - populate(objectMap, "signedIp", s.IPAddressOrRange) - populate(objectMap, "signedIdentifier", s.Identifier) - populate(objectMap, "keyToSign", s.KeyToSign) - populate(objectMap, "endPk", s.PartitionKeyEnd) - populate(objectMap, "startPk", s.PartitionKeyStart) - populate(objectMap, "signedPermission", s.Permissions) - populate(objectMap, "signedProtocol", s.Protocols) - populate(objectMap, "signedResource", s.Resource) - populate(objectMap, "endRk", s.RowKeyEnd) - populate(objectMap, "startRk", s.RowKeyStart) - populateTimeRFC3339(objectMap, "signedExpiry", s.SharedAccessExpiryTime) - populateTimeRFC3339(objectMap, "signedStart", s.SharedAccessStartTime) + populate(objectMap, "cors", q.Cors) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueueServicePropertiesProperties. +func (q *QueueServicePropertiesProperties) UnmarshalJSON(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 "cors": + err = unpopulate(val, "Cors", &q.Cors) + 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 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 ResourceAccessRule. +func (r ResourceAccessRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceId", r.ResourceID) + populate(objectMap, "tenantId", r.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceAccessRule. +func (r *ResourceAccessRule) UnmarshalJSON(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 "resourceId": + err = unpopulate(val, "ResourceID", &r.ResourceID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &r.TenantID) + 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 ResourceAutoGenerated. +func (r ResourceAutoGenerated) 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) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceAutoGenerated. +func (r *ResourceAutoGenerated) UnmarshalJSON(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 "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + 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 RestorePolicyProperties. +func (r RestorePolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "days", r.Days) + populate(objectMap, "enabled", r.Enabled) + populateDateTimeRFC3339(objectMap, "lastEnabledTime", r.LastEnabledTime) + populateDateTimeRFC3339(objectMap, "minRestoreTime", r.MinRestoreTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePolicyProperties. +func (r *RestorePolicyProperties) UnmarshalJSON(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 "days": + err = unpopulate(val, "Days", &r.Days) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &r.Enabled) + delete(rawMsg, key) + case "lastEnabledTime": + err = unpopulateDateTimeRFC3339(val, "LastEnabledTime", &r.LastEnabledTime) + delete(rawMsg, key) + case "minRestoreTime": + err = unpopulateDateTimeRFC3339(val, "MinRestoreTime", &r.MinRestoreTime) + 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 Restriction. +func (r Restriction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "reasonCode", r.ReasonCode) + populate(objectMap, "type", r.Type) + populate(objectMap, "values", r.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Restriction. +func (r *Restriction) UnmarshalJSON(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 "reasonCode": + err = unpopulate(val, "ReasonCode", &r.ReasonCode) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &r.Values) + 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 RoutingPreference. +func (r RoutingPreference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "publishInternetEndpoints", r.PublishInternetEndpoints) + populate(objectMap, "publishMicrosoftEndpoints", r.PublishMicrosoftEndpoints) + populate(objectMap, "routingChoice", r.RoutingChoice) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingPreference. +func (r *RoutingPreference) UnmarshalJSON(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 "publishInternetEndpoints": + err = unpopulate(val, "PublishInternetEndpoints", &r.PublishInternetEndpoints) + delete(rawMsg, key) + case "publishMicrosoftEndpoints": + err = unpopulate(val, "PublishMicrosoftEndpoints", &r.PublishMicrosoftEndpoints) + delete(rawMsg, key) + case "routingChoice": + err = unpopulate(val, "RoutingChoice", &r.RoutingChoice) + 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, "name", s.Name) + 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 "name": + err = unpopulate(val, "Name", &s.Name) + 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 SKUCapability. +func (s SKUCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapability. +func (s *SKUCapability) UnmarshalJSON(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 "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 SKUInformation. +func (s SKUInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capabilities", s.Capabilities) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "locations", s.Locations) + populate(objectMap, "name", s.Name) + populate(objectMap, "resourceType", s.ResourceType) + populate(objectMap, "restrictions", s.Restrictions) + populate(objectMap, "tier", s.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUInformation. +func (s *SKUInformation) UnmarshalJSON(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 "capabilities": + err = unpopulate(val, "Capabilities", &s.Capabilities) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &s.Locations) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &s.ResourceType) + delete(rawMsg, key) + case "restrictions": + err = unpopulate(val, "Restrictions", &s.Restrictions) + 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 SKUListResult. +func (s SKUListResult) 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 SKUListResult. +func (s *SKUListResult) UnmarshalJSON(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 SSHPublicKey. +func (s SSHPublicKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "key", s.Key) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKey. +func (s *SSHPublicKey) UnmarshalJSON(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 "key": + err = unpopulate(val, "Key", &s.Key) + 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 SasPolicy. +func (s SasPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "expirationAction", s.ExpirationAction) + populate(objectMap, "sasExpirationPeriod", s.SasExpirationPeriod) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SasPolicy. +func (s *SasPolicy) UnmarshalJSON(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 "expirationAction": + err = unpopulate(val, "ExpirationAction", &s.ExpirationAction) + delete(rawMsg, key) + case "sasExpirationPeriod": + err = unpopulate(val, "SasExpirationPeriod", &s.SasExpirationPeriod) + 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 ServiceSasParameters. +func (s ServiceSasParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "rscc", s.CacheControl) + populate(objectMap, "canonicalizedResource", s.CanonicalizedResource) + populate(objectMap, "rscd", s.ContentDisposition) + populate(objectMap, "rsce", s.ContentEncoding) + populate(objectMap, "rscl", s.ContentLanguage) + populate(objectMap, "rsct", s.ContentType) + populate(objectMap, "signedIp", s.IPAddressOrRange) + populate(objectMap, "signedIdentifier", s.Identifier) + populate(objectMap, "keyToSign", s.KeyToSign) + populate(objectMap, "endPk", s.PartitionKeyEnd) + populate(objectMap, "startPk", s.PartitionKeyStart) + populate(objectMap, "signedPermission", s.Permissions) + populate(objectMap, "signedProtocol", s.Protocols) + populate(objectMap, "signedResource", s.Resource) + populate(objectMap, "endRk", s.RowKeyEnd) + populate(objectMap, "startRk", s.RowKeyStart) + populateDateTimeRFC3339(objectMap, "signedExpiry", s.SharedAccessExpiryTime) + populateDateTimeRFC3339(objectMap, "signedStart", s.SharedAccessStartTime) return json.Marshal(objectMap) } @@ -5835,233 +7102,722 @@ func (s ServiceSasParameters) MarshalJSON() ([]byte, error) { func (s *ServiceSasParameters) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "rscc": + err = unpopulate(val, "CacheControl", &s.CacheControl) + delete(rawMsg, key) + case "canonicalizedResource": + err = unpopulate(val, "CanonicalizedResource", &s.CanonicalizedResource) + delete(rawMsg, key) + case "rscd": + err = unpopulate(val, "ContentDisposition", &s.ContentDisposition) + delete(rawMsg, key) + case "rsce": + err = unpopulate(val, "ContentEncoding", &s.ContentEncoding) + delete(rawMsg, key) + case "rscl": + err = unpopulate(val, "ContentLanguage", &s.ContentLanguage) + delete(rawMsg, key) + case "rsct": + err = unpopulate(val, "ContentType", &s.ContentType) + delete(rawMsg, key) + case "signedIp": + err = unpopulate(val, "IPAddressOrRange", &s.IPAddressOrRange) + delete(rawMsg, key) + case "signedIdentifier": + err = unpopulate(val, "Identifier", &s.Identifier) + delete(rawMsg, key) + case "keyToSign": + err = unpopulate(val, "KeyToSign", &s.KeyToSign) + delete(rawMsg, key) + case "endPk": + err = unpopulate(val, "PartitionKeyEnd", &s.PartitionKeyEnd) + delete(rawMsg, key) + case "startPk": + err = unpopulate(val, "PartitionKeyStart", &s.PartitionKeyStart) + delete(rawMsg, key) + case "signedPermission": + err = unpopulate(val, "Permissions", &s.Permissions) + delete(rawMsg, key) + case "signedProtocol": + err = unpopulate(val, "Protocols", &s.Protocols) + delete(rawMsg, key) + case "signedResource": + err = unpopulate(val, "Resource", &s.Resource) + delete(rawMsg, key) + case "endRk": + err = unpopulate(val, "RowKeyEnd", &s.RowKeyEnd) + delete(rawMsg, key) + case "startRk": + err = unpopulate(val, "RowKeyStart", &s.RowKeyStart) + delete(rawMsg, key) + case "signedExpiry": + err = unpopulateDateTimeRFC3339(val, "SharedAccessExpiryTime", &s.SharedAccessExpiryTime) + delete(rawMsg, key) + case "signedStart": + err = unpopulateDateTimeRFC3339(val, "SharedAccessStartTime", &s.SharedAccessStartTime) + 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 ServiceSpecification. +func (s ServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "metricSpecifications", s.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification. +func (s *ServiceSpecification) UnmarshalJSON(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 "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &s.MetricSpecifications) + 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 SignedIdentifier. +func (s SignedIdentifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessPolicy", s.AccessPolicy) + populate(objectMap, "id", s.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SignedIdentifier. +func (s *SignedIdentifier) UnmarshalJSON(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 "accessPolicy": + err = unpopulate(val, "AccessPolicy", &s.AccessPolicy) + delete(rawMsg, 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 SmbSetting. +func (s SmbSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authenticationMethods", s.AuthenticationMethods) + populate(objectMap, "channelEncryption", s.ChannelEncryption) + populate(objectMap, "kerberosTicketEncryption", s.KerberosTicketEncryption) + populate(objectMap, "multichannel", s.Multichannel) + populate(objectMap, "versions", s.Versions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SmbSetting. +func (s *SmbSetting) UnmarshalJSON(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 "authenticationMethods": + err = unpopulate(val, "AuthenticationMethods", &s.AuthenticationMethods) + delete(rawMsg, key) + case "channelEncryption": + err = unpopulate(val, "ChannelEncryption", &s.ChannelEncryption) + delete(rawMsg, key) + case "kerberosTicketEncryption": + err = unpopulate(val, "KerberosTicketEncryption", &s.KerberosTicketEncryption) + delete(rawMsg, key) + case "multichannel": + err = unpopulate(val, "Multichannel", &s.Multichannel) + delete(rawMsg, key) + case "versions": + err = unpopulate(val, "Versions", &s.Versions) + 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 Table. +func (t Table) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.TableProperties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Table. +func (t *Table) UnmarshalJSON(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, "TableProperties", &t.TableProperties) + 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 TableAccessPolicy. +func (t TableAccessPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expiryTime", t.ExpiryTime) + populate(objectMap, "permission", t.Permission) + populateDateTimeRFC3339(objectMap, "startTime", t.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableAccessPolicy. +func (t *TableAccessPolicy) UnmarshalJSON(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 "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &t.ExpiryTime) + delete(rawMsg, key) + case "permission": + err = unpopulate(val, "Permission", &t.Permission) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(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 TableProperties. +func (t TableProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "signedIdentifiers", t.SignedIdentifiers) + populate(objectMap, "tableName", t.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableProperties. +func (t *TableProperties) UnmarshalJSON(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 "rscc": - err = unpopulate(val, "CacheControl", &s.CacheControl) + case "signedIdentifiers": + err = unpopulate(val, "SignedIdentifiers", &t.SignedIdentifiers) delete(rawMsg, key) - case "canonicalizedResource": - err = unpopulate(val, "CanonicalizedResource", &s.CanonicalizedResource) + case "tableName": + err = unpopulate(val, "TableName", &t.TableName) delete(rawMsg, key) - case "rscd": - err = unpopulate(val, "ContentDisposition", &s.ContentDisposition) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TableServiceProperties. +func (t TableServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.TableServiceProperties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableServiceProperties. +func (t *TableServiceProperties) UnmarshalJSON(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 "rsce": - err = unpopulate(val, "ContentEncoding", &s.ContentEncoding) + case "name": + err = unpopulate(val, "Name", &t.Name) delete(rawMsg, key) - case "rscl": - err = unpopulate(val, "ContentLanguage", &s.ContentLanguage) + case "properties": + err = unpopulate(val, "TableServiceProperties", &t.TableServiceProperties) delete(rawMsg, key) - case "rsct": - err = unpopulate(val, "ContentType", &s.ContentType) + case "type": + err = unpopulate(val, "Type", &t.Type) delete(rawMsg, key) - case "signedIp": - err = unpopulate(val, "IPAddressOrRange", &s.IPAddressOrRange) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TableServicePropertiesProperties. +func (t TableServicePropertiesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cors", t.Cors) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableServicePropertiesProperties. +func (t *TableServicePropertiesProperties) UnmarshalJSON(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 "cors": + err = unpopulate(val, "Cors", &t.Cors) delete(rawMsg, key) - case "signedIdentifier": - err = unpopulate(val, "Identifier", &s.Identifier) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TableSignedIdentifier. +func (t TableSignedIdentifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessPolicy", t.AccessPolicy) + populate(objectMap, "id", t.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableSignedIdentifier. +func (t *TableSignedIdentifier) UnmarshalJSON(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 "accessPolicy": + err = unpopulate(val, "AccessPolicy", &t.AccessPolicy) delete(rawMsg, key) - case "keyToSign": - err = unpopulate(val, "KeyToSign", &s.KeyToSign) + case "id": + err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) - case "endPk": - err = unpopulate(val, "PartitionKeyEnd", &s.PartitionKeyEnd) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagFilter. +func (t TagFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", t.Name) + populate(objectMap, "op", t.Op) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagFilter. +func (t *TagFilter) UnmarshalJSON(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 "name": + err = unpopulate(val, "Name", &t.Name) delete(rawMsg, key) - case "startPk": - err = unpopulate(val, "PartitionKeyStart", &s.PartitionKeyStart) + case "op": + err = unpopulate(val, "Op", &t.Op) delete(rawMsg, key) - case "signedPermission": - err = unpopulate(val, "Permissions", &s.Permissions) + case "value": + err = unpopulate(val, "Value", &t.Value) delete(rawMsg, key) - case "signedProtocol": - err = unpopulate(val, "Protocols", &s.Protocols) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagProperty. +func (t TagProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "objectIdentifier", t.ObjectIdentifier) + populate(objectMap, "tag", t.Tag) + populate(objectMap, "tenantId", t.TenantID) + populateDateTimeRFC3339(objectMap, "timestamp", t.Timestamp) + populate(objectMap, "upn", t.Upn) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagProperty. +func (t *TagProperty) UnmarshalJSON(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 "objectIdentifier": + err = unpopulate(val, "ObjectIdentifier", &t.ObjectIdentifier) delete(rawMsg, key) - case "signedResource": - err = unpopulate(val, "Resource", &s.Resource) + case "tag": + err = unpopulate(val, "Tag", &t.Tag) delete(rawMsg, key) - case "endRk": - err = unpopulate(val, "RowKeyEnd", &s.RowKeyEnd) + case "tenantId": + err = unpopulate(val, "TenantID", &t.TenantID) delete(rawMsg, key) - case "startRk": - err = unpopulate(val, "RowKeyStart", &s.RowKeyStart) + case "timestamp": + err = unpopulateDateTimeRFC3339(val, "Timestamp", &t.Timestamp) delete(rawMsg, key) - case "signedExpiry": - err = unpopulateTimeRFC3339(val, "SharedAccessExpiryTime", &s.SharedAccessExpiryTime) + case "upn": + err = unpopulate(val, "Upn", &t.Upn) + 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 TaskAssignment. +func (t TaskAssignment) 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 TaskAssignment. +func (t *TaskAssignment) UnmarshalJSON(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 TaskAssignmentExecutionContext. +func (t TaskAssignmentExecutionContext) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "target", t.Target) + populate(objectMap, "trigger", t.Trigger) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentExecutionContext. +func (t *TaskAssignmentExecutionContext) UnmarshalJSON(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 "target": + err = unpopulate(val, "Target", &t.Target) delete(rawMsg, key) - case "signedStart": - err = unpopulateTimeRFC3339(val, "SharedAccessStartTime", &s.SharedAccessStartTime) + case "trigger": + err = unpopulate(val, "Trigger", &t.Trigger) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", t, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ServiceSpecification. -func (s ServiceSpecification) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type TaskAssignmentProperties. +func (t TaskAssignmentProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "metricSpecifications", s.MetricSpecifications) + populate(objectMap, "description", t.Description) + populate(objectMap, "enabled", t.Enabled) + populate(objectMap, "executionContext", t.ExecutionContext) + populate(objectMap, "provisioningState", t.ProvisioningState) + populate(objectMap, "report", t.Report) + populate(objectMap, "runStatus", t.RunStatus) + populate(objectMap, "taskId", t.TaskID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification. -func (s *ServiceSpecification) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentProperties. +func (t *TaskAssignmentProperties) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", t, err) } for key, val := range rawMsg { var err error switch key { - case "metricSpecifications": - err = unpopulate(val, "MetricSpecifications", &s.MetricSpecifications) + case "description": + err = unpopulate(val, "Description", &t.Description) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &t.Enabled) + delete(rawMsg, key) + case "executionContext": + err = unpopulate(val, "ExecutionContext", &t.ExecutionContext) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &t.ProvisioningState) + delete(rawMsg, key) + case "report": + err = unpopulate(val, "Report", &t.Report) + delete(rawMsg, key) + case "runStatus": + err = unpopulate(val, "RunStatus", &t.RunStatus) + delete(rawMsg, key) + case "taskId": + err = unpopulate(val, "TaskID", &t.TaskID) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", t, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type SignedIdentifier. -func (s SignedIdentifier) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type TaskAssignmentReport. +func (t TaskAssignmentReport) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "accessPolicy", s.AccessPolicy) - populate(objectMap, "id", s.ID) + populate(objectMap, "prefix", t.Prefix) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SignedIdentifier. -func (s *SignedIdentifier) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentReport. +func (t *TaskAssignmentReport) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", t, err) } for key, val := range rawMsg { var err error switch key { - case "accessPolicy": - err = unpopulate(val, "AccessPolicy", &s.AccessPolicy) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) + case "prefix": + err = unpopulate(val, "Prefix", &t.Prefix) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", t, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type SmbSetting. -func (s SmbSetting) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type TaskAssignmentUpdateExecutionContext. +func (t TaskAssignmentUpdateExecutionContext) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "authenticationMethods", s.AuthenticationMethods) - populate(objectMap, "channelEncryption", s.ChannelEncryption) - populate(objectMap, "kerberosTicketEncryption", s.KerberosTicketEncryption) - populate(objectMap, "multichannel", s.Multichannel) - populate(objectMap, "versions", s.Versions) + populate(objectMap, "target", t.Target) + populate(objectMap, "trigger", t.Trigger) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SmbSetting. -func (s *SmbSetting) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentUpdateExecutionContext. +func (t *TaskAssignmentUpdateExecutionContext) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", t, err) } for key, val := range rawMsg { var err error switch key { - case "authenticationMethods": - err = unpopulate(val, "AuthenticationMethods", &s.AuthenticationMethods) - delete(rawMsg, key) - case "channelEncryption": - err = unpopulate(val, "ChannelEncryption", &s.ChannelEncryption) - delete(rawMsg, key) - case "kerberosTicketEncryption": - err = unpopulate(val, "KerberosTicketEncryption", &s.KerberosTicketEncryption) - delete(rawMsg, key) - case "multichannel": - err = unpopulate(val, "Multichannel", &s.Multichannel) + case "target": + err = unpopulate(val, "Target", &t.Target) delete(rawMsg, key) - case "versions": - err = unpopulate(val, "Versions", &s.Versions) + case "trigger": + err = unpopulate(val, "Trigger", &t.Trigger) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", t, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type TaskAssignmentUpdateParameters. +func (t TaskAssignmentUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + populate(objectMap, "properties", t.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentUpdateParameters. +func (t *TaskAssignmentUpdateParameters) UnmarshalJSON(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) + return fmt.Errorf("unmarshalling type %T: %v", t, err) } for key, val := range rawMsg { var err error switch key { - case "createdAt": - err = unpopulateTimeRFC3339(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 = unpopulateTimeRFC3339(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) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", t, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Table. -func (t Table) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type TaskAssignmentUpdateProperties. +func (t TaskAssignmentUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", t.ID) - populate(objectMap, "name", t.Name) - populate(objectMap, "properties", t.TableProperties) - populate(objectMap, "type", t.Type) + populate(objectMap, "description", t.Description) + populate(objectMap, "enabled", t.Enabled) + populate(objectMap, "executionContext", t.ExecutionContext) + populate(objectMap, "provisioningState", t.ProvisioningState) + populate(objectMap, "report", t.Report) + populate(objectMap, "runStatus", t.RunStatus) + populate(objectMap, "taskId", t.TaskID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Table. -func (t *Table) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentUpdateProperties. +func (t *TaskAssignmentUpdateProperties) UnmarshalJSON(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) @@ -6069,17 +7825,26 @@ func (t *Table) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &t.ID) + case "description": + err = unpopulate(val, "Description", &t.Description) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) + case "enabled": + err = unpopulate(val, "Enabled", &t.Enabled) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "TableProperties", &t.TableProperties) + case "executionContext": + err = unpopulate(val, "ExecutionContext", &t.ExecutionContext) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &t.Type) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &t.ProvisioningState) + delete(rawMsg, key) + case "report": + err = unpopulate(val, "Report", &t.Report) + delete(rawMsg, key) + case "runStatus": + err = unpopulate(val, "RunStatus", &t.RunStatus) + delete(rawMsg, key) + case "taskId": + err = unpopulate(val, "TaskID", &t.TaskID) delete(rawMsg, key) } if err != nil { @@ -6089,17 +7854,15 @@ func (t *Table) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TableAccessPolicy. -func (t TableAccessPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type TaskAssignmentUpdateReport. +func (t TaskAssignmentUpdateReport) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "expiryTime", t.ExpiryTime) - populate(objectMap, "permission", t.Permission) - populateTimeRFC3339(objectMap, "startTime", t.StartTime) + populate(objectMap, "prefix", t.Prefix) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type TableAccessPolicy. -func (t *TableAccessPolicy) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentUpdateReport. +func (t *TaskAssignmentUpdateReport) UnmarshalJSON(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) @@ -6107,14 +7870,8 @@ func (t *TableAccessPolicy) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "expiryTime": - err = unpopulateTimeRFC3339(val, "ExpiryTime", &t.ExpiryTime) - delete(rawMsg, key) - case "permission": - err = unpopulate(val, "Permission", &t.Permission) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &t.StartTime) + case "prefix": + err = unpopulate(val, "Prefix", &t.Prefix) delete(rawMsg, key) } if err != nil { @@ -6124,16 +7881,16 @@ func (t *TableAccessPolicy) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TableProperties. -func (t TableProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type TaskAssignmentsList. +func (t TaskAssignmentsList) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "signedIdentifiers", t.SignedIdentifiers) - populate(objectMap, "tableName", t.TableName) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type TableProperties. -func (t *TableProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentsList. +func (t *TaskAssignmentsList) UnmarshalJSON(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) @@ -6141,11 +7898,11 @@ func (t *TableProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "signedIdentifiers": - err = unpopulate(val, "SignedIdentifiers", &t.SignedIdentifiers) + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) delete(rawMsg, key) - case "tableName": - err = unpopulate(val, "TableName", &t.TableName) + case "value": + err = unpopulate(val, "Value", &t.Value) delete(rawMsg, key) } if err != nil { @@ -6155,18 +7912,18 @@ func (t *TableProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TableServiceProperties. -func (t TableServiceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type TaskReportInstance. +func (t TaskReportInstance) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", t.ID) populate(objectMap, "name", t.Name) - populate(objectMap, "properties", t.TableServiceProperties) + populate(objectMap, "properties", t.Properties) populate(objectMap, "type", t.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type TableServiceProperties. -func (t *TableServiceProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TaskReportInstance. +func (t *TaskReportInstance) UnmarshalJSON(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) @@ -6181,7 +7938,7 @@ func (t *TableServiceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Name", &t.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "TableServiceProperties", &t.TableServiceProperties) + err = unpopulate(val, "Properties", &t.Properties) delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &t.Type) @@ -6194,15 +7951,28 @@ func (t *TableServiceProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TableServicePropertiesProperties. -func (t TableServicePropertiesProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type TaskReportProperties. +func (t TaskReportProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "cors", t.Cors) + populate(objectMap, "finishTime", t.FinishTime) + populate(objectMap, "objectFailedCount", t.ObjectFailedCount) + populate(objectMap, "objectsOperatedOnCount", t.ObjectsOperatedOnCount) + populate(objectMap, "objectsSucceededCount", t.ObjectsSucceededCount) + populate(objectMap, "objectsTargetedCount", t.ObjectsTargetedCount) + populate(objectMap, "runResult", t.RunResult) + populate(objectMap, "runStatusEnum", t.RunStatusEnum) + populate(objectMap, "runStatusError", t.RunStatusError) + populate(objectMap, "startTime", t.StartTime) + populate(objectMap, "storageAccountId", t.StorageAccountID) + populate(objectMap, "summaryReportPath", t.SummaryReportPath) + populate(objectMap, "taskAssignmentId", t.TaskAssignmentID) + populate(objectMap, "taskId", t.TaskID) + populate(objectMap, "taskVersion", t.TaskVersion) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type TableServicePropertiesProperties. -func (t *TableServicePropertiesProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TaskReportProperties. +func (t *TaskReportProperties) UnmarshalJSON(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) @@ -6210,8 +7980,47 @@ func (t *TableServicePropertiesProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "cors": - err = unpopulate(val, "Cors", &t.Cors) + case "finishTime": + err = unpopulate(val, "FinishTime", &t.FinishTime) + delete(rawMsg, key) + case "objectFailedCount": + err = unpopulate(val, "ObjectFailedCount", &t.ObjectFailedCount) + delete(rawMsg, key) + case "objectsOperatedOnCount": + err = unpopulate(val, "ObjectsOperatedOnCount", &t.ObjectsOperatedOnCount) + delete(rawMsg, key) + case "objectsSucceededCount": + err = unpopulate(val, "ObjectsSucceededCount", &t.ObjectsSucceededCount) + delete(rawMsg, key) + case "objectsTargetedCount": + err = unpopulate(val, "ObjectsTargetedCount", &t.ObjectsTargetedCount) + delete(rawMsg, key) + case "runResult": + err = unpopulate(val, "RunResult", &t.RunResult) + delete(rawMsg, key) + case "runStatusEnum": + err = unpopulate(val, "RunStatusEnum", &t.RunStatusEnum) + delete(rawMsg, key) + case "runStatusError": + err = unpopulate(val, "RunStatusError", &t.RunStatusError) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &t.StartTime) + delete(rawMsg, key) + case "storageAccountId": + err = unpopulate(val, "StorageAccountID", &t.StorageAccountID) + delete(rawMsg, key) + case "summaryReportPath": + err = unpopulate(val, "SummaryReportPath", &t.SummaryReportPath) + delete(rawMsg, key) + case "taskAssignmentId": + err = unpopulate(val, "TaskAssignmentID", &t.TaskAssignmentID) + delete(rawMsg, key) + case "taskId": + err = unpopulate(val, "TaskID", &t.TaskID) + delete(rawMsg, key) + case "taskVersion": + err = unpopulate(val, "TaskVersion", &t.TaskVersion) delete(rawMsg, key) } if err != nil { @@ -6221,16 +8030,16 @@ func (t *TableServicePropertiesProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TableSignedIdentifier. -func (t TableSignedIdentifier) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type TaskReportSummary. +func (t TaskReportSummary) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "accessPolicy", t.AccessPolicy) - populate(objectMap, "id", t.ID) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type TableSignedIdentifier. -func (t *TableSignedIdentifier) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TaskReportSummary. +func (t *TaskReportSummary) UnmarshalJSON(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) @@ -6238,11 +8047,11 @@ func (t *TableSignedIdentifier) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "accessPolicy": - err = unpopulate(val, "AccessPolicy", &t.AccessPolicy) + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &t.ID) + case "value": + err = unpopulate(val, "Value", &t.Value) delete(rawMsg, key) } if err != nil { @@ -6252,17 +8061,19 @@ func (t *TableSignedIdentifier) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TagFilter. -func (t TagFilter) MarshalJSON() ([]byte, error) { +// 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, "op", t.Op) - populate(objectMap, "value", t.Value) + populate(objectMap, "tags", t.Tags) + populate(objectMap, "type", t.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type TagFilter. -func (t *TagFilter) UnmarshalJSON(data []byte) error { +// 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) @@ -6270,14 +8081,20 @@ func (t *TagFilter) UnmarshalJSON(data []byte) error { 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 "op": - err = unpopulate(val, "Op", &t.Op) + case "tags": + err = unpopulate(val, "Tags", &t.Tags) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &t.Value) + case "type": + err = unpopulate(val, "Type", &t.Type) delete(rawMsg, key) } if err != nil { @@ -6287,19 +8104,19 @@ func (t *TagFilter) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TagProperty. -func (t TagProperty) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type TriggerParameters. +func (t TriggerParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "objectIdentifier", t.ObjectIdentifier) - populate(objectMap, "tag", t.Tag) - populate(objectMap, "tenantId", t.TenantID) - populateTimeRFC3339(objectMap, "timestamp", t.Timestamp) - populate(objectMap, "upn", t.Upn) + populateDateTimeRFC3339(objectMap, "endBy", t.EndBy) + populate(objectMap, "interval", t.Interval) + objectMap["intervalUnit"] = "Days" + populateDateTimeRFC3339(objectMap, "startFrom", t.StartFrom) + populateDateTimeRFC3339(objectMap, "startOn", t.StartOn) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type TagProperty. -func (t *TagProperty) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggerParameters. +func (t *TriggerParameters) UnmarshalJSON(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) @@ -6307,20 +8124,20 @@ func (t *TagProperty) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "objectIdentifier": - err = unpopulate(val, "ObjectIdentifier", &t.ObjectIdentifier) + case "endBy": + err = unpopulateDateTimeRFC3339(val, "EndBy", &t.EndBy) delete(rawMsg, key) - case "tag": - err = unpopulate(val, "Tag", &t.Tag) + case "interval": + err = unpopulate(val, "Interval", &t.Interval) delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &t.TenantID) + case "intervalUnit": + err = unpopulate(val, "IntervalUnit", &t.IntervalUnit) delete(rawMsg, key) - case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &t.Timestamp) + case "startFrom": + err = unpopulateDateTimeRFC3339(val, "StartFrom", &t.StartFrom) delete(rawMsg, key) - case "upn": - err = unpopulate(val, "Upn", &t.Upn) + case "startOn": + err = unpopulateDateTimeRFC3339(val, "StartOn", &t.StartOn) delete(rawMsg, key) } if err != nil { @@ -6330,19 +8147,19 @@ func (t *TagProperty) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TrackedResource. -func (t TrackedResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type TriggerParametersUpdate. +func (t TriggerParametersUpdate) 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) + populateDateTimeRFC3339(objectMap, "endBy", t.EndBy) + populate(objectMap, "interval", t.Interval) + objectMap["intervalUnit"] = "Days" + populateDateTimeRFC3339(objectMap, "startFrom", t.StartFrom) + populateDateTimeRFC3339(objectMap, "startOn", t.StartOn) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource. -func (t *TrackedResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggerParametersUpdate. +func (t *TriggerParametersUpdate) UnmarshalJSON(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) @@ -6350,20 +8167,20 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &t.ID) + case "endBy": + err = unpopulateDateTimeRFC3339(val, "EndBy", &t.EndBy) delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &t.Location) + case "interval": + err = unpopulate(val, "Interval", &t.Interval) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) + case "intervalUnit": + err = unpopulate(val, "IntervalUnit", &t.IntervalUnit) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &t.Tags) + case "startFrom": + err = unpopulateDateTimeRFC3339(val, "StartFrom", &t.StartFrom) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &t.Type) + case "startOn": + err = unpopulateDateTimeRFC3339(val, "StartOn", &t.StartOn) delete(rawMsg, key) } if err != nil { @@ -6381,7 +8198,7 @@ func (u UpdateHistoryProperty) MarshalJSON() ([]byte, error) { populate(objectMap, "immutabilityPeriodSinceCreationInDays", u.ImmutabilityPeriodSinceCreationInDays) populate(objectMap, "objectIdentifier", u.ObjectIdentifier) populate(objectMap, "tenantId", u.TenantID) - populateTimeRFC3339(objectMap, "timestamp", u.Timestamp) + populateDateTimeRFC3339(objectMap, "timestamp", u.Timestamp) populate(objectMap, "update", u.Update) populate(objectMap, "upn", u.Upn) return json.Marshal(objectMap) @@ -6412,7 +8229,7 @@ func (u *UpdateHistoryProperty) UnmarshalJSON(data []byte) error { err = unpopulate(val, "TenantID", &u.TenantID) delete(rawMsg, key) case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &u.Timestamp) + err = unpopulateDateTimeRFC3339(val, "Timestamp", &u.Timestamp) delete(rawMsg, key) case "update": err = unpopulate(val, "Update", &u.Update) @@ -6601,8 +8418,18 @@ func populate(m map[string]any, k string, v any) { } } +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 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/storage/armstorage/networksecurityperimeterconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/networksecurityperimeterconfigurations_client.go new file mode 100644 index 00000000..b4773da4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/networksecurityperimeterconfigurations_client.go @@ -0,0 +1,262 @@ +// 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 armstorage + +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 effective NetworkSecurityPerimeterConfiguration for association +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - networkSecurityPerimeterConfigurationName - The name for Network Security Perimeter configuration +// - options - NetworkSecurityPerimeterConfigurationsClientGetOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.Get +// method. +func (client *NetworkSecurityPerimeterConfigurationsClient) Get(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName 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, networkSecurityPerimeterConfigurationName, 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, networkSecurityPerimeterConfigurationName string, _ *NetworkSecurityPerimeterConfigurationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}" + 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 accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if networkSecurityPerimeterConfigurationName == "" { + return nil, errors.New("parameter networkSecurityPerimeterConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityPerimeterConfigurationName}", url.PathEscape(networkSecurityPerimeterConfigurationName)) + req, err := 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-01-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 list of effective NetworkSecurityPerimeterConfiguration for storage account +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - 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 false + }, + Fetcher: func(ctx context.Context, page *NetworkSecurityPerimeterConfigurationsClientListResponse) (NetworkSecurityPerimeterConfigurationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NetworkSecurityPerimeterConfigurationsClient.NewListPager") + req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return NetworkSecurityPerimeterConfigurationsClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return NetworkSecurityPerimeterConfigurationsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return NetworkSecurityPerimeterConfigurationsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *NetworkSecurityPerimeterConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *NetworkSecurityPerimeterConfigurationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/networkSecurityPerimeterConfigurations" + 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 accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := 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-01-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 - Refreshes any information about the association. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - networkSecurityPerimeterConfigurationName - The name for Network Security Perimeter configuration +// - options - NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.BeginReconcile +// method. +func (client *NetworkSecurityPerimeterConfigurationsClient) BeginReconcile(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions) (*runtime.Poller[NetworkSecurityPerimeterConfigurationsClientReconcileResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reconcile(ctx, resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, 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 - Refreshes any information about the association. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +func (client *NetworkSecurityPerimeterConfigurationsClient) reconcile(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName 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, networkSecurityPerimeterConfigurationName, 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) { + 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, networkSecurityPerimeterConfigurationName string, _ *NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile" + 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 accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if networkSecurityPerimeterConfigurationName == "" { + return nil, errors.New("parameter networkSecurityPerimeterConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityPerimeterConfigurationName}", url.PathEscape(networkSecurityPerimeterConfigurationName)) + 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-01-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/storage/armstorage/objectreplicationpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client.go index ed7334c1..c10b4c2a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type ObjectReplicationPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewObjectReplicationPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ObjectReplicationPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".ObjectReplicationPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +43,7 @@ func NewObjectReplicationPoliciesClient(subscriptionID string, credential azcore // CreateOrUpdate - Create or update the object replication policy of the storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -58,22 +54,29 @@ func NewObjectReplicationPoliciesClient(subscriptionID string, credential azcore // - options - ObjectReplicationPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ObjectReplicationPoliciesClient.CreateOrUpdate // method. func (client *ObjectReplicationPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, properties ObjectReplicationPolicy, options *ObjectReplicationPoliciesClientCreateOrUpdateOptions) (ObjectReplicationPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ObjectReplicationPoliciesClient.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, objectReplicationPolicyID, properties, options) if err != nil { return ObjectReplicationPoliciesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ObjectReplicationPoliciesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ObjectReplicationPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ObjectReplicationPoliciesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ObjectReplicationPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, properties ObjectReplicationPolicy, options *ObjectReplicationPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ObjectReplicationPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, properties ObjectReplicationPolicy, _ *ObjectReplicationPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -96,10 +99,13 @@ func (client *ObjectReplicationPoliciesClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -114,7 +120,7 @@ func (client *ObjectReplicationPoliciesClient) createOrUpdateHandleResponse(resp // Delete - Deletes the object replication policy associated with the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -124,22 +130,28 @@ func (client *ObjectReplicationPoliciesClient) createOrUpdateHandleResponse(resp // - options - ObjectReplicationPoliciesClientDeleteOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Delete // method. func (client *ObjectReplicationPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, options *ObjectReplicationPoliciesClientDeleteOptions) (ObjectReplicationPoliciesClientDeleteResponse, error) { + var err error + const operationName = "ObjectReplicationPoliciesClient.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, accountName, objectReplicationPolicyID, options) if err != nil { return ObjectReplicationPoliciesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ObjectReplicationPoliciesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ObjectReplicationPoliciesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ObjectReplicationPoliciesClientDeleteResponse{}, err } return ObjectReplicationPoliciesClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *ObjectReplicationPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, options *ObjectReplicationPoliciesClientDeleteOptions) (*policy.Request, error) { +func (client *ObjectReplicationPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, _ *ObjectReplicationPoliciesClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -162,7 +174,7 @@ func (client *ObjectReplicationPoliciesClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -171,7 +183,7 @@ func (client *ObjectReplicationPoliciesClient) deleteCreateRequest(ctx context.C // Get - Get the object replication policy of the storage account by policy ID. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -181,22 +193,29 @@ func (client *ObjectReplicationPoliciesClient) deleteCreateRequest(ctx context.C // - options - ObjectReplicationPoliciesClientGetOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Get // method. func (client *ObjectReplicationPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, options *ObjectReplicationPoliciesClientGetOptions) (ObjectReplicationPoliciesClientGetResponse, error) { + var err error + const operationName = "ObjectReplicationPoliciesClient.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, objectReplicationPolicyID, options) if err != nil { return ObjectReplicationPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ObjectReplicationPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ObjectReplicationPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ObjectReplicationPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *ObjectReplicationPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, options *ObjectReplicationPoliciesClientGetOptions) (*policy.Request, error) { +func (client *ObjectReplicationPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, _ *ObjectReplicationPoliciesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -219,7 +238,7 @@ func (client *ObjectReplicationPoliciesClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -236,7 +255,7 @@ func (client *ObjectReplicationPoliciesClient) getHandleResponse(resp *http.Resp // NewListPager - List the object replication policies associated with the storage account. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -248,6 +267,7 @@ func (client *ObjectReplicationPoliciesClient) NewListPager(resourceGroupName st return false }, Fetcher: func(ctx context.Context, page *ObjectReplicationPoliciesClientListResponse) (ObjectReplicationPoliciesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ObjectReplicationPoliciesClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return ObjectReplicationPoliciesClientListResponse{}, err @@ -261,11 +281,12 @@ func (client *ObjectReplicationPoliciesClient) NewListPager(resourceGroupName st } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listCreateRequest creates the List request. -func (client *ObjectReplicationPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *ObjectReplicationPoliciesClientListOptions) (*policy.Request, error) { +func (client *ObjectReplicationPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *ObjectReplicationPoliciesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -284,7 +305,7 @@ func (client *ObjectReplicationPoliciesClient) listCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-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/storage/armstorage/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/operations_client.go index 4fa2e778..93d7185d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/operations_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -28,7 +24,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -40,7 +36,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Storage Rest API operations. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-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]{ @@ -48,6 +44,7 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return false }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") req, err := client.listCreateRequest(ctx, options) if err != nil { return OperationsClientListResponse{}, err @@ -61,18 +58,19 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption } 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) { +func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *OperationsClientListOptions) (*policy.Request, error) { urlPath := "/providers/Microsoft.Storage/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", "2022-09-01") + reqQP.Set("api-version", "2024-01-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/storage/armstorage/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/options.go new file mode 100644 index 00000000..8e84f38c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/options.go @@ -0,0 +1,665 @@ +// 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 armstorage + +// AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions contains the optional parameters for the AccountsClient.BeginAbortHierarchicalNamespaceMigration +// method. +type AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method. +type AccountsClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// AccountsClientBeginCustomerInitiatedMigrationOptions contains the optional parameters for the AccountsClient.BeginCustomerInitiatedMigration +// method. +type AccountsClientBeginCustomerInitiatedMigrationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// AccountsClientBeginFailoverOptions contains the optional parameters for the AccountsClient.BeginFailover method. +type AccountsClientBeginFailoverOptions struct { + // The parameter is set to 'Planned' to indicate whether a Planned failover is requested.. Specifying any value will set the + // value to Planned. + FailoverType *string + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// AccountsClientBeginHierarchicalNamespaceMigrationOptions contains the optional parameters for the AccountsClient.BeginHierarchicalNamespaceMigration +// method. +type AccountsClientBeginHierarchicalNamespaceMigrationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// AccountsClientBeginRestoreBlobRangesOptions contains the optional parameters for the AccountsClient.BeginRestoreBlobRanges +// method. +type AccountsClientBeginRestoreBlobRangesOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// AccountsClientCheckNameAvailabilityOptions contains the optional parameters for the AccountsClient.CheckNameAvailability +// method. +type AccountsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientDeleteOptions contains the optional parameters for the AccountsClient.Delete method. +type AccountsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientGetCustomerInitiatedMigrationOptions contains the optional parameters for the AccountsClient.GetCustomerInitiatedMigration +// method. +type AccountsClientGetCustomerInitiatedMigrationOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientGetPropertiesOptions contains the optional parameters for the AccountsClient.GetProperties method. +type AccountsClientGetPropertiesOptions struct { + // May be used to expand the properties within account's properties. By default, data is not included when fetching properties. + // Currently we only support geoReplicationStats and blobRestoreStatus. + Expand *StorageAccountExpand +} + +// AccountsClientListAccountSASOptions contains the optional parameters for the AccountsClient.ListAccountSAS method. +type AccountsClientListAccountSASOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager +// method. +type AccountsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientListKeysOptions contains the optional parameters for the AccountsClient.ListKeys method. +type AccountsClientListKeysOptions struct { + // Specifies type of the key to be listed. Possible value is kerb.. Specifying any value will set the value to kerb. + Expand *string +} + +// AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method. +type AccountsClientListOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientListServiceSASOptions contains the optional parameters for the AccountsClient.ListServiceSAS method. +type AccountsClientListServiceSASOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientRegenerateKeyOptions contains the optional parameters for the AccountsClient.RegenerateKey method. +type AccountsClientRegenerateKeyOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientRevokeUserDelegationKeysOptions contains the optional parameters for the AccountsClient.RevokeUserDelegationKeys +// method. +type AccountsClientRevokeUserDelegationKeysOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientUpdateOptions contains the optional parameters for the AccountsClient.Update method. +type AccountsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientBeginObjectLevelWormOptions contains the optional parameters for the BlobContainersClient.BeginObjectLevelWorm +// method. +type BlobContainersClientBeginObjectLevelWormOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BlobContainersClientClearLegalHoldOptions contains the optional parameters for the BlobContainersClient.ClearLegalHold +// method. +type BlobContainersClientClearLegalHoldOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientCreateOptions contains the optional parameters for the BlobContainersClient.Create method. +type BlobContainersClientCreateOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.CreateOrUpdateImmutabilityPolicy +// method. +type BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions struct { + // The entity state (ETag) version of the immutability policy to update must be returned to the server for all update operations. + // The ETag value must include the leading and trailing double quotes as + // returned by the service. + IfMatch *string + + // The ImmutabilityPolicy Properties that will be created or updated to a blob container. + Parameters *ImmutabilityPolicy +} + +// BlobContainersClientDeleteImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.DeleteImmutabilityPolicy +// method. +type BlobContainersClientDeleteImmutabilityPolicyOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientDeleteOptions contains the optional parameters for the BlobContainersClient.Delete method. +type BlobContainersClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientExtendImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.ExtendImmutabilityPolicy +// method. +type BlobContainersClientExtendImmutabilityPolicyOptions struct { + // The ImmutabilityPolicy Properties that will be extended for a blob container. + Parameters *ImmutabilityPolicy +} + +// BlobContainersClientGetImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.GetImmutabilityPolicy +// method. +type BlobContainersClientGetImmutabilityPolicyOptions struct { + // The entity state (ETag) version of the immutability policy to update must be returned to the server for all update operations. + // The ETag value must include the leading and trailing double quotes as + // returned by the service. + IfMatch *string +} + +// BlobContainersClientGetOptions contains the optional parameters for the BlobContainersClient.Get method. +type BlobContainersClientGetOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientLeaseOptions contains the optional parameters for the BlobContainersClient.Lease method. +type BlobContainersClientLeaseOptions struct { + // Lease Container request body. + Parameters *LeaseContainerRequest +} + +// BlobContainersClientListOptions contains the optional parameters for the BlobContainersClient.NewListPager method. +type BlobContainersClientListOptions struct { + // Optional. When specified, only container names starting with the filter will be listed. + Filter *string + + // Optional, used to include the properties for soft deleted blob containers. + Include *ListContainersInclude + + // Optional. Specified maximum number of containers that can be included in the list. + Maxpagesize *string +} + +// BlobContainersClientLockImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.LockImmutabilityPolicy +// method. +type BlobContainersClientLockImmutabilityPolicyOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientSetLegalHoldOptions contains the optional parameters for the BlobContainersClient.SetLegalHold method. +type BlobContainersClientSetLegalHoldOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientUpdateOptions contains the optional parameters for the BlobContainersClient.Update method. +type BlobContainersClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// BlobInventoryPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BlobInventoryPoliciesClient.CreateOrUpdate +// method. +type BlobInventoryPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// BlobInventoryPoliciesClientDeleteOptions contains the optional parameters for the BlobInventoryPoliciesClient.Delete method. +type BlobInventoryPoliciesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// BlobInventoryPoliciesClientGetOptions contains the optional parameters for the BlobInventoryPoliciesClient.Get method. +type BlobInventoryPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// BlobInventoryPoliciesClientListOptions contains the optional parameters for the BlobInventoryPoliciesClient.NewListPager +// method. +type BlobInventoryPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// BlobServicesClientGetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.GetServiceProperties +// method. +type BlobServicesClientGetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// BlobServicesClientListOptions contains the optional parameters for the BlobServicesClient.NewListPager method. +type BlobServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// BlobServicesClientSetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.SetServiceProperties +// method. +type BlobServicesClientSetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// DeletedAccountsClientGetOptions contains the optional parameters for the DeletedAccountsClient.Get method. +type DeletedAccountsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DeletedAccountsClientListOptions contains the optional parameters for the DeletedAccountsClient.NewListPager method. +type DeletedAccountsClientListOptions 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 { + // Optional. When specified, only encryption scope names starting with the filter will be listed. + Filter *string + + // Optional, when specified, will list encryption scopes with the specific state. Defaults to All + Include *ListEncryptionScopesInclude + + // Optional, specifies the maximum number of encryption scopes that will be included in the list response. + Maxpagesize *int32 +} + +// EncryptionScopesClientPatchOptions contains the optional parameters for the EncryptionScopesClient.Patch method. +type EncryptionScopesClientPatchOptions struct { + // placeholder for future optional parameters +} + +// EncryptionScopesClientPutOptions contains the optional parameters for the EncryptionScopesClient.Put method. +type EncryptionScopesClientPutOptions struct { + // placeholder for future optional parameters +} + +// FileServicesClientGetServicePropertiesOptions contains the optional parameters for the FileServicesClient.GetServiceProperties +// method. +type FileServicesClientGetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// FileServicesClientGetServiceUsageOptions contains the optional parameters for the FileServicesClient.GetServiceUsage method. +type FileServicesClientGetServiceUsageOptions struct { + // placeholder for future optional parameters +} + +// FileServicesClientListOptions contains the optional parameters for the FileServicesClient.List method. +type FileServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// FileServicesClientListServiceUsagesOptions contains the optional parameters for the FileServicesClient.NewListServiceUsagesPager +// method. +type FileServicesClientListServiceUsagesOptions struct { + // Optional, specifies the maximum number of file service usages to be included in the list response. + Maxpagesize *int32 +} + +// FileServicesClientSetServicePropertiesOptions contains the optional parameters for the FileServicesClient.SetServiceProperties +// method. +type FileServicesClientSetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// FileSharesClientCreateOptions contains the optional parameters for the FileSharesClient.Create method. +type FileSharesClientCreateOptions struct { + // Optional, used to expand the properties within share's properties. Valid values are: snapshots. Should be passed as a string + // with delimiter ',' + Expand *string +} + +// FileSharesClientDeleteOptions contains the optional parameters for the FileSharesClient.Delete method. +type FileSharesClientDeleteOptions struct { + // Optional. Valid values are: snapshots, leased-snapshots, none. The default value is snapshots. For 'snapshots', the file + // share is deleted including all of its file share snapshots. If the file share + // contains leased-snapshots, the deletion fails. For 'leased-snapshots', the file share is deleted included all of its file + // share snapshots (leased/unleased). For 'none', the file share is deleted if it + // has no share snapshots. If the file share contains any snapshots (leased or unleased), the deletion fails. + Include *string + + // Optional, used to delete a snapshot. + XMSSnapshot *string +} + +// FileSharesClientGetOptions contains the optional parameters for the FileSharesClient.Get method. +type FileSharesClientGetOptions struct { + // Optional, used to expand the properties within share's properties. Valid values are: stats. Should be passed as a string + // with delimiter ','. + Expand *string + + // Optional, used to retrieve properties of a snapshot. + XMSSnapshot *string +} + +// FileSharesClientLeaseOptions contains the optional parameters for the FileSharesClient.Lease method. +type FileSharesClientLeaseOptions struct { + // Lease Share request body. + Parameters *LeaseShareRequest + + // Optional. Specify the snapshot time to lease a snapshot. + XMSSnapshot *string +} + +// FileSharesClientListOptions contains the optional parameters for the FileSharesClient.NewListPager method. +type FileSharesClientListOptions struct { + // Optional, used to expand the properties within share's properties. Valid values are: deleted, snapshots. Should be passed + // as a string with delimiter ',' + Expand *string + + // Optional. When specified, only share names starting with the filter will be listed. + Filter *string + + // Optional. Specified maximum number of shares that can be included in the list. + Maxpagesize *string +} + +// FileSharesClientRestoreOptions contains the optional parameters for the FileSharesClient.Restore method. +type FileSharesClientRestoreOptions struct { + // placeholder for future optional parameters +} + +// FileSharesClientUpdateOptions contains the optional parameters for the FileSharesClient.Update method. +type FileSharesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// LocalUsersClientCreateOrUpdateOptions contains the optional parameters for the LocalUsersClient.CreateOrUpdate method. +type LocalUsersClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// LocalUsersClientDeleteOptions contains the optional parameters for the LocalUsersClient.Delete method. +type LocalUsersClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// LocalUsersClientGetOptions contains the optional parameters for the LocalUsersClient.Get method. +type LocalUsersClientGetOptions struct { + // placeholder for future optional parameters +} + +// LocalUsersClientListKeysOptions contains the optional parameters for the LocalUsersClient.ListKeys method. +type LocalUsersClientListKeysOptions struct { + // placeholder for future optional parameters +} + +// LocalUsersClientListOptions contains the optional parameters for the LocalUsersClient.NewListPager method. +type LocalUsersClientListOptions struct { + // Optional. When specified, only local user names starting with the filter will be listed. + Filter *string + + // Optional, when specified, will list local users enabled for the specific protocol. Lists all users by default. + Include *ListLocalUserIncludeParam + + // Optional, specifies the maximum number of local users that will be included in the list response. + Maxpagesize *int32 +} + +// LocalUsersClientRegeneratePasswordOptions contains the optional parameters for the LocalUsersClient.RegeneratePassword +// method. +type LocalUsersClientRegeneratePasswordOptions struct { + // placeholder for future optional parameters +} + +// ManagementPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ManagementPoliciesClient.CreateOrUpdate +// method. +type ManagementPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagementPoliciesClientDeleteOptions contains the optional parameters for the ManagementPoliciesClient.Delete method. +type ManagementPoliciesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ManagementPoliciesClientGetOptions contains the optional parameters for the ManagementPoliciesClient.Get method. +type ManagementPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.BeginReconcile +// method. +type NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions struct { + // Resumes the long-running operation 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 +} + +// ObjectReplicationPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ObjectReplicationPoliciesClient.CreateOrUpdate +// method. +type ObjectReplicationPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ObjectReplicationPoliciesClientDeleteOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Delete +// method. +type ObjectReplicationPoliciesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ObjectReplicationPoliciesClientGetOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Get +// method. +type ObjectReplicationPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ObjectReplicationPoliciesClientListOptions contains the optional parameters for the ObjectReplicationPoliciesClient.NewListPager +// method. +type ObjectReplicationPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete +// method. +type PrivateEndpointConnectionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +type PrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager +// method. +type PrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put +// method. +type PrivateEndpointConnectionsClientPutOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListByStorageAccountOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByStorageAccount +// method. +type PrivateLinkResourcesClientListByStorageAccountOptions struct { + // placeholder for future optional parameters +} + +// QueueClientCreateOptions contains the optional parameters for the QueueClient.Create method. +type QueueClientCreateOptions struct { + // placeholder for future optional parameters +} + +// QueueClientDeleteOptions contains the optional parameters for the QueueClient.Delete method. +type QueueClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// QueueClientGetOptions contains the optional parameters for the QueueClient.Get method. +type QueueClientGetOptions struct { + // placeholder for future optional parameters +} + +// QueueClientListOptions contains the optional parameters for the QueueClient.NewListPager method. +type QueueClientListOptions struct { + // Optional, When specified, only the queues with a name starting with the given filter will be listed. + Filter *string + + // Optional, a maximum number of queues that should be included in a list queue response + Maxpagesize *string +} + +// QueueClientUpdateOptions contains the optional parameters for the QueueClient.Update method. +type QueueClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// QueueServicesClientGetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.GetServiceProperties +// method. +type QueueServicesClientGetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// QueueServicesClientListOptions contains the optional parameters for the QueueServicesClient.List method. +type QueueServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// QueueServicesClientSetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.SetServiceProperties +// method. +type QueueServicesClientSetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. +type SKUsClientListOptions struct { + // placeholder for future optional parameters +} + +// TableClientCreateOptions contains the optional parameters for the TableClient.Create method. +type TableClientCreateOptions struct { + // The parameters to provide to create a table. + Parameters *Table +} + +// TableClientDeleteOptions contains the optional parameters for the TableClient.Delete method. +type TableClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// TableClientGetOptions contains the optional parameters for the TableClient.Get method. +type TableClientGetOptions struct { + // placeholder for future optional parameters +} + +// TableClientListOptions contains the optional parameters for the TableClient.NewListPager method. +type TableClientListOptions struct { + // placeholder for future optional parameters +} + +// TableClientUpdateOptions contains the optional parameters for the TableClient.Update method. +type TableClientUpdateOptions struct { + // The parameters to provide to create a table. + Parameters *Table +} + +// TableServicesClientGetServicePropertiesOptions contains the optional parameters for the TableServicesClient.GetServiceProperties +// method. +type TableServicesClientGetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// TableServicesClientListOptions contains the optional parameters for the TableServicesClient.List method. +type TableServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// TableServicesClientSetServicePropertiesOptions contains the optional parameters for the TableServicesClient.SetServiceProperties +// method. +type TableServicesClientSetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// TaskAssignmentInstancesReportClientListOptions contains the optional parameters for the TaskAssignmentInstancesReportClient.NewListPager +// method. +type TaskAssignmentInstancesReportClientListOptions struct { + // Optional. When specified, it can be used to query using reporting properties. See Constructing Filter Strings + // [https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#constructing-filter-strings] for + // details. + Filter *string + + // Optional, specifies the maximum number of storage task assignment instances to be included in the list response. + Maxpagesize *int32 +} + +// TaskAssignmentsClientBeginCreateOptions contains the optional parameters for the TaskAssignmentsClient.BeginCreate method. +type TaskAssignmentsClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// TaskAssignmentsClientBeginDeleteOptions contains the optional parameters for the TaskAssignmentsClient.BeginDelete method. +type TaskAssignmentsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// TaskAssignmentsClientBeginUpdateOptions contains the optional parameters for the TaskAssignmentsClient.BeginUpdate method. +type TaskAssignmentsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// TaskAssignmentsClientGetOptions contains the optional parameters for the TaskAssignmentsClient.Get method. +type TaskAssignmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// TaskAssignmentsClientListOptions contains the optional parameters for the TaskAssignmentsClient.NewListPager method. +type TaskAssignmentsClientListOptions struct { + // Optional, specifies the maximum number of storage task assignment Ids to be included in the list response. + Maxpagesize *int32 +} + +// TaskAssignmentsInstancesReportClientListOptions contains the optional parameters for the TaskAssignmentsInstancesReportClient.NewListPager +// method. +type TaskAssignmentsInstancesReportClientListOptions struct { + // Optional. When specified, it can be used to query using reporting properties. See Constructing Filter Strings + // [https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#constructing-filter-strings] for + // details. + Filter *string + + // Optional, specifies the maximum number of storage task assignment instances to be included in the list response. + Maxpagesize *int32 +} + +// UsagesClientListByLocationOptions contains the optional parameters for the UsagesClient.NewListByLocationPager method. +type UsagesClientListByLocationOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client.go index 654992cc..f64ed688 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type PrivateEndpointConnectionsClient struct { // - 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+".PrivateEndpointConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +43,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // Delete - Deletes the specified private endpoint connection associated with the storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -55,22 +51,28 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // - options - PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete // method. func (client *PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientDeleteOptions) (PrivateEndpointConnectionsClientDeleteResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.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, accountName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return PrivateEndpointConnectionsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientDeleteResponse{}, err } return PrivateEndpointConnectionsClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientDeleteOptions) (*policy.Request, error) { +func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, _ *PrivateEndpointConnectionsClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -93,7 +95,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -102,7 +104,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets the specified private endpoint connection associated with the storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -110,22 +112,29 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get // method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, accountName 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, accountName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { +func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, _ *PrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -148,7 +157,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,7 +174,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListPager - List all the private endpoint connections associated with the storage account. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -177,6 +186,7 @@ func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName s return false }, Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsClientListResponse) (PrivateEndpointConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointConnectionsClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return PrivateEndpointConnectionsClientListResponse{}, err @@ -190,11 +200,12 @@ func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName s } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listCreateRequest creates the List request. -func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *PrivateEndpointConnectionsClientListOptions) (*policy.Request, error) { +func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *PrivateEndpointConnectionsClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -213,7 +224,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -231,7 +242,7 @@ func (client *PrivateEndpointConnectionsClient) listHandleResponse(resp *http.Re // Put - Update the state of specified private endpoint connection associated with the storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -240,22 +251,29 @@ func (client *PrivateEndpointConnectionsClient) listHandleResponse(resp *http.Re // - options - PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put // method. func (client *PrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientPutOptions) (PrivateEndpointConnectionsClientPutResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.Put" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.putCreateRequest(ctx, resourceGroupName, accountName, privateEndpointConnectionName, properties, options) if err != nil { return PrivateEndpointConnectionsClientPutResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientPutResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientPutResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientPutResponse{}, err } - return client.putHandleResponse(resp) + resp, err := client.putHandleResponse(httpResp) + return resp, err } // putCreateRequest creates the Put request. -func (client *PrivateEndpointConnectionsClient) putCreateRequest(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientPutOptions) (*policy.Request, error) { +func (client *PrivateEndpointConnectionsClient) putCreateRequest(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, _ *PrivateEndpointConnectionsClientPutOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -278,10 +296,13 @@ func (client *PrivateEndpointConnectionsClient) putCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } // putHandleResponse handles the Put response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/privatelinkresources_client.go index fd52b434..bd1a24c7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/privatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/privatelinkresources_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type PrivateLinkResourcesClient struct { // - 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+".PrivateLinkResourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,29 +43,36 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // ListByStorageAccount - Gets the private link resources that need to be created for a storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - options - PrivateLinkResourcesClientListByStorageAccountOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByStorageAccount // method. func (client *PrivateLinkResourcesClient) ListByStorageAccount(ctx context.Context, resourceGroupName string, accountName string, options *PrivateLinkResourcesClientListByStorageAccountOptions) (PrivateLinkResourcesClientListByStorageAccountResponse, error) { + var err error + const operationName = "PrivateLinkResourcesClient.ListByStorageAccount" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByStorageAccountCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return PrivateLinkResourcesClientListByStorageAccountResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientListByStorageAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientListByStorageAccountResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientListByStorageAccountResponse{}, err } - return client.listByStorageAccountHandleResponse(resp) + resp, err := client.listByStorageAccountHandleResponse(httpResp) + return resp, err } // listByStorageAccountCreateRequest creates the ListByStorageAccount request. -func (client *PrivateLinkResourcesClient) listByStorageAccountCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *PrivateLinkResourcesClientListByStorageAccountOptions) (*policy.Request, error) { +func (client *PrivateLinkResourcesClient) listByStorageAccountCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *PrivateLinkResourcesClientListByStorageAccountOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateLinkResources" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -88,7 +91,7 @@ func (client *PrivateLinkResourcesClient) listByStorageAccountCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-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/storage/armstorage/queue_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/queue_client.go index 9cf5ea91..d1b4ed83 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/queue_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/queue_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type QueueClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewQueueClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QueueClient, error) { - cl, err := arm.NewClient(moduleName+".QueueClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +43,7 @@ func NewQueueClient(subscriptionID string, credential azcore.TokenCredential, op // Create - Creates a new queue with the specified queue name, under the specified account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -57,22 +53,29 @@ func NewQueueClient(subscriptionID string, credential azcore.TokenCredential, op // - queue - Queue properties and metadata to be created with // - options - QueueClientCreateOptions contains the optional parameters for the QueueClient.Create method. func (client *QueueClient) Create(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue, options *QueueClientCreateOptions) (QueueClientCreateResponse, error) { + var err error + const operationName = "QueueClient.Create" + 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, accountName, queueName, queue, options) if err != nil { return QueueClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QueueClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return QueueClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return QueueClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. -func (client *QueueClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue, options *QueueClientCreateOptions) (*policy.Request, error) { +func (client *QueueClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue, _ *QueueClientCreateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -95,10 +98,13 @@ func (client *QueueClient) createCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, queue) + if err := runtime.MarshalAsJSON(req, queue); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -113,7 +119,7 @@ func (client *QueueClient) createHandleResponse(resp *http.Response) (QueueClien // Delete - Deletes the queue with the specified queue name, under the specified account if it exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -122,22 +128,28 @@ func (client *QueueClient) createHandleResponse(resp *http.Response) (QueueClien // an alphanumeric character and it cannot have two consecutive dash(-) characters. // - options - QueueClientDeleteOptions contains the optional parameters for the QueueClient.Delete method. func (client *QueueClient) Delete(ctx context.Context, resourceGroupName string, accountName string, queueName string, options *QueueClientDeleteOptions) (QueueClientDeleteResponse, error) { + var err error + const operationName = "QueueClient.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, accountName, queueName, options) if err != nil { return QueueClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QueueClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return QueueClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return QueueClientDeleteResponse{}, err } return QueueClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *QueueClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, queueName string, options *QueueClientDeleteOptions) (*policy.Request, error) { +func (client *QueueClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, queueName string, _ *QueueClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -160,7 +172,7 @@ func (client *QueueClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -169,7 +181,7 @@ func (client *QueueClient) deleteCreateRequest(ctx context.Context, resourceGrou // Get - Gets the queue with the specified queue name, under the specified account if it exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -178,22 +190,29 @@ func (client *QueueClient) deleteCreateRequest(ctx context.Context, resourceGrou // an alphanumeric character and it cannot have two consecutive dash(-) characters. // - options - QueueClientGetOptions contains the optional parameters for the QueueClient.Get method. func (client *QueueClient) Get(ctx context.Context, resourceGroupName string, accountName string, queueName string, options *QueueClientGetOptions) (QueueClientGetResponse, error) { + var err error + const operationName = "QueueClient.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, queueName, options) if err != nil { return QueueClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QueueClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return QueueClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return QueueClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *QueueClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, queueName string, options *QueueClientGetOptions) (*policy.Request, error) { +func (client *QueueClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, queueName string, _ *QueueClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -216,7 +235,7 @@ func (client *QueueClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,7 +252,7 @@ func (client *QueueClient) getHandleResponse(resp *http.Response) (QueueClientGe // NewListPager - Gets a list of all the queues under the specified storage account // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -244,25 +263,20 @@ func (client *QueueClient) NewListPager(resourceGroupName string, accountName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *QueueClientListResponse) (QueueClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, accountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "QueueClient.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 QueueClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return QueueClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return QueueClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -286,13 +300,13 @@ func (client *QueueClient) listCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") - if options != nil && options.Maxpagesize != nil { - reqQP.Set("$maxpagesize", *options.Maxpagesize) - } if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } + if options != nil && options.Maxpagesize != nil { + reqQP.Set("$maxpagesize", *options.Maxpagesize) + } + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,7 +324,7 @@ func (client *QueueClient) listHandleResponse(resp *http.Response) (QueueClientL // Update - Creates a new queue with the specified queue name, under the specified account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -320,22 +334,29 @@ func (client *QueueClient) listHandleResponse(resp *http.Response) (QueueClientL // - queue - Queue properties and metadata to be created with // - options - QueueClientUpdateOptions contains the optional parameters for the QueueClient.Update method. func (client *QueueClient) Update(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue, options *QueueClientUpdateOptions) (QueueClientUpdateResponse, error) { + var err error + const operationName = "QueueClient.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, queueName, queue, options) if err != nil { return QueueClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QueueClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return QueueClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return QueueClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *QueueClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue, options *QueueClientUpdateOptions) (*policy.Request, error) { +func (client *QueueClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue, _ *QueueClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -358,10 +379,13 @@ func (client *QueueClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, queue) + if err := runtime.MarshalAsJSON(req, queue); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/queueservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/queueservices_client.go index 4947d327..72c431c6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/queueservices_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/queueservices_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type QueueServicesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewQueueServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QueueServicesClient, error) { - cl, err := arm.NewClient(moduleName+".QueueServicesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,29 +44,36 @@ func NewQueueServicesClient(subscriptionID string, credential azcore.TokenCreden // and CORS (Cross-Origin Resource Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - options - QueueServicesClientGetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.GetServiceProperties // method. func (client *QueueServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, options *QueueServicesClientGetServicePropertiesOptions) (QueueServicesClientGetServicePropertiesResponse, error) { + var err error + const operationName = "QueueServicesClient.GetServiceProperties" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getServicePropertiesCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return QueueServicesClientGetServicePropertiesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QueueServicesClientGetServicePropertiesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return QueueServicesClientGetServicePropertiesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return QueueServicesClientGetServicePropertiesResponse{}, err } - return client.getServicePropertiesHandleResponse(resp) + resp, err := client.getServicePropertiesHandleResponse(httpResp) + return resp, err } // getServicePropertiesCreateRequest creates the GetServiceProperties request. -func (client *QueueServicesClient) getServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *QueueServicesClientGetServicePropertiesOptions) (*policy.Request, error) { +func (client *QueueServicesClient) getServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *QueueServicesClientGetServicePropertiesOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/{queueServiceName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -90,7 +93,7 @@ func (client *QueueServicesClient) getServicePropertiesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -108,28 +111,35 @@ func (client *QueueServicesClient) getServicePropertiesHandleResponse(resp *http // List - List all queue services for the storage account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - options - QueueServicesClientListOptions contains the optional parameters for the QueueServicesClient.List method. func (client *QueueServicesClient) List(ctx context.Context, resourceGroupName string, accountName string, options *QueueServicesClientListOptions) (QueueServicesClientListResponse, error) { + var err error + const operationName = "QueueServicesClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return QueueServicesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QueueServicesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return QueueServicesClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return QueueServicesClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. -func (client *QueueServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *QueueServicesClientListOptions) (*policy.Request, error) { +func (client *QueueServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *QueueServicesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -148,7 +158,7 @@ func (client *QueueServicesClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -167,7 +177,7 @@ func (client *QueueServicesClient) listHandleResponse(resp *http.Response) (Queu // and CORS (Cross-Origin Resource Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -176,22 +186,29 @@ func (client *QueueServicesClient) listHandleResponse(resp *http.Response) (Queu // - options - QueueServicesClientSetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.SetServiceProperties // method. func (client *QueueServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters QueueServiceProperties, options *QueueServicesClientSetServicePropertiesOptions) (QueueServicesClientSetServicePropertiesResponse, error) { + var err error + const operationName = "QueueServicesClient.SetServiceProperties" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.setServicePropertiesCreateRequest(ctx, resourceGroupName, accountName, parameters, options) if err != nil { return QueueServicesClientSetServicePropertiesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QueueServicesClientSetServicePropertiesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return QueueServicesClientSetServicePropertiesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return QueueServicesClientSetServicePropertiesResponse{}, err } - return client.setServicePropertiesHandleResponse(resp) + resp, err := client.setServicePropertiesHandleResponse(httpResp) + return resp, err } // setServicePropertiesCreateRequest creates the SetServiceProperties request. -func (client *QueueServicesClient) setServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters QueueServiceProperties, options *QueueServicesClientSetServicePropertiesOptions) (*policy.Request, error) { +func (client *QueueServicesClient) setServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters QueueServiceProperties, _ *QueueServicesClientSetServicePropertiesOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/{queueServiceName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -211,10 +228,13 @@ func (client *QueueServicesClient) setServicePropertiesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // setServicePropertiesHandleResponse handles the SetServiceProperties response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/responses.go similarity index 68% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/response_types.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/responses.go index 6b1f3f1d..a7f6f5c9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/responses.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -16,14 +12,21 @@ type AccountsClientAbortHierarchicalNamespaceMigrationResponse struct { // AccountsClientCheckNameAvailabilityResponse contains the response from method AccountsClient.CheckNameAvailability. type AccountsClientCheckNameAvailabilityResponse struct { + // The CheckNameAvailability operation response. CheckNameAvailabilityResult } // AccountsClientCreateResponse contains the response from method AccountsClient.BeginCreate. type AccountsClientCreateResponse struct { + // The storage account. Account } +// AccountsClientCustomerInitiatedMigrationResponse contains the response from method AccountsClient.BeginCustomerInitiatedMigration. +type AccountsClientCustomerInitiatedMigrationResponse struct { + // placeholder for future response values +} + // AccountsClientDeleteResponse contains the response from method AccountsClient.Delete. type AccountsClientDeleteResponse struct { // placeholder for future response values @@ -34,8 +37,16 @@ type AccountsClientFailoverResponse struct { // placeholder for future response values } +// AccountsClientGetCustomerInitiatedMigrationResponse contains the response from method AccountsClient.GetCustomerInitiatedMigration. +type AccountsClientGetCustomerInitiatedMigrationResponse struct { + // The parameters or status associated with an ongoing or enqueued storage account migration in order to update its current + // SKU or region. + AccountMigration +} + // AccountsClientGetPropertiesResponse contains the response from method AccountsClient.GetProperties. type AccountsClientGetPropertiesResponse struct { + // The storage account. Account } @@ -46,36 +57,43 @@ type AccountsClientHierarchicalNamespaceMigrationResponse struct { // AccountsClientListAccountSASResponse contains the response from method AccountsClient.ListAccountSAS. type AccountsClientListAccountSASResponse struct { + // The List SAS credentials operation response. ListAccountSasResponse } // AccountsClientListByResourceGroupResponse contains the response from method AccountsClient.NewListByResourceGroupPager. type AccountsClientListByResourceGroupResponse struct { + // The response from the List Storage Accounts operation. AccountListResult } // AccountsClientListKeysResponse contains the response from method AccountsClient.ListKeys. type AccountsClientListKeysResponse struct { + // The response from the ListKeys operation. AccountListKeysResult } // AccountsClientListResponse contains the response from method AccountsClient.NewListPager. type AccountsClientListResponse struct { + // The response from the List Storage Accounts operation. AccountListResult } // AccountsClientListServiceSASResponse contains the response from method AccountsClient.ListServiceSAS. type AccountsClientListServiceSASResponse struct { + // The List service SAS credentials operation response. ListServiceSasResponse } // AccountsClientRegenerateKeyResponse contains the response from method AccountsClient.RegenerateKey. type AccountsClientRegenerateKeyResponse struct { + // The response from the ListKeys operation. AccountListKeysResult } // AccountsClientRestoreBlobRangesResponse contains the response from method AccountsClient.BeginRestoreBlobRanges. type AccountsClientRestoreBlobRangesResponse struct { + // Blob restore status. BlobRestoreStatus } @@ -86,29 +104,36 @@ type AccountsClientRevokeUserDelegationKeysResponse struct { // AccountsClientUpdateResponse contains the response from method AccountsClient.Update. type AccountsClientUpdateResponse struct { + // The storage account. Account } // BlobContainersClientClearLegalHoldResponse contains the response from method BlobContainersClient.ClearLegalHold. type BlobContainersClientClearLegalHoldResponse struct { + // The LegalHold property of a blob container. LegalHold } // BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse contains the response from method BlobContainersClient.CreateOrUpdateImmutabilityPolicy. type BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse struct { + // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy + // ETag contains the information returned from the ETag header response. ETag *string } // BlobContainersClientCreateResponse contains the response from method BlobContainersClient.Create. type BlobContainersClientCreateResponse struct { + // Properties of the blob container, including Id, resource name, resource type, Etag. BlobContainer } // BlobContainersClientDeleteImmutabilityPolicyResponse contains the response from method BlobContainersClient.DeleteImmutabilityPolicy. type BlobContainersClientDeleteImmutabilityPolicyResponse struct { + // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy + // ETag contains the information returned from the ETag header response. ETag *string } @@ -120,36 +145,45 @@ type BlobContainersClientDeleteResponse struct { // BlobContainersClientExtendImmutabilityPolicyResponse contains the response from method BlobContainersClient.ExtendImmutabilityPolicy. type BlobContainersClientExtendImmutabilityPolicyResponse struct { + // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy + // ETag contains the information returned from the ETag header response. ETag *string } // BlobContainersClientGetImmutabilityPolicyResponse contains the response from method BlobContainersClient.GetImmutabilityPolicy. type BlobContainersClientGetImmutabilityPolicyResponse struct { + // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy + // ETag contains the information returned from the ETag header response. ETag *string } // BlobContainersClientGetResponse contains the response from method BlobContainersClient.Get. type BlobContainersClientGetResponse struct { + // Properties of the blob container, including Id, resource name, resource type, Etag. BlobContainer } // BlobContainersClientLeaseResponse contains the response from method BlobContainersClient.Lease. type BlobContainersClientLeaseResponse struct { + // Lease Container response schema. LeaseContainerResponse } // BlobContainersClientListResponse contains the response from method BlobContainersClient.NewListPager. type BlobContainersClientListResponse struct { + // Response schema. Contains list of blobs returned, and if paging is requested or required, a URL to next page of containers. ListContainerItems } // BlobContainersClientLockImmutabilityPolicyResponse contains the response from method BlobContainersClient.LockImmutabilityPolicy. type BlobContainersClientLockImmutabilityPolicyResponse struct { + // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy + // ETag contains the information returned from the ETag header response. ETag *string } @@ -161,16 +195,19 @@ type BlobContainersClientObjectLevelWormResponse struct { // BlobContainersClientSetLegalHoldResponse contains the response from method BlobContainersClient.SetLegalHold. type BlobContainersClientSetLegalHoldResponse struct { + // The LegalHold property of a blob container. LegalHold } // BlobContainersClientUpdateResponse contains the response from method BlobContainersClient.Update. type BlobContainersClientUpdateResponse struct { + // Properties of the blob container, including Id, resource name, resource type, Etag. BlobContainer } // BlobInventoryPoliciesClientCreateOrUpdateResponse contains the response from method BlobInventoryPoliciesClient.CreateOrUpdate. type BlobInventoryPoliciesClientCreateOrUpdateResponse struct { + // The storage account blob inventory policy. BlobInventoryPolicy } @@ -181,16 +218,19 @@ type BlobInventoryPoliciesClientDeleteResponse struct { // BlobInventoryPoliciesClientGetResponse contains the response from method BlobInventoryPoliciesClient.Get. type BlobInventoryPoliciesClientGetResponse struct { + // The storage account blob inventory policy. BlobInventoryPolicy } // BlobInventoryPoliciesClientListResponse contains the response from method BlobInventoryPoliciesClient.NewListPager. type BlobInventoryPoliciesClientListResponse struct { + // List of blob inventory policies returned. ListBlobInventoryPolicy } // BlobServicesClientGetServicePropertiesResponse contains the response from method BlobServicesClient.GetServiceProperties. type BlobServicesClientGetServicePropertiesResponse struct { + // The properties of a storage account’s Blob service. BlobServiceProperties } @@ -201,56 +241,78 @@ type BlobServicesClientListResponse struct { // BlobServicesClientSetServicePropertiesResponse contains the response from method BlobServicesClient.SetServiceProperties. type BlobServicesClientSetServicePropertiesResponse struct { + // The properties of a storage account’s Blob service. BlobServiceProperties } // DeletedAccountsClientGetResponse contains the response from method DeletedAccountsClient.Get. type DeletedAccountsClientGetResponse struct { + // Deleted storage account DeletedAccount } // DeletedAccountsClientListResponse contains the response from method DeletedAccountsClient.NewListPager. type DeletedAccountsClientListResponse struct { + // The response from the List Deleted Accounts operation. DeletedAccountListResult } // EncryptionScopesClientGetResponse contains the response from method EncryptionScopesClient.Get. type EncryptionScopesClientGetResponse struct { + // The Encryption Scope resource. EncryptionScope } // EncryptionScopesClientListResponse contains the response from method EncryptionScopesClient.NewListPager. type EncryptionScopesClientListResponse struct { + // List of encryption scopes requested, and if paging is required, a URL to the next page of encryption scopes. EncryptionScopeListResult } // EncryptionScopesClientPatchResponse contains the response from method EncryptionScopesClient.Patch. type EncryptionScopesClientPatchResponse struct { + // The Encryption Scope resource. EncryptionScope } // EncryptionScopesClientPutResponse contains the response from method EncryptionScopesClient.Put. type EncryptionScopesClientPutResponse struct { + // The Encryption Scope resource. EncryptionScope } // FileServicesClientGetServicePropertiesResponse contains the response from method FileServicesClient.GetServiceProperties. type FileServicesClientGetServicePropertiesResponse struct { + // The properties of File services in storage account. FileServiceProperties } +// FileServicesClientGetServiceUsageResponse contains the response from method FileServicesClient.GetServiceUsage. +type FileServicesClientGetServiceUsageResponse struct { + // The usage of file service in storage account. + FileServiceUsage +} + // FileServicesClientListResponse contains the response from method FileServicesClient.List. type FileServicesClientListResponse struct { FileServiceItems } +// FileServicesClientListServiceUsagesResponse contains the response from method FileServicesClient.NewListServiceUsagesPager. +type FileServicesClientListServiceUsagesResponse struct { + // List file service usages schema. + FileServiceUsages +} + // FileServicesClientSetServicePropertiesResponse contains the response from method FileServicesClient.SetServiceProperties. type FileServicesClientSetServicePropertiesResponse struct { + // The properties of File services in storage account. FileServiceProperties } // FileSharesClientCreateResponse contains the response from method FileSharesClient.Create. type FileSharesClientCreateResponse struct { + // Properties of the file share, including Id, resource name, resource type, Etag. FileShare } @@ -261,18 +323,22 @@ type FileSharesClientDeleteResponse struct { // FileSharesClientGetResponse contains the response from method FileSharesClient.Get. type FileSharesClientGetResponse struct { + // Properties of the file share, including Id, resource name, resource type, Etag. FileShare } // FileSharesClientLeaseResponse contains the response from method FileSharesClient.Lease. type FileSharesClientLeaseResponse struct { + // Lease Share response schema. LeaseShareResponse + // ETag contains the information returned from the ETag header response. ETag *string } // FileSharesClientListResponse contains the response from method FileSharesClient.NewListPager. type FileSharesClientListResponse struct { + // Response schema. Contains list of shares returned, and if paging is requested or required, a URL to next page of shares. FileShareItems } @@ -283,11 +349,13 @@ type FileSharesClientRestoreResponse struct { // FileSharesClientUpdateResponse contains the response from method FileSharesClient.Update. type FileSharesClientUpdateResponse struct { + // Properties of the file share, including Id, resource name, resource type, Etag. FileShare } // LocalUsersClientCreateOrUpdateResponse contains the response from method LocalUsersClient.CreateOrUpdate. type LocalUsersClientCreateOrUpdateResponse struct { + // The local user associated with the storage accounts. LocalUser } @@ -298,26 +366,31 @@ type LocalUsersClientDeleteResponse struct { // LocalUsersClientGetResponse contains the response from method LocalUsersClient.Get. type LocalUsersClientGetResponse struct { + // The local user associated with the storage accounts. LocalUser } // LocalUsersClientListKeysResponse contains the response from method LocalUsersClient.ListKeys. type LocalUsersClientListKeysResponse struct { + // The Storage Account Local User keys. LocalUserKeys } // LocalUsersClientListResponse contains the response from method LocalUsersClient.NewListPager. type LocalUsersClientListResponse struct { + // List of local users requested, and if paging is required, a URL to the next page of local users. LocalUsers } // LocalUsersClientRegeneratePasswordResponse contains the response from method LocalUsersClient.RegeneratePassword. type LocalUsersClientRegeneratePasswordResponse struct { + // The secrets of Storage Account Local User. LocalUserRegeneratePasswordResult } // ManagementPoliciesClientCreateOrUpdateResponse contains the response from method ManagementPoliciesClient.CreateOrUpdate. type ManagementPoliciesClientCreateOrUpdateResponse struct { + // The Get Storage Account ManagementPolicies operation response. ManagementPolicy } @@ -328,11 +401,30 @@ type ManagementPoliciesClientDeleteResponse struct { // ManagementPoliciesClientGetResponse contains the response from method ManagementPoliciesClient.Get. type ManagementPoliciesClientGetResponse struct { + // The Get Storage Account ManagementPolicies operation response. ManagementPolicy } +// NetworkSecurityPerimeterConfigurationsClientGetResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.Get. +type NetworkSecurityPerimeterConfigurationsClientGetResponse struct { + // The Network Security Perimeter configuration resource. + NetworkSecurityPerimeterConfiguration +} + +// NetworkSecurityPerimeterConfigurationsClientListResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.NewListPager. +type NetworkSecurityPerimeterConfigurationsClientListResponse struct { + // Result of the List Network Security Perimeter configuration operation. + NetworkSecurityPerimeterConfigurationList +} + +// NetworkSecurityPerimeterConfigurationsClientReconcileResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.BeginReconcile. +type NetworkSecurityPerimeterConfigurationsClientReconcileResponse struct { + // placeholder for future response values +} + // ObjectReplicationPoliciesClientCreateOrUpdateResponse contains the response from method ObjectReplicationPoliciesClient.CreateOrUpdate. type ObjectReplicationPoliciesClientCreateOrUpdateResponse struct { + // The replication policy between two storage accounts. Multiple rules can be defined in one policy. ObjectReplicationPolicy } @@ -343,16 +435,20 @@ type ObjectReplicationPoliciesClientDeleteResponse struct { // ObjectReplicationPoliciesClientGetResponse contains the response from method ObjectReplicationPoliciesClient.Get. type ObjectReplicationPoliciesClientGetResponse struct { + // The replication policy between two storage accounts. Multiple rules can be defined in one policy. ObjectReplicationPolicy } // ObjectReplicationPoliciesClientListResponse contains the response from method ObjectReplicationPoliciesClient.NewListPager. type ObjectReplicationPoliciesClientListResponse struct { + // List storage account object replication policies. ObjectReplicationPolicies } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list Storage operations. It contains a list of operations and a URL link to get the next set of + // results. OperationListResult } @@ -363,21 +459,25 @@ type PrivateEndpointConnectionsClientDeleteResponse struct { // PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. type PrivateEndpointConnectionsClientGetResponse struct { + // The Private Endpoint Connection resource. PrivateEndpointConnection } // PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager. type PrivateEndpointConnectionsClientListResponse struct { + // List of private endpoint connection associated with the specified storage account PrivateEndpointConnectionListResult } // PrivateEndpointConnectionsClientPutResponse contains the response from method PrivateEndpointConnectionsClient.Put. type PrivateEndpointConnectionsClientPutResponse struct { + // The Private Endpoint Connection resource. PrivateEndpointConnection } // PrivateLinkResourcesClientListByStorageAccountResponse contains the response from method PrivateLinkResourcesClient.ListByStorageAccount. type PrivateLinkResourcesClientListByStorageAccountResponse struct { + // A list of private link resources PrivateLinkResourceListResult } @@ -398,6 +498,7 @@ type QueueClientGetResponse struct { // QueueClientListResponse contains the response from method QueueClient.NewListPager. type QueueClientListResponse struct { + // Response schema. Contains list of queues returned ListQueueResource } @@ -408,6 +509,7 @@ type QueueClientUpdateResponse struct { // QueueServicesClientGetServicePropertiesResponse contains the response from method QueueServicesClient.GetServiceProperties. type QueueServicesClientGetServicePropertiesResponse struct { + // The properties of a storage account’s Queue service. QueueServiceProperties } @@ -418,16 +520,19 @@ type QueueServicesClientListResponse struct { // QueueServicesClientSetServicePropertiesResponse contains the response from method QueueServicesClient.SetServiceProperties. type QueueServicesClientSetServicePropertiesResponse struct { + // The properties of a storage account’s Queue service. QueueServiceProperties } // SKUsClientListResponse contains the response from method SKUsClient.NewListPager. type SKUsClientListResponse struct { + // The response from the List Storage SKUs operation. SKUListResult } // TableClientCreateResponse contains the response from method TableClient.Create. type TableClientCreateResponse struct { + // Properties of the table, including Id, resource name, resource type. Table } @@ -438,21 +543,25 @@ type TableClientDeleteResponse struct { // TableClientGetResponse contains the response from method TableClient.Get. type TableClientGetResponse struct { + // Properties of the table, including Id, resource name, resource type. Table } // TableClientListResponse contains the response from method TableClient.NewListPager. type TableClientListResponse struct { + // Response schema. Contains list of tables returned ListTableResource } // TableClientUpdateResponse contains the response from method TableClient.Update. type TableClientUpdateResponse struct { + // Properties of the table, including Id, resource name, resource type. Table } // TableServicesClientGetServicePropertiesResponse contains the response from method TableServicesClient.GetServiceProperties. type TableServicesClientGetServicePropertiesResponse struct { + // The properties of a storage account’s Table service. TableServiceProperties } @@ -463,10 +572,53 @@ type TableServicesClientListResponse struct { // TableServicesClientSetServicePropertiesResponse contains the response from method TableServicesClient.SetServiceProperties. type TableServicesClientSetServicePropertiesResponse struct { + // The properties of a storage account’s Table service. TableServiceProperties } +// TaskAssignmentInstancesReportClientListResponse contains the response from method TaskAssignmentInstancesReportClient.NewListPager. +type TaskAssignmentInstancesReportClientListResponse struct { + // Fetch Storage Tasks Run Summary. + TaskReportSummary +} + +// TaskAssignmentsClientCreateResponse contains the response from method TaskAssignmentsClient.BeginCreate. +type TaskAssignmentsClientCreateResponse struct { + // The storage task assignment. + TaskAssignment +} + +// TaskAssignmentsClientDeleteResponse contains the response from method TaskAssignmentsClient.BeginDelete. +type TaskAssignmentsClientDeleteResponse struct { + // placeholder for future response values +} + +// TaskAssignmentsClientGetResponse contains the response from method TaskAssignmentsClient.Get. +type TaskAssignmentsClientGetResponse struct { + // The storage task assignment. + TaskAssignment +} + +// TaskAssignmentsClientListResponse contains the response from method TaskAssignmentsClient.NewListPager. +type TaskAssignmentsClientListResponse struct { + // List of storage task assignments for the storage account + TaskAssignmentsList +} + +// TaskAssignmentsClientUpdateResponse contains the response from method TaskAssignmentsClient.BeginUpdate. +type TaskAssignmentsClientUpdateResponse struct { + // The storage task assignment. + TaskAssignment +} + +// TaskAssignmentsInstancesReportClientListResponse contains the response from method TaskAssignmentsInstancesReportClient.NewListPager. +type TaskAssignmentsInstancesReportClientListResponse struct { + // Fetch Storage Tasks Run Summary. + TaskReportSummary +} + // UsagesClientListByLocationResponse contains the response from method UsagesClient.NewListByLocationPager. type UsagesClientListByLocationResponse struct { + // The response from the List Usages operation. UsageListResult } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/skus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/skus_client.go index 378c35b9..f6404ce1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/skus_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/skus_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type SKUsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error) { - cl, err := arm.NewClient(moduleName+".SKUsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -46,7 +42,7 @@ func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, opt // NewListPager - Lists the available SKUs supported by Microsoft.Storage for given subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ @@ -54,6 +50,7 @@ func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime. return false }, Fetcher: func(ctx context.Context, page *SKUsClientListResponse) (SKUsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SKUsClient.NewListPager") req, err := client.listCreateRequest(ctx, options) if err != nil { return SKUsClientListResponse{}, err @@ -67,11 +64,12 @@ func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime. } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listCreateRequest creates the List request. -func (client *SKUsClient) listCreateRequest(ctx context.Context, options *SKUsClientListOptions) (*policy.Request, error) { +func (client *SKUsClient) listCreateRequest(ctx context.Context, _ *SKUsClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -82,7 +80,7 @@ func (client *SKUsClient) listCreateRequest(ctx context.Context, options *SKUsCl return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-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/storage/armstorage/table_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/table_client.go index 808746d5..0dc4d610 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/table_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/table_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type TableClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTableClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TableClient, error) { - cl, err := arm.NewClient(moduleName+".TableClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +43,7 @@ func NewTableClient(subscriptionID string, credential azcore.TokenCredential, op // Create - Creates a new table with the specified table name, under the specified account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -55,18 +51,25 @@ func NewTableClient(subscriptionID string, credential azcore.TokenCredential, op // comprise of only alphanumeric characters and it cannot begin with a numeric character. // - options - TableClientCreateOptions contains the optional parameters for the TableClient.Create method. func (client *TableClient) Create(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableClientCreateOptions) (TableClientCreateResponse, error) { + var err error + const operationName = "TableClient.Create" + 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, accountName, tableName, options) if err != nil { return TableClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TableClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TableClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TableClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -93,11 +96,14 @@ func (client *TableClient) createCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -114,7 +120,7 @@ func (client *TableClient) createHandleResponse(resp *http.Response) (TableClien // Delete - Deletes the table with the specified table name, under the specified account if it exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -122,22 +128,28 @@ func (client *TableClient) createHandleResponse(resp *http.Response) (TableClien // comprise of only alphanumeric characters and it cannot begin with a numeric character. // - options - TableClientDeleteOptions contains the optional parameters for the TableClient.Delete method. func (client *TableClient) Delete(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableClientDeleteOptions) (TableClientDeleteResponse, error) { + var err error + const operationName = "TableClient.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, accountName, tableName, options) if err != nil { return TableClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TableClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return TableClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TableClientDeleteResponse{}, err } return TableClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *TableClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableClientDeleteOptions) (*policy.Request, error) { +func (client *TableClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, tableName string, _ *TableClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -160,7 +172,7 @@ func (client *TableClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -169,7 +181,7 @@ func (client *TableClient) deleteCreateRequest(ctx context.Context, resourceGrou // Get - Gets the table with the specified table name, under the specified account if it exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -177,22 +189,29 @@ func (client *TableClient) deleteCreateRequest(ctx context.Context, resourceGrou // comprise of only alphanumeric characters and it cannot begin with a numeric character. // - options - TableClientGetOptions contains the optional parameters for the TableClient.Get method. func (client *TableClient) Get(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableClientGetOptions) (TableClientGetResponse, error) { + var err error + const operationName = "TableClient.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, tableName, options) if err != nil { return TableClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TableClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TableClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TableClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *TableClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableClientGetOptions) (*policy.Request, error) { +func (client *TableClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, tableName string, _ *TableClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -215,7 +234,7 @@ func (client *TableClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,7 +251,7 @@ func (client *TableClient) getHandleResponse(resp *http.Response) (TableClientGe // NewListPager - Gets a list of all the tables under the specified storage account // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -243,30 +262,25 @@ func (client *TableClient) NewListPager(resourceGroupName string, accountName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *TableClientListResponse) (TableClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, accountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TableClient.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 TableClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return TableClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TableClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listCreateRequest creates the List request. -func (client *TableClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *TableClientListOptions) (*policy.Request, error) { +func (client *TableClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *TableClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -285,7 +299,7 @@ func (client *TableClient) listCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -303,7 +317,7 @@ func (client *TableClient) listHandleResponse(resp *http.Response) (TableClientL // Update - Creates a new table with the specified table name, under the specified account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -311,18 +325,25 @@ func (client *TableClient) listHandleResponse(resp *http.Response) (TableClientL // comprise of only alphanumeric characters and it cannot begin with a numeric character. // - options - TableClientUpdateOptions contains the optional parameters for the TableClient.Update method. func (client *TableClient) Update(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableClientUpdateOptions) (TableClientUpdateResponse, error) { + var err error + const operationName = "TableClient.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, tableName, options) if err != nil { return TableClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TableClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TableClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TableClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -349,11 +370,14 @@ func (client *TableClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil } return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/tableservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/tableservices_client.go index 2cc73165..2905d911 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/tableservices_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/tableservices_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type TableServicesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTableServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TableServicesClient, error) { - cl, err := arm.NewClient(moduleName+".TableServicesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,29 +44,36 @@ func NewTableServicesClient(subscriptionID string, credential azcore.TokenCreden // and CORS (Cross-Origin Resource Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - options - TableServicesClientGetServicePropertiesOptions contains the optional parameters for the TableServicesClient.GetServiceProperties // method. func (client *TableServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, options *TableServicesClientGetServicePropertiesOptions) (TableServicesClientGetServicePropertiesResponse, error) { + var err error + const operationName = "TableServicesClient.GetServiceProperties" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getServicePropertiesCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return TableServicesClientGetServicePropertiesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TableServicesClientGetServicePropertiesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TableServicesClientGetServicePropertiesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TableServicesClientGetServicePropertiesResponse{}, err } - return client.getServicePropertiesHandleResponse(resp) + resp, err := client.getServicePropertiesHandleResponse(httpResp) + return resp, err } // getServicePropertiesCreateRequest creates the GetServiceProperties request. -func (client *TableServicesClient) getServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *TableServicesClientGetServicePropertiesOptions) (*policy.Request, error) { +func (client *TableServicesClient) getServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *TableServicesClientGetServicePropertiesOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/{tableServiceName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -90,7 +93,7 @@ func (client *TableServicesClient) getServicePropertiesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -108,28 +111,35 @@ func (client *TableServicesClient) getServicePropertiesHandleResponse(resp *http // List - List all table services for the storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. // - options - TableServicesClientListOptions contains the optional parameters for the TableServicesClient.List method. func (client *TableServicesClient) List(ctx context.Context, resourceGroupName string, accountName string, options *TableServicesClientListOptions) (TableServicesClientListResponse, error) { + var err error + const operationName = "TableServicesClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { return TableServicesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TableServicesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TableServicesClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TableServicesClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. -func (client *TableServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *TableServicesClientListOptions) (*policy.Request, error) { +func (client *TableServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *TableServicesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -148,7 +158,7 @@ func (client *TableServicesClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -167,7 +177,7 @@ func (client *TableServicesClient) listHandleResponse(resp *http.Response) (Tabl // and CORS (Cross-Origin Resource Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - accountName - The name of the storage account within the specified resource group. Storage account names must be between // 3 and 24 characters in length and use numbers and lower-case letters only. @@ -176,22 +186,29 @@ func (client *TableServicesClient) listHandleResponse(resp *http.Response) (Tabl // - options - TableServicesClientSetServicePropertiesOptions contains the optional parameters for the TableServicesClient.SetServiceProperties // method. func (client *TableServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters TableServiceProperties, options *TableServicesClientSetServicePropertiesOptions) (TableServicesClientSetServicePropertiesResponse, error) { + var err error + const operationName = "TableServicesClient.SetServiceProperties" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.setServicePropertiesCreateRequest(ctx, resourceGroupName, accountName, parameters, options) if err != nil { return TableServicesClientSetServicePropertiesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TableServicesClientSetServicePropertiesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TableServicesClientSetServicePropertiesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TableServicesClientSetServicePropertiesResponse{}, err } - return client.setServicePropertiesHandleResponse(resp) + resp, err := client.setServicePropertiesHandleResponse(httpResp) + return resp, err } // setServicePropertiesCreateRequest creates the SetServiceProperties request. -func (client *TableServicesClient) setServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters TableServiceProperties, options *TableServicesClientSetServicePropertiesOptions) (*policy.Request, error) { +func (client *TableServicesClient) setServicePropertiesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters TableServiceProperties, _ *TableServicesClientSetServicePropertiesOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/{tableServiceName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -211,10 +228,13 @@ func (client *TableServicesClient) setServicePropertiesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // setServicePropertiesHandleResponse handles the SetServiceProperties response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/taskassignmentinstancesreport_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/taskassignmentinstancesreport_client.go new file mode 100644 index 00000000..19bc76fa --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/taskassignmentinstancesreport_client.go @@ -0,0 +1,120 @@ +// 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 armstorage + +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" +) + +// TaskAssignmentInstancesReportClient contains the methods for the StorageTaskAssignmentInstancesReport group. +// Don't use this type directly, use NewTaskAssignmentInstancesReportClient() instead. +type TaskAssignmentInstancesReportClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTaskAssignmentInstancesReportClient creates a new instance of TaskAssignmentInstancesReportClient 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 NewTaskAssignmentInstancesReportClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TaskAssignmentInstancesReportClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TaskAssignmentInstancesReportClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Fetch the report summary of a single storage task assignment's instances +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - storageTaskAssignmentName - The name of the storage task assignment within the specified resource group. Storage task assignment +// names must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// - options - TaskAssignmentInstancesReportClientListOptions contains the optional parameters for the TaskAssignmentInstancesReportClient.NewListPager +// method. +func (client *TaskAssignmentInstancesReportClient) NewListPager(resourceGroupName string, accountName string, storageTaskAssignmentName string, options *TaskAssignmentInstancesReportClientListOptions) *runtime.Pager[TaskAssignmentInstancesReportClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[TaskAssignmentInstancesReportClientListResponse]{ + More: func(page TaskAssignmentInstancesReportClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TaskAssignmentInstancesReportClientListResponse) (TaskAssignmentInstancesReportClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TaskAssignmentInstancesReportClient.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, storageTaskAssignmentName, options) + }, nil) + if err != nil { + return TaskAssignmentInstancesReportClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *TaskAssignmentInstancesReportClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, options *TaskAssignmentInstancesReportClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports" + 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 accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if storageTaskAssignmentName == "" { + return nil, errors.New("parameter storageTaskAssignmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTaskAssignmentName}", url.PathEscape(storageTaskAssignmentName)) + 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.Maxpagesize != nil { + reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) + } + reqQP.Set("api-version", "2024-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *TaskAssignmentInstancesReportClient) listHandleResponse(resp *http.Response) (TaskAssignmentInstancesReportClientListResponse, error) { + result := TaskAssignmentInstancesReportClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TaskReportSummary); err != nil { + return TaskAssignmentInstancesReportClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/taskassignments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/taskassignments_client.go new file mode 100644 index 00000000..37db3de4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/taskassignments_client.go @@ -0,0 +1,450 @@ +// 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 armstorage + +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" +) + +// TaskAssignmentsClient contains the methods for the StorageTaskAssignments group. +// Don't use this type directly, use NewTaskAssignmentsClient() instead. +type TaskAssignmentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTaskAssignmentsClient creates a new instance of TaskAssignmentsClient 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 NewTaskAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TaskAssignmentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TaskAssignmentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage +// task assignment is already created and a subsequent create request is issued with +// different properties, the storage task assignment properties will be updated. If a storage task assignment is already created +// and a subsequent create or update request is issued with the exact same +// set of properties, the request will succeed. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - storageTaskAssignmentName - The name of the storage task assignment within the specified resource group. Storage task assignment +// names must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// - parameters - The parameters to create a Storage Task Assignment. +// - options - TaskAssignmentsClientBeginCreateOptions contains the optional parameters for the TaskAssignmentsClient.BeginCreate +// method. +func (client *TaskAssignmentsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, parameters TaskAssignment, options *TaskAssignmentsClientBeginCreateOptions) (*runtime.Poller[TaskAssignmentsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, accountName, storageTaskAssignmentName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TaskAssignmentsClientCreateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[TaskAssignmentsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage +// task assignment is already created and a subsequent create request is issued with +// different properties, the storage task assignment properties will be updated. If a storage task assignment is already created +// and a subsequent create or update request is issued with the exact same +// set of properties, the request will succeed. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +func (client *TaskAssignmentsClient) create(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, parameters TaskAssignment, options *TaskAssignmentsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "TaskAssignmentsClient.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, accountName, storageTaskAssignmentName, 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 *TaskAssignmentsClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, parameters TaskAssignment, _ *TaskAssignmentsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + 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 accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if storageTaskAssignmentName == "" { + return nil, errors.New("parameter storageTaskAssignmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTaskAssignmentName}", url.PathEscape(storageTaskAssignmentName)) + 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-01-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 +} + +// BeginDelete - Delete the storage task assignment sub-resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - storageTaskAssignmentName - The name of the storage task assignment within the specified resource group. Storage task assignment +// names must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// - options - TaskAssignmentsClientBeginDeleteOptions contains the optional parameters for the TaskAssignmentsClient.BeginDelete +// method. +func (client *TaskAssignmentsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, options *TaskAssignmentsClientBeginDeleteOptions) (*runtime.Poller[TaskAssignmentsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, storageTaskAssignmentName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TaskAssignmentsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[TaskAssignmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the storage task assignment sub-resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +func (client *TaskAssignmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, options *TaskAssignmentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "TaskAssignmentsClient.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, storageTaskAssignmentName, 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 *TaskAssignmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, _ *TaskAssignmentsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + 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 accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if storageTaskAssignmentName == "" { + return nil, errors.New("parameter storageTaskAssignmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTaskAssignmentName}", url.PathEscape(storageTaskAssignmentName)) + 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-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the storage task assignment properties +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - storageTaskAssignmentName - The name of the storage task assignment within the specified resource group. Storage task assignment +// names must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// - options - TaskAssignmentsClientGetOptions contains the optional parameters for the TaskAssignmentsClient.Get method. +func (client *TaskAssignmentsClient) Get(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, options *TaskAssignmentsClientGetOptions) (TaskAssignmentsClientGetResponse, error) { + var err error + const operationName = "TaskAssignmentsClient.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, storageTaskAssignmentName, options) + if err != nil { + return TaskAssignmentsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TaskAssignmentsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TaskAssignmentsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *TaskAssignmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, _ *TaskAssignmentsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + 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 accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if storageTaskAssignmentName == "" { + return nil, errors.New("parameter storageTaskAssignmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTaskAssignmentName}", url.PathEscape(storageTaskAssignmentName)) + req, err := 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-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *TaskAssignmentsClient) getHandleResponse(resp *http.Response) (TaskAssignmentsClientGetResponse, error) { + result := TaskAssignmentsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TaskAssignment); err != nil { + return TaskAssignmentsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all the storage task assignments in an account +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - options - TaskAssignmentsClientListOptions contains the optional parameters for the TaskAssignmentsClient.NewListPager +// method. +func (client *TaskAssignmentsClient) NewListPager(resourceGroupName string, accountName string, options *TaskAssignmentsClientListOptions) *runtime.Pager[TaskAssignmentsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[TaskAssignmentsClientListResponse]{ + More: func(page TaskAssignmentsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TaskAssignmentsClientListResponse) (TaskAssignmentsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TaskAssignmentsClient.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 TaskAssignmentsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *TaskAssignmentsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *TaskAssignmentsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments" + 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 accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + 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.Maxpagesize != nil { + reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) + } + reqQP.Set("api-version", "2024-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *TaskAssignmentsClient) listHandleResponse(resp *http.Response) (TaskAssignmentsClientListResponse, error) { + result := TaskAssignmentsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TaskAssignmentsList); err != nil { + return TaskAssignmentsClientListResponse{}, err + } + return result, nil +} + +// BeginUpdate - Update storage task assignment properties +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - storageTaskAssignmentName - The name of the storage task assignment within the specified resource group. Storage task assignment +// names must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// - parameters - The parameters to update a Storage Task Assignment. +// - options - TaskAssignmentsClientBeginUpdateOptions contains the optional parameters for the TaskAssignmentsClient.BeginUpdate +// method. +func (client *TaskAssignmentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, parameters TaskAssignmentUpdateParameters, options *TaskAssignmentsClientBeginUpdateOptions) (*runtime.Poller[TaskAssignmentsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, accountName, storageTaskAssignmentName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TaskAssignmentsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[TaskAssignmentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Update storage task assignment properties +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-01-01 +func (client *TaskAssignmentsClient) update(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, parameters TaskAssignmentUpdateParameters, options *TaskAssignmentsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "TaskAssignmentsClient.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, storageTaskAssignmentName, 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 *TaskAssignmentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, parameters TaskAssignmentUpdateParameters, _ *TaskAssignmentsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + 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 accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if storageTaskAssignmentName == "" { + return nil, errors.New("parameter storageTaskAssignmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTaskAssignmentName}", url.PathEscape(storageTaskAssignmentName)) + 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-01-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 +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/taskassignmentsinstancesreport_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/taskassignmentsinstancesreport_client.go new file mode 100644 index 00000000..f0600dbe --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/taskassignmentsinstancesreport_client.go @@ -0,0 +1,114 @@ +// 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 armstorage + +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" +) + +// TaskAssignmentsInstancesReportClient contains the methods for the StorageTaskAssignmentsInstancesReport group. +// Don't use this type directly, use NewTaskAssignmentsInstancesReportClient() instead. +type TaskAssignmentsInstancesReportClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTaskAssignmentsInstancesReportClient creates a new instance of TaskAssignmentsInstancesReportClient 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 NewTaskAssignmentsInstancesReportClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TaskAssignmentsInstancesReportClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TaskAssignmentsInstancesReportClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Fetch the report summary of all the storage task assignments and instances in an account +// +// Generated from API version 2024-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the storage account within the specified resource group. Storage account names must be between +// 3 and 24 characters in length and use numbers and lower-case letters only. +// - options - TaskAssignmentsInstancesReportClientListOptions contains the optional parameters for the TaskAssignmentsInstancesReportClient.NewListPager +// method. +func (client *TaskAssignmentsInstancesReportClient) NewListPager(resourceGroupName string, accountName string, options *TaskAssignmentsInstancesReportClientListOptions) *runtime.Pager[TaskAssignmentsInstancesReportClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[TaskAssignmentsInstancesReportClientListResponse]{ + More: func(page TaskAssignmentsInstancesReportClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TaskAssignmentsInstancesReportClientListResponse) (TaskAssignmentsInstancesReportClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TaskAssignmentsInstancesReportClient.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 TaskAssignmentsInstancesReportClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *TaskAssignmentsInstancesReportClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *TaskAssignmentsInstancesReportClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/reports" + 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 accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + 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.Maxpagesize != nil { + reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) + } + reqQP.Set("api-version", "2024-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *TaskAssignmentsInstancesReportClient) listHandleResponse(resp *http.Response) (TaskAssignmentsInstancesReportClientListResponse, error) { + result := TaskAssignmentsInstancesReportClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TaskReportSummary); err != nil { + return TaskAssignmentsInstancesReportClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/time_rfc1123.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/time_rfc1123.go new file mode 100644 index 00000000..dad32f06 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/time_rfc1123.go @@ -0,0 +1,74 @@ +// 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 armstorage + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "strings" + "time" +) + +const ( + dateTimeRFC1123JSON = `"` + time.RFC1123 + `"` +) + +type dateTimeRFC1123 time.Time + +func (t dateTimeRFC1123) MarshalJSON() ([]byte, error) { + b := []byte(time.Time(t).Format(dateTimeRFC1123JSON)) + return b, nil +} + +func (t dateTimeRFC1123) MarshalText() ([]byte, error) { + b := []byte(time.Time(t).Format(time.RFC1123)) + return b, nil +} + +func (t *dateTimeRFC1123) UnmarshalJSON(data []byte) error { + p, err := time.Parse(dateTimeRFC1123JSON, strings.ToUpper(string(data))) + *t = dateTimeRFC1123(p) + return err +} + +func (t *dateTimeRFC1123) UnmarshalText(data []byte) error { + if len(data) == 0 { + return nil + } + p, err := time.Parse(time.RFC1123, string(data)) + *t = dateTimeRFC1123(p) + return err +} + +func (t dateTimeRFC1123) String() string { + return time.Time(t).Format(time.RFC1123) +} + +func populateDateTimeRFC1123(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] = (*dateTimeRFC1123)(t) +} + +func unpopulateDateTimeRFC1123(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC1123 + 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/storage/armstorage/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/time_rfc3339.go index 625ecd13..f13e1072 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/time_rfc3339.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -19,50 +15,77 @@ import ( "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 ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + 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 + `"` ) -// 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+)*"*$`) - -type timeRFC3339 time.Time +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON +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 *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + if len(data) == 0 { + return nil + } + 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 *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +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) { @@ -71,14 +94,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/usages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/usages_client.go index 2c66fa4c..a3762374 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/usages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/usages_client.go @@ -1,11 +1,7 @@ -//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. +// 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. -// DO NOT EDIT. package armstorage @@ -33,7 +29,7 @@ type UsagesClient struct { // - 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+".UsagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -46,7 +42,7 @@ func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, o // NewListByLocationPager - Gets the current usage count and the limit for the resources of the location under the subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2024-01-01 // - location - The location of the Azure Storage resource. // - options - UsagesClientListByLocationOptions contains the optional parameters for the UsagesClient.NewListByLocationPager // method. @@ -56,6 +52,7 @@ func (client *UsagesClient) NewListByLocationPager(location string, options *Usa return false }, Fetcher: func(ctx context.Context, page *UsagesClientListByLocationResponse) (UsagesClientListByLocationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UsagesClient.NewListByLocationPager") req, err := client.listByLocationCreateRequest(ctx, location, options) if err != nil { return UsagesClientListByLocationResponse{}, err @@ -69,11 +66,12 @@ func (client *UsagesClient) NewListByLocationPager(location string, options *Usa } return client.listByLocationHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listByLocationCreateRequest creates the ListByLocation request. -func (client *UsagesClient) listByLocationCreateRequest(ctx context.Context, location string, options *UsagesClientListByLocationOptions) (*policy.Request, error) { +func (client *UsagesClient) listByLocationCreateRequest(ctx context.Context, location string, _ *UsagesClientListByLocationOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -88,7 +86,7 @@ func (client *UsagesClient) listByLocationCreateRequest(ctx context.Context, loc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2024-01-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/storagepool/armstoragepool/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/CHANGELOG.md index ad5dea09..f7e8694d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/CHANGELOG.md @@ -1,5 +1,11 @@ # 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/README.md index 72a74b60..d9823af7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewDiskPoolsClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/autorest.md index d7e213a6..982ecf5a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/autorest.md @@ -8,6 +8,6 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagepool/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagepool/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 +module-version: 1.2.0 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/client_factory.go index a6ce1dc5..0f2142df 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstoragepool @@ -28,7 +27,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,27 +37,32 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +// NewDiskPoolZonesClient creates a new instance of DiskPoolZonesClient. +func (c *ClientFactory) NewDiskPoolZonesClient() *DiskPoolZonesClient { + subClient, _ := NewDiskPoolZonesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDiskPoolsClient creates a new instance of DiskPoolsClient. func (c *ClientFactory) NewDiskPoolsClient() *DiskPoolsClient { subClient, _ := NewDiskPoolsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDiskPoolZonesClient() *DiskPoolZonesClient { - subClient, _ := NewDiskPoolZonesClient(c.subscriptionID, c.credential, c.options) +// NewIscsiTargetsClient creates a new instance of IscsiTargetsClient. +func (c *ClientFactory) NewIscsiTargetsClient() *IscsiTargetsClient { + subClient, _ := NewIscsiTargetsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewResourceSKUsClient() *ResourceSKUsClient { - subClient, _ := NewResourceSKUsClient(c.subscriptionID, c.credential, c.options) +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewIscsiTargetsClient() *IscsiTargetsClient { - subClient, _ := NewIscsiTargetsClient(c.subscriptionID, c.credential, c.options) +// NewResourceSKUsClient creates a new instance of ResourceSKUsClient. +func (c *ClientFactory) NewResourceSKUsClient() *ResourceSKUsClient { + subClient, _ := NewResourceSKUsClient(c.subscriptionID, c.credential, c.options) return subClient } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/constants.go index 21957b72..9b7b8fd8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armstoragepool const ( - moduleName = "armstoragepool" - moduleVersion = "v1.1.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool" + moduleVersion = "v1.2.0" ) // CreatedByType - The type of identity that created the resource. @@ -128,15 +127,15 @@ func PossibleProvisioningStatesValues() []ProvisioningStates { type ResourceSKURestrictionsReasonCode string const ( - ResourceSKURestrictionsReasonCodeQuotaID ResourceSKURestrictionsReasonCode = "QuotaId" ResourceSKURestrictionsReasonCodeNotAvailableForSubscription ResourceSKURestrictionsReasonCode = "NotAvailableForSubscription" + ResourceSKURestrictionsReasonCodeQuotaID ResourceSKURestrictionsReasonCode = "QuotaId" ) // PossibleResourceSKURestrictionsReasonCodeValues returns the possible values for the ResourceSKURestrictionsReasonCode const type. func PossibleResourceSKURestrictionsReasonCodeValues() []ResourceSKURestrictionsReasonCode { return []ResourceSKURestrictionsReasonCode{ - ResourceSKURestrictionsReasonCodeQuotaID, ResourceSKURestrictionsReasonCodeNotAvailableForSubscription, + ResourceSKURestrictionsReasonCodeQuotaID, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/diskpools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/diskpools_client.go index d8d3489b..41a6f73e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/diskpools_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/diskpools_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstoragepool @@ -33,7 +32,7 @@ type DiskPoolsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDiskPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiskPoolsClient, error) { - cl, err := arm.NewClient(moduleName+".DiskPoolsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,11 +59,15 @@ func (client *DiskPoolsClient) BeginCreateOrUpdate(ctx context.Context, resource if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskPoolsClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskPoolsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskPoolsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskPoolsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -74,18 +77,24 @@ func (client *DiskPoolsClient) BeginCreateOrUpdate(ctx context.Context, resource // // Generated from API version 2021-08-01 func (client *DiskPoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, diskPoolName string, diskPoolCreatePayload DiskPoolCreate, options *DiskPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DiskPoolsClient.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, diskPoolName, diskPoolCreatePayload, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -111,7 +120,10 @@ func (client *DiskPoolsClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, diskPoolCreatePayload) + if err := runtime.MarshalAsJSON(req, diskPoolCreatePayload); err != nil { + return nil, err + } + return req, nil } // BeginDeallocate - Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources @@ -130,11 +142,15 @@ func (client *DiskPoolsClient) BeginDeallocate(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskPoolsClientDeallocateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskPoolsClientDeallocateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskPoolsClientDeallocateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskPoolsClientDeallocateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -145,18 +161,24 @@ func (client *DiskPoolsClient) BeginDeallocate(ctx context.Context, resourceGrou // // Generated from API version 2021-08-01 func (client *DiskPoolsClient) deallocate(ctx context.Context, resourceGroupName string, diskPoolName string, options *DiskPoolsClientBeginDeallocateOptions) (*http.Response, error) { + var err error + const operationName = "DiskPoolsClient.BeginDeallocate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deallocateCreateRequest(ctx, resourceGroupName, diskPoolName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deallocateCreateRequest creates the Deallocate request. @@ -199,11 +221,15 @@ func (client *DiskPoolsClient) BeginDelete(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskPoolsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskPoolsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskPoolsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskPoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -213,18 +239,24 @@ func (client *DiskPoolsClient) BeginDelete(ctx context.Context, resourceGroupNam // // Generated from API version 2021-08-01 func (client *DiskPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, diskPoolName string, options *DiskPoolsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DiskPoolsClient.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, diskPoolName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -261,18 +293,25 @@ func (client *DiskPoolsClient) deleteCreateRequest(ctx context.Context, resource // - diskPoolName - The name of the Disk Pool. // - options - DiskPoolsClientGetOptions contains the optional parameters for the DiskPoolsClient.Get method. func (client *DiskPoolsClient) Get(ctx context.Context, resourceGroupName string, diskPoolName string, options *DiskPoolsClientGetOptions) (DiskPoolsClientGetResponse, error) { + var err error + const operationName = "DiskPoolsClient.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, diskPoolName, options) if err != nil { return DiskPoolsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiskPoolsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiskPoolsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiskPoolsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -322,25 +361,20 @@ func (client *DiskPoolsClient) NewListByResourceGroupPager(resourceGroupName str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiskPoolsClientListByResourceGroupResponse) (DiskPoolsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiskPoolsClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiskPoolsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 DiskPoolsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiskPoolsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -386,25 +420,20 @@ func (client *DiskPoolsClient) NewListBySubscriptionPager(options *DiskPoolsClie return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiskPoolsClientListBySubscriptionResponse) (DiskPoolsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiskPoolsClient.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 DiskPoolsClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DiskPoolsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiskPoolsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -448,25 +477,20 @@ func (client *DiskPoolsClient) NewListOutboundNetworkDependenciesEndpointsPager( return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiskPoolsClientListOutboundNetworkDependenciesEndpointsResponse) (DiskPoolsClientListOutboundNetworkDependenciesEndpointsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listOutboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, diskPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiskPoolsClientListOutboundNetworkDependenciesEndpointsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiskPoolsClient.NewListOutboundNetworkDependenciesEndpointsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listOutboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, diskPoolName, options) + }, nil) if err != nil { return DiskPoolsClientListOutboundNetworkDependenciesEndpointsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiskPoolsClientListOutboundNetworkDependenciesEndpointsResponse{}, runtime.NewResponseError(resp) - } return client.listOutboundNetworkDependenciesEndpointsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -519,11 +543,15 @@ func (client *DiskPoolsClient) BeginStart(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskPoolsClientStartResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskPoolsClientStartResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskPoolsClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskPoolsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -533,18 +561,24 @@ func (client *DiskPoolsClient) BeginStart(ctx context.Context, resourceGroupName // // Generated from API version 2021-08-01 func (client *DiskPoolsClient) start(ctx context.Context, resourceGroupName string, diskPoolName string, options *DiskPoolsClientBeginStartOptions) (*http.Response, error) { + var err error + const operationName = "DiskPoolsClient.BeginStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startCreateRequest(ctx, resourceGroupName, diskPoolName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // startCreateRequest creates the Start request. @@ -587,11 +621,15 @@ func (client *DiskPoolsClient) BeginUpdate(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskPoolsClientUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskPoolsClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskPoolsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskPoolsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -600,18 +638,24 @@ func (client *DiskPoolsClient) BeginUpdate(ctx context.Context, resourceGroupNam // // Generated from API version 2021-08-01 func (client *DiskPoolsClient) update(ctx context.Context, resourceGroupName string, diskPoolName string, diskPoolUpdatePayload DiskPoolUpdate, options *DiskPoolsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DiskPoolsClient.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, diskPoolName, diskPoolUpdatePayload, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -637,7 +681,10 @@ func (client *DiskPoolsClient) updateCreateRequest(ctx context.Context, resource reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, diskPoolUpdatePayload) + if err := runtime.MarshalAsJSON(req, diskPoolUpdatePayload); err != nil { + return nil, err + } + return req, nil } // BeginUpgrade - Upgrade replaces the underlying virtual machine hosts one at a time. This operation can take 10-15 minutes @@ -654,11 +701,15 @@ func (client *DiskPoolsClient) BeginUpgrade(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskPoolsClientUpgradeResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskPoolsClientUpgradeResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskPoolsClientUpgradeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskPoolsClientUpgradeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -668,18 +719,24 @@ func (client *DiskPoolsClient) BeginUpgrade(ctx context.Context, resourceGroupNa // // Generated from API version 2021-08-01 func (client *DiskPoolsClient) upgrade(ctx context.Context, resourceGroupName string, diskPoolName string, options *DiskPoolsClientBeginUpgradeOptions) (*http.Response, error) { + var err error + const operationName = "DiskPoolsClient.BeginUpgrade" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.upgradeCreateRequest(ctx, resourceGroupName, diskPoolName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // upgradeCreateRequest creates the Upgrade request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/diskpoolzones_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/diskpoolzones_client.go index 37a854ab..d5993ebd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/diskpoolzones_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/diskpoolzones_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstoragepool @@ -33,7 +32,7 @@ type DiskPoolZonesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDiskPoolZonesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiskPoolZonesClient, error) { - cl, err := arm.NewClient(moduleName+".DiskPoolZonesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,25 +54,20 @@ func (client *DiskPoolZonesClient) NewListPager(location string, options *DiskPo return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiskPoolZonesClientListResponse) (DiskPoolZonesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiskPoolZonesClient.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 DiskPoolZonesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DiskPoolZonesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiskPoolZonesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/iscsitargets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/iscsitargets_client.go index d26b0bab..190c2ed7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/iscsitargets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/iscsitargets_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstoragepool @@ -33,7 +32,7 @@ type IscsiTargetsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIscsiTargetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IscsiTargetsClient, error) { - cl, err := arm.NewClient(moduleName+".IscsiTargetsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,11 +59,15 @@ func (client *IscsiTargetsClient) BeginCreateOrUpdate(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IscsiTargetsClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IscsiTargetsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IscsiTargetsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IscsiTargetsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +76,24 @@ func (client *IscsiTargetsClient) BeginCreateOrUpdate(ctx context.Context, resou // // Generated from API version 2021-08-01 func (client *IscsiTargetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, diskPoolName string, iscsiTargetName string, iscsiTargetCreatePayload IscsiTargetCreate, options *IscsiTargetsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "IscsiTargetsClient.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, diskPoolName, iscsiTargetName, iscsiTargetCreatePayload, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -114,7 +123,10 @@ func (client *IscsiTargetsClient) createOrUpdateCreateRequest(ctx context.Contex reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, iscsiTargetCreatePayload) + if err := runtime.MarshalAsJSON(req, iscsiTargetCreatePayload); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete an iSCSI Target. @@ -132,11 +144,15 @@ func (client *IscsiTargetsClient) BeginDelete(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IscsiTargetsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IscsiTargetsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IscsiTargetsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IscsiTargetsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -145,18 +161,24 @@ func (client *IscsiTargetsClient) BeginDelete(ctx context.Context, resourceGroup // // Generated from API version 2021-08-01 func (client *IscsiTargetsClient) deleteOperation(ctx context.Context, resourceGroupName string, diskPoolName string, iscsiTargetName string, options *IscsiTargetsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "IscsiTargetsClient.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, diskPoolName, iscsiTargetName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -198,18 +220,25 @@ func (client *IscsiTargetsClient) deleteCreateRequest(ctx context.Context, resou // - iscsiTargetName - The name of the iSCSI Target. // - options - IscsiTargetsClientGetOptions contains the optional parameters for the IscsiTargetsClient.Get method. func (client *IscsiTargetsClient) Get(ctx context.Context, resourceGroupName string, diskPoolName string, iscsiTargetName string, options *IscsiTargetsClientGetOptions) (IscsiTargetsClientGetResponse, error) { + var err error + const operationName = "IscsiTargetsClient.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, diskPoolName, iscsiTargetName, options) if err != nil { return IscsiTargetsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IscsiTargetsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IscsiTargetsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IscsiTargetsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -264,25 +293,20 @@ func (client *IscsiTargetsClient) NewListByDiskPoolPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IscsiTargetsClientListByDiskPoolResponse) (IscsiTargetsClientListByDiskPoolResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByDiskPoolCreateRequest(ctx, resourceGroupName, diskPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IscsiTargetsClient.NewListByDiskPoolPager") + 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.listByDiskPoolCreateRequest(ctx, resourceGroupName, diskPoolName, options) + }, nil) if err != nil { return IscsiTargetsClientListByDiskPoolResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IscsiTargetsClientListByDiskPoolResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IscsiTargetsClientListByDiskPoolResponse{}, runtime.NewResponseError(resp) - } return client.listByDiskPoolHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -337,11 +361,15 @@ func (client *IscsiTargetsClient) BeginUpdate(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IscsiTargetsClientUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IscsiTargetsClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IscsiTargetsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IscsiTargetsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -350,18 +378,24 @@ func (client *IscsiTargetsClient) BeginUpdate(ctx context.Context, resourceGroup // // Generated from API version 2021-08-01 func (client *IscsiTargetsClient) update(ctx context.Context, resourceGroupName string, diskPoolName string, iscsiTargetName string, iscsiTargetUpdatePayload IscsiTargetUpdate, options *IscsiTargetsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "IscsiTargetsClient.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, diskPoolName, iscsiTargetName, iscsiTargetUpdatePayload, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -391,5 +425,8 @@ func (client *IscsiTargetsClient) updateCreateRequest(ctx context.Context, resou reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, iscsiTargetUpdatePayload) + if err := runtime.MarshalAsJSON(req, iscsiTargetUpdatePayload); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/models.go index df86009e..9a658a97 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstoragepool @@ -179,71 +178,6 @@ type DiskPoolZoneListResult struct { Value []*DiskPoolZoneInfo } -// DiskPoolZonesClientListOptions contains the optional parameters for the DiskPoolZonesClient.NewListPager method. -type DiskPoolZonesClientListOptions struct { - // placeholder for future optional parameters -} - -// DiskPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the DiskPoolsClient.BeginCreateOrUpdate -// method. -type DiskPoolsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DiskPoolsClientBeginDeallocateOptions contains the optional parameters for the DiskPoolsClient.BeginDeallocate method. -type DiskPoolsClientBeginDeallocateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DiskPoolsClientBeginDeleteOptions contains the optional parameters for the DiskPoolsClient.BeginDelete method. -type DiskPoolsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DiskPoolsClientBeginStartOptions contains the optional parameters for the DiskPoolsClient.BeginStart method. -type DiskPoolsClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DiskPoolsClientBeginUpdateOptions contains the optional parameters for the DiskPoolsClient.BeginUpdate method. -type DiskPoolsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DiskPoolsClientBeginUpgradeOptions contains the optional parameters for the DiskPoolsClient.BeginUpgrade method. -type DiskPoolsClientBeginUpgradeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DiskPoolsClientGetOptions contains the optional parameters for the DiskPoolsClient.Get method. -type DiskPoolsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DiskPoolsClientListByResourceGroupOptions contains the optional parameters for the DiskPoolsClient.NewListByResourceGroupPager -// method. -type DiskPoolsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// DiskPoolsClientListBySubscriptionOptions contains the optional parameters for the DiskPoolsClient.NewListBySubscriptionPager -// method. -type DiskPoolsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// DiskPoolsClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the DiskPoolsClient.NewListOutboundNetworkDependenciesEndpointsPager -// method. -type DiskPoolsClientListOutboundNetworkDependenciesEndpointsOptions struct { - // placeholder for future optional parameters -} - // EndpointDependency - A domain name that a service is reached at, including details of the current connection status. type EndpointDependency struct { // The domain name of the dependency. @@ -443,36 +377,6 @@ type IscsiTargetUpdateProperties struct { StaticACLs []*ACL } -// IscsiTargetsClientBeginCreateOrUpdateOptions contains the optional parameters for the IscsiTargetsClient.BeginCreateOrUpdate -// method. -type IscsiTargetsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IscsiTargetsClientBeginDeleteOptions contains the optional parameters for the IscsiTargetsClient.BeginDelete method. -type IscsiTargetsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IscsiTargetsClientBeginUpdateOptions contains the optional parameters for the IscsiTargetsClient.BeginUpdate method. -type IscsiTargetsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IscsiTargetsClientGetOptions contains the optional parameters for the IscsiTargetsClient.Get method. -type IscsiTargetsClientGetOptions struct { - // placeholder for future optional parameters -} - -// IscsiTargetsClientListByDiskPoolOptions contains the optional parameters for the IscsiTargetsClient.NewListByDiskPoolPager -// method. -type IscsiTargetsClientListByDiskPoolOptions struct { - // placeholder for future optional parameters -} - // OperationDisplay - Metadata about an operation. type OperationDisplay struct { // REQUIRED; Localized friendly description for the operation, as it should be shown to the user. @@ -497,11 +401,6 @@ type OperationListResult struct { NextLink *string } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // OutboundEnvironmentEndpoint - Endpoints accessed for a common purpose that the App Service Environment requires outbound // network access to. type OutboundEnvironmentEndpoint struct { @@ -653,11 +552,6 @@ type ResourceSKUZoneDetails struct { Name []*string } -// ResourceSKUsClientListOptions contains the optional parameters for the ResourceSKUsClient.NewListPager method. -type ResourceSKUsClientListOptions struct { - // placeholder for future optional parameters -} - // SKU - Sku for ARM resource type SKU struct { // REQUIRED; Sku name diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/models_serde.go index e2ef0308..26d56484 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstoragepool @@ -1488,10 +1487,10 @@ func (s *SKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemMetadata. func (s SystemMetadata) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -1507,7 +1506,7 @@ func (s *SystemMetadata) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -1516,7 +1515,7 @@ func (s *SystemMetadata) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/operations_client.go index c83c2496..c1a43dfa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstoragepool @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,6 +47,7 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return false }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") req, err := client.listCreateRequest(ctx, options) if err != nil { return OperationsClientListResponse{}, err @@ -61,6 +61,7 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/options.go new file mode 100644 index 00000000..6c12b3e0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/options.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 armstoragepool + +// DiskPoolZonesClientListOptions contains the optional parameters for the DiskPoolZonesClient.NewListPager method. +type DiskPoolZonesClientListOptions struct { + // placeholder for future optional parameters +} + +// DiskPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the DiskPoolsClient.BeginCreateOrUpdate +// method. +type DiskPoolsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DiskPoolsClientBeginDeallocateOptions contains the optional parameters for the DiskPoolsClient.BeginDeallocate method. +type DiskPoolsClientBeginDeallocateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DiskPoolsClientBeginDeleteOptions contains the optional parameters for the DiskPoolsClient.BeginDelete method. +type DiskPoolsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DiskPoolsClientBeginStartOptions contains the optional parameters for the DiskPoolsClient.BeginStart method. +type DiskPoolsClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DiskPoolsClientBeginUpdateOptions contains the optional parameters for the DiskPoolsClient.BeginUpdate method. +type DiskPoolsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DiskPoolsClientBeginUpgradeOptions contains the optional parameters for the DiskPoolsClient.BeginUpgrade method. +type DiskPoolsClientBeginUpgradeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DiskPoolsClientGetOptions contains the optional parameters for the DiskPoolsClient.Get method. +type DiskPoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DiskPoolsClientListByResourceGroupOptions contains the optional parameters for the DiskPoolsClient.NewListByResourceGroupPager +// method. +type DiskPoolsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// DiskPoolsClientListBySubscriptionOptions contains the optional parameters for the DiskPoolsClient.NewListBySubscriptionPager +// method. +type DiskPoolsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// DiskPoolsClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the DiskPoolsClient.NewListOutboundNetworkDependenciesEndpointsPager +// method. +type DiskPoolsClientListOutboundNetworkDependenciesEndpointsOptions struct { + // placeholder for future optional parameters +} + +// IscsiTargetsClientBeginCreateOrUpdateOptions contains the optional parameters for the IscsiTargetsClient.BeginCreateOrUpdate +// method. +type IscsiTargetsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IscsiTargetsClientBeginDeleteOptions contains the optional parameters for the IscsiTargetsClient.BeginDelete method. +type IscsiTargetsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IscsiTargetsClientBeginUpdateOptions contains the optional parameters for the IscsiTargetsClient.BeginUpdate method. +type IscsiTargetsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IscsiTargetsClientGetOptions contains the optional parameters for the IscsiTargetsClient.Get method. +type IscsiTargetsClientGetOptions struct { + // placeholder for future optional parameters +} + +// IscsiTargetsClientListByDiskPoolOptions contains the optional parameters for the IscsiTargetsClient.NewListByDiskPoolPager +// method. +type IscsiTargetsClientListByDiskPoolOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions 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/storagepool/armstoragepool/resourceskus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/resourceskus_client.go index 4fe226ef..a3a02d0e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/resourceskus_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/resourceskus_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstoragepool @@ -33,7 +32,7 @@ type ResourceSKUsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewResourceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceSKUsClient, error) { - cl, err := arm.NewClient(moduleName+".ResourceSKUsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,25 +54,20 @@ func (client *ResourceSKUsClient) NewListPager(location string, options *Resourc return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceSKUsClientListResponse) (ResourceSKUsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceSKUsClient.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 ResourceSKUsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ResourceSKUsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceSKUsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/response_types.go index 9f04bbcf..d290f322 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/response_types.go @@ -3,19 +3,20 @@ // 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. +// 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. -// DO NOT EDIT. package armstoragepool // DiskPoolZonesClientListResponse contains the response from method DiskPoolZonesClient.NewListPager. type DiskPoolZonesClientListResponse struct { + // List Disk Pool skus operation response. DiskPoolZoneListResult } // DiskPoolsClientCreateOrUpdateResponse contains the response from method DiskPoolsClient.BeginCreateOrUpdate. type DiskPoolsClientCreateOrUpdateResponse struct { + // Response for Disk Pool request. DiskPool } @@ -31,21 +32,25 @@ type DiskPoolsClientDeleteResponse struct { // DiskPoolsClientGetResponse contains the response from method DiskPoolsClient.Get. type DiskPoolsClientGetResponse struct { + // Response for Disk Pool request. DiskPool } // DiskPoolsClientListByResourceGroupResponse contains the response from method DiskPoolsClient.NewListByResourceGroupPager. type DiskPoolsClientListByResourceGroupResponse struct { + // List of Disk Pools DiskPoolListResult } // DiskPoolsClientListBySubscriptionResponse contains the response from method DiskPoolsClient.NewListBySubscriptionPager. type DiskPoolsClientListBySubscriptionResponse struct { + // List of Disk Pools DiskPoolListResult } // DiskPoolsClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method DiskPoolsClient.NewListOutboundNetworkDependenciesEndpointsPager. type DiskPoolsClientListOutboundNetworkDependenciesEndpointsResponse struct { + // Collection of Outbound Environment Endpoints OutboundEnvironmentEndpointList } @@ -56,6 +61,7 @@ type DiskPoolsClientStartResponse struct { // DiskPoolsClientUpdateResponse contains the response from method DiskPoolsClient.BeginUpdate. type DiskPoolsClientUpdateResponse struct { + // Response for Disk Pool request. DiskPool } @@ -66,6 +72,7 @@ type DiskPoolsClientUpgradeResponse struct { // IscsiTargetsClientCreateOrUpdateResponse contains the response from method IscsiTargetsClient.BeginCreateOrUpdate. type IscsiTargetsClientCreateOrUpdateResponse struct { + // Response for iSCSI Target requests. IscsiTarget } @@ -76,25 +83,30 @@ type IscsiTargetsClientDeleteResponse struct { // IscsiTargetsClientGetResponse contains the response from method IscsiTargetsClient.Get. type IscsiTargetsClientGetResponse struct { + // Response for iSCSI Target requests. IscsiTarget } // IscsiTargetsClientListByDiskPoolResponse contains the response from method IscsiTargetsClient.NewListByDiskPoolPager. type IscsiTargetsClientListByDiskPoolResponse struct { + // List of iSCSI Targets. IscsiTargetList } // IscsiTargetsClientUpdateResponse contains the response from method IscsiTargetsClient.BeginUpdate. type IscsiTargetsClientUpdateResponse struct { + // Response for iSCSI Target requests. IscsiTarget } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // List of operations supported by the RP. OperationListResult } // ResourceSKUsClientListResponse contains the response from method ResourceSKUsClient.NewListPager. type ResourceSKUsClientListResponse struct { + // List Disk Pool skus operation response. ResourceSKUListResult } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/time_rfc3339.go index 8bebad4b..d189404c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstoragepool @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/CHANGELOG.md index 1d24f9ce..4ca7d2ab 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/CHANGELOG.md @@ -1,5 +1,11 @@ # 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/README.md index ecc960b8..7b3b1c0e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewInputsClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/assets.json new file mode 100644 index 00000000..78da0450 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/streamanalytics/armstreamanalytics", + "Tag": "go/resourcemanager/streamanalytics/armstreamanalytics_4124c9f67c" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/autorest.md index 2998f345..34277dd8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/autorest.md @@ -8,5 +8,5 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/streamanalytics/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/streamanalytics/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 +module-version: 1.2.0 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/client_factory.go index 672d9b76..f547b494 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -28,7 +27,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,47 +37,56 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +// NewClustersClient creates a new instance of ClustersClient. +func (c *ClientFactory) NewClustersClient() *ClustersClient { + subClient, _ := NewClustersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewStreamingJobsClient() *StreamingJobsClient { - subClient, _ := NewStreamingJobsClient(c.subscriptionID, c.credential, c.options) +// NewFunctionsClient creates a new instance of FunctionsClient. +func (c *ClientFactory) NewFunctionsClient() *FunctionsClient { + subClient, _ := NewFunctionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewInputsClient creates a new instance of InputsClient. func (c *ClientFactory) NewInputsClient() *InputsClient { subClient, _ := NewInputsClient(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 +} + +// NewOutputsClient creates a new instance of OutputsClient. func (c *ClientFactory) NewOutputsClient() *OutputsClient { subClient, _ := NewOutputsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewTransformationsClient() *TransformationsClient { - subClient, _ := NewTransformationsClient(c.subscriptionID, c.credential, c.options) +// NewPrivateEndpointsClient creates a new instance of PrivateEndpointsClient. +func (c *ClientFactory) NewPrivateEndpointsClient() *PrivateEndpointsClient { + subClient, _ := NewPrivateEndpointsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewFunctionsClient() *FunctionsClient { - subClient, _ := NewFunctionsClient(c.subscriptionID, c.credential, c.options) +// NewStreamingJobsClient creates a new instance of StreamingJobsClient. +func (c *ClientFactory) NewStreamingJobsClient() *StreamingJobsClient { + subClient, _ := NewStreamingJobsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSubscriptionsClient creates a new instance of SubscriptionsClient. func (c *ClientFactory) NewSubscriptionsClient() *SubscriptionsClient { subClient, _ := NewSubscriptionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewClustersClient() *ClustersClient { - subClient, _ := NewClustersClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewPrivateEndpointsClient() *PrivateEndpointsClient { - subClient, _ := NewPrivateEndpointsClient(c.subscriptionID, c.credential, c.options) +// NewTransformationsClient creates a new instance of TransformationsClient. +func (c *ClientFactory) NewTransformationsClient() *TransformationsClient { + subClient, _ := NewTransformationsClient(c.subscriptionID, c.credential, c.options) return subClient } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/clusters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/clusters_client.go index 6918f744..eebd5041 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/clusters_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/clusters_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -33,7 +32,7 @@ type ClustersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClustersClient, error) { - cl, err := arm.NewClient(moduleName+".ClustersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,9 +58,14 @@ func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -70,18 +74,24 @@ func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceG // // Generated from API version 2020-03-01 func (client *ClustersClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, cluster Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.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, clusterName, cluster, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -113,7 +123,10 @@ func (client *ClustersClient) createOrUpdateCreateRequest(ctx context.Context, r req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, cluster) + if err := runtime.MarshalAsJSON(req, cluster); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the specified cluster. @@ -129,9 +142,14 @@ func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -140,18 +158,24 @@ func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName // // Generated from API version 2020-03-01 func (client *ClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.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 } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -188,18 +212,25 @@ func (client *ClustersClient) deleteCreateRequest(ctx context.Context, resourceG // - clusterName - The name of the cluster. // - options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (ClustersClientGetResponse, error) { + var err error + const operationName = "ClustersClient.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 ClustersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClustersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClustersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -249,25 +280,20 @@ func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ClustersClientListByResourceGroupResponse) (ClustersClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.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 ClustersClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClustersClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -313,25 +339,20 @@ func (client *ClustersClient) NewListBySubscriptionPager(options *ClustersClient return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ClustersClientListBySubscriptionResponse) (ClustersClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ClustersClientListBySubscriptionResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 ClustersClientListBySubscriptionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -375,25 +396,20 @@ func (client *ClustersClient) NewListStreamingJobsPager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ClustersClientListStreamingJobsResponse) (ClustersClientListStreamingJobsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listStreamingJobsCreateRequest(ctx, resourceGroupName, clusterName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ClustersClientListStreamingJobsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.NewListStreamingJobsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listStreamingJobsCreateRequest(ctx, resourceGroupName, clusterName, options) + }, nil) if err != nil { return ClustersClientListStreamingJobsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListStreamingJobsResponse{}, runtime.NewResponseError(resp) - } return client.listStreamingJobsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -448,9 +464,14 @@ func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClustersClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -460,18 +481,24 @@ func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName // // Generated from API version 2020-03-01 func (client *ClustersClient) update(ctx context.Context, resourceGroupName string, clusterName string, cluster Cluster, options *ClustersClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.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, clusterName, cluster, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -500,5 +527,8 @@ func (client *ClustersClient) updateCreateRequest(ctx context.Context, resourceG req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, cluster) + if err := runtime.MarshalAsJSON(req, cluster); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/constants.go index 5c84a12b..65d11fa5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics const ( - moduleName = "armstreamanalytics" - moduleVersion = "v1.1.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics" + moduleVersion = "v1.2.0" ) // AuthenticationMode - Authentication Mode. Valid modes are ConnectionString, Msi and 'UserToken'. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/functions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/functions_client.go index 3becc096..9e1b5636 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/functions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/functions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -33,7 +32,7 @@ type FunctionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFunctionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FunctionsClient, error) { - cl, err := arm.NewClient(moduleName+".FunctionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewFunctionsClient(subscriptionID string, credential azcore.TokenCredential // - options - FunctionsClientCreateOrReplaceOptions contains the optional parameters for the FunctionsClient.CreateOrReplace // method. func (client *FunctionsClient) CreateOrReplace(ctx context.Context, resourceGroupName string, jobName string, functionName string, function Function, options *FunctionsClientCreateOrReplaceOptions) (FunctionsClientCreateOrReplaceResponse, error) { + var err error + const operationName = "FunctionsClient.CreateOrReplace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrReplaceCreateRequest(ctx, resourceGroupName, jobName, functionName, function, options) if err != nil { return FunctionsClientCreateOrReplaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FunctionsClientCreateOrReplaceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return FunctionsClientCreateOrReplaceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return FunctionsClientCreateOrReplaceResponse{}, err } - return client.createOrReplaceHandleResponse(resp) + resp, err := client.createOrReplaceHandleResponse(httpResp) + return resp, err } // createOrReplaceCreateRequest creates the CreateOrReplace request. @@ -103,7 +109,10 @@ func (client *FunctionsClient) createOrReplaceCreateRequest(ctx context.Context, req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, function) + if err := runtime.MarshalAsJSON(req, function); err != nil { + return nil, err + } + return req, nil } // createOrReplaceHandleResponse handles the CreateOrReplace response. @@ -127,16 +136,22 @@ func (client *FunctionsClient) createOrReplaceHandleResponse(resp *http.Response // - functionName - The name of the function. // - options - FunctionsClientDeleteOptions contains the optional parameters for the FunctionsClient.Delete method. func (client *FunctionsClient) Delete(ctx context.Context, resourceGroupName string, jobName string, functionName string, options *FunctionsClientDeleteOptions) (FunctionsClientDeleteResponse, error) { + var err error + const operationName = "FunctionsClient.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, jobName, functionName, options) if err != nil { return FunctionsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FunctionsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return FunctionsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return FunctionsClientDeleteResponse{}, err } return FunctionsClientDeleteResponse{}, nil } @@ -180,18 +195,25 @@ func (client *FunctionsClient) deleteCreateRequest(ctx context.Context, resource // - functionName - The name of the function. // - options - FunctionsClientGetOptions contains the optional parameters for the FunctionsClient.Get method. func (client *FunctionsClient) Get(ctx context.Context, resourceGroupName string, jobName string, functionName string, options *FunctionsClientGetOptions) (FunctionsClientGetResponse, error) { + var err error + const operationName = "FunctionsClient.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, jobName, functionName, options) if err != nil { return FunctionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FunctionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FunctionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FunctionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -249,25 +271,20 @@ func (client *FunctionsClient) NewListByStreamingJobPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *FunctionsClientListByStreamingJobResponse) (FunctionsClientListByStreamingJobResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByStreamingJobCreateRequest(ctx, resourceGroupName, jobName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FunctionsClient.NewListByStreamingJobPager") + 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.listByStreamingJobCreateRequest(ctx, resourceGroupName, jobName, options) + }, nil) if err != nil { return FunctionsClientListByStreamingJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return FunctionsClientListByStreamingJobResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FunctionsClientListByStreamingJobResponse{}, runtime.NewResponseError(resp) - } return client.listByStreamingJobHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -319,18 +336,25 @@ func (client *FunctionsClient) listByStreamingJobHandleResponse(resp *http.Respo // - options - FunctionsClientRetrieveDefaultDefinitionOptions contains the optional parameters for the FunctionsClient.RetrieveDefaultDefinition // method. func (client *FunctionsClient) RetrieveDefaultDefinition(ctx context.Context, resourceGroupName string, jobName string, functionName string, options *FunctionsClientRetrieveDefaultDefinitionOptions) (FunctionsClientRetrieveDefaultDefinitionResponse, error) { + var err error + const operationName = "FunctionsClient.RetrieveDefaultDefinition" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.retrieveDefaultDefinitionCreateRequest(ctx, resourceGroupName, jobName, functionName, options) if err != nil { return FunctionsClientRetrieveDefaultDefinitionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FunctionsClientRetrieveDefaultDefinitionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FunctionsClientRetrieveDefaultDefinitionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FunctionsClientRetrieveDefaultDefinitionResponse{}, err } - return client.retrieveDefaultDefinitionHandleResponse(resp) + resp, err := client.retrieveDefaultDefinitionHandleResponse(httpResp) + return resp, err } // retrieveDefaultDefinitionCreateRequest creates the RetrieveDefaultDefinition request. @@ -361,7 +385,10 @@ func (client *FunctionsClient) retrieveDefaultDefinitionCreateRequest(ctx contex req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.FunctionRetrieveDefaultDefinitionParameters != nil { - return req, runtime.MarshalAsJSON(req, options.FunctionRetrieveDefaultDefinitionParameters) + if err := runtime.MarshalAsJSON(req, options.FunctionRetrieveDefaultDefinitionParameters); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -391,9 +418,14 @@ func (client *FunctionsClient) BeginTest(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[FunctionsClientTestResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FunctionsClientTestResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[FunctionsClientTestResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FunctionsClientTestResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -404,18 +436,24 @@ func (client *FunctionsClient) BeginTest(ctx context.Context, resourceGroupName // // Generated from API version 2020-03-01 func (client *FunctionsClient) test(ctx context.Context, resourceGroupName string, jobName string, functionName string, options *FunctionsClientBeginTestOptions) (*http.Response, error) { + var err error + const operationName = "FunctionsClient.BeginTest" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.testCreateRequest(ctx, resourceGroupName, jobName, functionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // testCreateRequest creates the Test request. @@ -446,7 +484,10 @@ func (client *FunctionsClient) testCreateRequest(ctx context.Context, resourceGr req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Function != nil { - return req, runtime.MarshalAsJSON(req, *options.Function) + if err := runtime.MarshalAsJSON(req, *options.Function); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -466,18 +507,25 @@ func (client *FunctionsClient) testCreateRequest(ctx context.Context, resourceGr // PATCH operation. // - options - FunctionsClientUpdateOptions contains the optional parameters for the FunctionsClient.Update method. func (client *FunctionsClient) Update(ctx context.Context, resourceGroupName string, jobName string, functionName string, function Function, options *FunctionsClientUpdateOptions) (FunctionsClientUpdateResponse, error) { + var err error + const operationName = "FunctionsClient.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, jobName, functionName, function, options) if err != nil { return FunctionsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FunctionsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FunctionsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FunctionsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -510,7 +558,10 @@ func (client *FunctionsClient) updateCreateRequest(ctx context.Context, resource req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, function) + if err := runtime.MarshalAsJSON(req, function); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/inputs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/inputs_client.go index 865748c2..3c4edd56 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/inputs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/inputs_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -33,7 +32,7 @@ type InputsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewInputsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InputsClient, error) { - cl, err := arm.NewClient(moduleName+".InputsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewInputsClient(subscriptionID string, credential azcore.TokenCredential, o // job. // - options - InputsClientCreateOrReplaceOptions contains the optional parameters for the InputsClient.CreateOrReplace method. func (client *InputsClient) CreateOrReplace(ctx context.Context, resourceGroupName string, jobName string, inputName string, input Input, options *InputsClientCreateOrReplaceOptions) (InputsClientCreateOrReplaceResponse, error) { + var err error + const operationName = "InputsClient.CreateOrReplace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrReplaceCreateRequest(ctx, resourceGroupName, jobName, inputName, input, options) if err != nil { return InputsClientCreateOrReplaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return InputsClientCreateOrReplaceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return InputsClientCreateOrReplaceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return InputsClientCreateOrReplaceResponse{}, err } - return client.createOrReplaceHandleResponse(resp) + resp, err := client.createOrReplaceHandleResponse(httpResp) + return resp, err } // createOrReplaceCreateRequest creates the CreateOrReplace request. @@ -102,7 +108,10 @@ func (client *InputsClient) createOrReplaceCreateRequest(ctx context.Context, re req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil } // createOrReplaceHandleResponse handles the CreateOrReplace response. @@ -126,16 +135,22 @@ func (client *InputsClient) createOrReplaceHandleResponse(resp *http.Response) ( // - inputName - The name of the input. // - options - InputsClientDeleteOptions contains the optional parameters for the InputsClient.Delete method. func (client *InputsClient) Delete(ctx context.Context, resourceGroupName string, jobName string, inputName string, options *InputsClientDeleteOptions) (InputsClientDeleteResponse, error) { + var err error + const operationName = "InputsClient.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, jobName, inputName, options) if err != nil { return InputsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return InputsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return InputsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return InputsClientDeleteResponse{}, err } return InputsClientDeleteResponse{}, nil } @@ -179,18 +194,25 @@ func (client *InputsClient) deleteCreateRequest(ctx context.Context, resourceGro // - inputName - The name of the input. // - options - InputsClientGetOptions contains the optional parameters for the InputsClient.Get method. func (client *InputsClient) Get(ctx context.Context, resourceGroupName string, jobName string, inputName string, options *InputsClientGetOptions) (InputsClientGetResponse, error) { + var err error + const operationName = "InputsClient.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, jobName, inputName, options) if err != nil { return InputsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return InputsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InputsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InputsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -248,25 +270,20 @@ func (client *InputsClient) NewListByStreamingJobPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *InputsClientListByStreamingJobResponse) (InputsClientListByStreamingJobResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByStreamingJobCreateRequest(ctx, resourceGroupName, jobName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InputsClientListByStreamingJobResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InputsClient.NewListByStreamingJobPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByStreamingJobCreateRequest(ctx, resourceGroupName, jobName, options) + }, nil) if err != nil { return InputsClientListByStreamingJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InputsClientListByStreamingJobResponse{}, runtime.NewResponseError(resp) - } return client.listByStreamingJobHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -322,9 +339,14 @@ func (client *InputsClient) BeginTest(ctx context.Context, resourceGroupName str if err != nil { return nil, err } - return runtime.NewPoller[InputsClientTestResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InputsClientTestResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[InputsClientTestResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InputsClientTestResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -333,18 +355,24 @@ func (client *InputsClient) BeginTest(ctx context.Context, resourceGroupName str // // Generated from API version 2020-03-01 func (client *InputsClient) test(ctx context.Context, resourceGroupName string, jobName string, inputName string, options *InputsClientBeginTestOptions) (*http.Response, error) { + var err error + const operationName = "InputsClient.BeginTest" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.testCreateRequest(ctx, resourceGroupName, jobName, inputName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // testCreateRequest creates the Test request. @@ -375,7 +403,10 @@ func (client *InputsClient) testCreateRequest(ctx context.Context, resourceGroup req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Input != nil { - return req, runtime.MarshalAsJSON(req, *options.Input) + if err := runtime.MarshalAsJSON(req, *options.Input); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -394,18 +425,25 @@ func (client *InputsClient) testCreateRequest(ctx context.Context, resourceGroup // operation. // - options - InputsClientUpdateOptions contains the optional parameters for the InputsClient.Update method. func (client *InputsClient) Update(ctx context.Context, resourceGroupName string, jobName string, inputName string, input Input, options *InputsClientUpdateOptions) (InputsClientUpdateResponse, error) { + var err error + const operationName = "InputsClient.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, jobName, inputName, input, options) if err != nil { return InputsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return InputsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InputsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InputsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -438,7 +476,10 @@ func (client *InputsClient) updateCreateRequest(ctx context.Context, resourceGro req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/interfaces.go new file mode 100644 index 00000000..22017d46 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/interfaces.go @@ -0,0 +1,85 @@ +//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 armstreamanalytics + +// FunctionBindingClassification provides polymorphic access to related types. +// Call the interface's GetFunctionBinding() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureMachineLearningWebServiceFunctionBinding, *FunctionBinding, *JavaScriptFunctionBinding +type FunctionBindingClassification interface { + // GetFunctionBinding returns the FunctionBinding content of the underlying type. + GetFunctionBinding() *FunctionBinding +} + +// FunctionPropertiesClassification provides polymorphic access to related types. +// Call the interface's GetFunctionProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AggregateFunctionProperties, *FunctionProperties, *ScalarFunctionProperties +type FunctionPropertiesClassification interface { + // GetFunctionProperties returns the FunctionProperties content of the underlying type. + GetFunctionProperties() *FunctionProperties +} + +// FunctionRetrieveDefaultDefinitionParametersClassification provides polymorphic access to related types. +// Call the interface's GetFunctionRetrieveDefaultDefinitionParameters() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters, *FunctionRetrieveDefaultDefinitionParameters, +// - *JavaScriptFunctionRetrieveDefaultDefinitionParameters +type FunctionRetrieveDefaultDefinitionParametersClassification interface { + // GetFunctionRetrieveDefaultDefinitionParameters returns the FunctionRetrieveDefaultDefinitionParameters content of the underlying type. + GetFunctionRetrieveDefaultDefinitionParameters() *FunctionRetrieveDefaultDefinitionParameters +} + +// InputPropertiesClassification provides polymorphic access to related types. +// Call the interface's GetInputProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *InputProperties, *ReferenceInputProperties, *StreamInputProperties +type InputPropertiesClassification interface { + // GetInputProperties returns the InputProperties content of the underlying type. + GetInputProperties() *InputProperties +} + +// OutputDataSourceClassification provides polymorphic access to related types. +// Call the interface's GetOutputDataSource() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureDataLakeStoreOutputDataSource, *AzureFunctionOutputDataSource, *AzureSQLDatabaseOutputDataSource, *AzureSynapseOutputDataSource, +// - *AzureTableOutputDataSource, *BlobOutputDataSource, *DocumentDbOutputDataSource, *EventHubOutputDataSource, *EventHubV2OutputDataSource, +// - *OutputDataSource, *PowerBIOutputDataSource, *ServiceBusQueueOutputDataSource, *ServiceBusTopicOutputDataSource +type OutputDataSourceClassification interface { + // GetOutputDataSource returns the OutputDataSource content of the underlying type. + GetOutputDataSource() *OutputDataSource +} + +// ReferenceInputDataSourceClassification provides polymorphic access to related types. +// Call the interface's GetReferenceInputDataSource() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureSQLReferenceInputDataSource, *BlobReferenceInputDataSource, *ReferenceInputDataSource +type ReferenceInputDataSourceClassification interface { + // GetReferenceInputDataSource returns the ReferenceInputDataSource content of the underlying type. + GetReferenceInputDataSource() *ReferenceInputDataSource +} + +// SerializationClassification provides polymorphic access to related types. +// Call the interface's GetSerialization() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AvroSerialization, *CSVSerialization, *JSONSerialization, *ParquetSerialization, *Serialization +type SerializationClassification interface { + // GetSerialization returns the Serialization content of the underlying type. + GetSerialization() *Serialization +} + +// StreamInputDataSourceClassification provides polymorphic access to related types. +// Call the interface's GetStreamInputDataSource() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *BlobStreamInputDataSource, *EventHubStreamInputDataSource, *EventHubV2StreamInputDataSource, *IoTHubStreamInputDataSource, +// - *StreamInputDataSource +type StreamInputDataSourceClassification interface { + // GetStreamInputDataSource returns the StreamInputDataSource content of the underlying type. + GetStreamInputDataSource() *StreamInputDataSource +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/models.go index 4634174b..d0be7219 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -26,9 +25,9 @@ type AggregateFunctionProperties struct { // GetFunctionProperties implements the FunctionPropertiesClassification interface for type AggregateFunctionProperties. func (a *AggregateFunctionProperties) GetFunctionProperties() *FunctionProperties { return &FunctionProperties{ - Type: a.Type, Etag: a.Etag, Properties: a.Properties, + Type: a.Type, } } @@ -732,56 +731,6 @@ type ClusterSKU struct { Name *ClusterSKUName } -// ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method. -type ClustersClientBeginCreateOrUpdateOptions struct { - // The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value - // to prevent accidentally overwriting concurrent changes. - IfMatch *string - // Set to '*' to allow a new resource to be created, but to prevent updating an existing record set. Other values will result - // in a 412 Pre-condition Failed response. - IfNoneMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method. -type ClustersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method. -type ClustersClientBeginUpdateOptions struct { - // The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value - // to prevent accidentally overwriting concurrent changes. - IfMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. -type ClustersClientGetOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager -// method. -type ClustersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListBySubscriptionOptions contains the optional parameters for the ClustersClient.NewListBySubscriptionPager -// method. -type ClustersClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListStreamingJobsOptions contains the optional parameters for the ClustersClient.NewListStreamingJobsPager -// method. -type ClustersClientListStreamingJobsOptions struct { - // placeholder for future optional parameters -} - // Compression - Describes how input data is compressed type Compression struct { // REQUIRED; Indicates the type of compression that the input uses. Required on PUT (CreateOrReplace) requests. @@ -1044,15 +993,6 @@ type Function struct { Type *string } -// FunctionBindingClassification provides polymorphic access to related types. -// Call the interface's GetFunctionBinding() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureMachineLearningWebServiceFunctionBinding, *FunctionBinding, *JavaScriptFunctionBinding -type FunctionBindingClassification interface { - // GetFunctionBinding returns the FunctionBinding content of the underlying type. - GetFunctionBinding() *FunctionBinding -} - // FunctionBinding - The physical binding of the function. For example, in the Azure Machine Learning web service’s case, // this describes the endpoint. type FunctionBinding struct { @@ -1101,15 +1041,6 @@ type FunctionOutput struct { DataType *string } -// FunctionPropertiesClassification provides polymorphic access to related types. -// Call the interface's GetFunctionProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AggregateFunctionProperties, *FunctionProperties, *ScalarFunctionProperties -type FunctionPropertiesClassification interface { - // GetFunctionProperties returns the FunctionProperties content of the underlying type. - GetFunctionProperties() *FunctionProperties -} - // FunctionProperties - The properties that are associated with a function. type FunctionProperties struct { // REQUIRED; Indicates the type of function. @@ -1125,16 +1056,6 @@ type FunctionProperties struct { // GetFunctionProperties implements the FunctionPropertiesClassification interface for type FunctionProperties. func (f *FunctionProperties) GetFunctionProperties() *FunctionProperties { return f } -// FunctionRetrieveDefaultDefinitionParametersClassification provides polymorphic access to related types. -// Call the interface's GetFunctionRetrieveDefaultDefinitionParameters() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters, *FunctionRetrieveDefaultDefinitionParameters, -// - *JavaScriptFunctionRetrieveDefaultDefinitionParameters -type FunctionRetrieveDefaultDefinitionParametersClassification interface { - // GetFunctionRetrieveDefaultDefinitionParameters returns the FunctionRetrieveDefaultDefinitionParameters content of the underlying type. - GetFunctionRetrieveDefaultDefinitionParameters() *FunctionRetrieveDefaultDefinitionParameters -} - // FunctionRetrieveDefaultDefinitionParameters - Parameters used to specify the type of function to retrieve the default definition // for. type FunctionRetrieveDefaultDefinitionParameters struct { @@ -1148,61 +1069,6 @@ func (f *FunctionRetrieveDefaultDefinitionParameters) GetFunctionRetrieveDefault return f } -// FunctionsClientBeginTestOptions contains the optional parameters for the FunctionsClient.BeginTest method. -type FunctionsClientBeginTestOptions struct { - // If the function specified does not already exist, this parameter must contain the full function definition intended to - // be tested. If the function specified already exists, this parameter can be left - // null to test the existing function as is or if specified, the properties specified will overwrite the corresponding properties - // in the existing function (exactly like a PATCH operation) and the - // resulting function will be tested. - Function *Function - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FunctionsClientCreateOrReplaceOptions contains the optional parameters for the FunctionsClient.CreateOrReplace method. -type FunctionsClientCreateOrReplaceOptions struct { - // The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to - // prevent accidentally overwriting concurrent changes. - IfMatch *string - // Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result - // in a 412 Pre-condition Failed response. - IfNoneMatch *string -} - -// FunctionsClientDeleteOptions contains the optional parameters for the FunctionsClient.Delete method. -type FunctionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// FunctionsClientGetOptions contains the optional parameters for the FunctionsClient.Get method. -type FunctionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// FunctionsClientListByStreamingJobOptions contains the optional parameters for the FunctionsClient.NewListByStreamingJobPager -// method. -type FunctionsClientListByStreamingJobOptions struct { - // The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, - // or "" to include all properties. By default, all properties are returned except - // diagnostics. Currently only accepts '' as a valid value. - Select *string -} - -// FunctionsClientRetrieveDefaultDefinitionOptions contains the optional parameters for the FunctionsClient.RetrieveDefaultDefinition -// method. -type FunctionsClientRetrieveDefaultDefinitionOptions struct { - // Parameters used to specify the type of function to retrieve the default definition for. - FunctionRetrieveDefaultDefinitionParameters FunctionRetrieveDefaultDefinitionParametersClassification -} - -// FunctionsClientUpdateOptions contains the optional parameters for the FunctionsClient.Update method. -type FunctionsClientUpdateOptions struct { - // The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to - // prevent accidentally overwriting concurrent changes. - IfMatch *string -} - // Identity - Describes how identity is verified type Identity struct { // The identity principal ID @@ -1240,15 +1106,6 @@ type InputListResult struct { Value []*Input } -// InputPropertiesClassification provides polymorphic access to related types. -// Call the interface's GetInputProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *InputProperties, *ReferenceInputProperties, *StreamInputProperties -type InputPropertiesClassification interface { - // GetInputProperties returns the InputProperties content of the underlying type. - GetInputProperties() *InputProperties -} - // InputProperties - The properties that are associated with an input. type InputProperties struct { // REQUIRED; Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. @@ -1276,54 +1133,6 @@ type InputProperties struct { // GetInputProperties implements the InputPropertiesClassification interface for type InputProperties. func (i *InputProperties) GetInputProperties() *InputProperties { return i } -// InputsClientBeginTestOptions contains the optional parameters for the InputsClient.BeginTest method. -type InputsClientBeginTestOptions struct { - // If the input specified does not already exist, this parameter must contain the full input definition intended to be tested. - // If the input specified already exists, this parameter can be left null to - // test the existing input as is or if specified, the properties specified will overwrite the corresponding properties in - // the existing input (exactly like a PATCH operation) and the resulting input will - // be tested. - Input *Input - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InputsClientCreateOrReplaceOptions contains the optional parameters for the InputsClient.CreateOrReplace method. -type InputsClientCreateOrReplaceOptions struct { - // The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent - // accidentally overwriting concurrent changes. - IfMatch *string - // Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a - // 412 Pre-condition Failed response. - IfNoneMatch *string -} - -// InputsClientDeleteOptions contains the optional parameters for the InputsClient.Delete method. -type InputsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// InputsClientGetOptions contains the optional parameters for the InputsClient.Get method. -type InputsClientGetOptions struct { - // placeholder for future optional parameters -} - -// InputsClientListByStreamingJobOptions contains the optional parameters for the InputsClient.NewListByStreamingJobPager -// method. -type InputsClientListByStreamingJobOptions struct { - // The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, - // or "" to include all properties. By default, all properties are returned except - // diagnostics. Currently only accepts '' as a valid value. - Select *string -} - -// InputsClientUpdateOptions contains the optional parameters for the InputsClient.Update method. -type InputsClientUpdateOptions struct { - // The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent - // accidentally overwriting concurrent changes. - IfMatch *string -} - // IoTHubStreamInputDataSource - Describes an IoT Hub input data source that contains stream data. type IoTHubStreamInputDataSource struct { // REQUIRED; Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. @@ -1508,11 +1317,6 @@ type OperationListResult struct { Value []*Operation } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // Output - An output object, containing all information associated with the named output. All outputs are contained under // a streaming job. type Output struct { @@ -1529,17 +1333,6 @@ type Output struct { Type *string } -// OutputDataSourceClassification provides polymorphic access to related types. -// Call the interface's GetOutputDataSource() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureDataLakeStoreOutputDataSource, *AzureFunctionOutputDataSource, *AzureSQLDatabaseOutputDataSource, *AzureSynapseOutputDataSource, -// - *AzureTableOutputDataSource, *BlobOutputDataSource, *DocumentDbOutputDataSource, *EventHubOutputDataSource, *EventHubV2OutputDataSource, -// - *OutputDataSource, *PowerBIOutputDataSource, *ServiceBusQueueOutputDataSource, *ServiceBusTopicOutputDataSource -type OutputDataSourceClassification interface { - // GetOutputDataSource returns the OutputDataSource content of the underlying type. - GetOutputDataSource() *OutputDataSource -} - // OutputDataSource - Describes the data source that output will be written to. type OutputDataSource struct { // REQUIRED; Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. @@ -1582,54 +1375,6 @@ type OutputProperties struct { Etag *string } -// OutputsClientBeginTestOptions contains the optional parameters for the OutputsClient.BeginTest method. -type OutputsClientBeginTestOptions struct { - // If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. - // If the output specified already exists, this parameter can be left null to - // test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in - // the existing output (exactly like a PATCH operation) and the resulting output - // will be tested. - Output *Output - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OutputsClientCreateOrReplaceOptions contains the optional parameters for the OutputsClient.CreateOrReplace method. -type OutputsClientCreateOrReplaceOptions struct { - // The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent - // accidentally overwriting concurrent changes. - IfMatch *string - // Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in - // a 412 Pre-condition Failed response. - IfNoneMatch *string -} - -// OutputsClientDeleteOptions contains the optional parameters for the OutputsClient.Delete method. -type OutputsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// OutputsClientGetOptions contains the optional parameters for the OutputsClient.Get method. -type OutputsClientGetOptions struct { - // placeholder for future optional parameters -} - -// OutputsClientListByStreamingJobOptions contains the optional parameters for the OutputsClient.NewListByStreamingJobPager -// method. -type OutputsClientListByStreamingJobOptions struct { - // The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, - // or "" to include all properties. By default, all properties are returned except - // diagnostics. Currently only accepts '' as a valid value. - Select *string -} - -// OutputsClientUpdateOptions contains the optional parameters for the OutputsClient.Update method. -type OutputsClientUpdateOptions struct { - // The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent - // accidentally overwriting concurrent changes. - IfMatch *string -} - // ParquetSerialization - Describes how data from an input is serialized or how data is serialized when written to an output // in Parquet format. type ParquetSerialization struct { @@ -1733,34 +1478,6 @@ type PrivateEndpointProperties struct { CreatedDate *string } -// PrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointsClient.BeginDelete method. -type PrivateEndpointsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointsClient.CreateOrUpdate -// method. -type PrivateEndpointsClientCreateOrUpdateOptions struct { - // The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value - // to prevent accidentally overwriting concurrent changes. - IfMatch *string - // Set to '*' to allow a new resource to be created, but to prevent updating an existing record set. Other values will result - // in a 412 Pre-condition Failed response. - IfNoneMatch *string -} - -// PrivateEndpointsClientGetOptions contains the optional parameters for the PrivateEndpointsClient.Get method. -type PrivateEndpointsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointsClientListByClusterOptions contains the optional parameters for the PrivateEndpointsClient.NewListByClusterPager -// method. -type PrivateEndpointsClientListByClusterOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkConnectionState - A collection of read-only information about the state of the connection to the private remote // resource. type PrivateLinkConnectionState struct { @@ -1809,15 +1526,6 @@ type ProxyResource struct { Type *string } -// ReferenceInputDataSourceClassification provides polymorphic access to related types. -// Call the interface's GetReferenceInputDataSource() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureSQLReferenceInputDataSource, *BlobReferenceInputDataSource, *ReferenceInputDataSource -type ReferenceInputDataSourceClassification interface { - // GetReferenceInputDataSource returns the ReferenceInputDataSource content of the underlying type. - GetReferenceInputDataSource() *ReferenceInputDataSource -} - // ReferenceInputDataSource - Describes an input data source that contains reference data. type ReferenceInputDataSource struct { // REQUIRED; Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests. @@ -1857,12 +1565,12 @@ type ReferenceInputProperties struct { // GetInputProperties implements the InputPropertiesClassification interface for type ReferenceInputProperties. func (r *ReferenceInputProperties) GetInputProperties() *InputProperties { return &InputProperties{ - Type: r.Type, - Serialization: r.Serialization, + Compression: r.Compression, Diagnostics: r.Diagnostics, Etag: r.Etag, - Compression: r.Compression, PartitionKey: r.PartitionKey, + Serialization: r.Serialization, + Type: r.Type, } } @@ -1908,9 +1616,9 @@ type ScalarFunctionProperties struct { // GetFunctionProperties implements the FunctionPropertiesClassification interface for type ScalarFunctionProperties. func (s *ScalarFunctionProperties) GetFunctionProperties() *FunctionProperties { return &FunctionProperties{ - Type: s.Type, Etag: s.Etag, Properties: s.Properties, + Type: s.Type, } } @@ -1920,15 +1628,6 @@ type ScaleStreamingJobParameters struct { StreamingUnits *int32 } -// SerializationClassification provides polymorphic access to related types. -// Call the interface's GetSerialization() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AvroSerialization, *CSVSerialization, *JSONSerialization, *ParquetSerialization, *Serialization -type SerializationClassification interface { - // GetSerialization returns the Serialization content of the underlying type. - GetSerialization() *Serialization -} - // Serialization - Describes how data from an input is serialized or how data is serialized when written to an output. type Serialization struct { // REQUIRED; Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. @@ -2066,16 +1765,6 @@ type StorageAccount struct { AccountName *string } -// StreamInputDataSourceClassification provides polymorphic access to related types. -// Call the interface's GetStreamInputDataSource() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *BlobStreamInputDataSource, *EventHubStreamInputDataSource, *EventHubV2StreamInputDataSource, *IoTHubStreamInputDataSource, -// - *StreamInputDataSource -type StreamInputDataSourceClassification interface { - // GetStreamInputDataSource returns the StreamInputDataSource content of the underlying type. - GetStreamInputDataSource() *StreamInputDataSource -} - // StreamInputDataSource - Describes an input data source that contains stream data. type StreamInputDataSource struct { // REQUIRED; Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. @@ -2115,12 +1804,12 @@ type StreamInputProperties struct { // GetInputProperties implements the InputPropertiesClassification interface for type StreamInputProperties. func (s *StreamInputProperties) GetInputProperties() *InputProperties { return &InputProperties{ - Type: s.Type, - Serialization: s.Serialization, + Compression: s.Compression, Diagnostics: s.Diagnostics, Etag: s.Etag, - Compression: s.Compression, PartitionKey: s.PartitionKey, + Serialization: s.Serialization, + Type: s.Type, } } @@ -2253,79 +1942,6 @@ type StreamingJobProperties struct { ProvisioningState *string } -// StreamingJobsClientBeginCreateOrReplaceOptions contains the optional parameters for the StreamingJobsClient.BeginCreateOrReplace -// method. -type StreamingJobsClientBeginCreateOrReplaceOptions struct { - // The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value - // to prevent accidentally overwriting concurrent changes. - IfMatch *string - // Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will - // result in a 412 Pre-condition Failed response. - IfNoneMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StreamingJobsClientBeginDeleteOptions contains the optional parameters for the StreamingJobsClient.BeginDelete method. -type StreamingJobsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StreamingJobsClientBeginScaleOptions contains the optional parameters for the StreamingJobsClient.BeginScale method. -type StreamingJobsClientBeginScaleOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string - // Parameters applicable to a scale streaming job operation. - ScaleJobParameters *ScaleStreamingJobParameters -} - -// StreamingJobsClientBeginStartOptions contains the optional parameters for the StreamingJobsClient.BeginStart method. -type StreamingJobsClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string - // Parameters applicable to a start streaming job operation. - StartJobParameters *StartStreamingJobParameters -} - -// StreamingJobsClientBeginStopOptions contains the optional parameters for the StreamingJobsClient.BeginStop method. -type StreamingJobsClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StreamingJobsClientGetOptions contains the optional parameters for the StreamingJobsClient.Get method. -type StreamingJobsClientGetOptions struct { - // The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in - // the response, beyond the default set returned when this parameter is absent. The - // default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - Expand *string -} - -// StreamingJobsClientListByResourceGroupOptions contains the optional parameters for the StreamingJobsClient.NewListByResourceGroupPager -// method. -type StreamingJobsClientListByResourceGroupOptions struct { - // The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in - // the response, beyond the default set returned when this parameter is absent. The - // default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - Expand *string -} - -// StreamingJobsClientListOptions contains the optional parameters for the StreamingJobsClient.NewListPager method. -type StreamingJobsClientListOptions struct { - // The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in - // the response, beyond the default set returned when this parameter is absent. The - // default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - Expand *string -} - -// StreamingJobsClientUpdateOptions contains the optional parameters for the StreamingJobsClient.Update method. -type StreamingJobsClientUpdateOptions struct { - // The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value - // to prevent accidentally overwriting concurrent changes. - IfMatch *string -} - // SubResource - The base sub-resource model definition. type SubResource struct { // Resource name @@ -2369,11 +1985,6 @@ type SubscriptionQuotasListResult struct { Value []*SubscriptionQuota } -// SubscriptionsClientListQuotasOptions contains the optional parameters for the SubscriptionsClient.ListQuotas method. -type SubscriptionsClientListQuotasOptions struct { - // placeholder for future optional parameters -} - // TrackedResource - The resource model definition for a ARM tracked top level resource type TrackedResource struct { // The geo-location where the resource lives @@ -2426,26 +2037,3 @@ type TransformationProperties struct { // If-None-Match headers for write operations for optimistic concurrency. Etag *string } - -// TransformationsClientCreateOrReplaceOptions contains the optional parameters for the TransformationsClient.CreateOrReplace -// method. -type TransformationsClientCreateOrReplaceOptions struct { - // The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag - // value to prevent accidentally overwriting concurrent changes. - IfMatch *string - // Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values - // will result in a 412 Pre-condition Failed response. - IfNoneMatch *string -} - -// TransformationsClientGetOptions contains the optional parameters for the TransformationsClient.Get method. -type TransformationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// TransformationsClientUpdateOptions contains the optional parameters for the TransformationsClient.Update method. -type TransformationsClientUpdateOptions struct { - // The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag - // value to prevent accidentally overwriting concurrent changes. - IfMatch *string -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/models_serde.go index 955dd030..ad82fac9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -1441,7 +1440,7 @@ func (c ClusterProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "capacityAllocated", c.CapacityAllocated) populate(objectMap, "capacityAssigned", c.CapacityAssigned) populate(objectMap, "clusterId", c.ClusterID) - populateTimeRFC3339(objectMap, "createdDate", c.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", c.CreatedDate) populate(objectMap, "provisioningState", c.ProvisioningState) return json.Marshal(objectMap) } @@ -1465,7 +1464,7 @@ func (c *ClusterProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ClusterID", &c.ClusterID) delete(rawMsg, key) case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &c.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &c.CreatedDate) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) @@ -3877,7 +3876,7 @@ func (s *ServiceBusTopicOutputDataSourceProperties) UnmarshalJSON(data []byte) e func (s StartStreamingJobParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "outputStartMode", s.OutputStartMode) - populateTimeRFC3339(objectMap, "outputStartTime", s.OutputStartTime) + populateDateTimeRFC3339(objectMap, "outputStartTime", s.OutputStartTime) return json.Marshal(objectMap) } @@ -3894,7 +3893,7 @@ func (s *StartStreamingJobParameters) UnmarshalJSON(data []byte) error { err = unpopulate(val, "OutputStartMode", &s.OutputStartMode) delete(rawMsg, key) case "outputStartTime": - err = unpopulateTimeRFC3339(val, "OutputStartTime", &s.OutputStartTime) + err = unpopulateDateTimeRFC3339(val, "OutputStartTime", &s.OutputStartTime) delete(rawMsg, key) } if err != nil { @@ -4101,7 +4100,7 @@ func (s StreamingJobProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "cluster", s.Cluster) populate(objectMap, "compatibilityLevel", s.CompatibilityLevel) populate(objectMap, "contentStoragePolicy", s.ContentStoragePolicy) - populateTimeRFC3339(objectMap, "createdDate", s.CreatedDate) + populateDateTimeRFC3339(objectMap, "createdDate", s.CreatedDate) populate(objectMap, "dataLocale", s.DataLocale) populate(objectMap, "etag", s.Etag) populate(objectMap, "eventsLateArrivalMaxDelayInSeconds", s.EventsLateArrivalMaxDelayInSeconds) @@ -4113,10 +4112,10 @@ func (s StreamingJobProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "jobState", s.JobState) populate(objectMap, "jobStorageAccount", s.JobStorageAccount) populate(objectMap, "jobType", s.JobType) - populateTimeRFC3339(objectMap, "lastOutputEventTime", s.LastOutputEventTime) + populateDateTimeRFC3339(objectMap, "lastOutputEventTime", s.LastOutputEventTime) populate(objectMap, "outputErrorPolicy", s.OutputErrorPolicy) populate(objectMap, "outputStartMode", s.OutputStartMode) - populateTimeRFC3339(objectMap, "outputStartTime", s.OutputStartTime) + populateDateTimeRFC3339(objectMap, "outputStartTime", s.OutputStartTime) populate(objectMap, "outputs", s.Outputs) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "sku", s.SKU) @@ -4143,7 +4142,7 @@ func (s *StreamingJobProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ContentStoragePolicy", &s.ContentStoragePolicy) delete(rawMsg, key) case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &s.CreatedDate) + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &s.CreatedDate) delete(rawMsg, key) case "dataLocale": err = unpopulate(val, "DataLocale", &s.DataLocale) @@ -4179,7 +4178,7 @@ func (s *StreamingJobProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "JobType", &s.JobType) delete(rawMsg, key) case "lastOutputEventTime": - err = unpopulateTimeRFC3339(val, "LastOutputEventTime", &s.LastOutputEventTime) + err = unpopulateDateTimeRFC3339(val, "LastOutputEventTime", &s.LastOutputEventTime) delete(rawMsg, key) case "outputErrorPolicy": err = unpopulate(val, "OutputErrorPolicy", &s.OutputErrorPolicy) @@ -4188,7 +4187,7 @@ func (s *StreamingJobProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "OutputStartMode", &s.OutputStartMode) delete(rawMsg, key) case "outputStartTime": - err = unpopulateTimeRFC3339(val, "OutputStartTime", &s.OutputStartTime) + err = unpopulateDateTimeRFC3339(val, "OutputStartTime", &s.OutputStartTime) delete(rawMsg, key) case "outputs": err = unpopulate(val, "Outputs", &s.Outputs) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/operations_client.go index f40fe5e1..578ff010 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,20 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/options.go new file mode 100644 index 00000000..7c44711d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/options.go @@ -0,0 +1,359 @@ +//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 armstreamanalytics + +// ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method. +type ClustersClientBeginCreateOrUpdateOptions struct { + // The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value + // to prevent accidentally overwriting concurrent changes. + IfMatch *string + + // Set to '*' to allow a new resource to be created, but to prevent updating an existing record set. Other values will result + // in a 412 Pre-condition Failed response. + IfNoneMatch *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method. +type ClustersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method. +type ClustersClientBeginUpdateOptions struct { + // The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value + // to prevent accidentally overwriting concurrent changes. + IfMatch *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. +type ClustersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager +// method. +type ClustersClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListBySubscriptionOptions contains the optional parameters for the ClustersClient.NewListBySubscriptionPager +// method. +type ClustersClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListStreamingJobsOptions contains the optional parameters for the ClustersClient.NewListStreamingJobsPager +// method. +type ClustersClientListStreamingJobsOptions struct { + // placeholder for future optional parameters +} + +// FunctionsClientBeginTestOptions contains the optional parameters for the FunctionsClient.BeginTest method. +type FunctionsClientBeginTestOptions struct { + // If the function specified does not already exist, this parameter must contain the full function definition intended to + // be tested. If the function specified already exists, this parameter can be left + // null to test the existing function as is or if specified, the properties specified will overwrite the corresponding properties + // in the existing function (exactly like a PATCH operation) and the + // resulting function will be tested. + Function *Function + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FunctionsClientCreateOrReplaceOptions contains the optional parameters for the FunctionsClient.CreateOrReplace method. +type FunctionsClientCreateOrReplaceOptions struct { + // The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to + // prevent accidentally overwriting concurrent changes. + IfMatch *string + + // Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result + // in a 412 Pre-condition Failed response. + IfNoneMatch *string +} + +// FunctionsClientDeleteOptions contains the optional parameters for the FunctionsClient.Delete method. +type FunctionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// FunctionsClientGetOptions contains the optional parameters for the FunctionsClient.Get method. +type FunctionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FunctionsClientListByStreamingJobOptions contains the optional parameters for the FunctionsClient.NewListByStreamingJobPager +// method. +type FunctionsClientListByStreamingJobOptions struct { + // The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, + // or "" to include all properties. By default, all properties are returned except + // diagnostics. Currently only accepts '' as a valid value. + Select *string +} + +// FunctionsClientRetrieveDefaultDefinitionOptions contains the optional parameters for the FunctionsClient.RetrieveDefaultDefinition +// method. +type FunctionsClientRetrieveDefaultDefinitionOptions struct { + // Parameters used to specify the type of function to retrieve the default definition for. + FunctionRetrieveDefaultDefinitionParameters FunctionRetrieveDefaultDefinitionParametersClassification +} + +// FunctionsClientUpdateOptions contains the optional parameters for the FunctionsClient.Update method. +type FunctionsClientUpdateOptions struct { + // The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to + // prevent accidentally overwriting concurrent changes. + IfMatch *string +} + +// InputsClientBeginTestOptions contains the optional parameters for the InputsClient.BeginTest method. +type InputsClientBeginTestOptions struct { + // If the input specified does not already exist, this parameter must contain the full input definition intended to be tested. + // If the input specified already exists, this parameter can be left null to + // test the existing input as is or if specified, the properties specified will overwrite the corresponding properties in + // the existing input (exactly like a PATCH operation) and the resulting input will + // be tested. + Input *Input + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InputsClientCreateOrReplaceOptions contains the optional parameters for the InputsClient.CreateOrReplace method. +type InputsClientCreateOrReplaceOptions struct { + // The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent + // accidentally overwriting concurrent changes. + IfMatch *string + + // Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a + // 412 Pre-condition Failed response. + IfNoneMatch *string +} + +// InputsClientDeleteOptions contains the optional parameters for the InputsClient.Delete method. +type InputsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// InputsClientGetOptions contains the optional parameters for the InputsClient.Get method. +type InputsClientGetOptions struct { + // placeholder for future optional parameters +} + +// InputsClientListByStreamingJobOptions contains the optional parameters for the InputsClient.NewListByStreamingJobPager +// method. +type InputsClientListByStreamingJobOptions struct { + // The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, + // or "" to include all properties. By default, all properties are returned except + // diagnostics. Currently only accepts '' as a valid value. + Select *string +} + +// InputsClientUpdateOptions contains the optional parameters for the InputsClient.Update method. +type InputsClientUpdateOptions struct { + // The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent + // accidentally overwriting concurrent changes. + IfMatch *string +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// OutputsClientBeginTestOptions contains the optional parameters for the OutputsClient.BeginTest method. +type OutputsClientBeginTestOptions struct { + // If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. + // If the output specified already exists, this parameter can be left null to + // test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in + // the existing output (exactly like a PATCH operation) and the resulting output + // will be tested. + Output *Output + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OutputsClientCreateOrReplaceOptions contains the optional parameters for the OutputsClient.CreateOrReplace method. +type OutputsClientCreateOrReplaceOptions struct { + // The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent + // accidentally overwriting concurrent changes. + IfMatch *string + + // Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in + // a 412 Pre-condition Failed response. + IfNoneMatch *string +} + +// OutputsClientDeleteOptions contains the optional parameters for the OutputsClient.Delete method. +type OutputsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// OutputsClientGetOptions contains the optional parameters for the OutputsClient.Get method. +type OutputsClientGetOptions struct { + // placeholder for future optional parameters +} + +// OutputsClientListByStreamingJobOptions contains the optional parameters for the OutputsClient.NewListByStreamingJobPager +// method. +type OutputsClientListByStreamingJobOptions struct { + // The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, + // or "" to include all properties. By default, all properties are returned except + // diagnostics. Currently only accepts '' as a valid value. + Select *string +} + +// OutputsClientUpdateOptions contains the optional parameters for the OutputsClient.Update method. +type OutputsClientUpdateOptions struct { + // The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent + // accidentally overwriting concurrent changes. + IfMatch *string +} + +// PrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointsClient.BeginDelete method. +type PrivateEndpointsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointsClient.CreateOrUpdate +// method. +type PrivateEndpointsClientCreateOrUpdateOptions struct { + // The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value + // to prevent accidentally overwriting concurrent changes. + IfMatch *string + + // Set to '*' to allow a new resource to be created, but to prevent updating an existing record set. Other values will result + // in a 412 Pre-condition Failed response. + IfNoneMatch *string +} + +// PrivateEndpointsClientGetOptions contains the optional parameters for the PrivateEndpointsClient.Get method. +type PrivateEndpointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointsClientListByClusterOptions contains the optional parameters for the PrivateEndpointsClient.NewListByClusterPager +// method. +type PrivateEndpointsClientListByClusterOptions struct { + // placeholder for future optional parameters +} + +// StreamingJobsClientBeginCreateOrReplaceOptions contains the optional parameters for the StreamingJobsClient.BeginCreateOrReplace +// method. +type StreamingJobsClientBeginCreateOrReplaceOptions struct { + // The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value + // to prevent accidentally overwriting concurrent changes. + IfMatch *string + + // Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will + // result in a 412 Pre-condition Failed response. + IfNoneMatch *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StreamingJobsClientBeginDeleteOptions contains the optional parameters for the StreamingJobsClient.BeginDelete method. +type StreamingJobsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StreamingJobsClientBeginScaleOptions contains the optional parameters for the StreamingJobsClient.BeginScale method. +type StreamingJobsClientBeginScaleOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string + + // Parameters applicable to a scale streaming job operation. + ScaleJobParameters *ScaleStreamingJobParameters +} + +// StreamingJobsClientBeginStartOptions contains the optional parameters for the StreamingJobsClient.BeginStart method. +type StreamingJobsClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string + + // Parameters applicable to a start streaming job operation. + StartJobParameters *StartStreamingJobParameters +} + +// StreamingJobsClientBeginStopOptions contains the optional parameters for the StreamingJobsClient.BeginStop method. +type StreamingJobsClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StreamingJobsClientGetOptions contains the optional parameters for the StreamingJobsClient.Get method. +type StreamingJobsClientGetOptions struct { + // The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in + // the response, beyond the default set returned when this parameter is absent. The + // default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. + Expand *string +} + +// StreamingJobsClientListByResourceGroupOptions contains the optional parameters for the StreamingJobsClient.NewListByResourceGroupPager +// method. +type StreamingJobsClientListByResourceGroupOptions struct { + // The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in + // the response, beyond the default set returned when this parameter is absent. The + // default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. + Expand *string +} + +// StreamingJobsClientListOptions contains the optional parameters for the StreamingJobsClient.NewListPager method. +type StreamingJobsClientListOptions struct { + // The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in + // the response, beyond the default set returned when this parameter is absent. The + // default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. + Expand *string +} + +// StreamingJobsClientUpdateOptions contains the optional parameters for the StreamingJobsClient.Update method. +type StreamingJobsClientUpdateOptions struct { + // The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value + // to prevent accidentally overwriting concurrent changes. + IfMatch *string +} + +// SubscriptionsClientListQuotasOptions contains the optional parameters for the SubscriptionsClient.ListQuotas method. +type SubscriptionsClientListQuotasOptions struct { + // placeholder for future optional parameters +} + +// TransformationsClientCreateOrReplaceOptions contains the optional parameters for the TransformationsClient.CreateOrReplace +// method. +type TransformationsClientCreateOrReplaceOptions struct { + // The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag + // value to prevent accidentally overwriting concurrent changes. + IfMatch *string + + // Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values + // will result in a 412 Pre-condition Failed response. + IfNoneMatch *string +} + +// TransformationsClientGetOptions contains the optional parameters for the TransformationsClient.Get method. +type TransformationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// TransformationsClientUpdateOptions contains the optional parameters for the TransformationsClient.Update method. +type TransformationsClientUpdateOptions struct { + // The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag + // value to prevent accidentally overwriting concurrent changes. + IfMatch *string +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/outputs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/outputs_client.go index 5b8ea9ae..c80894fc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/outputs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/outputs_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -33,7 +32,7 @@ type OutputsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOutputsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OutputsClient, error) { - cl, err := arm.NewClient(moduleName+".OutputsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewOutputsClient(subscriptionID string, credential azcore.TokenCredential, // job. // - options - OutputsClientCreateOrReplaceOptions contains the optional parameters for the OutputsClient.CreateOrReplace method. func (client *OutputsClient) CreateOrReplace(ctx context.Context, resourceGroupName string, jobName string, outputName string, output Output, options *OutputsClientCreateOrReplaceOptions) (OutputsClientCreateOrReplaceResponse, error) { + var err error + const operationName = "OutputsClient.CreateOrReplace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrReplaceCreateRequest(ctx, resourceGroupName, jobName, outputName, output, options) if err != nil { return OutputsClientCreateOrReplaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OutputsClientCreateOrReplaceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return OutputsClientCreateOrReplaceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return OutputsClientCreateOrReplaceResponse{}, err } - return client.createOrReplaceHandleResponse(resp) + resp, err := client.createOrReplaceHandleResponse(httpResp) + return resp, err } // createOrReplaceCreateRequest creates the CreateOrReplace request. @@ -102,7 +108,10 @@ func (client *OutputsClient) createOrReplaceCreateRequest(ctx context.Context, r req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, output) + if err := runtime.MarshalAsJSON(req, output); err != nil { + return nil, err + } + return req, nil } // createOrReplaceHandleResponse handles the CreateOrReplace response. @@ -126,16 +135,22 @@ func (client *OutputsClient) createOrReplaceHandleResponse(resp *http.Response) // - outputName - The name of the output. // - options - OutputsClientDeleteOptions contains the optional parameters for the OutputsClient.Delete method. func (client *OutputsClient) Delete(ctx context.Context, resourceGroupName string, jobName string, outputName string, options *OutputsClientDeleteOptions) (OutputsClientDeleteResponse, error) { + var err error + const operationName = "OutputsClient.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, jobName, outputName, options) if err != nil { return OutputsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OutputsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return OutputsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return OutputsClientDeleteResponse{}, err } return OutputsClientDeleteResponse{}, nil } @@ -179,18 +194,25 @@ func (client *OutputsClient) deleteCreateRequest(ctx context.Context, resourceGr // - outputName - The name of the output. // - options - OutputsClientGetOptions contains the optional parameters for the OutputsClient.Get method. func (client *OutputsClient) Get(ctx context.Context, resourceGroupName string, jobName string, outputName string, options *OutputsClientGetOptions) (OutputsClientGetResponse, error) { + var err error + const operationName = "OutputsClient.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, jobName, outputName, options) if err != nil { return OutputsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OutputsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OutputsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OutputsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -248,25 +270,20 @@ func (client *OutputsClient) NewListByStreamingJobPager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OutputsClientListByStreamingJobResponse) (OutputsClientListByStreamingJobResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByStreamingJobCreateRequest(ctx, resourceGroupName, jobName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OutputsClientListByStreamingJobResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OutputsClient.NewListByStreamingJobPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByStreamingJobCreateRequest(ctx, resourceGroupName, jobName, options) + }, nil) if err != nil { return OutputsClientListByStreamingJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OutputsClientListByStreamingJobResponse{}, runtime.NewResponseError(resp) - } return client.listByStreamingJobHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -322,9 +339,14 @@ func (client *OutputsClient) BeginTest(ctx context.Context, resourceGroupName st if err != nil { return nil, err } - return runtime.NewPoller[OutputsClientTestResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OutputsClientTestResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[OutputsClientTestResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[OutputsClientTestResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -333,18 +355,24 @@ func (client *OutputsClient) BeginTest(ctx context.Context, resourceGroupName st // // Generated from API version 2020-03-01 func (client *OutputsClient) test(ctx context.Context, resourceGroupName string, jobName string, outputName string, options *OutputsClientBeginTestOptions) (*http.Response, error) { + var err error + const operationName = "OutputsClient.BeginTest" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.testCreateRequest(ctx, resourceGroupName, jobName, outputName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // testCreateRequest creates the Test request. @@ -375,7 +403,10 @@ func (client *OutputsClient) testCreateRequest(ctx context.Context, resourceGrou req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Output != nil { - return req, runtime.MarshalAsJSON(req, *options.Output) + if err := runtime.MarshalAsJSON(req, *options.Output); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -394,18 +425,25 @@ func (client *OutputsClient) testCreateRequest(ctx context.Context, resourceGrou // operation. // - options - OutputsClientUpdateOptions contains the optional parameters for the OutputsClient.Update method. func (client *OutputsClient) Update(ctx context.Context, resourceGroupName string, jobName string, outputName string, output Output, options *OutputsClientUpdateOptions) (OutputsClientUpdateResponse, error) { + var err error + const operationName = "OutputsClient.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, jobName, outputName, output, options) if err != nil { return OutputsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OutputsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OutputsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OutputsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -438,7 +476,10 @@ func (client *OutputsClient) updateCreateRequest(ctx context.Context, resourceGr req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, output) + if err := runtime.MarshalAsJSON(req, output); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/polymorphic_helpers.go index b8cb8baa..0f53ed15 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/polymorphic_helpers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/polymorphic_helpers.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -28,7 +27,10 @@ func unmarshalFunctionBindingClassification(rawMsg json.RawMessage) (FunctionBin default: b = &FunctionBinding{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalFunctionPropertiesClassification(rawMsg json.RawMessage) (FunctionPropertiesClassification, error) { @@ -48,7 +50,10 @@ func unmarshalFunctionPropertiesClassification(rawMsg json.RawMessage) (Function default: b = &FunctionProperties{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalInputPropertiesClassification(rawMsg json.RawMessage) (InputPropertiesClassification, error) { @@ -68,7 +73,10 @@ func unmarshalInputPropertiesClassification(rawMsg json.RawMessage) (InputProper default: b = &InputProperties{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalOutputDataSourceClassification(rawMsg json.RawMessage) (OutputDataSourceClassification, error) { @@ -108,7 +116,10 @@ func unmarshalOutputDataSourceClassification(rawMsg json.RawMessage) (OutputData default: b = &OutputDataSource{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalReferenceInputDataSourceClassification(rawMsg json.RawMessage) (ReferenceInputDataSourceClassification, error) { @@ -128,7 +139,10 @@ func unmarshalReferenceInputDataSourceClassification(rawMsg json.RawMessage) (Re default: b = &ReferenceInputDataSource{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalSerializationClassification(rawMsg json.RawMessage) (SerializationClassification, error) { @@ -152,7 +166,10 @@ func unmarshalSerializationClassification(rawMsg json.RawMessage) (Serialization default: b = &Serialization{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalStreamInputDataSourceClassification(rawMsg json.RawMessage) (StreamInputDataSourceClassification, error) { @@ -176,5 +193,8 @@ func unmarshalStreamInputDataSourceClassification(rawMsg json.RawMessage) (Strea default: b = &StreamInputDataSource{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/privateendpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/privateendpoints_client.go index 745cde22..0865641e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/privateendpoints_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/privateendpoints_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -33,7 +32,7 @@ type PrivateEndpointsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointsClient, error) { - cl, err := arm.NewClient(moduleName+".PrivateEndpointsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCre // - options - PrivateEndpointsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointsClient.CreateOrUpdate // method. func (client *PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointName string, privateEndpoint PrivateEndpoint, options *PrivateEndpointsClientCreateOrUpdateOptions) (PrivateEndpointsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "PrivateEndpointsClient.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, clusterName, privateEndpointName, privateEndpoint, options) if err != nil { return PrivateEndpointsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return PrivateEndpointsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -103,7 +109,10 @@ func (client *PrivateEndpointsClient) createOrUpdateCreateRequest(ctx context.Co req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateEndpoint) + if err := runtime.MarshalAsJSON(req, privateEndpoint); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -130,9 +139,14 @@ func (client *PrivateEndpointsClient) BeginDelete(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -141,18 +155,24 @@ func (client *PrivateEndpointsClient) BeginDelete(ctx context.Context, resourceG // // Generated from API version 2020-03-01 func (client *PrivateEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointName string, options *PrivateEndpointsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PrivateEndpointsClient.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, privateEndpointName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -194,18 +214,25 @@ func (client *PrivateEndpointsClient) deleteCreateRequest(ctx context.Context, r // - privateEndpointName - The name of the private endpoint. // - options - PrivateEndpointsClientGetOptions contains the optional parameters for the PrivateEndpointsClient.Get method. func (client *PrivateEndpointsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointName string, options *PrivateEndpointsClientGetOptions) (PrivateEndpointsClientGetResponse, error) { + var err error + const operationName = "PrivateEndpointsClient.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, privateEndpointName, options) if err != nil { return PrivateEndpointsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -260,25 +287,20 @@ func (client *PrivateEndpointsClient) NewListByClusterPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PrivateEndpointsClientListByClusterResponse) (PrivateEndpointsClientListByClusterResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointsClient.NewListByClusterPager") + 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.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) + }, nil) if err != nil { return PrivateEndpointsClientListByClusterResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateEndpointsClientListByClusterResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointsClientListByClusterResponse{}, runtime.NewResponseError(resp) - } return client.listByClusterHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/response_types.go index 226db307..0ee1f99b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/response_types.go @@ -3,14 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics // ClustersClientCreateOrUpdateResponse contains the response from method ClustersClient.BeginCreateOrUpdate. type ClustersClientCreateOrUpdateResponse struct { + // A Stream Analytics Cluster object Cluster } @@ -21,32 +21,40 @@ type ClustersClientDeleteResponse struct { // ClustersClientGetResponse contains the response from method ClustersClient.Get. type ClustersClientGetResponse struct { + // A Stream Analytics Cluster object Cluster } // ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.NewListByResourceGroupPager. type ClustersClientListByResourceGroupResponse struct { + // A list of clusters populated by a 'list' operation. ClusterListResult } // ClustersClientListBySubscriptionResponse contains the response from method ClustersClient.NewListBySubscriptionPager. type ClustersClientListBySubscriptionResponse struct { + // A list of clusters populated by a 'list' operation. ClusterListResult } // ClustersClientListStreamingJobsResponse contains the response from method ClustersClient.NewListStreamingJobsPager. type ClustersClientListStreamingJobsResponse struct { + // A list of streaming jobs. Populated by a List operation. ClusterJobListResult } // ClustersClientUpdateResponse contains the response from method ClustersClient.BeginUpdate. type ClustersClientUpdateResponse struct { + // A Stream Analytics Cluster object Cluster } // FunctionsClientCreateOrReplaceResponse contains the response from method FunctionsClient.CreateOrReplace. type FunctionsClientCreateOrReplaceResponse struct { + // A function object, containing all information associated with the named function. All functions are contained under a streaming + // job. Function + // ETag contains the information returned from the ETag header response. ETag *string } @@ -58,36 +66,49 @@ type FunctionsClientDeleteResponse struct { // FunctionsClientGetResponse contains the response from method FunctionsClient.Get. type FunctionsClientGetResponse struct { + // A function object, containing all information associated with the named function. All functions are contained under a streaming + // job. Function + // ETag contains the information returned from the ETag header response. ETag *string } // FunctionsClientListByStreamingJobResponse contains the response from method FunctionsClient.NewListByStreamingJobPager. type FunctionsClientListByStreamingJobResponse struct { + // Object containing a list of functions under a streaming job. FunctionListResult } // FunctionsClientRetrieveDefaultDefinitionResponse contains the response from method FunctionsClient.RetrieveDefaultDefinition. type FunctionsClientRetrieveDefaultDefinitionResponse struct { + // A function object, containing all information associated with the named function. All functions are contained under a streaming + // job. Function } // FunctionsClientTestResponse contains the response from method FunctionsClient.BeginTest. type FunctionsClientTestResponse struct { + // Describes the status of the test operation along with error information, if applicable. ResourceTestStatus } // FunctionsClientUpdateResponse contains the response from method FunctionsClient.Update. type FunctionsClientUpdateResponse struct { + // A function object, containing all information associated with the named function. All functions are contained under a streaming + // job. Function + // ETag contains the information returned from the ETag header response. ETag *string } // InputsClientCreateOrReplaceResponse contains the response from method InputsClient.CreateOrReplace. type InputsClientCreateOrReplaceResponse struct { + // An input object, containing all information associated with the named input. All inputs are contained under a streaming + // job. Input + // ETag contains the information returned from the ETag header response. ETag *string } @@ -99,36 +120,49 @@ type InputsClientDeleteResponse struct { // InputsClientGetResponse contains the response from method InputsClient.Get. type InputsClientGetResponse struct { + // An input object, containing all information associated with the named input. All inputs are contained under a streaming + // job. Input + // ETag contains the information returned from the ETag header response. ETag *string } // InputsClientListByStreamingJobResponse contains the response from method InputsClient.NewListByStreamingJobPager. type InputsClientListByStreamingJobResponse struct { + // Object containing a list of inputs under a streaming job. InputListResult } // InputsClientTestResponse contains the response from method InputsClient.BeginTest. type InputsClientTestResponse struct { + // Describes the status of the test operation along with error information, if applicable. ResourceTestStatus } // InputsClientUpdateResponse contains the response from method InputsClient.Update. type InputsClientUpdateResponse struct { + // An input object, containing all information associated with the named input. All inputs are contained under a streaming + // job. Input + // ETag contains the information returned from the ETag header response. ETag *string } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the next + // set of results. OperationListResult } // OutputsClientCreateOrReplaceResponse contains the response from method OutputsClient.CreateOrReplace. type OutputsClientCreateOrReplaceResponse struct { + // An output object, containing all information associated with the named output. All outputs are contained under a streaming + // job. Output + // ETag contains the information returned from the ETag header response. ETag *string } @@ -140,30 +174,39 @@ type OutputsClientDeleteResponse struct { // OutputsClientGetResponse contains the response from method OutputsClient.Get. type OutputsClientGetResponse struct { + // An output object, containing all information associated with the named output. All outputs are contained under a streaming + // job. Output + // ETag contains the information returned from the ETag header response. ETag *string } // OutputsClientListByStreamingJobResponse contains the response from method OutputsClient.NewListByStreamingJobPager. type OutputsClientListByStreamingJobResponse struct { + // Object containing a list of outputs under a streaming job. OutputListResult } // OutputsClientTestResponse contains the response from method OutputsClient.BeginTest. type OutputsClientTestResponse struct { + // Describes the status of the test operation along with error information, if applicable. ResourceTestStatus } // OutputsClientUpdateResponse contains the response from method OutputsClient.Update. type OutputsClientUpdateResponse struct { + // An output object, containing all information associated with the named output. All outputs are contained under a streaming + // job. Output + // ETag contains the information returned from the ETag header response. ETag *string } // PrivateEndpointsClientCreateOrUpdateResponse contains the response from method PrivateEndpointsClient.CreateOrUpdate. type PrivateEndpointsClientCreateOrUpdateResponse struct { + // Complete information about the private endpoint. PrivateEndpoint } @@ -174,16 +217,19 @@ type PrivateEndpointsClientDeleteResponse struct { // PrivateEndpointsClientGetResponse contains the response from method PrivateEndpointsClient.Get. type PrivateEndpointsClientGetResponse struct { + // Complete information about the private endpoint. PrivateEndpoint } // PrivateEndpointsClientListByClusterResponse contains the response from method PrivateEndpointsClient.NewListByClusterPager. type PrivateEndpointsClientListByClusterResponse struct { + // A list of private endpoints. PrivateEndpointListResult } // StreamingJobsClientCreateOrReplaceResponse contains the response from method StreamingJobsClient.BeginCreateOrReplace. type StreamingJobsClientCreateOrReplaceResponse struct { + // A streaming job object, containing all information associated with the named streaming job. StreamingJob } @@ -194,18 +240,22 @@ type StreamingJobsClientDeleteResponse struct { // StreamingJobsClientGetResponse contains the response from method StreamingJobsClient.Get. type StreamingJobsClientGetResponse struct { + // A streaming job object, containing all information associated with the named streaming job. StreamingJob + // ETag contains the information returned from the ETag header response. ETag *string } // StreamingJobsClientListByResourceGroupResponse contains the response from method StreamingJobsClient.NewListByResourceGroupPager. type StreamingJobsClientListByResourceGroupResponse struct { + // Object containing a list of streaming jobs. StreamingJobListResult } // StreamingJobsClientListResponse contains the response from method StreamingJobsClient.NewListPager. type StreamingJobsClientListResponse struct { + // Object containing a list of streaming jobs. StreamingJobListResult } @@ -226,33 +276,45 @@ type StreamingJobsClientStopResponse struct { // StreamingJobsClientUpdateResponse contains the response from method StreamingJobsClient.Update. type StreamingJobsClientUpdateResponse struct { + // A streaming job object, containing all information associated with the named streaming job. StreamingJob + // ETag contains the information returned from the ETag header response. ETag *string } // SubscriptionsClientListQuotasResponse contains the response from method SubscriptionsClient.ListQuotas. type SubscriptionsClientListQuotasResponse struct { + // Result of the GetQuotas operation. It contains a list of quotas for the subscription in a particular region. SubscriptionQuotasListResult } // TransformationsClientCreateOrReplaceResponse contains the response from method TransformationsClient.CreateOrReplace. type TransformationsClientCreateOrReplaceResponse struct { + // A transformation object, containing all information associated with the named transformation. All transformations are contained + // under a streaming job. Transformation + // ETag contains the information returned from the ETag header response. ETag *string } // TransformationsClientGetResponse contains the response from method TransformationsClient.Get. type TransformationsClientGetResponse struct { + // A transformation object, containing all information associated with the named transformation. All transformations are contained + // under a streaming job. Transformation + // ETag contains the information returned from the ETag header response. ETag *string } // TransformationsClientUpdateResponse contains the response from method TransformationsClient.Update. type TransformationsClientUpdateResponse struct { + // A transformation object, containing all information associated with the named transformation. All transformations are contained + // under a streaming job. Transformation + // ETag contains the information returned from the ETag header response. ETag *string } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/streamingjobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/streamingjobs_client.go index 94f85dc0..c9f0992c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/streamingjobs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/streamingjobs_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -33,7 +32,7 @@ type StreamingJobsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewStreamingJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StreamingJobsClient, error) { - cl, err := arm.NewClient(moduleName+".StreamingJobsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *StreamingJobsClient) BeginCreateOrReplace(ctx context.Context, res if err != nil { return nil, err } - return runtime.NewPoller[StreamingJobsClientCreateOrReplaceResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StreamingJobsClientCreateOrReplaceResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StreamingJobsClientCreateOrReplaceResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StreamingJobsClientCreateOrReplaceResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *StreamingJobsClient) BeginCreateOrReplace(ctx context.Context, res // // Generated from API version 2020-03-01 func (client *StreamingJobsClient) createOrReplace(ctx context.Context, resourceGroupName string, jobName string, streamingJob StreamingJob, options *StreamingJobsClientBeginCreateOrReplaceOptions) (*http.Response, error) { + var err error + const operationName = "StreamingJobsClient.BeginCreateOrReplace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrReplaceCreateRequest(ctx, resourceGroupName, jobName, streamingJob, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrReplaceCreateRequest creates the CreateOrReplace request. @@ -114,7 +124,10 @@ func (client *StreamingJobsClient) createOrReplaceCreateRequest(ctx context.Cont req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, streamingJob) + if err := runtime.MarshalAsJSON(req, streamingJob); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a streaming job. @@ -131,9 +144,14 @@ func (client *StreamingJobsClient) BeginDelete(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[StreamingJobsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StreamingJobsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StreamingJobsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StreamingJobsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -142,18 +160,24 @@ func (client *StreamingJobsClient) BeginDelete(ctx context.Context, resourceGrou // // Generated from API version 2020-03-01 func (client *StreamingJobsClient) deleteOperation(ctx context.Context, resourceGroupName string, jobName string, options *StreamingJobsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "StreamingJobsClient.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, jobName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -190,18 +214,25 @@ func (client *StreamingJobsClient) deleteCreateRequest(ctx context.Context, reso // - jobName - The name of the streaming job. // - options - StreamingJobsClientGetOptions contains the optional parameters for the StreamingJobsClient.Get method. func (client *StreamingJobsClient) Get(ctx context.Context, resourceGroupName string, jobName string, options *StreamingJobsClientGetOptions) (StreamingJobsClientGetResponse, error) { + var err error + const operationName = "StreamingJobsClient.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, jobName, options) if err != nil { return StreamingJobsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StreamingJobsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StreamingJobsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StreamingJobsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -255,25 +286,20 @@ func (client *StreamingJobsClient) NewListPager(options *StreamingJobsClientList return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StreamingJobsClientListResponse) (StreamingJobsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StreamingJobsClient.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 StreamingJobsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return StreamingJobsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StreamingJobsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -319,25 +345,20 @@ func (client *StreamingJobsClient) NewListByResourceGroupPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StreamingJobsClientListByResourceGroupResponse) (StreamingJobsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StreamingJobsClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StreamingJobsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 StreamingJobsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StreamingJobsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -389,9 +410,14 @@ func (client *StreamingJobsClient) BeginScale(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[StreamingJobsClientScaleResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StreamingJobsClientScaleResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StreamingJobsClientScaleResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StreamingJobsClientScaleResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -400,18 +426,24 @@ func (client *StreamingJobsClient) BeginScale(ctx context.Context, resourceGroup // // Generated from API version 2020-03-01 func (client *StreamingJobsClient) scale(ctx context.Context, resourceGroupName string, jobName string, options *StreamingJobsClientBeginScaleOptions) (*http.Response, error) { + var err error + const operationName = "StreamingJobsClient.BeginScale" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.scaleCreateRequest(ctx, resourceGroupName, jobName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // scaleCreateRequest creates the Scale request. @@ -438,7 +470,10 @@ func (client *StreamingJobsClient) scaleCreateRequest(ctx context.Context, resou req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.ScaleJobParameters != nil { - return req, runtime.MarshalAsJSON(req, *options.ScaleJobParameters) + if err := runtime.MarshalAsJSON(req, *options.ScaleJobParameters); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -457,9 +492,14 @@ func (client *StreamingJobsClient) BeginStart(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[StreamingJobsClientStartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StreamingJobsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StreamingJobsClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StreamingJobsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -468,18 +508,24 @@ func (client *StreamingJobsClient) BeginStart(ctx context.Context, resourceGroup // // Generated from API version 2020-03-01 func (client *StreamingJobsClient) start(ctx context.Context, resourceGroupName string, jobName string, options *StreamingJobsClientBeginStartOptions) (*http.Response, error) { + var err error + const operationName = "StreamingJobsClient.BeginStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startCreateRequest(ctx, resourceGroupName, jobName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // startCreateRequest creates the Start request. @@ -506,7 +552,10 @@ func (client *StreamingJobsClient) startCreateRequest(ctx context.Context, resou req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.StartJobParameters != nil { - return req, runtime.MarshalAsJSON(req, *options.StartJobParameters) + if err := runtime.MarshalAsJSON(req, *options.StartJobParameters); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -525,9 +574,14 @@ func (client *StreamingJobsClient) BeginStop(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[StreamingJobsClientStopResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StreamingJobsClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StreamingJobsClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StreamingJobsClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -537,18 +591,24 @@ func (client *StreamingJobsClient) BeginStop(ctx context.Context, resourceGroupN // // Generated from API version 2020-03-01 func (client *StreamingJobsClient) stop(ctx context.Context, resourceGroupName string, jobName string, options *StreamingJobsClientBeginStopOptions) (*http.Response, error) { + var err error + const operationName = "StreamingJobsClient.BeginStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopCreateRequest(ctx, resourceGroupName, jobName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // stopCreateRequest creates the Stop request. @@ -590,18 +650,25 @@ func (client *StreamingJobsClient) stopCreateRequest(ctx context.Context, resour // of this PATCH operation. // - options - StreamingJobsClientUpdateOptions contains the optional parameters for the StreamingJobsClient.Update method. func (client *StreamingJobsClient) Update(ctx context.Context, resourceGroupName string, jobName string, streamingJob StreamingJob, options *StreamingJobsClientUpdateOptions) (StreamingJobsClientUpdateResponse, error) { + var err error + const operationName = "StreamingJobsClient.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, jobName, streamingJob, options) if err != nil { return StreamingJobsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StreamingJobsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StreamingJobsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StreamingJobsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -630,7 +697,10 @@ func (client *StreamingJobsClient) updateCreateRequest(ctx context.Context, reso req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, streamingJob) + if err := runtime.MarshalAsJSON(req, streamingJob); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/subscriptions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/subscriptions_client.go index 1cc0f354..b6fb7c99 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/subscriptions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/subscriptions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -33,7 +32,7 @@ type SubscriptionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSubscriptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionsClient, error) { - cl, err := arm.NewClient(moduleName+".SubscriptionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewSubscriptionsClient(subscriptionID string, credential azcore.TokenCreden // - options - SubscriptionsClientListQuotasOptions contains the optional parameters for the SubscriptionsClient.ListQuotas // method. func (client *SubscriptionsClient) ListQuotas(ctx context.Context, location string, options *SubscriptionsClientListQuotasOptions) (SubscriptionsClientListQuotasResponse, error) { + var err error + const operationName = "SubscriptionsClient.ListQuotas" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listQuotasCreateRequest(ctx, location, options) if err != nil { return SubscriptionsClientListQuotasResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SubscriptionsClientListQuotasResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubscriptionsClientListQuotasResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SubscriptionsClientListQuotasResponse{}, err } - return client.listQuotasHandleResponse(resp) + resp, err := client.listQuotasHandleResponse(httpResp) + return resp, err } // listQuotasCreateRequest creates the ListQuotas request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/time_rfc3339.go index 0303cfea..dda82208 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/transformations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/transformations_client.go index d7b9e1c2..5a854ad7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/transformations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics/transformations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armstreamanalytics @@ -33,7 +32,7 @@ type TransformationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTransformationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TransformationsClient, error) { - cl, err := arm.NewClient(moduleName+".TransformationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewTransformationsClient(subscriptionID string, credential azcore.TokenCred // - options - TransformationsClientCreateOrReplaceOptions contains the optional parameters for the TransformationsClient.CreateOrReplace // method. func (client *TransformationsClient) CreateOrReplace(ctx context.Context, resourceGroupName string, jobName string, transformationName string, transformation Transformation, options *TransformationsClientCreateOrReplaceOptions) (TransformationsClientCreateOrReplaceResponse, error) { + var err error + const operationName = "TransformationsClient.CreateOrReplace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrReplaceCreateRequest(ctx, resourceGroupName, jobName, transformationName, transformation, options) if err != nil { return TransformationsClientCreateOrReplaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TransformationsClientCreateOrReplaceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return TransformationsClientCreateOrReplaceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return TransformationsClientCreateOrReplaceResponse{}, err } - return client.createOrReplaceHandleResponse(resp) + resp, err := client.createOrReplaceHandleResponse(httpResp) + return resp, err } // createOrReplaceCreateRequest creates the CreateOrReplace request. @@ -103,7 +109,10 @@ func (client *TransformationsClient) createOrReplaceCreateRequest(ctx context.Co req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, transformation) + if err := runtime.MarshalAsJSON(req, transformation); err != nil { + return nil, err + } + return req, nil } // createOrReplaceHandleResponse handles the CreateOrReplace response. @@ -127,18 +136,25 @@ func (client *TransformationsClient) createOrReplaceHandleResponse(resp *http.Re // - transformationName - The name of the transformation. // - options - TransformationsClientGetOptions contains the optional parameters for the TransformationsClient.Get method. func (client *TransformationsClient) Get(ctx context.Context, resourceGroupName string, jobName string, transformationName string, options *TransformationsClientGetOptions) (TransformationsClientGetResponse, error) { + var err error + const operationName = "TransformationsClient.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, jobName, transformationName, options) if err != nil { return TransformationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TransformationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TransformationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TransformationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -198,18 +214,25 @@ func (client *TransformationsClient) getHandleResponse(resp *http.Response) (Tra // as a result of this PATCH operation. // - options - TransformationsClientUpdateOptions contains the optional parameters for the TransformationsClient.Update method. func (client *TransformationsClient) Update(ctx context.Context, resourceGroupName string, jobName string, transformationName string, transformation Transformation, options *TransformationsClientUpdateOptions) (TransformationsClientUpdateResponse, error) { + var err error + const operationName = "TransformationsClient.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, jobName, transformationName, transformation, options) if err != nil { return TransformationsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TransformationsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TransformationsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TransformationsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -242,7 +265,10 @@ func (client *TransformationsClient) updateCreateRequest(ctx context.Context, re req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, transformation) + if err := runtime.MarshalAsJSON(req, transformation); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md index bf5ed84b..1d2dddbf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 0.8.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + ## 0.7.1 (2023-04-14) ### Bug Fixes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/README.md index 09ab2a92..771e91a5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewKustoPoolDataConnectionsClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/autorest.md index 209917cb..17588ae5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/autorest.md @@ -8,6 +8,6 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.7.1 +module-version: 0.8.0 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/azureadonlyauthentications_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/azureadonlyauthentications_client.go index 8bc93299..748df736 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/azureadonlyauthentications_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/azureadonlyauthentications_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type AzureADOnlyAuthenticationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAzureADOnlyAuthenticationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureADOnlyAuthenticationsClient, error) { - cl, err := arm.NewClient(moduleName+".AzureADOnlyAuthenticationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,11 +59,15 @@ func (client *AzureADOnlyAuthenticationsClient) BeginCreate(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzureADOnlyAuthenticationsClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzureADOnlyAuthenticationsClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AzureADOnlyAuthenticationsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AzureADOnlyAuthenticationsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +76,24 @@ func (client *AzureADOnlyAuthenticationsClient) BeginCreate(ctx context.Context, // // Generated from API version 2021-06-01 func (client *AzureADOnlyAuthenticationsClient) create(ctx context.Context, resourceGroupName string, workspaceName string, azureADOnlyAuthenticationName AzureADOnlyAuthenticationName, azureADOnlyAuthenticationInfo AzureADOnlyAuthentication, options *AzureADOnlyAuthenticationsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "AzureADOnlyAuthenticationsClient.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, workspaceName, azureADOnlyAuthenticationName, azureADOnlyAuthenticationInfo, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -114,7 +123,10 @@ func (client *AzureADOnlyAuthenticationsClient) createCreateRequest(ctx context. reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, azureADOnlyAuthenticationInfo) + if err := runtime.MarshalAsJSON(req, azureADOnlyAuthenticationInfo); err != nil { + return nil, err + } + return req, nil } // Get - Gets a Azure Active Directory only authentication property @@ -127,18 +139,25 @@ func (client *AzureADOnlyAuthenticationsClient) createCreateRequest(ctx context. // - options - AzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.Get // method. func (client *AzureADOnlyAuthenticationsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, azureADOnlyAuthenticationName AzureADOnlyAuthenticationName, options *AzureADOnlyAuthenticationsClientGetOptions) (AzureADOnlyAuthenticationsClientGetResponse, error) { + var err error + const operationName = "AzureADOnlyAuthenticationsClient.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, azureADOnlyAuthenticationName, options) if err != nil { return AzureADOnlyAuthenticationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AzureADOnlyAuthenticationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AzureADOnlyAuthenticationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AzureADOnlyAuthenticationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -193,25 +212,20 @@ func (client *AzureADOnlyAuthenticationsClient) NewListPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AzureADOnlyAuthenticationsClientListResponse) (AzureADOnlyAuthenticationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AzureADOnlyAuthenticationsClient.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 AzureADOnlyAuthenticationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AzureADOnlyAuthenticationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AzureADOnlyAuthenticationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/bigdatapools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/bigdatapools_client.go index 6e968b35..69cfc4aa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/bigdatapools_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/bigdatapools_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -34,7 +33,7 @@ type BigDataPoolsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBigDataPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BigDataPoolsClient, error) { - cl, err := arm.NewClient(moduleName+".BigDataPoolsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,11 +60,15 @@ func (client *BigDataPoolsClient) BeginCreateOrUpdate(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BigDataPoolsClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BigDataPoolsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[BigDataPoolsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BigDataPoolsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -74,18 +77,24 @@ func (client *BigDataPoolsClient) BeginCreateOrUpdate(ctx context.Context, resou // // Generated from API version 2021-06-01-preview func (client *BigDataPoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, bigDataPoolInfo BigDataPoolResourceInfo, options *BigDataPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BigDataPoolsClient.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, bigDataPoolName, bigDataPoolInfo, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -118,7 +127,10 @@ func (client *BigDataPoolsClient) createOrUpdateCreateRequest(ctx context.Contex } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, bigDataPoolInfo) + if err := runtime.MarshalAsJSON(req, bigDataPoolInfo); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a Big Data pool from the workspace. @@ -136,11 +148,15 @@ func (client *BigDataPoolsClient) BeginDelete(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BigDataPoolsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BigDataPoolsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[BigDataPoolsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BigDataPoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -149,18 +165,24 @@ func (client *BigDataPoolsClient) BeginDelete(ctx context.Context, resourceGroup // // Generated from API version 2021-06-01-preview func (client *BigDataPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, options *BigDataPoolsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "BigDataPoolsClient.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, bigDataPoolName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -202,18 +224,25 @@ func (client *BigDataPoolsClient) deleteCreateRequest(ctx context.Context, resou // - bigDataPoolName - Big Data pool name // - options - BigDataPoolsClientGetOptions contains the optional parameters for the BigDataPoolsClient.Get method. func (client *BigDataPoolsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, options *BigDataPoolsClientGetOptions) (BigDataPoolsClientGetResponse, error) { + var err error + const operationName = "BigDataPoolsClient.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, bigDataPoolName, options) if err != nil { return BigDataPoolsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BigDataPoolsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BigDataPoolsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BigDataPoolsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -268,25 +297,20 @@ func (client *BigDataPoolsClient) NewListByWorkspacePager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *BigDataPoolsClientListByWorkspaceResponse) (BigDataPoolsClientListByWorkspaceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BigDataPoolsClient.NewListByWorkspacePager") + 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.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) if err != nil { return BigDataPoolsClientListByWorkspaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BigDataPoolsClientListByWorkspaceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BigDataPoolsClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) - } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -335,18 +359,25 @@ func (client *BigDataPoolsClient) listByWorkspaceHandleResponse(resp *http.Respo // - bigDataPoolPatchInfo - The updated Big Data pool properties // - options - BigDataPoolsClientUpdateOptions contains the optional parameters for the BigDataPoolsClient.Update method. func (client *BigDataPoolsClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, bigDataPoolPatchInfo BigDataPoolPatchInfo, options *BigDataPoolsClientUpdateOptions) (BigDataPoolsClientUpdateResponse, error) { + var err error + const operationName = "BigDataPoolsClient.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, workspaceName, bigDataPoolName, bigDataPoolPatchInfo, options) if err != nil { return BigDataPoolsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BigDataPoolsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BigDataPoolsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BigDataPoolsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -376,7 +407,10 @@ func (client *BigDataPoolsClient) updateCreateRequest(ctx context.Context, resou reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, bigDataPoolPatchInfo) + if err := runtime.MarshalAsJSON(req, bigDataPoolPatchInfo); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/client_factory.go index 949cfc23..2a632fc1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -28,7 +27,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,377 +37,452 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } +// NewAzureADOnlyAuthenticationsClient creates a new instance of AzureADOnlyAuthenticationsClient. func (c *ClientFactory) NewAzureADOnlyAuthenticationsClient() *AzureADOnlyAuthenticationsClient { subClient, _ := NewAzureADOnlyAuthenticationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.subscriptionID, c.credential, c.options) +// NewBigDataPoolsClient creates a new instance of BigDataPoolsClient. +func (c *ClientFactory) NewBigDataPoolsClient() *BigDataPoolsClient { + subClient, _ := NewBigDataPoolsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIPFirewallRulesClient() *IPFirewallRulesClient { - subClient, _ := NewIPFirewallRulesClient(c.subscriptionID, c.credential, c.options) +// NewDataMaskingPoliciesClient creates a new instance of DataMaskingPoliciesClient. +func (c *ClientFactory) NewDataMaskingPoliciesClient() *DataMaskingPoliciesClient { + subClient, _ := NewDataMaskingPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewKeysClient() *KeysClient { - subClient, _ := NewKeysClient(c.subscriptionID, c.credential, c.options) +// NewDataMaskingRulesClient creates a new instance of DataMaskingRulesClient. +func (c *ClientFactory) NewDataMaskingRulesClient() *DataMaskingRulesClient { + subClient, _ := NewDataMaskingRulesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) +// NewExtendedSQLPoolBlobAuditingPoliciesClient creates a new instance of ExtendedSQLPoolBlobAuditingPoliciesClient. +func (c *ClientFactory) NewExtendedSQLPoolBlobAuditingPoliciesClient() *ExtendedSQLPoolBlobAuditingPoliciesClient { + subClient, _ := NewExtendedSQLPoolBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) +// NewGetClient creates a new instance of GetClient. +func (c *ClientFactory) NewGetClient() *GetClient { + subClient, _ := NewGetClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateLinkHubPrivateLinkResourcesClient() *PrivateLinkHubPrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkHubPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) +// NewIPFirewallRulesClient creates a new instance of IPFirewallRulesClient. +func (c *ClientFactory) NewIPFirewallRulesClient() *IPFirewallRulesClient { + subClient, _ := NewIPFirewallRulesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateLinkHubsClient() *PrivateLinkHubsClient { - subClient, _ := NewPrivateLinkHubsClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationRuntimeAuthKeysClient creates a new instance of IntegrationRuntimeAuthKeysClient. +func (c *ClientFactory) NewIntegrationRuntimeAuthKeysClient() *IntegrationRuntimeAuthKeysClient { + subClient, _ := NewIntegrationRuntimeAuthKeysClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateEndpointConnectionsPrivateLinkHubClient() *PrivateEndpointConnectionsPrivateLinkHubClient { - subClient, _ := NewPrivateEndpointConnectionsPrivateLinkHubClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationRuntimeConnectionInfosClient creates a new instance of IntegrationRuntimeConnectionInfosClient. +func (c *ClientFactory) NewIntegrationRuntimeConnectionInfosClient() *IntegrationRuntimeConnectionInfosClient { + subClient, _ := NewIntegrationRuntimeConnectionInfosClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolsClient() *SQLPoolsClient { - subClient, _ := NewSQLPoolsClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationRuntimeCredentialsClient creates a new instance of IntegrationRuntimeCredentialsClient. +func (c *ClientFactory) NewIntegrationRuntimeCredentialsClient() *IntegrationRuntimeCredentialsClient { + subClient, _ := NewIntegrationRuntimeCredentialsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolMetadataSyncConfigsClient() *SQLPoolMetadataSyncConfigsClient { - subClient, _ := NewSQLPoolMetadataSyncConfigsClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationRuntimeMonitoringDataClient creates a new instance of IntegrationRuntimeMonitoringDataClient. +func (c *ClientFactory) NewIntegrationRuntimeMonitoringDataClient() *IntegrationRuntimeMonitoringDataClient { + subClient, _ := NewIntegrationRuntimeMonitoringDataClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolOperationResultsClient() *SQLPoolOperationResultsClient { - subClient, _ := NewSQLPoolOperationResultsClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationRuntimeNodeIPAddressClient creates a new instance of IntegrationRuntimeNodeIPAddressClient. +func (c *ClientFactory) NewIntegrationRuntimeNodeIPAddressClient() *IntegrationRuntimeNodeIPAddressClient { + subClient, _ := NewIntegrationRuntimeNodeIPAddressClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolGeoBackupPoliciesClient() *SQLPoolGeoBackupPoliciesClient { - subClient, _ := NewSQLPoolGeoBackupPoliciesClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationRuntimeNodesClient creates a new instance of IntegrationRuntimeNodesClient. +func (c *ClientFactory) NewIntegrationRuntimeNodesClient() *IntegrationRuntimeNodesClient { + subClient, _ := NewIntegrationRuntimeNodesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolDataWarehouseUserActivitiesClient() *SQLPoolDataWarehouseUserActivitiesClient { - subClient, _ := NewSQLPoolDataWarehouseUserActivitiesClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationRuntimeObjectMetadataClient creates a new instance of IntegrationRuntimeObjectMetadataClient. +func (c *ClientFactory) NewIntegrationRuntimeObjectMetadataClient() *IntegrationRuntimeObjectMetadataClient { + subClient, _ := NewIntegrationRuntimeObjectMetadataClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolRestorePointsClient() *SQLPoolRestorePointsClient { - subClient, _ := NewSQLPoolRestorePointsClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationRuntimeStatusClient creates a new instance of IntegrationRuntimeStatusClient. +func (c *ClientFactory) NewIntegrationRuntimeStatusClient() *IntegrationRuntimeStatusClient { + subClient, _ := NewIntegrationRuntimeStatusClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolReplicationLinksClient() *SQLPoolReplicationLinksClient { - subClient, _ := NewSQLPoolReplicationLinksClient(c.subscriptionID, c.credential, c.options) +// NewIntegrationRuntimesClient creates a new instance of IntegrationRuntimesClient. +func (c *ClientFactory) NewIntegrationRuntimesClient() *IntegrationRuntimesClient { + subClient, _ := NewIntegrationRuntimesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolMaintenanceWindowsClient() *SQLPoolMaintenanceWindowsClient { - subClient, _ := NewSQLPoolMaintenanceWindowsClient(c.subscriptionID, c.credential, c.options) +// NewKeysClient creates a new instance of KeysClient. +func (c *ClientFactory) NewKeysClient() *KeysClient { + subClient, _ := NewKeysClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolMaintenanceWindowOptionsClient() *SQLPoolMaintenanceWindowOptionsClient { - subClient, _ := NewSQLPoolMaintenanceWindowOptionsClient(c.subscriptionID, c.credential, c.options) +// NewKustoOperationsClient creates a new instance of KustoOperationsClient. +func (c *ClientFactory) NewKustoOperationsClient() *KustoOperationsClient { + subClient, _ := NewKustoOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolTransparentDataEncryptionsClient() *SQLPoolTransparentDataEncryptionsClient { - subClient, _ := NewSQLPoolTransparentDataEncryptionsClient(c.subscriptionID, c.credential, c.options) +// NewKustoPoolAttachedDatabaseConfigurationsClient creates a new instance of KustoPoolAttachedDatabaseConfigurationsClient. +func (c *ClientFactory) NewKustoPoolAttachedDatabaseConfigurationsClient() *KustoPoolAttachedDatabaseConfigurationsClient { + subClient, _ := NewKustoPoolAttachedDatabaseConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolBlobAuditingPoliciesClient() *SQLPoolBlobAuditingPoliciesClient { - subClient, _ := NewSQLPoolBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) +// NewKustoPoolChildResourceClient creates a new instance of KustoPoolChildResourceClient. +func (c *ClientFactory) NewKustoPoolChildResourceClient() *KustoPoolChildResourceClient { + subClient, _ := NewKustoPoolChildResourceClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolOperationsClient() *SQLPoolOperationsClient { - subClient, _ := NewSQLPoolOperationsClient(c.subscriptionID, c.credential, c.options) +// NewKustoPoolDataConnectionsClient creates a new instance of KustoPoolDataConnectionsClient. +func (c *ClientFactory) NewKustoPoolDataConnectionsClient() *KustoPoolDataConnectionsClient { + subClient, _ := NewKustoPoolDataConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolUsagesClient() *SQLPoolUsagesClient { - subClient, _ := NewSQLPoolUsagesClient(c.subscriptionID, c.credential, c.options) +// NewKustoPoolDatabasePrincipalAssignmentsClient creates a new instance of KustoPoolDatabasePrincipalAssignmentsClient. +func (c *ClientFactory) NewKustoPoolDatabasePrincipalAssignmentsClient() *KustoPoolDatabasePrincipalAssignmentsClient { + subClient, _ := NewKustoPoolDatabasePrincipalAssignmentsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolSensitivityLabelsClient() *SQLPoolSensitivityLabelsClient { - subClient, _ := NewSQLPoolSensitivityLabelsClient(c.subscriptionID, c.credential, c.options) +// NewKustoPoolDatabasesClient creates a new instance of KustoPoolDatabasesClient. +func (c *ClientFactory) NewKustoPoolDatabasesClient() *KustoPoolDatabasesClient { + subClient, _ := NewKustoPoolDatabasesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolRecommendedSensitivityLabelsClient() *SQLPoolRecommendedSensitivityLabelsClient { - subClient, _ := NewSQLPoolRecommendedSensitivityLabelsClient(c.subscriptionID, c.credential, c.options) +// NewKustoPoolPrincipalAssignmentsClient creates a new instance of KustoPoolPrincipalAssignmentsClient. +func (c *ClientFactory) NewKustoPoolPrincipalAssignmentsClient() *KustoPoolPrincipalAssignmentsClient { + subClient, _ := NewKustoPoolPrincipalAssignmentsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolSchemasClient() *SQLPoolSchemasClient { - subClient, _ := NewSQLPoolSchemasClient(c.subscriptionID, c.credential, c.options) +// NewKustoPoolPrivateLinkResourcesClient creates a new instance of KustoPoolPrivateLinkResourcesClient. +func (c *ClientFactory) NewKustoPoolPrivateLinkResourcesClient() *KustoPoolPrivateLinkResourcesClient { + subClient, _ := NewKustoPoolPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolTablesClient() *SQLPoolTablesClient { - subClient, _ := NewSQLPoolTablesClient(c.subscriptionID, c.credential, c.options) +// NewKustoPoolsClient creates a new instance of KustoPoolsClient. +func (c *ClientFactory) NewKustoPoolsClient() *KustoPoolsClient { + subClient, _ := NewKustoPoolsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolTableColumnsClient() *SQLPoolTableColumnsClient { - subClient, _ := NewSQLPoolTableColumnsClient(c.subscriptionID, c.credential, c.options) +// NewLibrariesClient creates a new instance of LibrariesClient. +func (c *ClientFactory) NewLibrariesClient() *LibrariesClient { + subClient, _ := NewLibrariesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolConnectionPoliciesClient() *SQLPoolConnectionPoliciesClient { - subClient, _ := NewSQLPoolConnectionPoliciesClient(c.subscriptionID, c.credential, c.options) +// NewLibraryClient creates a new instance of LibraryClient. +func (c *ClientFactory) NewLibraryClient() *LibraryClient { + subClient, _ := NewLibraryClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolVulnerabilityAssessmentsClient() *SQLPoolVulnerabilityAssessmentsClient { - subClient, _ := NewSQLPoolVulnerabilityAssessmentsClient(c.subscriptionID, c.credential, c.options) +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolVulnerabilityAssessmentScansClient() *SQLPoolVulnerabilityAssessmentScansClient { - subClient, _ := NewSQLPoolVulnerabilityAssessmentScansClient(c.subscriptionID, c.credential, c.options) +// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient. +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolSecurityAlertPoliciesClient() *SQLPoolSecurityAlertPoliciesClient { - subClient, _ := NewSQLPoolSecurityAlertPoliciesClient(c.subscriptionID, c.credential, c.options) +// NewPrivateEndpointConnectionsPrivateLinkHubClient creates a new instance of PrivateEndpointConnectionsPrivateLinkHubClient. +func (c *ClientFactory) NewPrivateEndpointConnectionsPrivateLinkHubClient() *PrivateEndpointConnectionsPrivateLinkHubClient { + subClient, _ := NewPrivateEndpointConnectionsPrivateLinkHubClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient() *SQLPoolVulnerabilityAssessmentRuleBaselinesClient { - subClient, _ := NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient(c.subscriptionID, c.credential, c.options) +// NewPrivateLinkHubPrivateLinkResourcesClient creates a new instance of PrivateLinkHubPrivateLinkResourcesClient. +func (c *ClientFactory) NewPrivateLinkHubPrivateLinkResourcesClient() *PrivateLinkHubPrivateLinkResourcesClient { + subClient, _ := NewPrivateLinkHubPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewExtendedSQLPoolBlobAuditingPoliciesClient() *ExtendedSQLPoolBlobAuditingPoliciesClient { - subClient, _ := NewExtendedSQLPoolBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) +// NewPrivateLinkHubsClient creates a new instance of PrivateLinkHubsClient. +func (c *ClientFactory) NewPrivateLinkHubsClient() *PrivateLinkHubsClient { + subClient, _ := NewPrivateLinkHubsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDataMaskingPoliciesClient() *DataMaskingPoliciesClient { - subClient, _ := NewDataMaskingPoliciesClient(c.subscriptionID, c.credential, c.options) +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient. +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDataMaskingRulesClient() *DataMaskingRulesClient { - subClient, _ := NewDataMaskingRulesClient(c.subscriptionID, c.credential, c.options) +// NewRestorableDroppedSQLPoolsClient creates a new instance of RestorableDroppedSQLPoolsClient. +func (c *ClientFactory) NewRestorableDroppedSQLPoolsClient() *RestorableDroppedSQLPoolsClient { + subClient, _ := NewRestorableDroppedSQLPoolsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolColumnsClient() *SQLPoolColumnsClient { - subClient, _ := NewSQLPoolColumnsClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolBlobAuditingPoliciesClient creates a new instance of SQLPoolBlobAuditingPoliciesClient. +func (c *ClientFactory) NewSQLPoolBlobAuditingPoliciesClient() *SQLPoolBlobAuditingPoliciesClient { + subClient, _ := NewSQLPoolBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolWorkloadGroupClient() *SQLPoolWorkloadGroupClient { - subClient, _ := NewSQLPoolWorkloadGroupClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolColumnsClient creates a new instance of SQLPoolColumnsClient. +func (c *ClientFactory) NewSQLPoolColumnsClient() *SQLPoolColumnsClient { + subClient, _ := NewSQLPoolColumnsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSQLPoolWorkloadClassifierClient() *SQLPoolWorkloadClassifierClient { - subClient, _ := NewSQLPoolWorkloadClassifierClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolConnectionPoliciesClient creates a new instance of SQLPoolConnectionPoliciesClient. +func (c *ClientFactory) NewSQLPoolConnectionPoliciesClient() *SQLPoolConnectionPoliciesClient { + subClient, _ := NewSQLPoolConnectionPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient() *WorkspaceManagedSQLServerBlobAuditingPoliciesClient { - subClient, _ := NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolDataWarehouseUserActivitiesClient creates a new instance of SQLPoolDataWarehouseUserActivitiesClient. +func (c *ClientFactory) NewSQLPoolDataWarehouseUserActivitiesClient() *SQLPoolDataWarehouseUserActivitiesClient { + subClient, _ := NewSQLPoolDataWarehouseUserActivitiesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient() *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient { - subClient, _ := NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolGeoBackupPoliciesClient creates a new instance of SQLPoolGeoBackupPoliciesClient. +func (c *ClientFactory) NewSQLPoolGeoBackupPoliciesClient() *SQLPoolGeoBackupPoliciesClient { + subClient, _ := NewSQLPoolGeoBackupPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspaceManagedSQLServerSecurityAlertPolicyClient() *WorkspaceManagedSQLServerSecurityAlertPolicyClient { - subClient, _ := NewWorkspaceManagedSQLServerSecurityAlertPolicyClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolMaintenanceWindowOptionsClient creates a new instance of SQLPoolMaintenanceWindowOptionsClient. +func (c *ClientFactory) NewSQLPoolMaintenanceWindowOptionsClient() *SQLPoolMaintenanceWindowOptionsClient { + subClient, _ := NewSQLPoolMaintenanceWindowOptionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient() *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient { - subClient, _ := NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolMaintenanceWindowsClient creates a new instance of SQLPoolMaintenanceWindowsClient. +func (c *ClientFactory) NewSQLPoolMaintenanceWindowsClient() *SQLPoolMaintenanceWindowsClient { + subClient, _ := NewSQLPoolMaintenanceWindowsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspaceManagedSQLServerEncryptionProtectorClient() *WorkspaceManagedSQLServerEncryptionProtectorClient { - subClient, _ := NewWorkspaceManagedSQLServerEncryptionProtectorClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolMetadataSyncConfigsClient creates a new instance of SQLPoolMetadataSyncConfigsClient. +func (c *ClientFactory) NewSQLPoolMetadataSyncConfigsClient() *SQLPoolMetadataSyncConfigsClient { + subClient, _ := NewSQLPoolMetadataSyncConfigsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspaceManagedSQLServerUsagesClient() *WorkspaceManagedSQLServerUsagesClient { - subClient, _ := NewWorkspaceManagedSQLServerUsagesClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolOperationResultsClient creates a new instance of SQLPoolOperationResultsClient. +func (c *ClientFactory) NewSQLPoolOperationResultsClient() *SQLPoolOperationResultsClient { + subClient, _ := NewSQLPoolOperationResultsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient() *WorkspaceManagedSQLServerRecoverableSQLPoolsClient { - subClient, _ := NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolOperationsClient creates a new instance of SQLPoolOperationsClient. +func (c *ClientFactory) NewSQLPoolOperationsClient() *SQLPoolOperationsClient { + subClient, _ := NewSQLPoolOperationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient() *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient { - subClient, _ := NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolRecommendedSensitivityLabelsClient creates a new instance of SQLPoolRecommendedSensitivityLabelsClient. +func (c *ClientFactory) NewSQLPoolRecommendedSensitivityLabelsClient() *SQLPoolRecommendedSensitivityLabelsClient { + subClient, _ := NewSQLPoolRecommendedSensitivityLabelsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspacesClient() *WorkspacesClient { - subClient, _ := NewWorkspacesClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolReplicationLinksClient creates a new instance of SQLPoolReplicationLinksClient. +func (c *ClientFactory) NewSQLPoolReplicationLinksClient() *SQLPoolReplicationLinksClient { + subClient, _ := NewSQLPoolReplicationLinksClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspaceAADAdminsClient() *WorkspaceAADAdminsClient { - subClient, _ := NewWorkspaceAADAdminsClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolRestorePointsClient creates a new instance of SQLPoolRestorePointsClient. +func (c *ClientFactory) NewSQLPoolRestorePointsClient() *SQLPoolRestorePointsClient { + subClient, _ := NewSQLPoolRestorePointsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspaceSQLAADAdminsClient() *WorkspaceSQLAADAdminsClient { - subClient, _ := NewWorkspaceSQLAADAdminsClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolSchemasClient creates a new instance of SQLPoolSchemasClient. +func (c *ClientFactory) NewSQLPoolSchemasClient() *SQLPoolSchemasClient { + subClient, _ := NewSQLPoolSchemasClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkspaceManagedIdentitySQLControlSettingsClient() *WorkspaceManagedIdentitySQLControlSettingsClient { - subClient, _ := NewWorkspaceManagedIdentitySQLControlSettingsClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolSecurityAlertPoliciesClient creates a new instance of SQLPoolSecurityAlertPoliciesClient. +func (c *ClientFactory) NewSQLPoolSecurityAlertPoliciesClient() *SQLPoolSecurityAlertPoliciesClient { + subClient, _ := NewSQLPoolSecurityAlertPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewRestorableDroppedSQLPoolsClient() *RestorableDroppedSQLPoolsClient { - subClient, _ := NewRestorableDroppedSQLPoolsClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolSensitivityLabelsClient creates a new instance of SQLPoolSensitivityLabelsClient. +func (c *ClientFactory) NewSQLPoolSensitivityLabelsClient() *SQLPoolSensitivityLabelsClient { + subClient, _ := NewSQLPoolSensitivityLabelsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBigDataPoolsClient() *BigDataPoolsClient { - subClient, _ := NewBigDataPoolsClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolTableColumnsClient creates a new instance of SQLPoolTableColumnsClient. +func (c *ClientFactory) NewSQLPoolTableColumnsClient() *SQLPoolTableColumnsClient { + subClient, _ := NewSQLPoolTableColumnsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewLibraryClient() *LibraryClient { - subClient, _ := NewLibraryClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolTablesClient creates a new instance of SQLPoolTablesClient. +func (c *ClientFactory) NewSQLPoolTablesClient() *SQLPoolTablesClient { + subClient, _ := NewSQLPoolTablesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewLibrariesClient() *LibrariesClient { - subClient, _ := NewLibrariesClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolTransparentDataEncryptionsClient creates a new instance of SQLPoolTransparentDataEncryptionsClient. +func (c *ClientFactory) NewSQLPoolTransparentDataEncryptionsClient() *SQLPoolTransparentDataEncryptionsClient { + subClient, _ := NewSQLPoolTransparentDataEncryptionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationRuntimesClient() *IntegrationRuntimesClient { - subClient, _ := NewIntegrationRuntimesClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolUsagesClient creates a new instance of SQLPoolUsagesClient. +func (c *ClientFactory) NewSQLPoolUsagesClient() *SQLPoolUsagesClient { + subClient, _ := NewSQLPoolUsagesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationRuntimeNodeIPAddressClient() *IntegrationRuntimeNodeIPAddressClient { - subClient, _ := NewIntegrationRuntimeNodeIPAddressClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient creates a new instance of SQLPoolVulnerabilityAssessmentRuleBaselinesClient. +func (c *ClientFactory) NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient() *SQLPoolVulnerabilityAssessmentRuleBaselinesClient { + subClient, _ := NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationRuntimeObjectMetadataClient() *IntegrationRuntimeObjectMetadataClient { - subClient, _ := NewIntegrationRuntimeObjectMetadataClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolVulnerabilityAssessmentScansClient creates a new instance of SQLPoolVulnerabilityAssessmentScansClient. +func (c *ClientFactory) NewSQLPoolVulnerabilityAssessmentScansClient() *SQLPoolVulnerabilityAssessmentScansClient { + subClient, _ := NewSQLPoolVulnerabilityAssessmentScansClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationRuntimeNodesClient() *IntegrationRuntimeNodesClient { - subClient, _ := NewIntegrationRuntimeNodesClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolVulnerabilityAssessmentsClient creates a new instance of SQLPoolVulnerabilityAssessmentsClient. +func (c *ClientFactory) NewSQLPoolVulnerabilityAssessmentsClient() *SQLPoolVulnerabilityAssessmentsClient { + subClient, _ := NewSQLPoolVulnerabilityAssessmentsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationRuntimeCredentialsClient() *IntegrationRuntimeCredentialsClient { - subClient, _ := NewIntegrationRuntimeCredentialsClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolWorkloadClassifierClient creates a new instance of SQLPoolWorkloadClassifierClient. +func (c *ClientFactory) NewSQLPoolWorkloadClassifierClient() *SQLPoolWorkloadClassifierClient { + subClient, _ := NewSQLPoolWorkloadClassifierClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationRuntimeConnectionInfosClient() *IntegrationRuntimeConnectionInfosClient { - subClient, _ := NewIntegrationRuntimeConnectionInfosClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolWorkloadGroupClient creates a new instance of SQLPoolWorkloadGroupClient. +func (c *ClientFactory) NewSQLPoolWorkloadGroupClient() *SQLPoolWorkloadGroupClient { + subClient, _ := NewSQLPoolWorkloadGroupClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationRuntimeAuthKeysClient() *IntegrationRuntimeAuthKeysClient { - subClient, _ := NewIntegrationRuntimeAuthKeysClient(c.subscriptionID, c.credential, c.options) +// NewSQLPoolsClient creates a new instance of SQLPoolsClient. +func (c *ClientFactory) NewSQLPoolsClient() *SQLPoolsClient { + subClient, _ := NewSQLPoolsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationRuntimeMonitoringDataClient() *IntegrationRuntimeMonitoringDataClient { - subClient, _ := NewIntegrationRuntimeMonitoringDataClient(c.subscriptionID, c.credential, c.options) +// NewSparkConfigurationClient creates a new instance of SparkConfigurationClient. +func (c *ClientFactory) NewSparkConfigurationClient() *SparkConfigurationClient { + subClient, _ := NewSparkConfigurationClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIntegrationRuntimeStatusClient() *IntegrationRuntimeStatusClient { - subClient, _ := NewIntegrationRuntimeStatusClient(c.subscriptionID, c.credential, c.options) +// NewSparkConfigurationsClient creates a new instance of SparkConfigurationsClient. +func (c *ClientFactory) NewSparkConfigurationsClient() *SparkConfigurationsClient { + subClient, _ := NewSparkConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewGetClient() *GetClient { - subClient, _ := NewGetClient(c.subscriptionID, c.credential, c.options) +// NewWorkspaceAADAdminsClient creates a new instance of WorkspaceAADAdminsClient. +func (c *ClientFactory) NewWorkspaceAADAdminsClient() *WorkspaceAADAdminsClient { + subClient, _ := NewWorkspaceAADAdminsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSparkConfigurationClient() *SparkConfigurationClient { - subClient, _ := NewSparkConfigurationClient(c.subscriptionID, c.credential, c.options) +// NewWorkspaceManagedIdentitySQLControlSettingsClient creates a new instance of WorkspaceManagedIdentitySQLControlSettingsClient. +func (c *ClientFactory) NewWorkspaceManagedIdentitySQLControlSettingsClient() *WorkspaceManagedIdentitySQLControlSettingsClient { + subClient, _ := NewWorkspaceManagedIdentitySQLControlSettingsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSparkConfigurationsClient() *SparkConfigurationsClient { - subClient, _ := NewSparkConfigurationsClient(c.subscriptionID, c.credential, c.options) +// NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient creates a new instance of WorkspaceManagedSQLServerBlobAuditingPoliciesClient. +func (c *ClientFactory) NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient() *WorkspaceManagedSQLServerBlobAuditingPoliciesClient { + subClient, _ := NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewKustoOperationsClient() *KustoOperationsClient { - subClient, _ := NewKustoOperationsClient(c.credential, c.options) +// NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient creates a new instance of WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient. +func (c *ClientFactory) NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient() *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient { + subClient, _ := NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewKustoPoolsClient() *KustoPoolsClient { - subClient, _ := NewKustoPoolsClient(c.subscriptionID, c.credential, c.options) +// NewWorkspaceManagedSQLServerEncryptionProtectorClient creates a new instance of WorkspaceManagedSQLServerEncryptionProtectorClient. +func (c *ClientFactory) NewWorkspaceManagedSQLServerEncryptionProtectorClient() *WorkspaceManagedSQLServerEncryptionProtectorClient { + subClient, _ := NewWorkspaceManagedSQLServerEncryptionProtectorClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewKustoPoolChildResourceClient() *KustoPoolChildResourceClient { - subClient, _ := NewKustoPoolChildResourceClient(c.subscriptionID, c.credential, c.options) +// NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient creates a new instance of WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient. +func (c *ClientFactory) NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient() *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient { + subClient, _ := NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewKustoPoolAttachedDatabaseConfigurationsClient() *KustoPoolAttachedDatabaseConfigurationsClient { - subClient, _ := NewKustoPoolAttachedDatabaseConfigurationsClient(c.subscriptionID, c.credential, c.options) +// NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient creates a new instance of WorkspaceManagedSQLServerRecoverableSQLPoolsClient. +func (c *ClientFactory) NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient() *WorkspaceManagedSQLServerRecoverableSQLPoolsClient { + subClient, _ := NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewKustoPoolDatabasesClient() *KustoPoolDatabasesClient { - subClient, _ := NewKustoPoolDatabasesClient(c.subscriptionID, c.credential, c.options) +// NewWorkspaceManagedSQLServerSecurityAlertPolicyClient creates a new instance of WorkspaceManagedSQLServerSecurityAlertPolicyClient. +func (c *ClientFactory) NewWorkspaceManagedSQLServerSecurityAlertPolicyClient() *WorkspaceManagedSQLServerSecurityAlertPolicyClient { + subClient, _ := NewWorkspaceManagedSQLServerSecurityAlertPolicyClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewKustoPoolDataConnectionsClient() *KustoPoolDataConnectionsClient { - subClient, _ := NewKustoPoolDataConnectionsClient(c.subscriptionID, c.credential, c.options) +// NewWorkspaceManagedSQLServerUsagesClient creates a new instance of WorkspaceManagedSQLServerUsagesClient. +func (c *ClientFactory) NewWorkspaceManagedSQLServerUsagesClient() *WorkspaceManagedSQLServerUsagesClient { + subClient, _ := NewWorkspaceManagedSQLServerUsagesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewKustoPoolPrincipalAssignmentsClient() *KustoPoolPrincipalAssignmentsClient { - subClient, _ := NewKustoPoolPrincipalAssignmentsClient(c.subscriptionID, c.credential, c.options) +// NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient creates a new instance of WorkspaceManagedSQLServerVulnerabilityAssessmentsClient. +func (c *ClientFactory) NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient() *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient { + subClient, _ := NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewKustoPoolDatabasePrincipalAssignmentsClient() *KustoPoolDatabasePrincipalAssignmentsClient { - subClient, _ := NewKustoPoolDatabasePrincipalAssignmentsClient(c.subscriptionID, c.credential, c.options) +// NewWorkspaceSQLAADAdminsClient creates a new instance of WorkspaceSQLAADAdminsClient. +func (c *ClientFactory) NewWorkspaceSQLAADAdminsClient() *WorkspaceSQLAADAdminsClient { + subClient, _ := NewWorkspaceSQLAADAdminsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewKustoPoolPrivateLinkResourcesClient() *KustoPoolPrivateLinkResourcesClient { - subClient, _ := NewKustoPoolPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) +// 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/synapse/armsynapse/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/constants.go index c6eb25e3..35f45369 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/constants.go @@ -3,35 +3,34 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse const ( - moduleName = "armsynapse" - moduleVersion = "v0.7.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" + moduleVersion = "v0.8.0" ) // ActualState - Actual state type ActualState string const ( - ActualStateEnabling ActualState = "Enabling" - ActualStateEnabled ActualState = "Enabled" - ActualStateDisabling ActualState = "Disabling" ActualStateDisabled ActualState = "Disabled" + ActualStateDisabling ActualState = "Disabling" + ActualStateEnabled ActualState = "Enabled" + ActualStateEnabling ActualState = "Enabling" ActualStateUnknown ActualState = "Unknown" ) // PossibleActualStateValues returns the possible values for the ActualState const type. func PossibleActualStateValues() []ActualState { return []ActualState{ - ActualStateEnabling, - ActualStateEnabled, - ActualStateDisabling, ActualStateDisabled, + ActualStateDisabling, + ActualStateEnabled, + ActualStateEnabling, ActualStateUnknown, } } @@ -85,15 +84,15 @@ func PossibleBlobAuditingPolicyNameValues() []BlobAuditingPolicyName { type BlobAuditingPolicyState string const ( - BlobAuditingPolicyStateEnabled BlobAuditingPolicyState = "Enabled" BlobAuditingPolicyStateDisabled BlobAuditingPolicyState = "Disabled" + BlobAuditingPolicyStateEnabled BlobAuditingPolicyState = "Enabled" ) // PossibleBlobAuditingPolicyStateValues returns the possible values for the BlobAuditingPolicyState const type. func PossibleBlobAuditingPolicyStateValues() []BlobAuditingPolicyState { return []BlobAuditingPolicyState{ - BlobAuditingPolicyStateEnabled, BlobAuditingPolicyStateDisabled, + BlobAuditingPolicyStateEnabled, } } @@ -343,8 +342,8 @@ func PossibleDataFlowComputeTypeValues() []DataFlowComputeType { type DataMaskingFunction string const ( - DataMaskingFunctionDefault DataMaskingFunction = "Default" DataMaskingFunctionCCN DataMaskingFunction = "CCN" + DataMaskingFunctionDefault DataMaskingFunction = "Default" DataMaskingFunctionEmail DataMaskingFunction = "Email" DataMaskingFunctionNumber DataMaskingFunction = "Number" DataMaskingFunctionSSN DataMaskingFunction = "SSN" @@ -354,8 +353,8 @@ const ( // PossibleDataMaskingFunctionValues returns the possible values for the DataMaskingFunction const type. func PossibleDataMaskingFunctionValues() []DataMaskingFunction { return []DataMaskingFunction{ - DataMaskingFunctionDefault, DataMaskingFunctionCCN, + DataMaskingFunctionDefault, DataMaskingFunctionEmail, DataMaskingFunctionNumber, DataMaskingFunctionSSN, @@ -495,15 +494,15 @@ func PossibleDefaultPrincipalsModificationKindValues() []DefaultPrincipalsModifi type DesiredState string const ( - DesiredStateEnabled DesiredState = "Enabled" DesiredStateDisabled DesiredState = "Disabled" + DesiredStateEnabled DesiredState = "Enabled" ) // PossibleDesiredStateValues returns the possible values for the DesiredState const type. func PossibleDesiredStateValues() []DesiredState { return []DesiredState{ - DesiredStateEnabled, DesiredStateDisabled, + DesiredStateEnabled, } } @@ -1071,18 +1070,18 @@ func PossibleProvisioningStateValues() []ProvisioningState { type QueryAggregationFunction string const ( - QueryAggregationFunctionMin QueryAggregationFunction = "min" - QueryAggregationFunctionMax QueryAggregationFunction = "max" QueryAggregationFunctionAvg QueryAggregationFunction = "avg" + QueryAggregationFunctionMax QueryAggregationFunction = "max" + QueryAggregationFunctionMin QueryAggregationFunction = "min" QueryAggregationFunctionSum QueryAggregationFunction = "sum" ) // PossibleQueryAggregationFunctionValues returns the possible values for the QueryAggregationFunction const type. func PossibleQueryAggregationFunctionValues() []QueryAggregationFunction { return []QueryAggregationFunction{ - QueryAggregationFunctionMin, - QueryAggregationFunctionMax, QueryAggregationFunctionAvg, + QueryAggregationFunctionMax, + QueryAggregationFunctionMin, QueryAggregationFunctionSum, } } @@ -1091,21 +1090,21 @@ func PossibleQueryAggregationFunctionValues() []QueryAggregationFunction { type QueryExecutionType string const ( - QueryExecutionTypeAny QueryExecutionType = "any" - QueryExecutionTypeRegular QueryExecutionType = "regular" - QueryExecutionTypeIrregular QueryExecutionType = "irregular" QueryExecutionTypeAborted QueryExecutionType = "aborted" + QueryExecutionTypeAny QueryExecutionType = "any" QueryExecutionTypeException QueryExecutionType = "exception" + QueryExecutionTypeIrregular QueryExecutionType = "irregular" + QueryExecutionTypeRegular QueryExecutionType = "regular" ) // PossibleQueryExecutionTypeValues returns the possible values for the QueryExecutionType const type. func PossibleQueryExecutionTypeValues() []QueryExecutionType { return []QueryExecutionType{ - QueryExecutionTypeAny, - QueryExecutionTypeRegular, - QueryExecutionTypeIrregular, QueryExecutionTypeAborted, + QueryExecutionTypeAny, QueryExecutionTypeException, + QueryExecutionTypeIrregular, + QueryExecutionTypeRegular, } } @@ -1113,17 +1112,17 @@ func PossibleQueryExecutionTypeValues() []QueryExecutionType { type QueryMetricUnit string const ( - QueryMetricUnitPercentage QueryMetricUnit = "percentage" QueryMetricUnitKB QueryMetricUnit = "KB" QueryMetricUnitMicroseconds QueryMetricUnit = "microseconds" + QueryMetricUnitPercentage QueryMetricUnit = "percentage" ) // PossibleQueryMetricUnitValues returns the possible values for the QueryMetricUnit const type. func PossibleQueryMetricUnitValues() []QueryMetricUnit { return []QueryMetricUnit{ - QueryMetricUnitPercentage, QueryMetricUnitKB, QueryMetricUnitMicroseconds, + QueryMetricUnitPercentage, } } @@ -1132,20 +1131,20 @@ type QueryObservedMetricType string const ( QueryObservedMetricTypeCPU QueryObservedMetricType = "cpu" - QueryObservedMetricTypeIo QueryObservedMetricType = "io" - QueryObservedMetricTypeLogio QueryObservedMetricType = "logio" QueryObservedMetricTypeDuration QueryObservedMetricType = "duration" QueryObservedMetricTypeExecutionCount QueryObservedMetricType = "executionCount" + QueryObservedMetricTypeIo QueryObservedMetricType = "io" + QueryObservedMetricTypeLogio QueryObservedMetricType = "logio" ) // PossibleQueryObservedMetricTypeValues returns the possible values for the QueryObservedMetricType const type. func PossibleQueryObservedMetricTypeValues() []QueryObservedMetricType { return []QueryObservedMetricType{ QueryObservedMetricTypeCPU, - QueryObservedMetricTypeIo, - QueryObservedMetricTypeLogio, QueryObservedMetricTypeDuration, QueryObservedMetricTypeExecutionCount, + QueryObservedMetricTypeIo, + QueryObservedMetricTypeLogio, } } @@ -1168,15 +1167,15 @@ func PossibleReasonValues() []Reason { type RecommendedSensitivityLabelUpdateKind string const ( - RecommendedSensitivityLabelUpdateKindEnable RecommendedSensitivityLabelUpdateKind = "enable" RecommendedSensitivityLabelUpdateKindDisable RecommendedSensitivityLabelUpdateKind = "disable" + RecommendedSensitivityLabelUpdateKindEnable RecommendedSensitivityLabelUpdateKind = "enable" ) // PossibleRecommendedSensitivityLabelUpdateKindValues returns the possible values for the RecommendedSensitivityLabelUpdateKind const type. func PossibleRecommendedSensitivityLabelUpdateKindValues() []RecommendedSensitivityLabelUpdateKind { return []RecommendedSensitivityLabelUpdateKind{ - RecommendedSensitivityLabelUpdateKindEnable, RecommendedSensitivityLabelUpdateKindDisable, + RecommendedSensitivityLabelUpdateKindEnable, } } @@ -1184,21 +1183,21 @@ func PossibleRecommendedSensitivityLabelUpdateKindValues() []RecommendedSensitiv type ReplicationRole string const ( + ReplicationRoleCopy ReplicationRole = "Copy" + ReplicationRoleNonReadableSecondary ReplicationRole = "NonReadableSecondary" ReplicationRolePrimary ReplicationRole = "Primary" ReplicationRoleSecondary ReplicationRole = "Secondary" - ReplicationRoleNonReadableSecondary ReplicationRole = "NonReadableSecondary" ReplicationRoleSource ReplicationRole = "Source" - ReplicationRoleCopy ReplicationRole = "Copy" ) // PossibleReplicationRoleValues returns the possible values for the ReplicationRole const type. func PossibleReplicationRoleValues() []ReplicationRole { return []ReplicationRole{ + ReplicationRoleCopy, + ReplicationRoleNonReadableSecondary, ReplicationRolePrimary, ReplicationRoleSecondary, - ReplicationRoleNonReadableSecondary, ReplicationRoleSource, - ReplicationRoleCopy, } } @@ -1349,17 +1348,17 @@ func PossibleSecurityAlertPolicyNameAutoGeneratedValues() []SecurityAlertPolicyN type SecurityAlertPolicyState string const ( - SecurityAlertPolicyStateNew SecurityAlertPolicyState = "New" - SecurityAlertPolicyStateEnabled SecurityAlertPolicyState = "Enabled" SecurityAlertPolicyStateDisabled SecurityAlertPolicyState = "Disabled" + SecurityAlertPolicyStateEnabled SecurityAlertPolicyState = "Enabled" + SecurityAlertPolicyStateNew SecurityAlertPolicyState = "New" ) // PossibleSecurityAlertPolicyStateValues returns the possible values for the SecurityAlertPolicyState const type. func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState { return []SecurityAlertPolicyState{ - SecurityAlertPolicyStateNew, - SecurityAlertPolicyStateEnabled, SecurityAlertPolicyStateDisabled, + SecurityAlertPolicyStateEnabled, + SecurityAlertPolicyStateNew, } } @@ -1392,21 +1391,21 @@ func PossibleSelfHostedIntegrationRuntimeNodeStatusValues() []SelfHostedIntegrat type SensitivityLabelRank string const ( - SensitivityLabelRankNone SensitivityLabelRank = "None" + SensitivityLabelRankCritical SensitivityLabelRank = "Critical" + SensitivityLabelRankHigh SensitivityLabelRank = "High" SensitivityLabelRankLow SensitivityLabelRank = "Low" SensitivityLabelRankMedium SensitivityLabelRank = "Medium" - SensitivityLabelRankHigh SensitivityLabelRank = "High" - SensitivityLabelRankCritical SensitivityLabelRank = "Critical" + SensitivityLabelRankNone SensitivityLabelRank = "None" ) // PossibleSensitivityLabelRankValues returns the possible values for the SensitivityLabelRank const type. func PossibleSensitivityLabelRankValues() []SensitivityLabelRank { return []SensitivityLabelRank{ - SensitivityLabelRankNone, + SensitivityLabelRankCritical, + SensitivityLabelRankHigh, SensitivityLabelRankLow, SensitivityLabelRankMedium, - SensitivityLabelRankHigh, - SensitivityLabelRankCritical, + SensitivityLabelRankNone, } } @@ -1428,15 +1427,15 @@ func PossibleSensitivityLabelSourceValues() []SensitivityLabelSource { type SensitivityLabelUpdateKind string const ( - SensitivityLabelUpdateKindSet SensitivityLabelUpdateKind = "set" SensitivityLabelUpdateKindRemove SensitivityLabelUpdateKind = "remove" + SensitivityLabelUpdateKindSet SensitivityLabelUpdateKind = "set" ) // PossibleSensitivityLabelUpdateKindValues returns the possible values for the SensitivityLabelUpdateKind const type. func PossibleSensitivityLabelUpdateKindValues() []SensitivityLabelUpdateKind { return []SensitivityLabelUpdateKind{ - SensitivityLabelUpdateKindSet, SensitivityLabelUpdateKindRemove, + SensitivityLabelUpdateKindSet, } } @@ -1557,15 +1556,15 @@ func PossibleTransparentDataEncryptionNameValues() []TransparentDataEncryptionNa type TransparentDataEncryptionStatus string const ( - TransparentDataEncryptionStatusEnabled TransparentDataEncryptionStatus = "Enabled" TransparentDataEncryptionStatusDisabled TransparentDataEncryptionStatus = "Disabled" + TransparentDataEncryptionStatusEnabled TransparentDataEncryptionStatus = "Enabled" ) // PossibleTransparentDataEncryptionStatusValues returns the possible values for the TransparentDataEncryptionStatus const type. func PossibleTransparentDataEncryptionStatusValues() []TransparentDataEncryptionStatus { return []TransparentDataEncryptionStatus{ - TransparentDataEncryptionStatusEnabled, TransparentDataEncryptionStatusDisabled, + TransparentDataEncryptionStatusEnabled, } } @@ -1573,15 +1572,15 @@ func PossibleTransparentDataEncryptionStatusValues() []TransparentDataEncryption type Type string const ( - TypeMicrosoftSynapseWorkspacesKustoPoolsDatabases Type = "Microsoft.Synapse/workspaces/kustoPools/databases" TypeMicrosoftSynapseWorkspacesKustoPoolsAttachedDatabaseConfigurations Type = "Microsoft.Synapse/workspaces/kustoPools/attachedDatabaseConfigurations" + TypeMicrosoftSynapseWorkspacesKustoPoolsDatabases Type = "Microsoft.Synapse/workspaces/kustoPools/databases" ) // PossibleTypeValues returns the possible values for the Type const type. func PossibleTypeValues() []Type { return []Type{ - TypeMicrosoftSynapseWorkspacesKustoPoolsDatabases, TypeMicrosoftSynapseWorkspacesKustoPoolsAttachedDatabaseConfigurations, + TypeMicrosoftSynapseWorkspacesKustoPoolsDatabases, } } @@ -1601,15 +1600,15 @@ func PossibleVulnerabilityAssessmentNameValues() []VulnerabilityAssessmentName { type VulnerabilityAssessmentPolicyBaselineName string const ( - VulnerabilityAssessmentPolicyBaselineNameMaster VulnerabilityAssessmentPolicyBaselineName = "master" VulnerabilityAssessmentPolicyBaselineNameDefault VulnerabilityAssessmentPolicyBaselineName = "default" + VulnerabilityAssessmentPolicyBaselineNameMaster VulnerabilityAssessmentPolicyBaselineName = "master" ) // PossibleVulnerabilityAssessmentPolicyBaselineNameValues returns the possible values for the VulnerabilityAssessmentPolicyBaselineName const type. func PossibleVulnerabilityAssessmentPolicyBaselineNameValues() []VulnerabilityAssessmentPolicyBaselineName { return []VulnerabilityAssessmentPolicyBaselineName{ - VulnerabilityAssessmentPolicyBaselineNameMaster, VulnerabilityAssessmentPolicyBaselineNameDefault, + VulnerabilityAssessmentPolicyBaselineNameMaster, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/datamaskingpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/datamaskingpolicies_client.go index 356ca140..73444777 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/datamaskingpolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/datamaskingpolicies_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type DataMaskingPoliciesClient struct { // - 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+".DataMaskingPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewDataMaskingPoliciesClient(subscriptionID string, credential azcore.Token // - options - DataMaskingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingPoliciesClient.CreateOrUpdate // method. func (client *DataMaskingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName 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, workspaceName, sqlPoolName, parameters, options) if err != nil { return DataMaskingPoliciesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataMaskingPoliciesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataMaskingPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataMaskingPoliciesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *DataMaskingPoliciesClient) createOrUpdateCreateRequest(ctx context reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,18 +127,25 @@ func (client *DataMaskingPoliciesClient) createOrUpdateHandleResponse(resp *http // - sqlPoolName - SQL pool name // - options - DataMaskingPoliciesClientGetOptions contains the optional parameters for the DataMaskingPoliciesClient.Get method. func (client *DataMaskingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName 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, workspaceName, sqlPoolName, options) if err != nil { return DataMaskingPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataMaskingPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataMaskingPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataMaskingPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/datamaskingrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/datamaskingrules_client.go index 8b4bd560..e08d6005 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/datamaskingrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/datamaskingrules_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type DataMaskingRulesClient struct { // - 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+".DataMaskingRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewDataMaskingRulesClient(subscriptionID string, credential azcore.TokenCre // - options - DataMaskingRulesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingRulesClient.CreateOrUpdate // method. func (client *DataMaskingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName 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, workspaceName, sqlPoolName, dataMaskingRuleName, parameters, options) if err != nil { return DataMaskingRulesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataMaskingRulesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DataMaskingRulesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DataMaskingRulesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -102,7 +108,10 @@ func (client *DataMaskingRulesClient) createOrUpdateCreateRequest(ctx context.Co reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -124,18 +133,25 @@ func (client *DataMaskingRulesClient) createOrUpdateHandleResponse(resp *http.Re // - dataMaskingRuleName - The name of the data masking rule. // - options - DataMaskingRulesClientGetOptions contains the optional parameters for the DataMaskingRulesClient.Get method. func (client *DataMaskingRulesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, dataMaskingRuleName string, options *DataMaskingRulesClientGetOptions) (DataMaskingRulesClientGetResponse, error) { + var err error + const operationName = "DataMaskingRulesClient.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, sqlPoolName, dataMaskingRuleName, options) if err != nil { return DataMaskingRulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataMaskingRulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataMaskingRulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataMaskingRulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -196,6 +212,7 @@ func (client *DataMaskingRulesClient) NewListBySQLPoolPager(resourceGroupName st return false }, Fetcher: func(ctx context.Context, page *DataMaskingRulesClientListBySQLPoolResponse) (DataMaskingRulesClientListBySQLPoolResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DataMaskingRulesClient.NewListBySQLPoolPager") req, err := client.listBySQLPoolCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) if err != nil { return DataMaskingRulesClientListBySQLPoolResponse{}, err @@ -209,6 +226,7 @@ func (client *DataMaskingRulesClient) NewListBySQLPoolPager(resourceGroupName st } return client.listBySQLPoolHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/extendedsqlpoolblobauditingpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/extendedsqlpoolblobauditingpolicies_client.go index 29bae3ba..d5a5a4d0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/extendedsqlpoolblobauditingpolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/extendedsqlpoolblobauditingpolicies_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type ExtendedSQLPoolBlobAuditingPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExtendedSQLPoolBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExtendedSQLPoolBlobAuditingPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".ExtendedSQLPoolBlobAuditingPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewExtendedSQLPoolBlobAuditingPoliciesClient(subscriptionID string, credent // - options - ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.CreateOrUpdate // method. func (client *ExtendedSQLPoolBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters ExtendedSQLPoolBlobAuditingPolicy, options *ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions) (ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ExtendedSQLPoolBlobAuditingPoliciesClient.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, workspaceName, sqlPoolName, parameters, options) if err != nil { return ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *ExtendedSQLPoolBlobAuditingPoliciesClient) createOrUpdateCreateReq reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,18 +128,25 @@ func (client *ExtendedSQLPoolBlobAuditingPoliciesClient) createOrUpdateHandleRes // - options - ExtendedSQLPoolBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.Get // method. func (client *ExtendedSQLPoolBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *ExtendedSQLPoolBlobAuditingPoliciesClientGetOptions) (ExtendedSQLPoolBlobAuditingPoliciesClientGetResponse, error) { + var err error + const operationName = "ExtendedSQLPoolBlobAuditingPoliciesClient.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, sqlPoolName, options) if err != nil { return ExtendedSQLPoolBlobAuditingPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExtendedSQLPoolBlobAuditingPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExtendedSQLPoolBlobAuditingPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExtendedSQLPoolBlobAuditingPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -187,25 +203,20 @@ func (client *ExtendedSQLPoolBlobAuditingPoliciesClient) NewListBySQLPoolPager(r return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse) (ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySQLPoolCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExtendedSQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager") + 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.listBySQLPoolCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) + }, nil) if err != nil { return ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse{}, runtime.NewResponseError(resp) - } return client.listBySQLPoolHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/get_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/get_client.go index d81fde4e..5157f368 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/get_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/get_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type GetClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GetClient, error) { - cl, err := arm.NewClient(moduleName+".GetClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewGetClient(subscriptionID string, credential azcore.TokenCredential, opti // - options - GetClientIntegrationRuntimeEnableInteractivequeryOptions contains the optional parameters for the GetClient.IntegrationRuntimeEnableInteractivequery // method. func (client *GetClient) IntegrationRuntimeEnableInteractivequery(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntimeOperationID string, options *GetClientIntegrationRuntimeEnableInteractivequeryOptions) (GetClientIntegrationRuntimeEnableInteractivequeryResponse, error) { + var err error + const operationName = "GetClient.IntegrationRuntimeEnableInteractivequery" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.integrationRuntimeEnableInteractivequeryCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, integrationRuntimeOperationID, options) if err != nil { return GetClientIntegrationRuntimeEnableInteractivequeryResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GetClientIntegrationRuntimeEnableInteractivequeryResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GetClientIntegrationRuntimeEnableInteractivequeryResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GetClientIntegrationRuntimeEnableInteractivequeryResponse{}, err } - return client.integrationRuntimeEnableInteractivequeryHandleResponse(resp) + resp, err := client.integrationRuntimeEnableInteractivequeryHandleResponse(httpResp) + return resp, err } // integrationRuntimeEnableInteractivequeryCreateRequest creates the IntegrationRuntimeEnableInteractivequery request. @@ -123,18 +129,25 @@ func (client *GetClient) integrationRuntimeEnableInteractivequeryHandleResponse( // - options - GetClientIntegrationRuntimeStartOptions contains the optional parameters for the GetClient.IntegrationRuntimeStart // method. func (client *GetClient) IntegrationRuntimeStart(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntimeOperationID string, options *GetClientIntegrationRuntimeStartOptions) (GetClientIntegrationRuntimeStartResponse, error) { + var err error + const operationName = "GetClient.IntegrationRuntimeStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.integrationRuntimeStartCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, integrationRuntimeOperationID, options) if err != nil { return GetClientIntegrationRuntimeStartResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GetClientIntegrationRuntimeStartResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GetClientIntegrationRuntimeStartResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GetClientIntegrationRuntimeStartResponse{}, err } - return client.integrationRuntimeStartHandleResponse(resp) + resp, err := client.integrationRuntimeStartHandleResponse(httpResp) + return resp, err } // integrationRuntimeStartCreateRequest creates the IntegrationRuntimeStart request. @@ -191,18 +204,25 @@ func (client *GetClient) integrationRuntimeStartHandleResponse(resp *http.Respon // - options - GetClientIntegrationRuntimeStopOptions contains the optional parameters for the GetClient.IntegrationRuntimeStop // method. func (client *GetClient) IntegrationRuntimeStop(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntimeOperationID string, options *GetClientIntegrationRuntimeStopOptions) (GetClientIntegrationRuntimeStopResponse, error) { + var err error + const operationName = "GetClient.IntegrationRuntimeStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.integrationRuntimeStopCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, integrationRuntimeOperationID, options) if err != nil { return GetClientIntegrationRuntimeStopResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GetClientIntegrationRuntimeStopResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GetClientIntegrationRuntimeStopResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GetClientIntegrationRuntimeStopResponse{}, err } - return client.integrationRuntimeStopHandleResponse(resp) + resp, err := client.integrationRuntimeStopHandleResponse(httpResp) + return resp, err } // integrationRuntimeStopCreateRequest creates the IntegrationRuntimeStop request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimeauthkeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimeauthkeys_client.go index 3429515a..5e7ab69b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimeauthkeys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimeauthkeys_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type IntegrationRuntimeAuthKeysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationRuntimeAuthKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeAuthKeysClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationRuntimeAuthKeysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewIntegrationRuntimeAuthKeysClient(subscriptionID string, credential azcor // - options - IntegrationRuntimeAuthKeysClientListOptions contains the optional parameters for the IntegrationRuntimeAuthKeysClient.List // method. func (client *IntegrationRuntimeAuthKeysClient) List(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeAuthKeysClientListOptions) (IntegrationRuntimeAuthKeysClientListResponse, error) { + var err error + const operationName = "IntegrationRuntimeAuthKeysClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { return IntegrationRuntimeAuthKeysClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimeAuthKeysClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimeAuthKeysClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimeAuthKeysClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -118,18 +124,25 @@ func (client *IntegrationRuntimeAuthKeysClient) listHandleResponse(resp *http.Re // - options - IntegrationRuntimeAuthKeysClientRegenerateOptions contains the optional parameters for the IntegrationRuntimeAuthKeysClient.Regenerate // method. func (client *IntegrationRuntimeAuthKeysClient) Regenerate(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, regenerateKeyParameters IntegrationRuntimeRegenerateKeyParameters, options *IntegrationRuntimeAuthKeysClientRegenerateOptions) (IntegrationRuntimeAuthKeysClientRegenerateResponse, error) { + var err error + const operationName = "IntegrationRuntimeAuthKeysClient.Regenerate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regenerateCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, regenerateKeyParameters, options) if err != nil { return IntegrationRuntimeAuthKeysClientRegenerateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimeAuthKeysClientRegenerateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimeAuthKeysClientRegenerateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimeAuthKeysClientRegenerateResponse{}, err } - return client.regenerateHandleResponse(resp) + resp, err := client.regenerateHandleResponse(httpResp) + return resp, err } // regenerateCreateRequest creates the Regenerate request. @@ -159,7 +172,10 @@ func (client *IntegrationRuntimeAuthKeysClient) regenerateCreateRequest(ctx cont reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, regenerateKeyParameters) + if err := runtime.MarshalAsJSON(req, regenerateKeyParameters); err != nil { + return nil, err + } + return req, nil } // regenerateHandleResponse handles the Regenerate response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimeconnectioninfos_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimeconnectioninfos_client.go index be4729e7..125ed896 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimeconnectioninfos_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimeconnectioninfos_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type IntegrationRuntimeConnectionInfosClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationRuntimeConnectionInfosClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeConnectionInfosClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationRuntimeConnectionInfosClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewIntegrationRuntimeConnectionInfosClient(subscriptionID string, credentia // - options - IntegrationRuntimeConnectionInfosClientGetOptions contains the optional parameters for the IntegrationRuntimeConnectionInfosClient.Get // method. func (client *IntegrationRuntimeConnectionInfosClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeConnectionInfosClientGetOptions) (IntegrationRuntimeConnectionInfosClientGetResponse, error) { + var err error + const operationName = "IntegrationRuntimeConnectionInfosClient.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, integrationRuntimeName, options) if err != nil { return IntegrationRuntimeConnectionInfosClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimeConnectionInfosClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimeConnectionInfosClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimeConnectionInfosClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimecredentials_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimecredentials_client.go index c186ef09..e8a567de 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimecredentials_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimecredentials_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type IntegrationRuntimeCredentialsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationRuntimeCredentialsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeCredentialsClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationRuntimeCredentialsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,16 +56,22 @@ func NewIntegrationRuntimeCredentialsClient(subscriptionID string, credential az // - options - IntegrationRuntimeCredentialsClientSyncOptions contains the optional parameters for the IntegrationRuntimeCredentialsClient.Sync // method. func (client *IntegrationRuntimeCredentialsClient) Sync(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeCredentialsClientSyncOptions) (IntegrationRuntimeCredentialsClientSyncResponse, error) { + var err error + const operationName = "IntegrationRuntimeCredentialsClient.Sync" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.syncCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { return IntegrationRuntimeCredentialsClientSyncResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimeCredentialsClientSyncResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimeCredentialsClientSyncResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimeCredentialsClientSyncResponse{}, err } return IntegrationRuntimeCredentialsClientSyncResponse{}, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimemonitoringdata_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimemonitoringdata_client.go index 83ea9719..a51ae1f4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimemonitoringdata_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimemonitoringdata_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type IntegrationRuntimeMonitoringDataClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationRuntimeMonitoringDataClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeMonitoringDataClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationRuntimeMonitoringDataClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewIntegrationRuntimeMonitoringDataClient(subscriptionID string, credential // - options - IntegrationRuntimeMonitoringDataClientListOptions contains the optional parameters for the IntegrationRuntimeMonitoringDataClient.List // method. func (client *IntegrationRuntimeMonitoringDataClient) List(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeMonitoringDataClientListOptions) (IntegrationRuntimeMonitoringDataClientListResponse, error) { + var err error + const operationName = "IntegrationRuntimeMonitoringDataClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { return IntegrationRuntimeMonitoringDataClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimeMonitoringDataClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimeMonitoringDataClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimeMonitoringDataClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodeipaddress_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodeipaddress_client.go index ea400b54..48aef4ac 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodeipaddress_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodeipaddress_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type IntegrationRuntimeNodeIPAddressClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationRuntimeNodeIPAddressClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeNodeIPAddressClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationRuntimeNodeIPAddressClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewIntegrationRuntimeNodeIPAddressClient(subscriptionID string, credential // - options - IntegrationRuntimeNodeIPAddressClientGetOptions contains the optional parameters for the IntegrationRuntimeNodeIPAddressClient.Get // method. func (client *IntegrationRuntimeNodeIPAddressClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string, options *IntegrationRuntimeNodeIPAddressClientGetOptions) (IntegrationRuntimeNodeIPAddressClientGetResponse, error) { + var err error + const operationName = "IntegrationRuntimeNodeIPAddressClient.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, integrationRuntimeName, nodeName, options) if err != nil { return IntegrationRuntimeNodeIPAddressClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimeNodeIPAddressClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimeNodeIPAddressClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimeNodeIPAddressClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodes_client.go index 97a2f94d..81b41c61 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodes_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodes_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type IntegrationRuntimeNodesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationRuntimeNodesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeNodesClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationRuntimeNodesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,16 +54,22 @@ func NewIntegrationRuntimeNodesClient(subscriptionID string, credential azcore.T // - options - IntegrationRuntimeNodesClientDeleteOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Delete // method. func (client *IntegrationRuntimeNodesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string, options *IntegrationRuntimeNodesClientDeleteOptions) (IntegrationRuntimeNodesClientDeleteResponse, error) { + var err error + const operationName = "IntegrationRuntimeNodesClient.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, workspaceName, integrationRuntimeName, nodeName, options) if err != nil { return IntegrationRuntimeNodesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimeNodesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IntegrationRuntimeNodesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimeNodesClientDeleteResponse{}, err } return IntegrationRuntimeNodesClientDeleteResponse{}, nil } @@ -114,18 +119,25 @@ func (client *IntegrationRuntimeNodesClient) deleteCreateRequest(ctx context.Con // - options - IntegrationRuntimeNodesClientGetOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Get // method. func (client *IntegrationRuntimeNodesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string, options *IntegrationRuntimeNodesClientGetOptions) (IntegrationRuntimeNodesClientGetResponse, error) { + var err error + const operationName = "IntegrationRuntimeNodesClient.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, integrationRuntimeName, nodeName, options) if err != nil { return IntegrationRuntimeNodesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimeNodesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimeNodesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimeNodesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -183,18 +195,25 @@ func (client *IntegrationRuntimeNodesClient) getHandleResponse(resp *http.Respon // - options - IntegrationRuntimeNodesClientUpdateOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Update // method. func (client *IntegrationRuntimeNodesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string, updateIntegrationRuntimeNodeRequest UpdateIntegrationRuntimeNodeRequest, options *IntegrationRuntimeNodesClientUpdateOptions) (IntegrationRuntimeNodesClientUpdateResponse, error) { + var err error + const operationName = "IntegrationRuntimeNodesClient.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, workspaceName, integrationRuntimeName, nodeName, updateIntegrationRuntimeNodeRequest, options) if err != nil { return IntegrationRuntimeNodesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimeNodesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimeNodesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimeNodesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -228,7 +247,10 @@ func (client *IntegrationRuntimeNodesClient) updateCreateRequest(ctx context.Con reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, updateIntegrationRuntimeNodeRequest) + if err := runtime.MarshalAsJSON(req, updateIntegrationRuntimeNodeRequest); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimeobjectmetadata_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimeobjectmetadata_client.go index f68171bf..fae086c0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimeobjectmetadata_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimeobjectmetadata_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type IntegrationRuntimeObjectMetadataClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationRuntimeObjectMetadataClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeObjectMetadataClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationRuntimeObjectMetadataClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewIntegrationRuntimeObjectMetadataClient(subscriptionID string, credential // - options - IntegrationRuntimeObjectMetadataClientListOptions contains the optional parameters for the IntegrationRuntimeObjectMetadataClient.List // method. func (client *IntegrationRuntimeObjectMetadataClient) List(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeObjectMetadataClientListOptions) (IntegrationRuntimeObjectMetadataClientListResponse, error) { + var err error + const operationName = "IntegrationRuntimeObjectMetadataClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { return IntegrationRuntimeObjectMetadataClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimeObjectMetadataClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimeObjectMetadataClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimeObjectMetadataClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -96,7 +102,10 @@ func (client *IntegrationRuntimeObjectMetadataClient) listCreateRequest(ctx cont req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.GetMetadataRequest != nil { - return req, runtime.MarshalAsJSON(req, *options.GetMetadataRequest) + if err := runtime.MarshalAsJSON(req, *options.GetMetadataRequest); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -125,11 +134,15 @@ func (client *IntegrationRuntimeObjectMetadataClient) BeginRefresh(ctx context.C if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IntegrationRuntimeObjectMetadataClientRefreshResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IntegrationRuntimeObjectMetadataClientRefreshResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IntegrationRuntimeObjectMetadataClientRefreshResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IntegrationRuntimeObjectMetadataClientRefreshResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,18 +151,24 @@ func (client *IntegrationRuntimeObjectMetadataClient) BeginRefresh(ctx context.C // // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimeObjectMetadataClient) refresh(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeObjectMetadataClientBeginRefreshOptions) (*http.Response, error) { + var err error + const operationName = "IntegrationRuntimeObjectMetadataClient.BeginRefresh" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.refreshCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // refreshCreateRequest creates the Refresh request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client.go index 17648452..97983dec 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type IntegrationRuntimesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationRuntimesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimesClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationRuntimesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *IntegrationRuntimesClient) BeginCreate(ctx context.Context, resour if err != nil { return nil, err } - return runtime.NewPoller[IntegrationRuntimesClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IntegrationRuntimesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IntegrationRuntimesClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IntegrationRuntimesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *IntegrationRuntimesClient) BeginCreate(ctx context.Context, resour // // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimesClient) create(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntime IntegrationRuntimeResource, options *IntegrationRuntimesClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "IntegrationRuntimesClient.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, workspaceName, integrationRuntimeName, integrationRuntime, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -115,7 +125,10 @@ func (client *IntegrationRuntimesClient) createCreateRequest(ctx context.Context req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, integrationRuntime) + if err := runtime.MarshalAsJSON(req, integrationRuntime); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete an integration runtime @@ -133,9 +146,14 @@ func (client *IntegrationRuntimesClient) BeginDelete(ctx context.Context, resour if err != nil { return nil, err } - return runtime.NewPoller[IntegrationRuntimesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IntegrationRuntimesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IntegrationRuntimesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IntegrationRuntimesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,18 +162,24 @@ func (client *IntegrationRuntimesClient) BeginDelete(ctx context.Context, resour // // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "IntegrationRuntimesClient.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, integrationRuntimeName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -203,9 +227,14 @@ func (client *IntegrationRuntimesClient) BeginDisableInteractiveQuery(ctx contex if err != nil { return nil, err } - return runtime.NewPoller[IntegrationRuntimesClientDisableInteractiveQueryResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IntegrationRuntimesClientDisableInteractiveQueryResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IntegrationRuntimesClientDisableInteractiveQueryResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IntegrationRuntimesClientDisableInteractiveQueryResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -214,18 +243,24 @@ func (client *IntegrationRuntimesClient) BeginDisableInteractiveQuery(ctx contex // // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimesClient) disableInteractiveQuery(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginDisableInteractiveQueryOptions) (*http.Response, error) { + var err error + const operationName = "IntegrationRuntimesClient.BeginDisableInteractiveQuery" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.disableInteractiveQueryCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // disableInteractiveQueryCreateRequest creates the DisableInteractiveQuery request. @@ -273,9 +308,14 @@ func (client *IntegrationRuntimesClient) BeginEnableInteractiveQuery(ctx context if err != nil { return nil, err } - return runtime.NewPoller[IntegrationRuntimesClientEnableInteractiveQueryResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IntegrationRuntimesClientEnableInteractiveQueryResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IntegrationRuntimesClientEnableInteractiveQueryResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IntegrationRuntimesClientEnableInteractiveQueryResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -284,18 +324,24 @@ func (client *IntegrationRuntimesClient) BeginEnableInteractiveQuery(ctx context // // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimesClient) enableInteractiveQuery(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginEnableInteractiveQueryOptions) (*http.Response, error) { + var err error + const operationName = "IntegrationRuntimesClient.BeginEnableInteractiveQuery" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.enableInteractiveQueryCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // enableInteractiveQueryCreateRequest creates the EnableInteractiveQuery request. @@ -337,18 +383,25 @@ func (client *IntegrationRuntimesClient) enableInteractiveQueryCreateRequest(ctx // - integrationRuntimeName - Integration runtime name // - options - IntegrationRuntimesClientGetOptions contains the optional parameters for the IntegrationRuntimesClient.Get method. func (client *IntegrationRuntimesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientGetOptions) (IntegrationRuntimesClientGetResponse, error) { + var err error + const operationName = "IntegrationRuntimesClient.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, integrationRuntimeName, options) if err != nil { return IntegrationRuntimesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNotModified) { - return IntegrationRuntimesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNotModified) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -406,25 +459,20 @@ func (client *IntegrationRuntimesClient) NewListByWorkspacePager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IntegrationRuntimesClientListByWorkspaceResponse) (IntegrationRuntimesClientListByWorkspaceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IntegrationRuntimesClient.NewListByWorkspacePager") + 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.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) if err != nil { return IntegrationRuntimesClientListByWorkspaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IntegrationRuntimesClientListByWorkspaceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimesClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) - } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -474,18 +522,25 @@ func (client *IntegrationRuntimesClient) listByWorkspaceHandleResponse(resp *htt // - options - IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for // the IntegrationRuntimesClient.ListOutboundNetworkDependenciesEndpoints method. func (client *IntegrationRuntimesClient) ListOutboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsOptions) (IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsResponse, error) { + var err error + const operationName = "IntegrationRuntimesClient.ListOutboundNetworkDependenciesEndpoints" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listOutboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { return IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsResponse{}, err } - return client.listOutboundNetworkDependenciesEndpointsHandleResponse(resp) + resp, err := client.listOutboundNetworkDependenciesEndpointsHandleResponse(httpResp) + return resp, err } // listOutboundNetworkDependenciesEndpointsCreateRequest creates the ListOutboundNetworkDependenciesEndpoints request. @@ -542,11 +597,15 @@ func (client *IntegrationRuntimesClient) BeginStart(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IntegrationRuntimesClientStartResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IntegrationRuntimesClientStartResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IntegrationRuntimesClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IntegrationRuntimesClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -555,18 +614,24 @@ func (client *IntegrationRuntimesClient) BeginStart(ctx context.Context, resourc // // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimesClient) start(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginStartOptions) (*http.Response, error) { + var err error + const operationName = "IntegrationRuntimesClient.BeginStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // startCreateRequest creates the Start request. @@ -614,9 +679,14 @@ func (client *IntegrationRuntimesClient) BeginStop(ctx context.Context, resource if err != nil { return nil, err } - return runtime.NewPoller[IntegrationRuntimesClientStopResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IntegrationRuntimesClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IntegrationRuntimesClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IntegrationRuntimesClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -625,18 +695,24 @@ func (client *IntegrationRuntimesClient) BeginStop(ctx context.Context, resource // // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimesClient) stop(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginStopOptions) (*http.Response, error) { + var err error + const operationName = "IntegrationRuntimesClient.BeginStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // stopCreateRequest creates the Stop request. @@ -680,18 +756,25 @@ func (client *IntegrationRuntimesClient) stopCreateRequest(ctx context.Context, // - options - IntegrationRuntimesClientUpdateOptions contains the optional parameters for the IntegrationRuntimesClient.Update // method. func (client *IntegrationRuntimesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, updateIntegrationRuntimeRequest UpdateIntegrationRuntimeRequest, options *IntegrationRuntimesClientUpdateOptions) (IntegrationRuntimesClientUpdateResponse, error) { + var err error + const operationName = "IntegrationRuntimesClient.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, workspaceName, integrationRuntimeName, updateIntegrationRuntimeRequest, options) if err != nil { return IntegrationRuntimesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -721,7 +804,10 @@ func (client *IntegrationRuntimesClient) updateCreateRequest(ctx context.Context reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, updateIntegrationRuntimeRequest) + if err := runtime.MarshalAsJSON(req, updateIntegrationRuntimeRequest); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -743,16 +829,22 @@ func (client *IntegrationRuntimesClient) updateHandleResponse(resp *http.Respons // - options - IntegrationRuntimesClientUpgradeOptions contains the optional parameters for the IntegrationRuntimesClient.Upgrade // method. func (client *IntegrationRuntimesClient) Upgrade(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientUpgradeOptions) (IntegrationRuntimesClientUpgradeResponse, error) { + var err error + const operationName = "IntegrationRuntimesClient.Upgrade" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.upgradeCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { return IntegrationRuntimesClientUpgradeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimesClientUpgradeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimesClientUpgradeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimesClientUpgradeResponse{}, err } return IntegrationRuntimesClientUpgradeResponse{}, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimestatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimestatus_client.go index 18accfc1..bcfb57b3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimestatus_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/integrationruntimestatus_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type IntegrationRuntimeStatusClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIntegrationRuntimeStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeStatusClient, error) { - cl, err := arm.NewClient(moduleName+".IntegrationRuntimeStatusClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewIntegrationRuntimeStatusClient(subscriptionID string, credential azcore. // - options - IntegrationRuntimeStatusClientGetOptions contains the optional parameters for the IntegrationRuntimeStatusClient.Get // method. func (client *IntegrationRuntimeStatusClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeStatusClientGetOptions) (IntegrationRuntimeStatusClientGetResponse, error) { + var err error + const operationName = "IntegrationRuntimeStatusClient.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, integrationRuntimeName, options) if err != nil { return IntegrationRuntimeStatusClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IntegrationRuntimeStatusClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IntegrationRuntimeStatusClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IntegrationRuntimeStatusClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/interfaces.go new file mode 100644 index 00000000..a7272a8c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/interfaces.go @@ -0,0 +1,81 @@ +//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 armsynapse + +// CustomSetupBaseClassification provides polymorphic access to related types. +// Call the interface's GetCustomSetupBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CmdkeySetup, *ComponentSetup, *CustomSetupBase, *EnvironmentVariableSetup +type CustomSetupBaseClassification interface { + // GetCustomSetupBase returns the CustomSetupBase content of the underlying type. + GetCustomSetupBase() *CustomSetupBase +} + +// DataConnectionClassification provides polymorphic access to related types. +// Call the interface's GetDataConnection() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *DataConnection, *EventGridDataConnection, *EventHubDataConnection, *IotHubDataConnection +type DataConnectionClassification interface { + // GetDataConnection returns the DataConnection content of the underlying type. + GetDataConnection() *DataConnection +} + +// DatabaseClassification provides polymorphic access to related types. +// Call the interface's GetDatabase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *Database, *ReadOnlyFollowingDatabase, *ReadWriteDatabase +type DatabaseClassification interface { + // GetDatabase returns the Database content of the underlying type. + GetDatabase() *Database +} + +// IntegrationRuntimeClassification provides polymorphic access to related types. +// Call the interface's GetIntegrationRuntime() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *IntegrationRuntime, *ManagedIntegrationRuntime, *SelfHostedIntegrationRuntime +type IntegrationRuntimeClassification interface { + // GetIntegrationRuntime returns the IntegrationRuntime content of the underlying type. + GetIntegrationRuntime() *IntegrationRuntime +} + +// IntegrationRuntimeStatusClassification provides polymorphic access to related types. +// Call the interface's GetIntegrationRuntimeStatus() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *IntegrationRuntimeStatus, *ManagedIntegrationRuntimeStatus, *SelfHostedIntegrationRuntimeStatus +type IntegrationRuntimeStatusClassification interface { + // GetIntegrationRuntimeStatus returns the IntegrationRuntimeStatus content of the underlying type. + GetIntegrationRuntimeStatus() *IntegrationRuntimeStatus +} + +// LinkedIntegrationRuntimeTypeClassification provides polymorphic access to related types. +// Call the interface's GetLinkedIntegrationRuntimeType() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *LinkedIntegrationRuntimeKeyAuthorization, *LinkedIntegrationRuntimeRbacAuthorization, *LinkedIntegrationRuntimeType +type LinkedIntegrationRuntimeTypeClassification interface { + // GetLinkedIntegrationRuntimeType returns the LinkedIntegrationRuntimeType content of the underlying type. + GetLinkedIntegrationRuntimeType() *LinkedIntegrationRuntimeType +} + +// SecretBaseClassification provides polymorphic access to related types. +// Call the interface's GetSecretBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *SecretBase, *SecureString +type SecretBaseClassification interface { + // GetSecretBase returns the SecretBase content of the underlying type. + GetSecretBase() *SecretBase +} + +// SsisObjectMetadataClassification provides polymorphic access to related types. +// Call the interface's GetSsisObjectMetadata() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *SsisEnvironment, *SsisFolder, *SsisObjectMetadata, *SsisPackage, *SsisProject +type SsisObjectMetadataClassification interface { + // GetSsisObjectMetadata returns the SsisObjectMetadata content of the underlying type. + GetSsisObjectMetadata() *SsisObjectMetadata +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/ipfirewallrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/ipfirewallrules_client.go index 66404322..df2cb4ed 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/ipfirewallrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/ipfirewallrules_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type IPFirewallRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIPFirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPFirewallRulesClient, error) { - cl, err := arm.NewClient(moduleName+".IPFirewallRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,11 +59,15 @@ func (client *IPFirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPFirewallRulesClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPFirewallRulesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IPFirewallRulesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IPFirewallRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +76,24 @@ func (client *IPFirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, re // // Generated from API version 2021-06-01 func (client *IPFirewallRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, ipFirewallRuleInfo IPFirewallRuleInfo, options *IPFirewallRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "IPFirewallRulesClient.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, ipFirewallRuleInfo, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -114,7 +123,10 @@ func (client *IPFirewallRulesClient) createOrUpdateCreateRequest(ctx context.Con reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, ipFirewallRuleInfo) + if err := runtime.MarshalAsJSON(req, ipFirewallRuleInfo); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a firewall rule @@ -132,11 +144,15 @@ func (client *IPFirewallRulesClient) BeginDelete(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPFirewallRulesClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPFirewallRulesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IPFirewallRulesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IPFirewallRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -145,18 +161,24 @@ func (client *IPFirewallRulesClient) BeginDelete(ctx context.Context, resourceGr // // Generated from API version 2021-06-01 func (client *IPFirewallRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, options *IPFirewallRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "IPFirewallRulesClient.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 } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -198,18 +220,25 @@ func (client *IPFirewallRulesClient) deleteCreateRequest(ctx context.Context, re // - ruleName - The IP firewall rule name // - options - IPFirewallRulesClientGetOptions contains the optional parameters for the IPFirewallRulesClient.Get method. func (client *IPFirewallRulesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, options *IPFirewallRulesClientGetOptions) (IPFirewallRulesClientGetResponse, error) { + var err error + const operationName = "IPFirewallRulesClient.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 IPFirewallRulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IPFirewallRulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPFirewallRulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IPFirewallRulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -264,25 +293,20 @@ func (client *IPFirewallRulesClient) NewListByWorkspacePager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IPFirewallRulesClientListByWorkspaceResponse) (IPFirewallRulesClientListByWorkspaceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IPFirewallRulesClient.NewListByWorkspacePager") + 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.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) if err != nil { return IPFirewallRulesClientListByWorkspaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IPFirewallRulesClientListByWorkspaceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPFirewallRulesClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) - } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -336,11 +360,15 @@ func (client *IPFirewallRulesClient) BeginReplaceAll(ctx context.Context, resour if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPFirewallRulesClientReplaceAllResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPFirewallRulesClientReplaceAllResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[IPFirewallRulesClientReplaceAllResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IPFirewallRulesClientReplaceAllResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -349,18 +377,24 @@ func (client *IPFirewallRulesClient) BeginReplaceAll(ctx context.Context, resour // // Generated from API version 2021-06-01 func (client *IPFirewallRulesClient) replaceAll(ctx context.Context, resourceGroupName string, workspaceName string, request ReplaceAllIPFirewallRulesRequest, options *IPFirewallRulesClientBeginReplaceAllOptions) (*http.Response, error) { + var err error + const operationName = "IPFirewallRulesClient.BeginReplaceAll" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.replaceAllCreateRequest(ctx, resourceGroupName, workspaceName, request, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // replaceAllCreateRequest creates the ReplaceAll request. @@ -386,5 +420,8 @@ func (client *IPFirewallRulesClient) replaceAllCreateRequest(ctx context.Context reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/keys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/keys_client.go index 6eddfa1d..415143e1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/keys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/keys_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type KeysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KeysClient, error) { - cl, err := arm.NewClient(moduleName+".KeysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, opt // - keyProperties - Key put request properties // - options - KeysClientCreateOrUpdateOptions contains the optional parameters for the KeysClient.CreateOrUpdate method. func (client *KeysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, keyName string, keyProperties Key, options *KeysClientCreateOrUpdateOptions) (KeysClientCreateOrUpdateResponse, error) { + var err error + const operationName = "KeysClient.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, workspaceName, keyName, keyProperties, options) if err != nil { return KeysClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KeysClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KeysClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -95,7 +101,10 @@ func (client *KeysClient) createOrUpdateCreateRequest(ctx context.Context, resou reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, keyProperties) + if err := runtime.MarshalAsJSON(req, keyProperties); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -116,18 +125,25 @@ func (client *KeysClient) createOrUpdateHandleResponse(resp *http.Response) (Key // - keyName - The name of the workspace key // - options - KeysClientDeleteOptions contains the optional parameters for the KeysClient.Delete method. func (client *KeysClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, keyName string, options *KeysClientDeleteOptions) (KeysClientDeleteResponse, error) { + var err error + const operationName = "KeysClient.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, workspaceName, keyName, options) if err != nil { return KeysClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return KeysClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return KeysClientDeleteResponse{}, err } - return client.deleteHandleResponse(resp) + resp, err := client.deleteHandleResponse(httpResp) + return resp, err } // deleteCreateRequest creates the Delete request. @@ -178,18 +194,25 @@ func (client *KeysClient) deleteHandleResponse(resp *http.Response) (KeysClientD // - keyName - The name of the workspace key // - options - KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. func (client *KeysClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, keyName string, options *KeysClientGetOptions) (KeysClientGetResponse, error) { + var err error + const operationName = "KeysClient.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, keyName, options) if err != nil { return KeysClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KeysClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KeysClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -244,25 +267,20 @@ func (client *KeysClient) NewListByWorkspacePager(resourceGroupName string, work return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *KeysClientListByWorkspaceResponse) (KeysClientListByWorkspaceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KeysClient.NewListByWorkspacePager") + 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.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) if err != nil { return KeysClientListByWorkspaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return KeysClientListByWorkspaceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KeysClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) - } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustooperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustooperations_client.go index c66a178d..656c5273 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustooperations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustooperations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -28,7 +27,7 @@ type KustoOperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewKustoOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoOperationsClient, error) { - cl, err := arm.NewClient(moduleName+".KustoOperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,25 +48,20 @@ func (client *KustoOperationsClient) NewListPager(options *KustoOperationsClient return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *KustoOperationsClientListResponse) (KustoOperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KustoOperationsClient.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 KustoOperationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return KustoOperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KustoOperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolattacheddatabaseconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolattacheddatabaseconfigurations_client.go index f2e76f6c..76fc36d2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolattacheddatabaseconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolattacheddatabaseconfigurations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type KustoPoolAttachedDatabaseConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewKustoPoolAttachedDatabaseConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolAttachedDatabaseConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".KustoPoolAttachedDatabaseConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,9 +60,14 @@ func (client *KustoPoolAttachedDatabaseConfigurationsClient) BeginCreateOrUpdate if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolAttachedDatabaseConfigurationsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolAttachedDatabaseConfigurationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolAttachedDatabaseConfigurationsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolAttachedDatabaseConfigurationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +76,24 @@ func (client *KustoPoolAttachedDatabaseConfigurationsClient) BeginCreateOrUpdate // // Generated from API version 2021-06-01-preview func (client *KustoPoolAttachedDatabaseConfigurationsClient) createOrUpdate(ctx context.Context, workspaceName string, kustoPoolName string, attachedDatabaseConfigurationName string, resourceGroupName string, parameters AttachedDatabaseConfiguration, options *KustoPoolAttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolAttachedDatabaseConfigurationsClient.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, workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -117,7 +127,10 @@ func (client *KustoPoolAttachedDatabaseConfigurationsClient) createOrUpdateCreat reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the attached database configuration with the given name. @@ -136,9 +149,14 @@ func (client *KustoPoolAttachedDatabaseConfigurationsClient) BeginDelete(ctx con if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolAttachedDatabaseConfigurationsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolAttachedDatabaseConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolAttachedDatabaseConfigurationsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolAttachedDatabaseConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -147,18 +165,24 @@ func (client *KustoPoolAttachedDatabaseConfigurationsClient) BeginDelete(ctx con // // Generated from API version 2021-06-01-preview func (client *KustoPoolAttachedDatabaseConfigurationsClient) deleteOperation(ctx context.Context, workspaceName string, kustoPoolName string, attachedDatabaseConfigurationName string, resourceGroupName string, options *KustoPoolAttachedDatabaseConfigurationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolAttachedDatabaseConfigurationsClient.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, workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -206,18 +230,25 @@ func (client *KustoPoolAttachedDatabaseConfigurationsClient) deleteCreateRequest // - options - KustoPoolAttachedDatabaseConfigurationsClientGetOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.Get // method. func (client *KustoPoolAttachedDatabaseConfigurationsClient) Get(ctx context.Context, workspaceName string, kustoPoolName string, attachedDatabaseConfigurationName string, resourceGroupName string, options *KustoPoolAttachedDatabaseConfigurationsClientGetOptions) (KustoPoolAttachedDatabaseConfigurationsClientGetResponse, error) { + var err error + const operationName = "KustoPoolAttachedDatabaseConfigurationsClient.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, workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, options) if err != nil { return KustoPoolAttachedDatabaseConfigurationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KustoPoolAttachedDatabaseConfigurationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KustoPoolAttachedDatabaseConfigurationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KustoPoolAttachedDatabaseConfigurationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -277,6 +308,7 @@ func (client *KustoPoolAttachedDatabaseConfigurationsClient) NewListByKustoPoolP return false }, Fetcher: func(ctx context.Context, page *KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolResponse) (KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KustoPoolAttachedDatabaseConfigurationsClient.NewListByKustoPoolPager") req, err := client.listByKustoPoolCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, options) if err != nil { return KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolResponse{}, err @@ -290,6 +322,7 @@ func (client *KustoPoolAttachedDatabaseConfigurationsClient) NewListByKustoPoolP } return client.listByKustoPoolHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolchildresource_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolchildresource_client.go index 095b3a6c..2e63778c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolchildresource_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolchildresource_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type KustoPoolChildResourceClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewKustoPoolChildResourceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolChildResourceClient, error) { - cl, err := arm.NewClient(moduleName+".KustoPoolChildResourceClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewKustoPoolChildResourceClient(subscriptionID string, credential azcore.To // - options - KustoPoolChildResourceClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolChildResourceClient.CheckNameAvailability // method. func (client *KustoPoolChildResourceClient) CheckNameAvailability(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, resourceName DatabaseCheckNameRequest, options *KustoPoolChildResourceClientCheckNameAvailabilityOptions) (KustoPoolChildResourceClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "KustoPoolChildResourceClient.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, workspaceName, kustoPoolName, resourceGroupName, resourceName, options) if err != nil { return KustoPoolChildResourceClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KustoPoolChildResourceClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KustoPoolChildResourceClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KustoPoolChildResourceClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -96,7 +102,10 @@ func (client *KustoPoolChildResourceClient) checkNameAvailabilityCreateRequest(c reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resourceName) + if err := runtime.MarshalAsJSON(req, resourceName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopooldatabaseprincipalassignments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopooldatabaseprincipalassignments_client.go index 923a29c6..ed66c43b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopooldatabaseprincipalassignments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopooldatabaseprincipalassignments_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type KustoPoolDatabasePrincipalAssignmentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewKustoPoolDatabasePrincipalAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolDatabasePrincipalAssignmentsClient, error) { - cl, err := arm.NewClient(moduleName+".KustoPoolDatabasePrincipalAssignmentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewKustoPoolDatabasePrincipalAssignmentsClient(subscriptionID string, crede // - options - KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for // the KustoPoolDatabasePrincipalAssignmentsClient.CheckNameAvailability method. func (client *KustoPoolDatabasePrincipalAssignmentsClient) CheckNameAvailability(ctx context.Context, workspaceName string, kustoPoolName string, databaseName string, resourceGroupName string, principalAssignmentName DatabasePrincipalAssignmentCheckNameRequest, options *KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions) (KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "KustoPoolDatabasePrincipalAssignmentsClient.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, workspaceName, kustoPoolName, databaseName, resourceGroupName, principalAssignmentName, options) if err != nil { return KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -101,7 +107,10 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) checkNameAvailability reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, principalAssignmentName) + if err := runtime.MarshalAsJSON(req, principalAssignmentName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -131,9 +140,14 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) BeginCreateOrUpdate(c if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolDatabasePrincipalAssignmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolDatabasePrincipalAssignmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolDatabasePrincipalAssignmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolDatabasePrincipalAssignmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -142,18 +156,24 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) BeginCreateOrUpdate(c // // Generated from API version 2021-06-01-preview func (client *KustoPoolDatabasePrincipalAssignmentsClient) createOrUpdate(ctx context.Context, workspaceName string, kustoPoolName string, databaseName string, principalAssignmentName string, resourceGroupName string, parameters DatabasePrincipalAssignment, options *KustoPoolDatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolDatabasePrincipalAssignmentsClient.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, workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -191,7 +211,10 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) createOrUpdateCreateR reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a Kusto pool principalAssignment. @@ -211,9 +234,14 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) BeginDelete(ctx conte if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolDatabasePrincipalAssignmentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolDatabasePrincipalAssignmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolDatabasePrincipalAssignmentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolDatabasePrincipalAssignmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -222,18 +250,24 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) BeginDelete(ctx conte // // Generated from API version 2021-06-01-preview func (client *KustoPoolDatabasePrincipalAssignmentsClient) deleteOperation(ctx context.Context, workspaceName string, kustoPoolName string, databaseName string, principalAssignmentName string, resourceGroupName string, options *KustoPoolDatabasePrincipalAssignmentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolDatabasePrincipalAssignmentsClient.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, workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -286,18 +320,25 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) deleteCreateRequest(c // - options - KustoPoolDatabasePrincipalAssignmentsClientGetOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.Get // method. func (client *KustoPoolDatabasePrincipalAssignmentsClient) Get(ctx context.Context, workspaceName string, kustoPoolName string, databaseName string, principalAssignmentName string, resourceGroupName string, options *KustoPoolDatabasePrincipalAssignmentsClientGetOptions) (KustoPoolDatabasePrincipalAssignmentsClientGetResponse, error) { + var err error + const operationName = "KustoPoolDatabasePrincipalAssignmentsClient.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, workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, options) if err != nil { return KustoPoolDatabasePrincipalAssignmentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KustoPoolDatabasePrincipalAssignmentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KustoPoolDatabasePrincipalAssignmentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KustoPoolDatabasePrincipalAssignmentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -362,6 +403,7 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) NewListPager(workspac return false }, Fetcher: func(ctx context.Context, page *KustoPoolDatabasePrincipalAssignmentsClientListResponse) (KustoPoolDatabasePrincipalAssignmentsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KustoPoolDatabasePrincipalAssignmentsClient.NewListPager") req, err := client.listCreateRequest(ctx, workspaceName, kustoPoolName, databaseName, resourceGroupName, options) if err != nil { return KustoPoolDatabasePrincipalAssignmentsClientListResponse{}, err @@ -375,6 +417,7 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) NewListPager(workspac } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopooldatabases_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopooldatabases_client.go index bf3a12b8..c1ef2ae5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopooldatabases_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopooldatabases_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type KustoPoolDatabasesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewKustoPoolDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolDatabasesClient, error) { - cl, err := arm.NewClient(moduleName+".KustoPoolDatabasesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,9 +60,14 @@ func (client *KustoPoolDatabasesClient) BeginCreateOrUpdate(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolDatabasesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolDatabasesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolDatabasesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolDatabasesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +76,24 @@ func (client *KustoPoolDatabasesClient) BeginCreateOrUpdate(ctx context.Context, // // Generated from API version 2021-06-01-preview func (client *KustoPoolDatabasesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, parameters DatabaseClassification, options *KustoPoolDatabasesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolDatabasesClient.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, kustoPoolName, databaseName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -117,7 +127,10 @@ func (client *KustoPoolDatabasesClient) createOrUpdateCreateRequest(ctx context. reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the database with the given name. @@ -136,9 +149,14 @@ func (client *KustoPoolDatabasesClient) BeginDelete(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolDatabasesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolDatabasesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolDatabasesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolDatabasesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -147,18 +165,24 @@ func (client *KustoPoolDatabasesClient) BeginDelete(ctx context.Context, resourc // // Generated from API version 2021-06-01-preview func (client *KustoPoolDatabasesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, options *KustoPoolDatabasesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolDatabasesClient.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, kustoPoolName, databaseName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -205,18 +229,25 @@ func (client *KustoPoolDatabasesClient) deleteCreateRequest(ctx context.Context, // - databaseName - The name of the database in the Kusto pool. // - options - KustoPoolDatabasesClientGetOptions contains the optional parameters for the KustoPoolDatabasesClient.Get method. func (client *KustoPoolDatabasesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, options *KustoPoolDatabasesClientGetOptions) (KustoPoolDatabasesClientGetResponse, error) { + var err error + const operationName = "KustoPoolDatabasesClient.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, kustoPoolName, databaseName, options) if err != nil { return KustoPoolDatabasesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KustoPoolDatabasesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KustoPoolDatabasesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KustoPoolDatabasesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -276,6 +307,7 @@ func (client *KustoPoolDatabasesClient) NewListByKustoPoolPager(resourceGroupNam return false }, Fetcher: func(ctx context.Context, page *KustoPoolDatabasesClientListByKustoPoolResponse) (KustoPoolDatabasesClientListByKustoPoolResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KustoPoolDatabasesClient.NewListByKustoPoolPager") req, err := client.listByKustoPoolCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, options) if err != nil { return KustoPoolDatabasesClientListByKustoPoolResponse{}, err @@ -289,6 +321,7 @@ func (client *KustoPoolDatabasesClient) NewListByKustoPoolPager(resourceGroupNam } return client.listByKustoPoolHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -348,9 +381,14 @@ func (client *KustoPoolDatabasesClient) BeginUpdate(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolDatabasesClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolDatabasesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolDatabasesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolDatabasesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -359,18 +397,24 @@ func (client *KustoPoolDatabasesClient) BeginUpdate(ctx context.Context, resourc // // Generated from API version 2021-06-01-preview func (client *KustoPoolDatabasesClient) update(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, parameters DatabaseClassification, options *KustoPoolDatabasesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolDatabasesClient.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, kustoPoolName, databaseName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -404,5 +448,8 @@ func (client *KustoPoolDatabasesClient) updateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + 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/synapse/armsynapse/kustopooldataconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopooldataconnections_client.go index 43a2b71e..318f2777 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopooldataconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopooldataconnections_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type KustoPoolDataConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewKustoPoolDataConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolDataConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".KustoPoolDataConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewKustoPoolDataConnectionsClient(subscriptionID string, credential azcore. // - options - KustoPoolDataConnectionsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolDataConnectionsClient.CheckNameAvailability // method. func (client *KustoPoolDataConnectionsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, dataConnectionName DataConnectionCheckNameRequest, options *KustoPoolDataConnectionsClientCheckNameAvailabilityOptions) (KustoPoolDataConnectionsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "KustoPoolDataConnectionsClient.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, resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, options) if err != nil { return KustoPoolDataConnectionsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KustoPoolDataConnectionsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KustoPoolDataConnectionsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KustoPoolDataConnectionsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -101,7 +107,10 @@ func (client *KustoPoolDataConnectionsClient) checkNameAvailabilityCreateRequest reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, dataConnectionName) + if err := runtime.MarshalAsJSON(req, dataConnectionName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -131,9 +140,14 @@ func (client *KustoPoolDataConnectionsClient) BeginCreateOrUpdate(ctx context.Co if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolDataConnectionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolDataConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolDataConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolDataConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -142,18 +156,24 @@ func (client *KustoPoolDataConnectionsClient) BeginCreateOrUpdate(ctx context.Co // // Generated from API version 2021-06-01-preview func (client *KustoPoolDataConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, dataConnectionName string, parameters DataConnectionClassification, options *KustoPoolDataConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolDataConnectionsClient.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, kustoPoolName, databaseName, dataConnectionName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -191,7 +211,10 @@ func (client *KustoPoolDataConnectionsClient) createOrUpdateCreateRequest(ctx co reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDataConnectionValidation - Checks that the data connection parameters are valid. @@ -211,11 +234,15 @@ func (client *KustoPoolDataConnectionsClient) BeginDataConnectionValidation(ctx if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolDataConnectionsClientDataConnectionValidationResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolDataConnectionsClientDataConnectionValidationResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolDataConnectionsClientDataConnectionValidationResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolDataConnectionsClientDataConnectionValidationResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -224,18 +251,24 @@ func (client *KustoPoolDataConnectionsClient) BeginDataConnectionValidation(ctx // // Generated from API version 2021-06-01-preview func (client *KustoPoolDataConnectionsClient) dataConnectionValidation(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, parameters DataConnectionValidation, options *KustoPoolDataConnectionsClientBeginDataConnectionValidationOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolDataConnectionsClient.BeginDataConnectionValidation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.dataConnectionValidationCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // dataConnectionValidationCreateRequest creates the DataConnectionValidation request. @@ -269,7 +302,10 @@ func (client *KustoPoolDataConnectionsClient) dataConnectionValidationCreateRequ reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the data connection with the given name. @@ -289,9 +325,14 @@ func (client *KustoPoolDataConnectionsClient) BeginDelete(ctx context.Context, r if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolDataConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolDataConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolDataConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolDataConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -300,18 +341,24 @@ func (client *KustoPoolDataConnectionsClient) BeginDelete(ctx context.Context, r // // Generated from API version 2021-06-01-preview func (client *KustoPoolDataConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, dataConnectionName string, options *KustoPoolDataConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolDataConnectionsClient.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, kustoPoolName, databaseName, dataConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -364,18 +411,25 @@ func (client *KustoPoolDataConnectionsClient) deleteCreateRequest(ctx context.Co // - options - KustoPoolDataConnectionsClientGetOptions contains the optional parameters for the KustoPoolDataConnectionsClient.Get // method. func (client *KustoPoolDataConnectionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, dataConnectionName string, options *KustoPoolDataConnectionsClientGetOptions) (KustoPoolDataConnectionsClientGetResponse, error) { + var err error + const operationName = "KustoPoolDataConnectionsClient.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, kustoPoolName, databaseName, dataConnectionName, options) if err != nil { return KustoPoolDataConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KustoPoolDataConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KustoPoolDataConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KustoPoolDataConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -440,6 +494,7 @@ func (client *KustoPoolDataConnectionsClient) NewListByDatabasePager(resourceGro return false }, Fetcher: func(ctx context.Context, page *KustoPoolDataConnectionsClientListByDatabaseResponse) (KustoPoolDataConnectionsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KustoPoolDataConnectionsClient.NewListByDatabasePager") req, err := client.listByDatabaseCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, options) if err != nil { return KustoPoolDataConnectionsClientListByDatabaseResponse{}, err @@ -453,6 +508,7 @@ func (client *KustoPoolDataConnectionsClient) NewListByDatabasePager(resourceGro } return client.listByDatabaseHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -517,9 +573,14 @@ func (client *KustoPoolDataConnectionsClient) BeginUpdate(ctx context.Context, r if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolDataConnectionsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolDataConnectionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolDataConnectionsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolDataConnectionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -528,18 +589,24 @@ func (client *KustoPoolDataConnectionsClient) BeginUpdate(ctx context.Context, r // // Generated from API version 2021-06-01-preview func (client *KustoPoolDataConnectionsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, dataConnectionName string, parameters DataConnectionClassification, options *KustoPoolDataConnectionsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolDataConnectionsClient.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, kustoPoolName, databaseName, dataConnectionName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -577,5 +644,8 @@ func (client *KustoPoolDataConnectionsClient) updateCreateRequest(ctx context.Co reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + 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/synapse/armsynapse/kustopoolprincipalassignments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolprincipalassignments_client.go index 49a4ee3c..1cc4796e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolprincipalassignments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolprincipalassignments_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type KustoPoolPrincipalAssignmentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewKustoPoolPrincipalAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolPrincipalAssignmentsClient, error) { - cl, err := arm.NewClient(moduleName+".KustoPoolPrincipalAssignmentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewKustoPoolPrincipalAssignmentsClient(subscriptionID string, credential az // - options - KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.CheckNameAvailability // method. func (client *KustoPoolPrincipalAssignmentsClient) CheckNameAvailability(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, principalAssignmentName ClusterPrincipalAssignmentCheckNameRequest, options *KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityOptions) (KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "KustoPoolPrincipalAssignmentsClient.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, workspaceName, kustoPoolName, resourceGroupName, principalAssignmentName, options) if err != nil { return KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -96,7 +102,10 @@ func (client *KustoPoolPrincipalAssignmentsClient) checkNameAvailabilityCreateRe reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, principalAssignmentName) + if err := runtime.MarshalAsJSON(req, principalAssignmentName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -125,9 +134,14 @@ func (client *KustoPoolPrincipalAssignmentsClient) BeginCreateOrUpdate(ctx conte if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolPrincipalAssignmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolPrincipalAssignmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolPrincipalAssignmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolPrincipalAssignmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -136,18 +150,24 @@ func (client *KustoPoolPrincipalAssignmentsClient) BeginCreateOrUpdate(ctx conte // // Generated from API version 2021-06-01-preview func (client *KustoPoolPrincipalAssignmentsClient) createOrUpdate(ctx context.Context, workspaceName string, kustoPoolName string, principalAssignmentName string, resourceGroupName string, parameters ClusterPrincipalAssignment, options *KustoPoolPrincipalAssignmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolPrincipalAssignmentsClient.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, workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -181,7 +201,10 @@ func (client *KustoPoolPrincipalAssignmentsClient) createOrUpdateCreateRequest(c reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a Kusto pool principalAssignment. @@ -200,9 +223,14 @@ func (client *KustoPoolPrincipalAssignmentsClient) BeginDelete(ctx context.Conte if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolPrincipalAssignmentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolPrincipalAssignmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolPrincipalAssignmentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolPrincipalAssignmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -211,18 +239,24 @@ func (client *KustoPoolPrincipalAssignmentsClient) BeginDelete(ctx context.Conte // // Generated from API version 2021-06-01-preview func (client *KustoPoolPrincipalAssignmentsClient) deleteOperation(ctx context.Context, workspaceName string, kustoPoolName string, principalAssignmentName string, resourceGroupName string, options *KustoPoolPrincipalAssignmentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolPrincipalAssignmentsClient.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, workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -270,18 +304,25 @@ func (client *KustoPoolPrincipalAssignmentsClient) deleteCreateRequest(ctx conte // - options - KustoPoolPrincipalAssignmentsClientGetOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.Get // method. func (client *KustoPoolPrincipalAssignmentsClient) Get(ctx context.Context, workspaceName string, kustoPoolName string, principalAssignmentName string, resourceGroupName string, options *KustoPoolPrincipalAssignmentsClientGetOptions) (KustoPoolPrincipalAssignmentsClientGetResponse, error) { + var err error + const operationName = "KustoPoolPrincipalAssignmentsClient.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, workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, options) if err != nil { return KustoPoolPrincipalAssignmentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KustoPoolPrincipalAssignmentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KustoPoolPrincipalAssignmentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KustoPoolPrincipalAssignmentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -341,6 +382,7 @@ func (client *KustoPoolPrincipalAssignmentsClient) NewListPager(workspaceName st return false }, Fetcher: func(ctx context.Context, page *KustoPoolPrincipalAssignmentsClientListResponse) (KustoPoolPrincipalAssignmentsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KustoPoolPrincipalAssignmentsClient.NewListPager") req, err := client.listCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, options) if err != nil { return KustoPoolPrincipalAssignmentsClientListResponse{}, err @@ -354,6 +396,7 @@ func (client *KustoPoolPrincipalAssignmentsClient) NewListPager(workspaceName st } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client.go index 4ef75f7b..92176379 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type KustoPoolPrivateLinkResourcesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewKustoPoolPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolPrivateLinkResourcesClient, error) { - cl, err := arm.NewClient(moduleName+".KustoPoolPrivateLinkResourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,6 +57,7 @@ func (client *KustoPoolPrivateLinkResourcesClient) NewListPager(resourceGroupNam return false }, Fetcher: func(ctx context.Context, page *KustoPoolPrivateLinkResourcesClientListResponse) (KustoPoolPrivateLinkResourcesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KustoPoolPrivateLinkResourcesClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, options) if err != nil { return KustoPoolPrivateLinkResourcesClientListResponse{}, err @@ -71,6 +71,7 @@ func (client *KustoPoolPrivateLinkResourcesClient) NewListPager(resourceGroupNam } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopools_client.go index 866dd12a..8952ee8f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopools_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/kustopools_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type KustoPoolsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewKustoPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolsClient, error) { - cl, err := arm.NewClient(moduleName+".KustoPoolsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *KustoPoolsClient) BeginAddLanguageExtensions(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolsClientAddLanguageExtensionsResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolsClientAddLanguageExtensionsResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolsClientAddLanguageExtensionsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolsClientAddLanguageExtensionsResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *KustoPoolsClient) BeginAddLanguageExtensions(ctx context.Context, // // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) addLanguageExtensions(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, languageExtensionsToAdd LanguageExtensionsList, options *KustoPoolsClientBeginAddLanguageExtensionsOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolsClient.BeginAddLanguageExtensions" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.addLanguageExtensionsCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // addLanguageExtensionsCreateRequest creates the AddLanguageExtensions request. @@ -112,7 +122,10 @@ func (client *KustoPoolsClient) addLanguageExtensionsCreateRequest(ctx context.C reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, languageExtensionsToAdd) + if err := runtime.MarshalAsJSON(req, languageExtensionsToAdd); err != nil { + return nil, err + } + return req, nil } // CheckNameAvailability - Checks that the kusto pool name is valid and is not already in use. @@ -124,18 +137,25 @@ func (client *KustoPoolsClient) addLanguageExtensionsCreateRequest(ctx context.C // - options - KustoPoolsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolsClient.CheckNameAvailability // method. func (client *KustoPoolsClient) CheckNameAvailability(ctx context.Context, location string, kustoPoolName KustoPoolCheckNameRequest, options *KustoPoolsClientCheckNameAvailabilityOptions) (KustoPoolsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "KustoPoolsClient.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, location, kustoPoolName, options) if err != nil { return KustoPoolsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KustoPoolsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KustoPoolsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KustoPoolsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -157,7 +177,10 @@ func (client *KustoPoolsClient) checkNameAvailabilityCreateRequest(ctx context.C reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, kustoPoolName) + if err := runtime.MarshalAsJSON(req, kustoPoolName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -185,9 +208,14 @@ func (client *KustoPoolsClient) BeginCreateOrUpdate(ctx context.Context, workspa if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -196,18 +224,24 @@ func (client *KustoPoolsClient) BeginCreateOrUpdate(ctx context.Context, workspa // // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) createOrUpdate(ctx context.Context, workspaceName string, resourceGroupName string, kustoPoolName string, parameters KustoPool, options *KustoPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolsClient.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, workspaceName, resourceGroupName, kustoPoolName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -243,7 +277,10 @@ func (client *KustoPoolsClient) createOrUpdateCreateRequest(ctx context.Context, req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a Kusto pool. @@ -260,9 +297,14 @@ func (client *KustoPoolsClient) BeginDelete(ctx context.Context, workspaceName s if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -271,18 +313,24 @@ func (client *KustoPoolsClient) BeginDelete(ctx context.Context, workspaceName s // // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) deleteOperation(ctx context.Context, workspaceName string, resourceGroupName string, kustoPoolName string, options *KustoPoolsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolsClient.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, workspaceName, resourceGroupName, kustoPoolName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -331,9 +379,14 @@ func (client *KustoPoolsClient) BeginDetachFollowerDatabases(ctx context.Context if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolsClientDetachFollowerDatabasesResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolsClientDetachFollowerDatabasesResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolsClientDetachFollowerDatabasesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolsClientDetachFollowerDatabasesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -342,18 +395,24 @@ func (client *KustoPoolsClient) BeginDetachFollowerDatabases(ctx context.Context // // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) detachFollowerDatabases(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, followerDatabaseToRemove FollowerDatabaseDefinition, options *KustoPoolsClientBeginDetachFollowerDatabasesOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolsClient.BeginDetachFollowerDatabases" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.detachFollowerDatabasesCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // detachFollowerDatabasesCreateRequest creates the DetachFollowerDatabases request. @@ -383,7 +442,10 @@ func (client *KustoPoolsClient) detachFollowerDatabasesCreateRequest(ctx context reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, followerDatabaseToRemove) + if err := runtime.MarshalAsJSON(req, followerDatabaseToRemove); err != nil { + return nil, err + } + return req, nil } // Get - Gets a Kusto pool. @@ -395,18 +457,25 @@ func (client *KustoPoolsClient) detachFollowerDatabasesCreateRequest(ctx context // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - KustoPoolsClientGetOptions contains the optional parameters for the KustoPoolsClient.Get method. func (client *KustoPoolsClient) Get(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, options *KustoPoolsClientGetOptions) (KustoPoolsClientGetResponse, error) { + var err error + const operationName = "KustoPoolsClient.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, workspaceName, kustoPoolName, resourceGroupName, options) if err != nil { return KustoPoolsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KustoPoolsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KustoPoolsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KustoPoolsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -457,18 +526,25 @@ func (client *KustoPoolsClient) getHandleResponse(resp *http.Response) (KustoPoo // - options - KustoPoolsClientListByWorkspaceOptions contains the optional parameters for the KustoPoolsClient.ListByWorkspace // method. func (client *KustoPoolsClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, options *KustoPoolsClientListByWorkspaceOptions) (KustoPoolsClientListByWorkspaceResponse, error) { + var err error + const operationName = "KustoPoolsClient.ListByWorkspace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return KustoPoolsClientListByWorkspaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KustoPoolsClientListByWorkspaceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KustoPoolsClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KustoPoolsClientListByWorkspaceResponse{}, err } - return client.listByWorkspaceHandleResponse(resp) + resp, err := client.listByWorkspaceHandleResponse(httpResp) + return resp, err } // listByWorkspaceCreateRequest creates the ListByWorkspace request. @@ -521,6 +597,7 @@ func (client *KustoPoolsClient) NewListFollowerDatabasesPager(workspaceName stri return false }, Fetcher: func(ctx context.Context, page *KustoPoolsClientListFollowerDatabasesResponse) (KustoPoolsClientListFollowerDatabasesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KustoPoolsClient.NewListFollowerDatabasesPager") req, err := client.listFollowerDatabasesCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, options) if err != nil { return KustoPoolsClientListFollowerDatabasesResponse{}, err @@ -534,6 +611,7 @@ func (client *KustoPoolsClient) NewListFollowerDatabasesPager(workspaceName stri } return client.listFollowerDatabasesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -590,6 +668,7 @@ func (client *KustoPoolsClient) NewListLanguageExtensionsPager(workspaceName str return false }, Fetcher: func(ctx context.Context, page *KustoPoolsClientListLanguageExtensionsResponse) (KustoPoolsClientListLanguageExtensionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KustoPoolsClient.NewListLanguageExtensionsPager") req, err := client.listLanguageExtensionsCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, options) if err != nil { return KustoPoolsClientListLanguageExtensionsResponse{}, err @@ -603,6 +682,7 @@ func (client *KustoPoolsClient) NewListLanguageExtensionsPager(workspaceName str } return client.listLanguageExtensionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -655,6 +735,7 @@ func (client *KustoPoolsClient) NewListSKUsPager(options *KustoPoolsClientListSK return false }, Fetcher: func(ctx context.Context, page *KustoPoolsClientListSKUsResponse) (KustoPoolsClientListSKUsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KustoPoolsClient.NewListSKUsPager") req, err := client.listSKUsCreateRequest(ctx, options) if err != nil { return KustoPoolsClientListSKUsResponse{}, err @@ -668,6 +749,7 @@ func (client *KustoPoolsClient) NewListSKUsPager(options *KustoPoolsClientListSK } return client.listSKUsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -712,6 +794,7 @@ func (client *KustoPoolsClient) NewListSKUsByResourcePager(workspaceName string, return false }, Fetcher: func(ctx context.Context, page *KustoPoolsClientListSKUsByResourceResponse) (KustoPoolsClientListSKUsByResourceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KustoPoolsClient.NewListSKUsByResourcePager") req, err := client.listSKUsByResourceCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, options) if err != nil { return KustoPoolsClientListSKUsByResourceResponse{}, err @@ -725,6 +808,7 @@ func (client *KustoPoolsClient) NewListSKUsByResourcePager(workspaceName string, } return client.listSKUsByResourceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -783,9 +867,14 @@ func (client *KustoPoolsClient) BeginRemoveLanguageExtensions(ctx context.Contex if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolsClientRemoveLanguageExtensionsResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolsClientRemoveLanguageExtensionsResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolsClientRemoveLanguageExtensionsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolsClientRemoveLanguageExtensionsResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -794,18 +883,24 @@ func (client *KustoPoolsClient) BeginRemoveLanguageExtensions(ctx context.Contex // // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) removeLanguageExtensions(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, languageExtensionsToRemove LanguageExtensionsList, options *KustoPoolsClientBeginRemoveLanguageExtensionsOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolsClient.BeginRemoveLanguageExtensions" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.removeLanguageExtensionsCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // removeLanguageExtensionsCreateRequest creates the RemoveLanguageExtensions request. @@ -835,7 +930,10 @@ func (client *KustoPoolsClient) removeLanguageExtensionsCreateRequest(ctx contex reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, languageExtensionsToRemove) + if err := runtime.MarshalAsJSON(req, languageExtensionsToRemove); err != nil { + return nil, err + } + return req, nil } // BeginStart - Starts a Kusto pool. @@ -852,9 +950,14 @@ func (client *KustoPoolsClient) BeginStart(ctx context.Context, workspaceName st if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolsClientStartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolsClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -863,18 +966,24 @@ func (client *KustoPoolsClient) BeginStart(ctx context.Context, workspaceName st // // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) start(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, options *KustoPoolsClientBeginStartOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolsClient.BeginStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // startCreateRequest creates the Start request. @@ -921,9 +1030,14 @@ func (client *KustoPoolsClient) BeginStop(ctx context.Context, workspaceName str if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolsClientStopResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolsClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolsClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolsClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -932,18 +1046,24 @@ func (client *KustoPoolsClient) BeginStop(ctx context.Context, workspaceName str // // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) stop(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, options *KustoPoolsClientBeginStopOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolsClient.BeginStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // stopCreateRequest creates the Stop request. @@ -991,9 +1111,14 @@ func (client *KustoPoolsClient) BeginUpdate(ctx context.Context, workspaceName s if err != nil { return nil, err } - return runtime.NewPoller[KustoPoolsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KustoPoolsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KustoPoolsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KustoPoolsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1002,18 +1127,24 @@ func (client *KustoPoolsClient) BeginUpdate(ctx context.Context, workspaceName s // // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) update(ctx context.Context, workspaceName string, resourceGroupName string, kustoPoolName string, parameters KustoPoolUpdate, options *KustoPoolsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "KustoPoolsClient.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, workspaceName, resourceGroupName, kustoPoolName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -1046,5 +1177,8 @@ func (client *KustoPoolsClient) updateCreateRequest(ctx context.Context, workspa req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + 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/synapse/armsynapse/libraries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/libraries_client.go index d46af92e..3c6072e6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/libraries_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/libraries_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type LibrariesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLibrariesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LibrariesClient, error) { - cl, err := arm.NewClient(moduleName+".LibrariesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,25 +56,20 @@ func (client *LibrariesClient) NewListByWorkspacePager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *LibrariesClientListByWorkspaceResponse) (LibrariesClientListByWorkspaceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LibrariesClient.NewListByWorkspacePager") + 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.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) if err != nil { return LibrariesClientListByWorkspaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return LibrariesClientListByWorkspaceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LibrariesClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) - } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/library_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/library_client.go index f53b1511..e0037d00 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/library_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/library_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type LibraryClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLibraryClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LibraryClient, error) { - cl, err := arm.NewClient(moduleName+".LibraryClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewLibraryClient(subscriptionID string, credential azcore.TokenCredential, // - workspaceName - The name of the workspace. // - options - LibraryClientGetOptions contains the optional parameters for the LibraryClient.Get method. func (client *LibraryClient) Get(ctx context.Context, resourceGroupName string, libraryName string, workspaceName string, options *LibraryClientGetOptions) (LibraryClientGetResponse, error) { + var err error + const operationName = "LibraryClient.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, libraryName, workspaceName, options) if err != nil { return LibraryClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LibraryClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LibraryClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LibraryClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/models.go index 9e563d10..ac0af991 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/models.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -165,25 +164,6 @@ type AzureADOnlyAuthenticationProperties struct { State *StateValue } -// AzureADOnlyAuthenticationsClientBeginCreateOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.BeginCreate -// method. -type AzureADOnlyAuthenticationsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.Get -// method. -type AzureADOnlyAuthenticationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AzureADOnlyAuthenticationsClientListOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.NewListPager -// method. -type AzureADOnlyAuthenticationsClientListOptions struct { - // placeholder for future optional parameters -} - // AzureCapacity - Azure capacity definition. type AzureCapacity struct { // REQUIRED; The default capacity that would be used. @@ -334,37 +314,6 @@ type BigDataPoolResourceProperties struct { LastSucceededTimestamp *time.Time } -// BigDataPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the BigDataPoolsClient.BeginCreateOrUpdate -// method. -type BigDataPoolsClientBeginCreateOrUpdateOptions struct { - // Whether to stop any running jobs in the Big Data pool - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BigDataPoolsClientBeginDeleteOptions contains the optional parameters for the BigDataPoolsClient.BeginDelete method. -type BigDataPoolsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BigDataPoolsClientGetOptions contains the optional parameters for the BigDataPoolsClient.Get method. -type BigDataPoolsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BigDataPoolsClientListByWorkspaceOptions contains the optional parameters for the BigDataPoolsClient.NewListByWorkspacePager -// method. -type BigDataPoolsClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - -// BigDataPoolsClientUpdateOptions contains the optional parameters for the BigDataPoolsClient.Update method. -type BigDataPoolsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // CheckNameAvailabilityRequest - A request about whether a workspace name is available type CheckNameAvailabilityRequest struct { // Workspace name @@ -522,15 +471,6 @@ type CspWorkspaceAdminProperties struct { InitialWorkspaceAdminObjectID *string } -// CustomSetupBaseClassification provides polymorphic access to related types. -// Call the interface's GetCustomSetupBase() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *CmdkeySetup, *ComponentSetup, *CustomSetupBase, *EnvironmentVariableSetup -type CustomSetupBaseClassification interface { - // GetCustomSetupBase returns the CustomSetupBase content of the underlying type. - GetCustomSetupBase() *CustomSetupBase -} - // CustomSetupBase - The base definition of the custom setup. type CustomSetupBase struct { // REQUIRED; The type of custom setup. @@ -552,15 +492,6 @@ type CustomerManagedKeyDetails struct { Status *string } -// DataConnectionClassification provides polymorphic access to related types. -// Call the interface's GetDataConnection() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *DataConnection, *EventGridDataConnection, *EventHubDataConnection, *IotHubDataConnection -type DataConnectionClassification interface { - // GetDataConnection returns the DataConnection content of the underlying type. - GetDataConnection() *DataConnection -} - // DataConnection - Class representing a data connection. type DataConnection struct { // REQUIRED; Kind of the endpoint for the data connection @@ -637,17 +568,6 @@ type DataLakeStorageAccountDetails struct { ResourceID *string } -// 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 -} - type DataMaskingPolicy struct { // The properties of the data masking policy. Properties *DataMaskingPolicyProperties @@ -761,23 +681,6 @@ type DataMaskingRuleProperties struct { ID *string } -// DataMaskingRulesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingRulesClient.CreateOrUpdate -// method. -type DataMaskingRulesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// DataMaskingRulesClientGetOptions contains the optional parameters for the DataMaskingRulesClient.Get method. -type DataMaskingRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// DataMaskingRulesClientListBySQLPoolOptions contains the optional parameters for the DataMaskingRulesClient.NewListBySQLPoolPager -// method. -type DataMaskingRulesClientListBySQLPoolOptions struct { - // placeholder for future optional parameters -} - // DataWarehouseUserActivities - User activities of a data warehouse type DataWarehouseUserActivities struct { // Resource properties. @@ -800,15 +703,6 @@ type DataWarehouseUserActivitiesProperties struct { ActiveQueriesCount *int32 } -// DatabaseClassification provides polymorphic access to related types. -// Call the interface's GetDatabase() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *Database, *ReadOnlyFollowingDatabase, *ReadWriteDatabase -type DatabaseClassification interface { - // GetDatabase returns the Database content of the underlying type. - GetDatabase() *Database -} - // Database - Class representing a Kusto database. type Database struct { // REQUIRED; Kind of the database @@ -1169,11 +1063,11 @@ type EventGridDataConnection struct { // GetDataConnection implements the DataConnectionClassification interface for type EventGridDataConnection. func (e *EventGridDataConnection) GetDataConnection() *DataConnection { return &DataConnection{ - Location: e.Location, - Kind: e.Kind, - SystemData: e.SystemData, ID: e.ID, + Kind: e.Kind, + Location: e.Location, Name: e.Name, + SystemData: e.SystemData, Type: e.Type, } } @@ -1235,33 +1129,15 @@ type EventHubDataConnection struct { // GetDataConnection implements the DataConnectionClassification interface for type EventHubDataConnection. func (e *EventHubDataConnection) GetDataConnection() *DataConnection { return &DataConnection{ - Location: e.Location, - Kind: e.Kind, - SystemData: e.SystemData, ID: e.ID, + Kind: e.Kind, + Location: e.Location, Name: e.Name, + SystemData: e.SystemData, Type: e.Type, } } -// ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.CreateOrUpdate -// method. -type ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ExtendedSQLPoolBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.Get -// method. -type ExtendedSQLPoolBlobAuditingPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager -// method. -type ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions struct { - // placeholder for future optional parameters -} - // ExtendedSQLPoolBlobAuditingPolicy - An extended Sql pool blob auditing policy. type ExtendedSQLPoolBlobAuditingPolicy struct { // Resource properties. @@ -1525,22 +1401,6 @@ type GeoBackupPolicyProperties struct { StorageType *string } -// GetClientIntegrationRuntimeEnableInteractivequeryOptions contains the optional parameters for the GetClient.IntegrationRuntimeEnableInteractivequery -// method. -type GetClientIntegrationRuntimeEnableInteractivequeryOptions struct { - // placeholder for future optional parameters -} - -// GetClientIntegrationRuntimeStartOptions contains the optional parameters for the GetClient.IntegrationRuntimeStart method. -type GetClientIntegrationRuntimeStartOptions struct { - // placeholder for future optional parameters -} - -// GetClientIntegrationRuntimeStopOptions contains the optional parameters for the GetClient.IntegrationRuntimeStop method. -type GetClientIntegrationRuntimeStopOptions struct { - // placeholder for future optional parameters -} - // GetSsisObjectMetadataRequest - The request payload of get SSIS object metadata. type GetSsisObjectMetadataRequest struct { // Metadata path. @@ -1583,46 +1443,6 @@ type IPFirewallRuleProperties struct { ProvisioningState *ProvisioningState } -// IPFirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the IPFirewallRulesClient.BeginCreateOrUpdate -// method. -type IPFirewallRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IPFirewallRulesClientBeginDeleteOptions contains the optional parameters for the IPFirewallRulesClient.BeginDelete method. -type IPFirewallRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IPFirewallRulesClientBeginReplaceAllOptions contains the optional parameters for the IPFirewallRulesClient.BeginReplaceAll -// method. -type IPFirewallRulesClientBeginReplaceAllOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IPFirewallRulesClientGetOptions contains the optional parameters for the IPFirewallRulesClient.Get method. -type IPFirewallRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// IPFirewallRulesClientListByWorkspaceOptions contains the optional parameters for the IPFirewallRulesClient.NewListByWorkspacePager -// method. -type IPFirewallRulesClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - -// IntegrationRuntimeClassification provides polymorphic access to related types. -// Call the interface's GetIntegrationRuntime() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *IntegrationRuntime, *ManagedIntegrationRuntime, *SelfHostedIntegrationRuntime -type IntegrationRuntimeClassification interface { - // GetIntegrationRuntime returns the IntegrationRuntime content of the underlying type. - GetIntegrationRuntime() *IntegrationRuntime -} - // IntegrationRuntime - Azure Synapse nested object which serves as a compute resource for activities. type IntegrationRuntime struct { // REQUIRED; Type of integration runtime. @@ -1647,18 +1467,6 @@ type IntegrationRuntimeAuthKeys struct { AuthKey2 *string } -// IntegrationRuntimeAuthKeysClientListOptions contains the optional parameters for the IntegrationRuntimeAuthKeysClient.List -// method. -type IntegrationRuntimeAuthKeysClientListOptions struct { - // placeholder for future optional parameters -} - -// IntegrationRuntimeAuthKeysClientRegenerateOptions contains the optional parameters for the IntegrationRuntimeAuthKeysClient.Regenerate -// method. -type IntegrationRuntimeAuthKeysClientRegenerateOptions struct { - // placeholder for future optional parameters -} - // IntegrationRuntimeComputeProperties - The compute resource properties for managed integration runtime. type IntegrationRuntimeComputeProperties struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. @@ -1707,18 +1515,6 @@ type IntegrationRuntimeConnectionInfo struct { Version *string } -// IntegrationRuntimeConnectionInfosClientGetOptions contains the optional parameters for the IntegrationRuntimeConnectionInfosClient.Get -// method. -type IntegrationRuntimeConnectionInfosClientGetOptions struct { - // placeholder for future optional parameters -} - -// IntegrationRuntimeCredentialsClientSyncOptions contains the optional parameters for the IntegrationRuntimeCredentialsClient.Sync -// method. -type IntegrationRuntimeCredentialsClientSyncOptions struct { - // placeholder for future optional parameters -} - // IntegrationRuntimeCustomSetupScriptProperties - Custom setup script properties for a managed dedicated integration runtime. type IntegrationRuntimeCustomSetupScriptProperties struct { // The URI of the Azure blob container that contains the custom setup script. @@ -1792,24 +1588,12 @@ type IntegrationRuntimeMonitoringData struct { Nodes []*IntegrationRuntimeNodeMonitoringData } -// IntegrationRuntimeMonitoringDataClientListOptions contains the optional parameters for the IntegrationRuntimeMonitoringDataClient.List -// method. -type IntegrationRuntimeMonitoringDataClientListOptions struct { - // placeholder for future optional parameters -} - // IntegrationRuntimeNodeIPAddress - The IP address of self-hosted integration runtime node. type IntegrationRuntimeNodeIPAddress struct { // READ-ONLY; The IP address of self-hosted integration runtime node. IPAddress *string } -// IntegrationRuntimeNodeIPAddressClientGetOptions contains the optional parameters for the IntegrationRuntimeNodeIPAddressClient.Get -// method. -type IntegrationRuntimeNodeIPAddressClientGetOptions struct { - // placeholder for future optional parameters -} - // IntegrationRuntimeNodeMonitoringData - Monitoring data for integration runtime node. type IntegrationRuntimeNodeMonitoringData struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. @@ -1840,37 +1624,6 @@ type IntegrationRuntimeNodeMonitoringData struct { SentBytes *float32 } -// IntegrationRuntimeNodesClientDeleteOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Delete -// method. -type IntegrationRuntimeNodesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IntegrationRuntimeNodesClientGetOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Get method. -type IntegrationRuntimeNodesClientGetOptions struct { - // placeholder for future optional parameters -} - -// IntegrationRuntimeNodesClientUpdateOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Update -// method. -type IntegrationRuntimeNodesClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// IntegrationRuntimeObjectMetadataClientBeginRefreshOptions contains the optional parameters for the IntegrationRuntimeObjectMetadataClient.BeginRefresh -// method. -type IntegrationRuntimeObjectMetadataClientBeginRefreshOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IntegrationRuntimeObjectMetadataClientListOptions contains the optional parameters for the IntegrationRuntimeObjectMetadataClient.List -// method. -type IntegrationRuntimeObjectMetadataClientListOptions struct { - // The parameters for getting a SSIS object metadata. - GetMetadataRequest *GetSsisObjectMetadataRequest -} - // IntegrationRuntimeOperationStatus - Integration Runtime Operation Status Properties type IntegrationRuntimeOperationStatus struct { // The operation error message. @@ -1986,15 +1739,6 @@ type IntegrationRuntimeSsisProperties struct { LicenseType *IntegrationRuntimeLicenseType } -// IntegrationRuntimeStatusClassification provides polymorphic access to related types. -// Call the interface's GetIntegrationRuntimeStatus() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *IntegrationRuntimeStatus, *ManagedIntegrationRuntimeStatus, *SelfHostedIntegrationRuntimeStatus -type IntegrationRuntimeStatusClassification interface { - // GetIntegrationRuntimeStatus returns the IntegrationRuntimeStatus content of the underlying type. - GetIntegrationRuntimeStatus() *IntegrationRuntimeStatus -} - // IntegrationRuntimeStatus - Integration runtime status. type IntegrationRuntimeStatus struct { // REQUIRED; Type of integration runtime. @@ -2013,11 +1757,6 @@ type IntegrationRuntimeStatus struct { // GetIntegrationRuntimeStatus implements the IntegrationRuntimeStatusClassification interface for type IntegrationRuntimeStatus. func (i *IntegrationRuntimeStatus) GetIntegrationRuntimeStatus() *IntegrationRuntimeStatus { return i } -// IntegrationRuntimeStatusClientGetOptions contains the optional parameters for the IntegrationRuntimeStatusClient.Get method. -type IntegrationRuntimeStatusClientGetOptions struct { - // placeholder for future optional parameters -} - // IntegrationRuntimeStatusResponse - Integration runtime status response. type IntegrationRuntimeStatusResponse struct { // REQUIRED; Integration runtime properties. @@ -2060,80 +1799,6 @@ type IntegrationRuntimeVNetProperties struct { VNetID *string } -// IntegrationRuntimesClientBeginCreateOptions contains the optional parameters for the IntegrationRuntimesClient.BeginCreate -// method. -type IntegrationRuntimesClientBeginCreateOptions struct { - // ETag of the integration runtime entity. Should only be specified for update, for which it should match existing entity - // or can be * for unconditional update. - IfMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IntegrationRuntimesClientBeginDeleteOptions contains the optional parameters for the IntegrationRuntimesClient.BeginDelete -// method. -type IntegrationRuntimesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IntegrationRuntimesClientBeginDisableInteractiveQueryOptions contains the optional parameters for the IntegrationRuntimesClient.BeginDisableInteractiveQuery -// method. -type IntegrationRuntimesClientBeginDisableInteractiveQueryOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IntegrationRuntimesClientBeginEnableInteractiveQueryOptions contains the optional parameters for the IntegrationRuntimesClient.BeginEnableInteractiveQuery -// method. -type IntegrationRuntimesClientBeginEnableInteractiveQueryOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IntegrationRuntimesClientBeginStartOptions contains the optional parameters for the IntegrationRuntimesClient.BeginStart -// method. -type IntegrationRuntimesClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IntegrationRuntimesClientBeginStopOptions contains the optional parameters for the IntegrationRuntimesClient.BeginStop -// method. -type IntegrationRuntimesClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IntegrationRuntimesClientGetOptions contains the optional parameters for the IntegrationRuntimesClient.Get method. -type IntegrationRuntimesClientGetOptions struct { - // ETag of the integration runtime entity. Should only be specified for get. If the ETag matches the existing entity tag, - // or if * was provided, then no content will be returned. - IfNoneMatch *string -} - -// IntegrationRuntimesClientListByWorkspaceOptions contains the optional parameters for the IntegrationRuntimesClient.NewListByWorkspacePager -// method. -type IntegrationRuntimesClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - -// IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the IntegrationRuntimesClient.ListOutboundNetworkDependenciesEndpoints -// method. -type IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsOptions struct { - // placeholder for future optional parameters -} - -// IntegrationRuntimesClientUpdateOptions contains the optional parameters for the IntegrationRuntimesClient.Update method. -type IntegrationRuntimesClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// IntegrationRuntimesClientUpgradeOptions contains the optional parameters for the IntegrationRuntimesClient.Upgrade method. -type IntegrationRuntimesClientUpgradeOptions struct { - // placeholder for future optional parameters -} - // IotHubConnectionProperties - Class representing the Kusto Iot hub connection properties. type IotHubConnectionProperties struct { // REQUIRED; The iot hub consumer group. @@ -2188,11 +1853,11 @@ type IotHubDataConnection struct { // GetDataConnection implements the DataConnectionClassification interface for type IotHubDataConnection. func (i *IotHubDataConnection) GetDataConnection() *DataConnection { return &DataConnection{ - Location: i.Location, - Kind: i.Kind, - SystemData: i.SystemData, ID: i.ID, + Kind: i.Kind, + Location: i.Location, Name: i.Name, + SystemData: i.SystemData, Type: i.Type, } } @@ -2239,31 +1904,6 @@ type KeyProperties struct { KeyVaultURL *string } -// KeysClientCreateOrUpdateOptions contains the optional parameters for the KeysClient.CreateOrUpdate method. -type KeysClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// KeysClientDeleteOptions contains the optional parameters for the KeysClient.Delete method. -type KeysClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. -type KeysClientGetOptions struct { - // placeholder for future optional parameters -} - -// KeysClientListByWorkspaceOptions contains the optional parameters for the KeysClient.NewListByWorkspacePager method. -type KeysClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - -// KustoOperationsClientListOptions contains the optional parameters for the KustoOperationsClient.NewListPager method. -type KustoOperationsClientListOptions struct { - // placeholder for future optional parameters -} - // KustoPool - Class representing a Kusto kusto pool. type KustoPool struct { // REQUIRED; The geo-location where the resource lives @@ -2294,32 +1934,6 @@ type KustoPool struct { Type *string } -// KustoPoolAttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.BeginCreateOrUpdate -// method. -type KustoPoolAttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolAttachedDatabaseConfigurationsClientBeginDeleteOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.BeginDelete -// method. -type KustoPoolAttachedDatabaseConfigurationsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolAttachedDatabaseConfigurationsClientGetOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.Get -// method. -type KustoPoolAttachedDatabaseConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.NewListByKustoPoolPager -// method. -type KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolOptions struct { - // placeholder for future optional parameters -} - // KustoPoolCheckNameRequest - The object sent for a kusto pool check name availability request. type KustoPoolCheckNameRequest struct { // REQUIRED; Kusto Pool name. @@ -2330,159 +1944,12 @@ type KustoPoolCheckNameRequest struct { Type *string } -// KustoPoolChildResourceClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolChildResourceClient.CheckNameAvailability -// method. -type KustoPoolChildResourceClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolDataConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginCreateOrUpdate -// method. -type KustoPoolDataConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolDataConnectionsClientBeginDataConnectionValidationOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginDataConnectionValidation -// method. -type KustoPoolDataConnectionsClientBeginDataConnectionValidationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolDataConnectionsClientBeginDeleteOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginDelete -// method. -type KustoPoolDataConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolDataConnectionsClientBeginUpdateOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginUpdate -// method. -type KustoPoolDataConnectionsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolDataConnectionsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolDataConnectionsClient.CheckNameAvailability -// method. -type KustoPoolDataConnectionsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolDataConnectionsClientGetOptions contains the optional parameters for the KustoPoolDataConnectionsClient.Get method. -type KustoPoolDataConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolDataConnectionsClientListByDatabaseOptions contains the optional parameters for the KustoPoolDataConnectionsClient.NewListByDatabasePager -// method. -type KustoPoolDataConnectionsClientListByDatabaseOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolDatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.BeginCreateOrUpdate -// method. -type KustoPoolDatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolDatabasePrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.BeginDelete -// method. -type KustoPoolDatabasePrincipalAssignmentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.CheckNameAvailability -// method. -type KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolDatabasePrincipalAssignmentsClientGetOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.Get -// method. -type KustoPoolDatabasePrincipalAssignmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolDatabasePrincipalAssignmentsClientListOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.NewListPager -// method. -type KustoPoolDatabasePrincipalAssignmentsClientListOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolDatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolDatabasesClient.BeginCreateOrUpdate -// method. -type KustoPoolDatabasesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolDatabasesClientBeginDeleteOptions contains the optional parameters for the KustoPoolDatabasesClient.BeginDelete -// method. -type KustoPoolDatabasesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolDatabasesClientBeginUpdateOptions contains the optional parameters for the KustoPoolDatabasesClient.BeginUpdate -// method. -type KustoPoolDatabasesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolDatabasesClientGetOptions contains the optional parameters for the KustoPoolDatabasesClient.Get method. -type KustoPoolDatabasesClientGetOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolDatabasesClientListByKustoPoolOptions contains the optional parameters for the KustoPoolDatabasesClient.NewListByKustoPoolPager -// method. -type KustoPoolDatabasesClientListByKustoPoolOptions struct { - // placeholder for future optional parameters -} - // KustoPoolListResult - The list Kusto pools operation response. type KustoPoolListResult struct { // The list of Kusto pools. Value []*KustoPool } -// KustoPoolPrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.BeginCreateOrUpdate -// method. -type KustoPoolPrincipalAssignmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolPrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.BeginDelete -// method. -type KustoPoolPrincipalAssignmentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.CheckNameAvailability -// method. -type KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolPrincipalAssignmentsClientGetOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.Get -// method. -type KustoPoolPrincipalAssignmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolPrincipalAssignmentsClientListOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.NewListPager -// method. -type KustoPoolPrincipalAssignmentsClientListOptions struct { - // placeholder for future optional parameters -} - // KustoPoolPrivateLinkResources - Class representing a Private Link Resources. type KustoPoolPrivateLinkResources struct { // The Private Link Resources. @@ -2501,12 +1968,6 @@ type KustoPoolPrivateLinkResources struct { Type *string } -// KustoPoolPrivateLinkResourcesClientListOptions contains the optional parameters for the KustoPoolPrivateLinkResourcesClient.NewListPager -// method. -type KustoPoolPrivateLinkResourcesClientListOptions struct { - // placeholder for future optional parameters -} - // KustoPoolProperties - Class representing the Kusto pool properties. type KustoPoolProperties struct { // A boolean value that indicates if the purge operations are enabled. @@ -2561,106 +2022,6 @@ type KustoPoolUpdate struct { Type *string } -// KustoPoolsClientBeginAddLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.BeginAddLanguageExtensions -// method. -type KustoPoolsClientBeginAddLanguageExtensionsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolsClient.BeginCreateOrUpdate -// method. -type KustoPoolsClientBeginCreateOrUpdateOptions struct { - // The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify the last-seen ETag value - // to prevent accidentally overwriting concurrent changes. - IfMatch *string - // Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto Pool. Other values will result - // in a 412 Pre-condition Failed response. - IfNoneMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolsClientBeginDeleteOptions contains the optional parameters for the KustoPoolsClient.BeginDelete method. -type KustoPoolsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolsClientBeginDetachFollowerDatabasesOptions contains the optional parameters for the KustoPoolsClient.BeginDetachFollowerDatabases -// method. -type KustoPoolsClientBeginDetachFollowerDatabasesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolsClientBeginRemoveLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.BeginRemoveLanguageExtensions -// method. -type KustoPoolsClientBeginRemoveLanguageExtensionsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolsClientBeginStartOptions contains the optional parameters for the KustoPoolsClient.BeginStart method. -type KustoPoolsClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolsClientBeginStopOptions contains the optional parameters for the KustoPoolsClient.BeginStop method. -type KustoPoolsClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolsClientBeginUpdateOptions contains the optional parameters for the KustoPoolsClient.BeginUpdate method. -type KustoPoolsClientBeginUpdateOptions struct { - // The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify the last-seen ETag value - // to prevent accidentally overwriting concurrent changes. - IfMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KustoPoolsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolsClient.CheckNameAvailability -// method. -type KustoPoolsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolsClientGetOptions contains the optional parameters for the KustoPoolsClient.Get method. -type KustoPoolsClientGetOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolsClientListByWorkspaceOptions contains the optional parameters for the KustoPoolsClient.ListByWorkspace method. -type KustoPoolsClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolsClientListFollowerDatabasesOptions contains the optional parameters for the KustoPoolsClient.NewListFollowerDatabasesPager -// method. -type KustoPoolsClientListFollowerDatabasesOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolsClientListLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.NewListLanguageExtensionsPager -// method. -type KustoPoolsClientListLanguageExtensionsOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolsClientListSKUsByResourceOptions contains the optional parameters for the KustoPoolsClient.NewListSKUsByResourcePager -// method. -type KustoPoolsClientListSKUsByResourceOptions struct { - // placeholder for future optional parameters -} - -// KustoPoolsClientListSKUsOptions contains the optional parameters for the KustoPoolsClient.NewListSKUsPager method. -type KustoPoolsClientListSKUsOptions struct { - // placeholder for future optional parameters -} - // LanguageExtension - The language extension object. type LanguageExtension struct { // The language extension name. @@ -2673,17 +2034,6 @@ type LanguageExtensionsList struct { Value []*LanguageExtension } -// LibrariesClientListByWorkspaceOptions contains the optional parameters for the LibrariesClient.NewListByWorkspacePager -// method. -type LibrariesClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - -// LibraryClientGetOptions contains the optional parameters for the LibraryClient.Get method. -type LibraryClientGetOptions struct { - // placeholder for future optional parameters -} - // LibraryInfo - Library/package information of a Big Data pool powered by Apache Spark type LibraryInfo struct { // Storage blob container name. @@ -2806,15 +2156,6 @@ func (l *LinkedIntegrationRuntimeRbacAuthorization) GetLinkedIntegrationRuntimeT } } -// LinkedIntegrationRuntimeTypeClassification provides polymorphic access to related types. -// Call the interface's GetLinkedIntegrationRuntimeType() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *LinkedIntegrationRuntimeKeyAuthorization, *LinkedIntegrationRuntimeRbacAuthorization, *LinkedIntegrationRuntimeType -type LinkedIntegrationRuntimeTypeClassification interface { - // GetLinkedIntegrationRuntimeType returns the LinkedIntegrationRuntimeType content of the underlying type. - GetLinkedIntegrationRuntimeType() *LinkedIntegrationRuntimeType -} - // LinkedIntegrationRuntimeType - The base definition of a linked integration runtime. type LinkedIntegrationRuntimeType struct { // REQUIRED; The authorization type for integration runtime sharing. @@ -2981,9 +2322,9 @@ type ManagedIntegrationRuntime struct { // GetIntegrationRuntime implements the IntegrationRuntimeClassification interface for type ManagedIntegrationRuntime. func (m *ManagedIntegrationRuntime) GetIntegrationRuntime() *IntegrationRuntime { return &IntegrationRuntime{ - Type: m.Type, - Description: m.Description, AdditionalProperties: m.AdditionalProperties, + Description: m.Description, + Type: m.Type, } } @@ -3077,10 +2418,10 @@ type ManagedIntegrationRuntimeStatus struct { // GetIntegrationRuntimeStatus implements the IntegrationRuntimeStatusClassification interface for type ManagedIntegrationRuntimeStatus. func (m *ManagedIntegrationRuntimeStatus) GetIntegrationRuntimeStatus() *IntegrationRuntimeStatus { return &IntegrationRuntimeStatus{ - Type: m.Type, + AdditionalProperties: m.AdditionalProperties, DataFactoryName: m.DataFactoryName, State: m.State, - AdditionalProperties: m.AdditionalProperties, + Type: m.Type, } } @@ -3286,29 +2627,6 @@ type OperationResource struct { Status *OperationStatus } -// OperationsClientCheckNameAvailabilityOptions contains the optional parameters for the OperationsClient.CheckNameAvailability -// method. -type OperationsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// OperationsClientGetAzureAsyncHeaderResultOptions contains the optional parameters for the OperationsClient.GetAzureAsyncHeaderResult -// method. -type OperationsClientGetAzureAsyncHeaderResultOptions struct { - // placeholder for future optional parameters -} - -// OperationsClientGetLocationHeaderResultOptions contains the optional parameters for the OperationsClient.GetLocationHeaderResult -// method. -type OperationsClientGetLocationHeaderResultOptions struct { - // placeholder for future optional parameters -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // OptimizedAutoscale - A class that contains the optimized auto scale definition. type OptimizedAutoscale struct { // REQUIRED; A boolean value that indicate if the optimized autoscale feature is enabled or not. @@ -3396,44 +2714,6 @@ type PrivateEndpointConnectionProperties struct { ProvisioningState *string } -// PrivateEndpointConnectionsClientBeginCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreate -// method. -type PrivateEndpointConnectionsClientBeginCreateOptions 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 -} - -// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager -// method. -type PrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsPrivateLinkHubClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsPrivateLinkHubClient.Get -// method. -type PrivateEndpointConnectionsPrivateLinkHubClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsPrivateLinkHubClientListOptions contains the optional parameters for the PrivateEndpointConnectionsPrivateLinkHubClient.NewListPager -// method. -type PrivateEndpointConnectionsPrivateLinkHubClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkHub - A privateLinkHub type PrivateLinkHub struct { // REQUIRED; The geo-location where the resource lives @@ -3470,18 +2750,6 @@ type PrivateLinkHubPatchInfo struct { Tags map[string]*string } -// PrivateLinkHubPrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkHubPrivateLinkResourcesClient.Get -// method. -type PrivateLinkHubPrivateLinkResourcesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkHubPrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkHubPrivateLinkResourcesClient.NewListPager -// method. -type PrivateLinkHubPrivateLinkResourcesClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkHubProperties - PrivateLinkHub properties type PrivateLinkHubProperties struct { // PrivateLinkHub provisioning state @@ -3491,39 +2759,6 @@ type PrivateLinkHubProperties struct { PrivateEndpointConnections []*PrivateEndpointConnectionForPrivateLinkHubBasic } -// PrivateLinkHubsClientBeginDeleteOptions contains the optional parameters for the PrivateLinkHubsClient.BeginDelete method. -type PrivateLinkHubsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateLinkHubsClientCreateOrUpdateOptions contains the optional parameters for the PrivateLinkHubsClient.CreateOrUpdate -// method. -type PrivateLinkHubsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkHubsClientGetOptions contains the optional parameters for the PrivateLinkHubsClient.Get method. -type PrivateLinkHubsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkHubsClientListByResourceGroupOptions contains the optional parameters for the PrivateLinkHubsClient.NewListByResourceGroupPager -// method. -type PrivateLinkHubsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkHubsClientListOptions contains the optional parameters for the PrivateLinkHubsClient.NewListPager method. -type PrivateLinkHubsClientListOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkHubsClientUpdateOptions contains the optional parameters for the PrivateLinkHubsClient.Update method. -type PrivateLinkHubsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkResource - A private link resource type PrivateLinkResource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -3566,17 +2801,6 @@ type PrivateLinkResources struct { Value []*KustoPoolPrivateLinkResources } -// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. -type PrivateLinkResourcesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager -// method. -type PrivateLinkResourcesClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkResourcesProperties - Private Link Resources Properties. type PrivateLinkResourcesProperties struct { // READ-ONLY; The Private link resources GroupId @@ -3686,11 +2910,11 @@ type ReadOnlyFollowingDatabase struct { // GetDatabase implements the DatabaseClassification interface for type ReadOnlyFollowingDatabase. func (r *ReadOnlyFollowingDatabase) GetDatabase() *Database { return &Database{ - Location: r.Location, - Kind: r.Kind, - SystemData: r.SystemData, ID: r.ID, + Kind: r.Kind, + Location: r.Location, Name: r.Name, + SystemData: r.SystemData, Type: r.Type, } } @@ -3746,11 +2970,11 @@ type ReadWriteDatabase struct { // GetDatabase implements the DatabaseClassification interface for type ReadWriteDatabase. func (r *ReadWriteDatabase) GetDatabase() *Database { return &Database{ - Location: r.Location, - Kind: r.Kind, - SystemData: r.SystemData, ID: r.ID, + Kind: r.Kind, + Location: r.Location, Name: r.Name, + SystemData: r.SystemData, Type: r.Type, } } @@ -3988,18 +3212,6 @@ type RestorableDroppedSQLPoolProperties struct { ServiceLevelObjective *string } -// RestorableDroppedSQLPoolsClientGetOptions contains the optional parameters for the RestorableDroppedSQLPoolsClient.Get -// method. -type RestorableDroppedSQLPoolsClientGetOptions struct { - // placeholder for future optional parameters -} - -// RestorableDroppedSQLPoolsClientListByWorkspaceOptions contains the optional parameters for the RestorableDroppedSQLPoolsClient.NewListByWorkspacePager -// method. -type RestorableDroppedSQLPoolsClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - // RestorePoint - Database restore points. type RestorePoint struct { // Resource properties. @@ -4115,24 +3327,6 @@ type SQLPool struct { Type *string } -// SQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.CreateOrUpdate -// method. -type SQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolBlobAuditingPoliciesClientGetOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.Get -// method. -type SQLPoolBlobAuditingPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager -// method. -type SQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions struct { - // placeholder for future optional parameters -} - // SQLPoolBlobAuditingPolicy - A Sql pool blob auditing policy. type SQLPoolBlobAuditingPolicy struct { // Resource properties. @@ -4265,17 +3459,6 @@ type SQLPoolColumnProperties struct { IsComputed *bool } -// SQLPoolColumnsClientGetOptions contains the optional parameters for the SQLPoolColumnsClient.Get method. -type SQLPoolColumnsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolConnectionPoliciesClientGetOptions contains the optional parameters for the SQLPoolConnectionPoliciesClient.Get -// method. -type SQLPoolConnectionPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - // SQLPoolConnectionPolicy - A Sql pool connection policy. type SQLPoolConnectionPolicy struct { // Resource properties. @@ -4321,29 +3504,6 @@ type SQLPoolConnectionPolicyProperties struct { Visibility *string } -// SQLPoolDataWarehouseUserActivitiesClientGetOptions contains the optional parameters for the SQLPoolDataWarehouseUserActivitiesClient.Get -// method. -type SQLPoolDataWarehouseUserActivitiesClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolGeoBackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.CreateOrUpdate -// method. -type SQLPoolGeoBackupPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolGeoBackupPoliciesClientGetOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.Get method. -type SQLPoolGeoBackupPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolGeoBackupPoliciesClientListOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.NewListPager -// method. -type SQLPoolGeoBackupPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - // SQLPoolInfoListResult - List of SQL pools type SQLPoolInfoListResult struct { // Link to the next page of results @@ -4353,36 +3513,6 @@ type SQLPoolInfoListResult struct { Value []*SQLPool } -// SQLPoolMaintenanceWindowOptionsClientGetOptions contains the optional parameters for the SQLPoolMaintenanceWindowOptionsClient.Get -// method. -type SQLPoolMaintenanceWindowOptionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolMaintenanceWindowsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolMaintenanceWindowsClient.CreateOrUpdate -// method. -type SQLPoolMaintenanceWindowsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolMaintenanceWindowsClientGetOptions contains the optional parameters for the SQLPoolMaintenanceWindowsClient.Get -// method. -type SQLPoolMaintenanceWindowsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolMetadataSyncConfigsClientCreateOptions contains the optional parameters for the SQLPoolMetadataSyncConfigsClient.Create -// method. -type SQLPoolMetadataSyncConfigsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolMetadataSyncConfigsClientGetOptions contains the optional parameters for the SQLPoolMetadataSyncConfigsClient.Get -// method. -type SQLPoolMetadataSyncConfigsClientGetOptions struct { - // placeholder for future optional parameters -} - // SQLPoolOperation - A Sql pool operation. type SQLPoolOperation struct { // Resource properties. @@ -4443,18 +3573,6 @@ type SQLPoolOperationProperties struct { State *ManagementOperationState } -// SQLPoolOperationResultsClientBeginGetLocationHeaderResultOptions contains the optional parameters for the SQLPoolOperationResultsClient.BeginGetLocationHeaderResult -// method. -type SQLPoolOperationResultsClientBeginGetLocationHeaderResultOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLPoolOperationsClientListOptions contains the optional parameters for the SQLPoolOperationsClient.NewListPager method. -type SQLPoolOperationsClientListOptions struct { - // placeholder for future optional parameters -} - // SQLPoolPatchInfo - A SQL Analytics pool patch info type SQLPoolPatchInfo struct { // The geo-location where the resource lives @@ -4470,24 +3588,6 @@ type SQLPoolPatchInfo struct { Tags map[string]*string } -// SQLPoolRecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the SQLPoolRecommendedSensitivityLabelsClient.Update -// method. -type SQLPoolRecommendedSensitivityLabelsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolReplicationLinksClientGetByNameOptions contains the optional parameters for the SQLPoolReplicationLinksClient.GetByName -// method. -type SQLPoolReplicationLinksClientGetByNameOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolReplicationLinksClientListOptions contains the optional parameters for the SQLPoolReplicationLinksClient.NewListPager -// method. -type SQLPoolReplicationLinksClientListOptions struct { - // placeholder for future optional parameters -} - // SQLPoolResourceProperties - Properties of a SQL Analytics pool type SQLPoolResourceProperties struct { // Collation mode @@ -4533,29 +3633,6 @@ type SQLPoolResourceProperties struct { Status *string } -// SQLPoolRestorePointsClientBeginCreateOptions contains the optional parameters for the SQLPoolRestorePointsClient.BeginCreate -// method. -type SQLPoolRestorePointsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLPoolRestorePointsClientDeleteOptions contains the optional parameters for the SQLPoolRestorePointsClient.Delete method. -type SQLPoolRestorePointsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolRestorePointsClientGetOptions contains the optional parameters for the SQLPoolRestorePointsClient.Get method. -type SQLPoolRestorePointsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolRestorePointsClientListOptions contains the optional parameters for the SQLPoolRestorePointsClient.NewListPager -// method. -type SQLPoolRestorePointsClientListOptions struct { - // placeholder for future optional parameters -} - // SQLPoolSchema - A Sql pool schema resource. type SQLPoolSchema struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -4577,35 +3654,6 @@ type SQLPoolSchemaListResult struct { Value []*SQLPoolSchema } -// SQLPoolSchemasClientGetOptions contains the optional parameters for the SQLPoolSchemasClient.Get method. -type SQLPoolSchemasClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolSchemasClientListOptions contains the optional parameters for the SQLPoolSchemasClient.NewListPager method. -type SQLPoolSchemasClientListOptions struct { - // An OData filter expression that filters elements in the collection. - Filter *string -} - -// SQLPoolSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.CreateOrUpdate -// method. -type SQLPoolSecurityAlertPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolSecurityAlertPoliciesClientGetOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.Get -// method. -type SQLPoolSecurityAlertPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolSecurityAlertPoliciesClientListOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.NewListPager -// method. -type SQLPoolSecurityAlertPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - // SQLPoolSecurityAlertPolicy - A Sql pool security alert policy. type SQLPoolSecurityAlertPolicy struct { // Resource properties. @@ -4621,59 +3669,6 @@ type SQLPoolSecurityAlertPolicy struct { Type *string } -// SQLPoolSensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.CreateOrUpdate -// method. -type SQLPoolSensitivityLabelsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolSensitivityLabelsClientDeleteOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Delete -// method. -type SQLPoolSensitivityLabelsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolSensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.DisableRecommendation -// method. -type SQLPoolSensitivityLabelsClientDisableRecommendationOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolSensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.EnableRecommendation -// method. -type SQLPoolSensitivityLabelsClientEnableRecommendationOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolSensitivityLabelsClientGetOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Get method. -type SQLPoolSensitivityLabelsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolSensitivityLabelsClientListCurrentOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.NewListCurrentPager -// method. -type SQLPoolSensitivityLabelsClientListCurrentOptions struct { - // An OData filter expression that filters elements in the collection. - Filter *string -} - -// SQLPoolSensitivityLabelsClientListRecommendedOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.NewListRecommendedPager -// method. -type SQLPoolSensitivityLabelsClientListRecommendedOptions struct { - // An OData filter expression that filters elements in the collection. - Filter *string - // Specifies whether to include disabled recommendations or not. - IncludeDisabledRecommendations *bool - // An OData query option to indicate how many elements to skip in the collection. - SkipToken *string -} - -// SQLPoolSensitivityLabelsClientUpdateOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Update -// method. -type SQLPoolSensitivityLabelsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // SQLPoolTable - A Sql pool table resource. type SQLPoolTable struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -4686,13 +3681,6 @@ type SQLPoolTable struct { Type *string } -// SQLPoolTableColumnsClientListByTableNameOptions contains the optional parameters for the SQLPoolTableColumnsClient.NewListByTableNamePager -// method. -type SQLPoolTableColumnsClientListByTableNameOptions struct { - // An OData filter expression that filters elements in the collection. - Filter *string -} - // SQLPoolTableListResult - A list of Sql pool tables. type SQLPoolTableListResult struct { // READ-ONLY; Link to retrieve next page of results. @@ -4702,36 +3690,6 @@ type SQLPoolTableListResult struct { Value []*SQLPoolTable } -// SQLPoolTablesClientGetOptions contains the optional parameters for the SQLPoolTablesClient.Get method. -type SQLPoolTablesClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolTablesClientListBySchemaOptions contains the optional parameters for the SQLPoolTablesClient.NewListBySchemaPager -// method. -type SQLPoolTablesClientListBySchemaOptions struct { - // An OData filter expression that filters elements in the collection. - Filter *string -} - -// SQLPoolTransparentDataEncryptionsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.CreateOrUpdate -// method. -type SQLPoolTransparentDataEncryptionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolTransparentDataEncryptionsClientGetOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.Get -// method. -type SQLPoolTransparentDataEncryptionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolTransparentDataEncryptionsClientListOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.NewListPager -// method. -type SQLPoolTransparentDataEncryptionsClientListOptions struct { - // placeholder for future optional parameters -} - // SQLPoolUsage - The Sql pool usages. type SQLPoolUsage struct { // READ-ONLY; The current value of the usage metric. @@ -4765,11 +3723,6 @@ type SQLPoolUsageListResult struct { NextLink *string } -// SQLPoolUsagesClientListOptions contains the optional parameters for the SQLPoolUsagesClient.NewListPager method. -type SQLPoolUsagesClientListOptions struct { - // placeholder for future optional parameters -} - // SQLPoolVulnerabilityAssessment - A Sql pool vulnerability assessment. type SQLPoolVulnerabilityAssessment struct { // Resource properties. @@ -4840,55 +3793,12 @@ type SQLPoolVulnerabilityAssessmentRuleBaselineProperties struct { BaselineResults []*SQLPoolVulnerabilityAssessmentRuleBaselineItem } -// SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate -// method. -type SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentRuleBaselinesClient.Delete -// method. -type SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentRuleBaselinesClient.Get -// method. -type SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetOptions struct { - // placeholder for future optional parameters -} - // SQLPoolVulnerabilityAssessmentScanExportProperties - Properties of the export operation's result. type SQLPoolVulnerabilityAssessmentScanExportProperties 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 } -// SQLPoolVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.BeginInitiateScan -// method. -type SQLPoolVulnerabilityAssessmentScansClientBeginInitiateScanOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLPoolVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.Export -// method. -type SQLPoolVulnerabilityAssessmentScansClientExportOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.Get -// method. -type SQLPoolVulnerabilityAssessmentScansClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolVulnerabilityAssessmentScansClientListOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.NewListPager -// method. -type SQLPoolVulnerabilityAssessmentScansClientListOptions struct { - // placeholder for future optional parameters -} - // SQLPoolVulnerabilityAssessmentScansExport - A Sql pool Vulnerability Assessment scan export resource. type SQLPoolVulnerabilityAssessmentScansExport struct { // Resource properties. @@ -4904,135 +3814,6 @@ type SQLPoolVulnerabilityAssessmentScansExport struct { Type *string } -// SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.CreateOrUpdate -// method. -type SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.Delete -// method. -type SQLPoolVulnerabilityAssessmentsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.Get -// method. -type SQLPoolVulnerabilityAssessmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolVulnerabilityAssessmentsClientListOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.NewListPager -// method. -type SQLPoolVulnerabilityAssessmentsClientListOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolWorkloadClassifierClientBeginCreateOrUpdateOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.BeginCreateOrUpdate -// method. -type SQLPoolWorkloadClassifierClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLPoolWorkloadClassifierClientBeginDeleteOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.BeginDelete -// method. -type SQLPoolWorkloadClassifierClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLPoolWorkloadClassifierClientGetOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.Get -// method. -type SQLPoolWorkloadClassifierClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolWorkloadClassifierClientListOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.NewListPager -// method. -type SQLPoolWorkloadClassifierClientListOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolWorkloadGroupClientBeginCreateOrUpdateOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.BeginCreateOrUpdate -// method. -type SQLPoolWorkloadGroupClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLPoolWorkloadGroupClientBeginDeleteOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.BeginDelete -// method. -type SQLPoolWorkloadGroupClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLPoolWorkloadGroupClientGetOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.Get method. -type SQLPoolWorkloadGroupClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolWorkloadGroupClientListOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.NewListPager -// method. -type SQLPoolWorkloadGroupClientListOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolsClientBeginCreateOptions contains the optional parameters for the SQLPoolsClient.BeginCreate method. -type SQLPoolsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLPoolsClientBeginDeleteOptions contains the optional parameters for the SQLPoolsClient.BeginDelete method. -type SQLPoolsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLPoolsClientBeginPauseOptions contains the optional parameters for the SQLPoolsClient.BeginPause method. -type SQLPoolsClientBeginPauseOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLPoolsClientBeginResumeOptions contains the optional parameters for the SQLPoolsClient.BeginResume method. -type SQLPoolsClientBeginResumeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLPoolsClientBeginUpdateOptions contains the optional parameters for the SQLPoolsClient.BeginUpdate method. -type SQLPoolsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SQLPoolsClientGetOptions contains the optional parameters for the SQLPoolsClient.Get method. -type SQLPoolsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolsClientListByWorkspaceOptions contains the optional parameters for the SQLPoolsClient.NewListByWorkspacePager method. -type SQLPoolsClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - -// SQLPoolsClientRenameOptions contains the optional parameters for the SQLPoolsClient.Rename method. -type SQLPoolsClientRenameOptions struct { - // placeholder for future optional parameters -} - -// SecretBaseClassification provides polymorphic access to related types. -// Call the interface's GetSecretBase() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *SecretBase, *SecureString -type SecretBaseClassification interface { - // GetSecretBase returns the SecretBase content of the underlying type. - GetSecretBase() *SecretBase -} - // SecretBase - The base definition of a secret type. type SecretBase struct { // REQUIRED; Type of the secret. @@ -5108,9 +3889,9 @@ type SelfHostedIntegrationRuntime struct { // GetIntegrationRuntime implements the IntegrationRuntimeClassification interface for type SelfHostedIntegrationRuntime. func (s *SelfHostedIntegrationRuntime) GetIntegrationRuntime() *IntegrationRuntime { return &IntegrationRuntime{ - Type: s.Type, - Description: s.Description, AdditionalProperties: s.AdditionalProperties, + Description: s.Description, + Type: s.Type, } } @@ -5195,10 +3976,10 @@ type SelfHostedIntegrationRuntimeStatus struct { // GetIntegrationRuntimeStatus implements the IntegrationRuntimeStatusClassification interface for type SelfHostedIntegrationRuntimeStatus. func (s *SelfHostedIntegrationRuntimeStatus) GetIntegrationRuntimeStatus() *IntegrationRuntimeStatus { return &IntegrationRuntimeStatus{ - Type: s.Type, + AdditionalProperties: s.AdditionalProperties, DataFactoryName: s.DataFactoryName, State: s.State, - AdditionalProperties: s.AdditionalProperties, + Type: s.Type, } } @@ -5614,11 +4395,6 @@ type SparkConfigProperties struct { Time *time.Time } -// SparkConfigurationClientGetOptions contains the optional parameters for the SparkConfigurationClient.Get method. -type SparkConfigurationClientGetOptions struct { - // placeholder for future optional parameters -} - // SparkConfigurationInfo - SparkConfiguration Artifact information type SparkConfigurationInfo struct { // REQUIRED; SparkConfiguration configs. @@ -5670,12 +4446,6 @@ type SparkConfigurationResource struct { Type *string } -// SparkConfigurationsClientListByWorkspaceOptions contains the optional parameters for the SparkConfigurationsClient.NewListByWorkspacePager -// method. -type SparkConfigurationsClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - // SsisEnvironment - Ssis environment. type SsisEnvironment struct { // REQUIRED; Type of metadata. @@ -5700,10 +4470,10 @@ type SsisEnvironment struct { // GetSsisObjectMetadata implements the SsisObjectMetadataClassification interface for type SsisEnvironment. func (s *SsisEnvironment) GetSsisObjectMetadata() *SsisObjectMetadata { return &SsisObjectMetadata{ - Type: s.Type, + Description: s.Description, ID: s.ID, Name: s.Name, - Description: s.Description, + Type: s.Type, } } @@ -5740,22 +4510,13 @@ type SsisFolder struct { // GetSsisObjectMetadata implements the SsisObjectMetadataClassification interface for type SsisFolder. func (s *SsisFolder) GetSsisObjectMetadata() *SsisObjectMetadata { return &SsisObjectMetadata{ - Type: s.Type, + Description: s.Description, ID: s.ID, Name: s.Name, - Description: s.Description, + Type: s.Type, } } -// SsisObjectMetadataClassification provides polymorphic access to related types. -// Call the interface's GetSsisObjectMetadata() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *SsisEnvironment, *SsisFolder, *SsisObjectMetadata, *SsisPackage, *SsisProject -type SsisObjectMetadataClassification interface { - // GetSsisObjectMetadata returns the SsisObjectMetadata content of the underlying type. - GetSsisObjectMetadata() *SsisObjectMetadata -} - // SsisObjectMetadata - SSIS object metadata. type SsisObjectMetadata struct { // REQUIRED; Type of metadata. @@ -5828,10 +4589,10 @@ type SsisPackage struct { // GetSsisObjectMetadata implements the SsisObjectMetadataClassification interface for type SsisPackage. func (s *SsisPackage) GetSsisObjectMetadata() *SsisObjectMetadata { return &SsisObjectMetadata{ - Type: s.Type, + Description: s.Description, ID: s.ID, Name: s.Name, - Description: s.Description, + Type: s.Type, } } @@ -5904,10 +4665,10 @@ type SsisProject struct { // GetSsisObjectMetadata implements the SsisObjectMetadataClassification interface for type SsisProject. func (s *SsisProject) GetSsisObjectMetadata() *SsisObjectMetadata { return &SsisObjectMetadata{ - Type: s.Type, + Description: s.Description, ID: s.ID, Name: s.Name, - Description: s.Description, + Type: s.Type, } } @@ -6312,25 +5073,6 @@ type WorkspaceAADAdminInfo struct { Type *string } -// WorkspaceAADAdminsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceAADAdminsClient.BeginCreateOrUpdate -// method. -type WorkspaceAADAdminsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspaceAADAdminsClientBeginDeleteOptions contains the optional parameters for the WorkspaceAADAdminsClient.BeginDelete -// method. -type WorkspaceAADAdminsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspaceAADAdminsClientGetOptions contains the optional parameters for the WorkspaceAADAdminsClient.Get method. -type WorkspaceAADAdminsClientGetOptions struct { - // placeholder for future optional parameters -} - // WorkspaceInfoListResult - List of workspaces type WorkspaceInfoListResult struct { // Link to the next page of results @@ -6349,163 +5091,6 @@ type WorkspaceKeyDetails struct { Name *string } -// WorkspaceManagedIdentitySQLControlSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceManagedIdentitySQLControlSettingsClient.BeginCreateOrUpdate -// method. -type WorkspaceManagedIdentitySQLControlSettingsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspaceManagedIdentitySQLControlSettingsClientGetOptions contains the optional parameters for the WorkspaceManagedIdentitySQLControlSettingsClient.Get -// method. -type WorkspaceManagedIdentitySQLControlSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the -// WorkspaceManagedSQLServerBlobAuditingPoliciesClient.BeginCreateOrUpdate method. -type WorkspaceManagedSQLServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerBlobAuditingPoliciesClient.Get -// method. -type WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceOptions contains the optional parameters for the WorkspaceManagedSQLServerBlobAuditingPoliciesClient.NewListByWorkspacePager -// method. -type WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientBeginUpdateOptions contains the optional parameters for the -// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.BeginUpdate method. -type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.Get -// method. -type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.NewListPager -// method. -type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerEncryptionProtectorClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.BeginCreateOrUpdate -// method. -type WorkspaceManagedSQLServerEncryptionProtectorClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspaceManagedSQLServerEncryptionProtectorClientBeginRevalidateOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.BeginRevalidate -// method. -type WorkspaceManagedSQLServerEncryptionProtectorClientBeginRevalidateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspaceManagedSQLServerEncryptionProtectorClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.Get -// method. -type WorkspaceManagedSQLServerEncryptionProtectorClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerEncryptionProtectorClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.NewListPager -// method. -type WorkspaceManagedSQLServerEncryptionProtectorClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters -// for the WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.BeginCreateOrUpdate method. -type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.Get -// method. -type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceOptions contains the optional parameters for -// the WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.NewListByWorkspacePager method. -type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerRecoverableSQLPoolsClient.Get -// method. -type WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerRecoverableSQLPoolsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerRecoverableSQLPoolsClient.NewListPager -// method. -type WorkspaceManagedSQLServerRecoverableSQLPoolsClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerSecurityAlertPolicyClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.BeginCreateOrUpdate -// method. -type WorkspaceManagedSQLServerSecurityAlertPolicyClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspaceManagedSQLServerSecurityAlertPolicyClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.Get -// method. -type WorkspaceManagedSQLServerSecurityAlertPolicyClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerSecurityAlertPolicyClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.NewListPager -// method. -type WorkspaceManagedSQLServerSecurityAlertPolicyClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerUsagesClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerUsagesClient.NewListPager -// method. -type WorkspaceManagedSQLServerUsagesClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.CreateOrUpdate -// method. -type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.Delete -// method. -type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.Get -// method. -type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.NewListPager -// method. -type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListOptions struct { - // placeholder for future optional parameters -} - // WorkspacePatchInfo - Workspace patch details type WorkspacePatchInfo struct { // The identity of the workspace @@ -6641,57 +5226,3 @@ type WorkspaceRepositoryConfiguration struct { // Type of workspace repositoryID configuration. Example WorkspaceVSTSConfiguration, WorkspaceGitHubConfiguration Type *string } - -// WorkspaceSQLAADAdminsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceSQLAADAdminsClient.BeginCreateOrUpdate -// method. -type WorkspaceSQLAADAdminsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspaceSQLAADAdminsClientBeginDeleteOptions contains the optional parameters for the WorkspaceSQLAADAdminsClient.BeginDelete -// method. -type WorkspaceSQLAADAdminsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspaceSQLAADAdminsClientGetOptions contains the optional parameters for the WorkspaceSQLAADAdminsClient.Get method. -type WorkspaceSQLAADAdminsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.BeginCreateOrUpdate -// method. -type WorkspacesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. -type WorkspacesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspacesClientBeginUpdateOptions contains the optional parameters for the WorkspacesClient.BeginUpdate method. -type WorkspacesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. -type WorkspacesClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager -// method. -type WorkspacesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// WorkspacesClientListOptions contains the optional parameters for the WorkspacesClient.NewListPager method. -type WorkspacesClientListOptions struct { - // placeholder for future optional parameters -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/models_serde.go index eb4003f2..3bee2fb8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -398,7 +397,7 @@ func (a *AzureADOnlyAuthenticationListResult) UnmarshalJSON(data []byte) error { func (a AzureADOnlyAuthenticationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "azureADOnlyAuthentication", a.AzureADOnlyAuthentication) - populateTimeRFC3339(objectMap, "creationDate", a.CreationDate) + populateDateTimeRFC3339(objectMap, "creationDate", a.CreationDate) populate(objectMap, "state", a.State) return json.Marshal(objectMap) } @@ -416,7 +415,7 @@ func (a *AzureADOnlyAuthenticationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AzureADOnlyAuthentication", &a.AzureADOnlyAuthentication) delete(rawMsg, key) case "creationDate": - err = unpopulateTimeRFC3339(val, "CreationDate", &a.CreationDate) + err = unpopulateDateTimeRFC3339(val, "CreationDate", &a.CreationDate) delete(rawMsg, key) case "state": err = unpopulate(val, "State", &a.State) @@ -688,13 +687,13 @@ func (b BigDataPoolResourceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "autoPause", b.AutoPause) populate(objectMap, "autoScale", b.AutoScale) populate(objectMap, "cacheSize", b.CacheSize) - populateTimeRFC3339(objectMap, "creationDate", b.CreationDate) + populateDateTimeRFC3339(objectMap, "creationDate", b.CreationDate) populate(objectMap, "customLibraries", b.CustomLibraries) populate(objectMap, "defaultSparkLogFolder", b.DefaultSparkLogFolder) populate(objectMap, "dynamicExecutorAllocation", b.DynamicExecutorAllocation) populate(objectMap, "isAutotuneEnabled", b.IsAutotuneEnabled) populate(objectMap, "isComputeIsolationEnabled", b.IsComputeIsolationEnabled) - populateTimeRFC3339(objectMap, "lastSucceededTimestamp", b.LastSucceededTimestamp) + populateDateTimeRFC3339(objectMap, "lastSucceededTimestamp", b.LastSucceededTimestamp) populate(objectMap, "libraryRequirements", b.LibraryRequirements) populate(objectMap, "nodeCount", b.NodeCount) populate(objectMap, "nodeSize", b.NodeSize) @@ -726,7 +725,7 @@ func (b *BigDataPoolResourceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CacheSize", &b.CacheSize) delete(rawMsg, key) case "creationDate": - err = unpopulateTimeRFC3339(val, "CreationDate", &b.CreationDate) + err = unpopulateDateTimeRFC3339(val, "CreationDate", &b.CreationDate) delete(rawMsg, key) case "customLibraries": err = unpopulate(val, "CustomLibraries", &b.CustomLibraries) @@ -744,7 +743,7 @@ func (b *BigDataPoolResourceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "IsComputeIsolationEnabled", &b.IsComputeIsolationEnabled) delete(rawMsg, key) case "lastSucceededTimestamp": - err = unpopulateTimeRFC3339(val, "LastSucceededTimestamp", &b.LastSucceededTimestamp) + err = unpopulateDateTimeRFC3339(val, "LastSucceededTimestamp", &b.LastSucceededTimestamp) delete(rawMsg, key) case "libraryRequirements": err = unpopulate(val, "LibraryRequirements", &b.LibraryRequirements) @@ -5023,7 +5022,7 @@ func (l LibraryInfo) MarshalJSON() ([]byte, error) { populate(objectMap, "path", l.Path) populate(objectMap, "provisioningStatus", l.ProvisioningStatus) populate(objectMap, "type", l.Type) - populateTimeRFC3339(objectMap, "uploadedTimestamp", l.UploadedTimestamp) + populateDateTimeRFC3339(objectMap, "uploadedTimestamp", l.UploadedTimestamp) return json.Marshal(objectMap) } @@ -5055,7 +5054,7 @@ func (l *LibraryInfo) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Type", &l.Type) delete(rawMsg, key) case "uploadedTimestamp": - err = unpopulateTimeRFC3339(val, "UploadedTimestamp", &l.UploadedTimestamp) + err = unpopulateDateTimeRFC3339(val, "UploadedTimestamp", &l.UploadedTimestamp) delete(rawMsg, key) } if err != nil { @@ -5101,7 +5100,7 @@ func (l LibraryRequirements) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "content", l.Content) populate(objectMap, "filename", l.Filename) - populateTimeRFC3339(objectMap, "time", l.Time) + populateDateTimeRFC3339(objectMap, "time", l.Time) return json.Marshal(objectMap) } @@ -5121,7 +5120,7 @@ func (l *LibraryRequirements) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Filename", &l.Filename) delete(rawMsg, key) case "time": - err = unpopulateTimeRFC3339(val, "Time", &l.Time) + err = unpopulateDateTimeRFC3339(val, "Time", &l.Time) delete(rawMsg, key) } if err != nil { @@ -5208,7 +5207,7 @@ func (l *LicensedComponentSetupTypeProperties) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type LinkedIntegrationRuntime. func (l LinkedIntegrationRuntime) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createTime", l.CreateTime) + populateDateTimeRFC3339(objectMap, "createTime", l.CreateTime) populate(objectMap, "dataFactoryLocation", l.DataFactoryLocation) populate(objectMap, "dataFactoryName", l.DataFactoryName) populate(objectMap, "name", l.Name) @@ -5226,7 +5225,7 @@ func (l *LinkedIntegrationRuntime) UnmarshalJSON(data []byte) error { var err error switch key { case "createTime": - err = unpopulateTimeRFC3339(val, "CreateTime", &l.CreateTime) + err = unpopulateDateTimeRFC3339(val, "CreateTime", &l.CreateTime) delete(rawMsg, key) case "dataFactoryLocation": err = unpopulate(val, "DataFactoryLocation", &l.DataFactoryLocation) @@ -5786,7 +5785,7 @@ func (m ManagedIntegrationRuntimeError) MarshalJSON() ([]byte, error) { populate(objectMap, "code", m.Code) populate(objectMap, "message", m.Message) populate(objectMap, "parameters", m.Parameters) - populateTimeRFC3339(objectMap, "time", m.Time) + populateDateTimeRFC3339(objectMap, "time", m.Time) if m.AdditionalProperties != nil { for key, val := range m.AdditionalProperties { objectMap[key] = val @@ -5814,7 +5813,7 @@ func (m *ManagedIntegrationRuntimeError) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Parameters", &m.Parameters) delete(rawMsg, key) case "time": - err = unpopulateTimeRFC3339(val, "Time", &m.Time) + err = unpopulateDateTimeRFC3339(val, "Time", &m.Time) delete(rawMsg, key) default: if m.AdditionalProperties == nil { @@ -5926,7 +5925,7 @@ func (m ManagedIntegrationRuntimeOperationResult) MarshalJSON() ([]byte, error) populate(objectMap, "errorCode", m.ErrorCode) populate(objectMap, "parameters", m.Parameters) populate(objectMap, "result", m.Result) - populateTimeRFC3339(objectMap, "startTime", m.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", m.StartTime) populate(objectMap, "type", m.Type) if m.AdditionalProperties != nil { for key, val := range m.AdditionalProperties { @@ -5958,7 +5957,7 @@ func (m *ManagedIntegrationRuntimeOperationResult) UnmarshalJSON(data []byte) er err = unpopulate(val, "Result", &m.Result) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &m.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &m.StartTime) delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &m.Type) @@ -6038,7 +6037,7 @@ func (m *ManagedIntegrationRuntimeStatus) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntimeStatusTypeProperties. func (m ManagedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createTime", m.CreateTime) + populateDateTimeRFC3339(objectMap, "createTime", m.CreateTime) populate(objectMap, "lastOperation", m.LastOperation) populate(objectMap, "nodes", m.Nodes) populate(objectMap, "otherErrors", m.OtherErrors) @@ -6055,7 +6054,7 @@ func (m *ManagedIntegrationRuntimeStatusTypeProperties) UnmarshalJSON(data []byt var err error switch key { case "createTime": - err = unpopulateTimeRFC3339(val, "CreateTime", &m.CreateTime) + err = unpopulateDateTimeRFC3339(val, "CreateTime", &m.CreateTime) delete(rawMsg, key) case "lastOperation": err = unpopulate(val, "LastOperation", &m.LastOperation) @@ -6517,13 +6516,13 @@ func (o *OperationMetaServiceSpecification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationResource. func (o OperationResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", o.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", o.EndTime) populate(objectMap, "error", o.Error) populate(objectMap, "id", o.ID) populate(objectMap, "name", o.Name) populate(objectMap, "percentComplete", o.PercentComplete) populateAny(objectMap, "properties", o.Properties) - populateTimeRFC3339(objectMap, "startTime", o.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) populate(objectMap, "status", o.Status) return json.Marshal(objectMap) } @@ -6538,7 +6537,7 @@ func (o *OperationResource) UnmarshalJSON(data []byte) error { var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &o.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &o.Error) @@ -6556,7 +6555,7 @@ func (o *OperationResource) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Properties", &o.Properties) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &o.Status) @@ -7280,7 +7279,7 @@ func (p *PurviewConfiguration) UnmarshalJSON(data []byte) error { func (q QueryInterval) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "executionCount", q.ExecutionCount) - populateTimeRFC3339(objectMap, "intervalStartTime", q.IntervalStartTime) + populateDateTimeRFC3339(objectMap, "intervalStartTime", q.IntervalStartTime) populate(objectMap, "metrics", q.Metrics) return json.Marshal(objectMap) } @@ -7298,7 +7297,7 @@ func (q *QueryInterval) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ExecutionCount", &q.ExecutionCount) delete(rawMsg, key) case "intervalStartTime": - err = unpopulateTimeRFC3339(val, "IntervalStartTime", &q.IntervalStartTime) + err = unpopulateDateTimeRFC3339(val, "IntervalStartTime", &q.IntervalStartTime) delete(rawMsg, key) case "metrics": err = unpopulate(val, "Metrics", &q.Metrics) @@ -7757,7 +7756,7 @@ func (r RecoverableSQLPoolProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "edition", r.Edition) populate(objectMap, "elasticPoolName", r.ElasticPoolName) - populateTimeRFC3339(objectMap, "lastAvailableBackupDate", r.LastAvailableBackupDate) + populateDateTimeRFC3339(objectMap, "lastAvailableBackupDate", r.LastAvailableBackupDate) populate(objectMap, "serviceLevelObjective", r.ServiceLevelObjective) return json.Marshal(objectMap) } @@ -7778,7 +7777,7 @@ func (r *RecoverableSQLPoolProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ElasticPoolName", &r.ElasticPoolName) delete(rawMsg, key) case "lastAvailableBackupDate": - err = unpopulateTimeRFC3339(val, "LastAvailableBackupDate", &r.LastAvailableBackupDate) + err = unpopulateDateTimeRFC3339(val, "LastAvailableBackupDate", &r.LastAvailableBackupDate) delete(rawMsg, key) case "serviceLevelObjective": err = unpopulate(val, "ServiceLevelObjective", &r.ServiceLevelObjective) @@ -7931,7 +7930,7 @@ func (r ReplicationLinkProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "replicationMode", r.ReplicationMode) populate(objectMap, "replicationState", r.ReplicationState) populate(objectMap, "role", r.Role) - populateTimeRFC3339(objectMap, "startTime", r.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", r.StartTime) return json.Marshal(objectMap) } @@ -7972,7 +7971,7 @@ func (r *ReplicationLinkProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Role", &r.Role) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &r.StartTime) delete(rawMsg, key) } if err != nil { @@ -8117,10 +8116,10 @@ func (r *RestorableDroppedSQLPoolListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RestorableDroppedSQLPoolProperties. func (r RestorableDroppedSQLPoolProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationDate", r.CreationDate) + populateDateTimeRFC3339(objectMap, "creationDate", r.CreationDate) populate(objectMap, "databaseName", r.DatabaseName) - populateTimeRFC3339(objectMap, "deletionDate", r.DeletionDate) - populateTimeRFC3339(objectMap, "earliestRestoreDate", r.EarliestRestoreDate) + populateDateTimeRFC3339(objectMap, "deletionDate", r.DeletionDate) + populateDateTimeRFC3339(objectMap, "earliestRestoreDate", r.EarliestRestoreDate) populate(objectMap, "edition", r.Edition) populate(objectMap, "elasticPoolName", r.ElasticPoolName) populate(objectMap, "maxSizeBytes", r.MaxSizeBytes) @@ -8138,16 +8137,16 @@ func (r *RestorableDroppedSQLPoolProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationDate": - err = unpopulateTimeRFC3339(val, "CreationDate", &r.CreationDate) + err = unpopulateDateTimeRFC3339(val, "CreationDate", &r.CreationDate) delete(rawMsg, key) case "databaseName": err = unpopulate(val, "DatabaseName", &r.DatabaseName) delete(rawMsg, key) case "deletionDate": - err = unpopulateTimeRFC3339(val, "DeletionDate", &r.DeletionDate) + err = unpopulateDateTimeRFC3339(val, "DeletionDate", &r.DeletionDate) delete(rawMsg, key) case "earliestRestoreDate": - err = unpopulateTimeRFC3339(val, "EarliestRestoreDate", &r.EarliestRestoreDate) + err = unpopulateDateTimeRFC3339(val, "EarliestRestoreDate", &r.EarliestRestoreDate) delete(rawMsg, key) case "edition": err = unpopulate(val, "Edition", &r.Edition) @@ -8246,8 +8245,8 @@ func (r *RestorePointListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RestorePointProperties. func (r RestorePointProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "earliestRestoreDate", r.EarliestRestoreDate) - populateTimeRFC3339(objectMap, "restorePointCreationDate", r.RestorePointCreationDate) + populateDateTimeRFC3339(objectMap, "earliestRestoreDate", r.EarliestRestoreDate) + populateDateTimeRFC3339(objectMap, "restorePointCreationDate", r.RestorePointCreationDate) populate(objectMap, "restorePointLabel", r.RestorePointLabel) populate(objectMap, "restorePointType", r.RestorePointType) return json.Marshal(objectMap) @@ -8263,10 +8262,10 @@ func (r *RestorePointProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "earliestRestoreDate": - err = unpopulateTimeRFC3339(val, "EarliestRestoreDate", &r.EarliestRestoreDate) + err = unpopulateDateTimeRFC3339(val, "EarliestRestoreDate", &r.EarliestRestoreDate) delete(rawMsg, key) case "restorePointCreationDate": - err = unpopulateTimeRFC3339(val, "RestorePointCreationDate", &r.RestorePointCreationDate) + err = unpopulateDateTimeRFC3339(val, "RestorePointCreationDate", &r.RestorePointCreationDate) delete(rawMsg, key) case "restorePointLabel": err = unpopulate(val, "RestorePointLabel", &r.RestorePointLabel) @@ -8910,14 +8909,14 @@ func (s SQLPoolOperationProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "errorCode", s.ErrorCode) populate(objectMap, "errorDescription", s.ErrorDescription) populate(objectMap, "errorSeverity", s.ErrorSeverity) - populateTimeRFC3339(objectMap, "estimatedCompletionTime", s.EstimatedCompletionTime) + 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) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) populate(objectMap, "state", s.State) return json.Marshal(objectMap) } @@ -8947,7 +8946,7 @@ func (s *SQLPoolOperationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ErrorSeverity", &s.ErrorSeverity) delete(rawMsg, key) case "estimatedCompletionTime": - err = unpopulateTimeRFC3339(val, "EstimatedCompletionTime", &s.EstimatedCompletionTime) + err = unpopulateDateTimeRFC3339(val, "EstimatedCompletionTime", &s.EstimatedCompletionTime) delete(rawMsg, key) case "isCancellable": err = unpopulate(val, "IsCancellable", &s.IsCancellable) @@ -8968,7 +8967,7 @@ func (s *SQLPoolOperationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ServerName", &s.ServerName) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) delete(rawMsg, key) case "state": err = unpopulate(val, "State", &s.State) @@ -9025,12 +9024,12 @@ func (s SQLPoolResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "collation", s.Collation) populate(objectMap, "createMode", s.CreateMode) - populateTimeRFC3339(objectMap, "creationDate", s.CreationDate) + populateDateTimeRFC3339(objectMap, "creationDate", s.CreationDate) populate(objectMap, "maxSizeBytes", s.MaxSizeBytes) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "recoverableDatabaseId", s.RecoverableDatabaseID) - populateTimeRFC3339(objectMap, "restorePointInTime", s.RestorePointInTime) - populateTimeRFC3339(objectMap, "sourceDatabaseDeletionDate", s.SourceDatabaseDeletionDate) + populateDateTimeRFC3339(objectMap, "restorePointInTime", s.RestorePointInTime) + populateDateTimeRFC3339(objectMap, "sourceDatabaseDeletionDate", s.SourceDatabaseDeletionDate) populate(objectMap, "sourceDatabaseId", s.SourceDatabaseID) populate(objectMap, "status", s.Status) populate(objectMap, "storageAccountType", s.StorageAccountType) @@ -9053,7 +9052,7 @@ func (s *SQLPoolResourceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreateMode", &s.CreateMode) delete(rawMsg, key) case "creationDate": - err = unpopulateTimeRFC3339(val, "CreationDate", &s.CreationDate) + err = unpopulateDateTimeRFC3339(val, "CreationDate", &s.CreationDate) delete(rawMsg, key) case "maxSizeBytes": err = unpopulate(val, "MaxSizeBytes", &s.MaxSizeBytes) @@ -9065,10 +9064,10 @@ func (s *SQLPoolResourceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "RecoverableDatabaseID", &s.RecoverableDatabaseID) delete(rawMsg, key) case "restorePointInTime": - err = unpopulateTimeRFC3339(val, "RestorePointInTime", &s.RestorePointInTime) + err = unpopulateDateTimeRFC3339(val, "RestorePointInTime", &s.RestorePointInTime) delete(rawMsg, key) case "sourceDatabaseDeletionDate": - err = unpopulateTimeRFC3339(val, "SourceDatabaseDeletionDate", &s.SourceDatabaseDeletionDate) + err = unpopulateDateTimeRFC3339(val, "SourceDatabaseDeletionDate", &s.SourceDatabaseDeletionDate) delete(rawMsg, key) case "sourceDatabaseId": err = unpopulate(val, "SourceDatabaseID", &s.SourceDatabaseID) @@ -9265,7 +9264,7 @@ func (s SQLPoolUsage) MarshalJSON() ([]byte, error) { populate(objectMap, "displayName", s.DisplayName) populate(objectMap, "limit", s.Limit) populate(objectMap, "name", s.Name) - populateTimeRFC3339(objectMap, "nextResetTime", s.NextResetTime) + populateDateTimeRFC3339(objectMap, "nextResetTime", s.NextResetTime) populate(objectMap, "resourceName", s.ResourceName) populate(objectMap, "unit", s.Unit) return json.Marshal(objectMap) @@ -9293,7 +9292,7 @@ func (s *SQLPoolUsage) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) case "nextResetTime": - err = unpopulateTimeRFC3339(val, "NextResetTime", &s.NextResetTime) + err = unpopulateDateTimeRFC3339(val, "NextResetTime", &s.NextResetTime) delete(rawMsg, key) case "resourceName": err = unpopulate(val, "ResourceName", &s.ResourceName) @@ -9669,7 +9668,7 @@ func (s *SecureString) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityAlertPolicyProperties. func (s SecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", s.CreationTime) populate(objectMap, "disabledAlerts", s.DisabledAlerts) populate(objectMap, "emailAccountAdmins", s.EmailAccountAdmins) populate(objectMap, "emailAddresses", s.EmailAddresses) @@ -9690,7 +9689,7 @@ func (s *SecurityAlertPolicyProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &s.CreationTime) delete(rawMsg, key) case "disabledAlerts": err = unpopulate(val, "DisabledAlerts", &s.DisabledAlerts) @@ -9776,19 +9775,19 @@ func (s SelfHostedIntegrationRuntimeNode) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "capabilities", s.Capabilities) populate(objectMap, "concurrentJobsLimit", s.ConcurrentJobsLimit) - populateTimeRFC3339(objectMap, "expiryTime", s.ExpiryTime) + populateDateTimeRFC3339(objectMap, "expiryTime", s.ExpiryTime) populate(objectMap, "hostServiceUri", s.HostServiceURI) populate(objectMap, "isActiveDispatcher", s.IsActiveDispatcher) - populateTimeRFC3339(objectMap, "lastConnectTime", s.LastConnectTime) - populateTimeRFC3339(objectMap, "lastEndUpdateTime", s.LastEndUpdateTime) - populateTimeRFC3339(objectMap, "lastStartTime", s.LastStartTime) - populateTimeRFC3339(objectMap, "lastStartUpdateTime", s.LastStartUpdateTime) - populateTimeRFC3339(objectMap, "lastStopTime", s.LastStopTime) + populateDateTimeRFC3339(objectMap, "lastConnectTime", s.LastConnectTime) + populateDateTimeRFC3339(objectMap, "lastEndUpdateTime", s.LastEndUpdateTime) + populateDateTimeRFC3339(objectMap, "lastStartTime", s.LastStartTime) + populateDateTimeRFC3339(objectMap, "lastStartUpdateTime", s.LastStartUpdateTime) + populateDateTimeRFC3339(objectMap, "lastStopTime", s.LastStopTime) populate(objectMap, "lastUpdateResult", s.LastUpdateResult) populate(objectMap, "machineName", s.MachineName) populate(objectMap, "maxConcurrentJobs", s.MaxConcurrentJobs) populate(objectMap, "nodeName", s.NodeName) - populateTimeRFC3339(objectMap, "registerTime", s.RegisterTime) + populateDateTimeRFC3339(objectMap, "registerTime", s.RegisterTime) populate(objectMap, "status", s.Status) populate(objectMap, "version", s.Version) populate(objectMap, "versionStatus", s.VersionStatus) @@ -9816,7 +9815,7 @@ func (s *SelfHostedIntegrationRuntimeNode) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ConcurrentJobsLimit", &s.ConcurrentJobsLimit) delete(rawMsg, key) case "expiryTime": - err = unpopulateTimeRFC3339(val, "ExpiryTime", &s.ExpiryTime) + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &s.ExpiryTime) delete(rawMsg, key) case "hostServiceUri": err = unpopulate(val, "HostServiceURI", &s.HostServiceURI) @@ -9825,19 +9824,19 @@ func (s *SelfHostedIntegrationRuntimeNode) UnmarshalJSON(data []byte) error { err = unpopulate(val, "IsActiveDispatcher", &s.IsActiveDispatcher) delete(rawMsg, key) case "lastConnectTime": - err = unpopulateTimeRFC3339(val, "LastConnectTime", &s.LastConnectTime) + err = unpopulateDateTimeRFC3339(val, "LastConnectTime", &s.LastConnectTime) delete(rawMsg, key) case "lastEndUpdateTime": - err = unpopulateTimeRFC3339(val, "LastEndUpdateTime", &s.LastEndUpdateTime) + err = unpopulateDateTimeRFC3339(val, "LastEndUpdateTime", &s.LastEndUpdateTime) delete(rawMsg, key) case "lastStartTime": - err = unpopulateTimeRFC3339(val, "LastStartTime", &s.LastStartTime) + err = unpopulateDateTimeRFC3339(val, "LastStartTime", &s.LastStartTime) delete(rawMsg, key) case "lastStartUpdateTime": - err = unpopulateTimeRFC3339(val, "LastStartUpdateTime", &s.LastStartUpdateTime) + err = unpopulateDateTimeRFC3339(val, "LastStartUpdateTime", &s.LastStartUpdateTime) delete(rawMsg, key) case "lastStopTime": - err = unpopulateTimeRFC3339(val, "LastStopTime", &s.LastStopTime) + err = unpopulateDateTimeRFC3339(val, "LastStopTime", &s.LastStopTime) delete(rawMsg, key) case "lastUpdateResult": err = unpopulate(val, "LastUpdateResult", &s.LastUpdateResult) @@ -9852,7 +9851,7 @@ func (s *SelfHostedIntegrationRuntimeNode) UnmarshalJSON(data []byte) error { err = unpopulate(val, "NodeName", &s.NodeName) delete(rawMsg, key) case "registerTime": - err = unpopulateTimeRFC3339(val, "RegisterTime", &s.RegisterTime) + err = unpopulateDateTimeRFC3339(val, "RegisterTime", &s.RegisterTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &s.Status) @@ -9939,9 +9938,9 @@ func (s *SelfHostedIntegrationRuntimeStatus) UnmarshalJSON(data []byte) error { func (s SelfHostedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "autoUpdate", s.AutoUpdate) - populateTimeRFC3339(objectMap, "autoUpdateETA", s.AutoUpdateETA) + populateDateTimeRFC3339(objectMap, "autoUpdateETA", s.AutoUpdateETA) populate(objectMap, "capabilities", s.Capabilities) - populateTimeRFC3339(objectMap, "createTime", s.CreateTime) + populateDateTimeRFC3339(objectMap, "createTime", s.CreateTime) populate(objectMap, "internalChannelEncryption", s.InternalChannelEncryption) populate(objectMap, "latestVersion", s.LatestVersion) populate(objectMap, "links", s.Links) @@ -9950,7 +9949,7 @@ func (s SelfHostedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, populate(objectMap, "nodeCommunicationChannelEncryptionMode", s.NodeCommunicationChannelEncryptionMode) populate(objectMap, "nodes", s.Nodes) populate(objectMap, "pushedVersion", s.PushedVersion) - populateTimeRFC3339(objectMap, "scheduledUpdateDate", s.ScheduledUpdateDate) + populateDateTimeRFC3339(objectMap, "scheduledUpdateDate", s.ScheduledUpdateDate) populate(objectMap, "serviceRegion", s.ServiceRegion) populate(objectMap, "serviceUrls", s.ServiceUrls) populate(objectMap, "taskQueueId", s.TaskQueueID) @@ -9973,13 +9972,13 @@ func (s *SelfHostedIntegrationRuntimeStatusTypeProperties) UnmarshalJSON(data [] err = unpopulate(val, "AutoUpdate", &s.AutoUpdate) delete(rawMsg, key) case "autoUpdateETA": - err = unpopulateTimeRFC3339(val, "AutoUpdateETA", &s.AutoUpdateETA) + err = unpopulateDateTimeRFC3339(val, "AutoUpdateETA", &s.AutoUpdateETA) delete(rawMsg, key) case "capabilities": err = unpopulate(val, "Capabilities", &s.Capabilities) delete(rawMsg, key) case "createTime": - err = unpopulateTimeRFC3339(val, "CreateTime", &s.CreateTime) + err = unpopulateDateTimeRFC3339(val, "CreateTime", &s.CreateTime) delete(rawMsg, key) case "internalChannelEncryption": err = unpopulate(val, "InternalChannelEncryption", &s.InternalChannelEncryption) @@ -10006,7 +10005,7 @@ func (s *SelfHostedIntegrationRuntimeStatusTypeProperties) UnmarshalJSON(data [] err = unpopulate(val, "PushedVersion", &s.PushedVersion) delete(rawMsg, key) case "scheduledUpdateDate": - err = unpopulateTimeRFC3339(val, "ScheduledUpdateDate", &s.ScheduledUpdateDate) + err = unpopulateDateTimeRFC3339(val, "ScheduledUpdateDate", &s.ScheduledUpdateDate) delete(rawMsg, key) case "serviceRegion": err = unpopulate(val, "ServiceRegion", &s.ServiceRegion) @@ -10509,7 +10508,7 @@ func (s *ServerSecurityAlertPolicyListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServerSecurityAlertPolicyProperties. func (s ServerSecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", s.CreationTime) populate(objectMap, "disabledAlerts", s.DisabledAlerts) populate(objectMap, "emailAccountAdmins", s.EmailAccountAdmins) populate(objectMap, "emailAddresses", s.EmailAddresses) @@ -10530,7 +10529,7 @@ func (s *ServerSecurityAlertPolicyProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &s.CreationTime) delete(rawMsg, key) case "disabledAlerts": err = unpopulate(val, "DisabledAlerts", &s.DisabledAlerts) @@ -10568,7 +10567,7 @@ func (s ServerUsage) MarshalJSON() ([]byte, error) { populate(objectMap, "displayName", s.DisplayName) populate(objectMap, "limit", s.Limit) populate(objectMap, "name", s.Name) - populateTimeRFC3339(objectMap, "nextResetTime", s.NextResetTime) + populateDateTimeRFC3339(objectMap, "nextResetTime", s.NextResetTime) populate(objectMap, "resourceName", s.ResourceName) populate(objectMap, "unit", s.Unit) return json.Marshal(objectMap) @@ -10596,7 +10595,7 @@ func (s *ServerUsage) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) case "nextResetTime": - err = unpopulateTimeRFC3339(val, "NextResetTime", &s.NextResetTime) + err = unpopulateDateTimeRFC3339(val, "NextResetTime", &s.NextResetTime) delete(rawMsg, key) case "resourceName": err = unpopulate(val, "ResourceName", &s.ResourceName) @@ -10758,7 +10757,7 @@ func (s SparkConfigProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "configurationType", s.ConfigurationType) populate(objectMap, "content", s.Content) populate(objectMap, "filename", s.Filename) - populateTimeRFC3339(objectMap, "time", s.Time) + populateDateTimeRFC3339(objectMap, "time", s.Time) return json.Marshal(objectMap) } @@ -10781,7 +10780,7 @@ func (s *SparkConfigProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Filename", &s.Filename) delete(rawMsg, key) case "time": - err = unpopulateTimeRFC3339(val, "Time", &s.Time) + err = unpopulateDateTimeRFC3339(val, "Time", &s.Time) delete(rawMsg, key) } if err != nil { @@ -10797,7 +10796,7 @@ func (s SparkConfigurationInfo) MarshalJSON() ([]byte, error) { populate(objectMap, "annotations", s.Annotations) populate(objectMap, "configMergeRule", s.ConfigMergeRule) populate(objectMap, "configs", s.Configs) - populateTimeRFC3339(objectMap, "created", s.Created) + populateDateTimeRFC3339(objectMap, "created", s.Created) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "description", s.Description) populate(objectMap, "notes", s.Notes) @@ -10823,7 +10822,7 @@ func (s *SparkConfigurationInfo) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Configs", &s.Configs) delete(rawMsg, key) case "created": - err = unpopulateTimeRFC3339(val, "Created", &s.Created) + err = unpopulateDateTimeRFC3339(val, "Created", &s.Created) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -11424,10 +11423,10 @@ func (s *SubResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -11443,7 +11442,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -11452,7 +11451,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) @@ -11522,8 +11521,8 @@ func (t TopQueries) MarshalJSON() ([]byte, error) { populate(objectMap, "executionType", t.ExecutionType) populate(objectMap, "intervalType", t.IntervalType) populate(objectMap, "numberOfTopQueries", t.NumberOfTopQueries) - populateTimeRFC3339(objectMap, "observationEndTime", t.ObservationEndTime) - populateTimeRFC3339(objectMap, "observationStartTime", t.ObservationStartTime) + populateDateTimeRFC3339(objectMap, "observationEndTime", t.ObservationEndTime) + populateDateTimeRFC3339(objectMap, "observationStartTime", t.ObservationStartTime) populate(objectMap, "observedMetric", t.ObservedMetric) populate(objectMap, "queries", t.Queries) return json.Marshal(objectMap) @@ -11551,10 +11550,10 @@ func (t *TopQueries) UnmarshalJSON(data []byte) error { err = unpopulate(val, "NumberOfTopQueries", &t.NumberOfTopQueries) delete(rawMsg, key) case "observationEndTime": - err = unpopulateTimeRFC3339(val, "ObservationEndTime", &t.ObservationEndTime) + err = unpopulateDateTimeRFC3339(val, "ObservationEndTime", &t.ObservationEndTime) delete(rawMsg, key) case "observationStartTime": - err = unpopulateTimeRFC3339(val, "ObservationStartTime", &t.ObservationStartTime) + err = unpopulateDateTimeRFC3339(val, "ObservationStartTime", &t.ObservationStartTime) delete(rawMsg, key) case "observedMetric": err = unpopulate(val, "ObservedMetric", &t.ObservedMetric) @@ -11996,11 +11995,11 @@ func (v *VulnerabilityAssessmentScanRecordListResult) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecordProperties. func (v VulnerabilityAssessmentScanRecordProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", v.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", v.EndTime) populate(objectMap, "errors", v.Errors) populate(objectMap, "numberOfFailedSecurityChecks", v.NumberOfFailedSecurityChecks) populate(objectMap, "scanId", v.ScanID) - populateTimeRFC3339(objectMap, "startTime", v.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", v.StartTime) populate(objectMap, "state", v.State) populate(objectMap, "storageContainerPath", v.StorageContainerPath) populate(objectMap, "triggerType", v.TriggerType) @@ -12017,7 +12016,7 @@ func (v *VulnerabilityAssessmentScanRecordProperties) UnmarshalJSON(data []byte) var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &v.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &v.EndTime) delete(rawMsg, key) case "errors": err = unpopulate(val, "Errors", &v.Errors) @@ -12029,7 +12028,7 @@ func (v *VulnerabilityAssessmentScanRecordProperties) UnmarshalJSON(data []byte) err = unpopulate(val, "ScanID", &v.ScanID) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &v.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &v.StartTime) delete(rawMsg, key) case "state": err = unpopulate(val, "State", &v.State) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/operations_client.go index bc9e75e1..865936e3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type OperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - cl, err := arm.NewClient(moduleName+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -52,18 +51,25 @@ func NewOperationsClient(subscriptionID string, credential azcore.TokenCredentia // - options - OperationsClientCheckNameAvailabilityOptions contains the optional parameters for the OperationsClient.CheckNameAvailability // method. func (client *OperationsClient) CheckNameAvailability(ctx context.Context, request CheckNameAvailabilityRequest, options *OperationsClientCheckNameAvailabilityOptions) (OperationsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "OperationsClient.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, request, options) if err != nil { return OperationsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OperationsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OperationsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -81,7 +87,10 @@ func (client *OperationsClient) checkNameAvailabilityCreateRequest(ctx context.C reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -103,18 +112,25 @@ func (client *OperationsClient) checkNameAvailabilityHandleResponse(resp *http.R // - options - OperationsClientGetAzureAsyncHeaderResultOptions contains the optional parameters for the OperationsClient.GetAzureAsyncHeaderResult // method. func (client *OperationsClient) GetAzureAsyncHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, operationID string, options *OperationsClientGetAzureAsyncHeaderResultOptions) (OperationsClientGetAzureAsyncHeaderResultResponse, error) { + var err error + const operationName = "OperationsClient.GetAzureAsyncHeaderResult" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAzureAsyncHeaderResultCreateRequest(ctx, resourceGroupName, workspaceName, operationID, options) if err != nil { return OperationsClientGetAzureAsyncHeaderResultResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OperationsClientGetAzureAsyncHeaderResultResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNotFound) { - return OperationsClientGetAzureAsyncHeaderResultResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNotFound) { + err = runtime.NewResponseError(httpResp) + return OperationsClientGetAzureAsyncHeaderResultResponse{}, err } - return client.getAzureAsyncHeaderResultHandleResponse(resp) + resp, err := client.getAzureAsyncHeaderResultHandleResponse(httpResp) + return resp, err } // getAzureAsyncHeaderResultCreateRequest creates the GetAzureAsyncHeaderResult request. @@ -166,16 +182,22 @@ func (client *OperationsClient) getAzureAsyncHeaderResultHandleResponse(resp *ht // - options - OperationsClientGetLocationHeaderResultOptions contains the optional parameters for the OperationsClient.GetLocationHeaderResult // method. func (client *OperationsClient) GetLocationHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, operationID string, options *OperationsClientGetLocationHeaderResultOptions) (OperationsClientGetLocationHeaderResultResponse, error) { + var err error + const operationName = "OperationsClient.GetLocationHeaderResult" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getLocationHeaderResultCreateRequest(ctx, resourceGroupName, workspaceName, operationID, options) if err != nil { return OperationsClientGetLocationHeaderResultResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OperationsClientGetLocationHeaderResultResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent) { - return OperationsClientGetLocationHeaderResultResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return OperationsClientGetLocationHeaderResultResponse{}, err } return OperationsClientGetLocationHeaderResultResponse{}, nil } @@ -216,18 +238,25 @@ func (client *OperationsClient) getLocationHeaderResultCreateRequest(ctx context // Generated from API version 2021-06-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) List(ctx context.Context, options *OperationsClientListOptions) (OperationsClientListResponse, error) { + var err error + const operationName = "OperationsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCreateRequest(ctx, options) if err != nil { return OperationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OperationsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OperationsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/options.go new file mode 100644 index 00000000..6d4da5c6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/options.go @@ -0,0 +1,1412 @@ +//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 armsynapse + +// AzureADOnlyAuthenticationsClientBeginCreateOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.BeginCreate +// method. +type AzureADOnlyAuthenticationsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.Get +// method. +type AzureADOnlyAuthenticationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AzureADOnlyAuthenticationsClientListOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.NewListPager +// method. +type AzureADOnlyAuthenticationsClientListOptions struct { + // placeholder for future optional parameters +} + +// BigDataPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the BigDataPoolsClient.BeginCreateOrUpdate +// method. +type BigDataPoolsClientBeginCreateOrUpdateOptions struct { + // Whether to stop any running jobs in the Big Data pool + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BigDataPoolsClientBeginDeleteOptions contains the optional parameters for the BigDataPoolsClient.BeginDelete method. +type BigDataPoolsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BigDataPoolsClientGetOptions contains the optional parameters for the BigDataPoolsClient.Get method. +type BigDataPoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BigDataPoolsClientListByWorkspaceOptions contains the optional parameters for the BigDataPoolsClient.NewListByWorkspacePager +// method. +type BigDataPoolsClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// BigDataPoolsClientUpdateOptions contains the optional parameters for the BigDataPoolsClient.Update method. +type BigDataPoolsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// 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 +} + +// DataMaskingRulesClientGetOptions contains the optional parameters for the DataMaskingRulesClient.Get method. +type DataMaskingRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DataMaskingRulesClientListBySQLPoolOptions contains the optional parameters for the DataMaskingRulesClient.NewListBySQLPoolPager +// method. +type DataMaskingRulesClientListBySQLPoolOptions struct { + // placeholder for future optional parameters +} + +// ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.CreateOrUpdate +// method. +type ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ExtendedSQLPoolBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.Get +// method. +type ExtendedSQLPoolBlobAuditingPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager +// method. +type ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions struct { + // placeholder for future optional parameters +} + +// GetClientIntegrationRuntimeEnableInteractivequeryOptions contains the optional parameters for the GetClient.IntegrationRuntimeEnableInteractivequery +// method. +type GetClientIntegrationRuntimeEnableInteractivequeryOptions struct { + // placeholder for future optional parameters +} + +// GetClientIntegrationRuntimeStartOptions contains the optional parameters for the GetClient.IntegrationRuntimeStart method. +type GetClientIntegrationRuntimeStartOptions struct { + // placeholder for future optional parameters +} + +// GetClientIntegrationRuntimeStopOptions contains the optional parameters for the GetClient.IntegrationRuntimeStop method. +type GetClientIntegrationRuntimeStopOptions struct { + // placeholder for future optional parameters +} + +// IPFirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the IPFirewallRulesClient.BeginCreateOrUpdate +// method. +type IPFirewallRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IPFirewallRulesClientBeginDeleteOptions contains the optional parameters for the IPFirewallRulesClient.BeginDelete method. +type IPFirewallRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IPFirewallRulesClientBeginReplaceAllOptions contains the optional parameters for the IPFirewallRulesClient.BeginReplaceAll +// method. +type IPFirewallRulesClientBeginReplaceAllOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IPFirewallRulesClientGetOptions contains the optional parameters for the IPFirewallRulesClient.Get method. +type IPFirewallRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// IPFirewallRulesClientListByWorkspaceOptions contains the optional parameters for the IPFirewallRulesClient.NewListByWorkspacePager +// method. +type IPFirewallRulesClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimeAuthKeysClientListOptions contains the optional parameters for the IntegrationRuntimeAuthKeysClient.List +// method. +type IntegrationRuntimeAuthKeysClientListOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimeAuthKeysClientRegenerateOptions contains the optional parameters for the IntegrationRuntimeAuthKeysClient.Regenerate +// method. +type IntegrationRuntimeAuthKeysClientRegenerateOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimeConnectionInfosClientGetOptions contains the optional parameters for the IntegrationRuntimeConnectionInfosClient.Get +// method. +type IntegrationRuntimeConnectionInfosClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimeCredentialsClientSyncOptions contains the optional parameters for the IntegrationRuntimeCredentialsClient.Sync +// method. +type IntegrationRuntimeCredentialsClientSyncOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimeMonitoringDataClientListOptions contains the optional parameters for the IntegrationRuntimeMonitoringDataClient.List +// method. +type IntegrationRuntimeMonitoringDataClientListOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimeNodeIPAddressClientGetOptions contains the optional parameters for the IntegrationRuntimeNodeIPAddressClient.Get +// method. +type IntegrationRuntimeNodeIPAddressClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimeNodesClientDeleteOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Delete +// method. +type IntegrationRuntimeNodesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimeNodesClientGetOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Get method. +type IntegrationRuntimeNodesClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimeNodesClientUpdateOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Update +// method. +type IntegrationRuntimeNodesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimeObjectMetadataClientBeginRefreshOptions contains the optional parameters for the IntegrationRuntimeObjectMetadataClient.BeginRefresh +// method. +type IntegrationRuntimeObjectMetadataClientBeginRefreshOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IntegrationRuntimeObjectMetadataClientListOptions contains the optional parameters for the IntegrationRuntimeObjectMetadataClient.List +// method. +type IntegrationRuntimeObjectMetadataClientListOptions struct { + // The parameters for getting a SSIS object metadata. + GetMetadataRequest *GetSsisObjectMetadataRequest +} + +// IntegrationRuntimeStatusClientGetOptions contains the optional parameters for the IntegrationRuntimeStatusClient.Get method. +type IntegrationRuntimeStatusClientGetOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimesClientBeginCreateOptions contains the optional parameters for the IntegrationRuntimesClient.BeginCreate +// method. +type IntegrationRuntimesClientBeginCreateOptions struct { + // ETag of the integration runtime entity. Should only be specified for update, for which it should match existing entity + // or can be * for unconditional update. + IfMatch *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IntegrationRuntimesClientBeginDeleteOptions contains the optional parameters for the IntegrationRuntimesClient.BeginDelete +// method. +type IntegrationRuntimesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IntegrationRuntimesClientBeginDisableInteractiveQueryOptions contains the optional parameters for the IntegrationRuntimesClient.BeginDisableInteractiveQuery +// method. +type IntegrationRuntimesClientBeginDisableInteractiveQueryOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IntegrationRuntimesClientBeginEnableInteractiveQueryOptions contains the optional parameters for the IntegrationRuntimesClient.BeginEnableInteractiveQuery +// method. +type IntegrationRuntimesClientBeginEnableInteractiveQueryOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IntegrationRuntimesClientBeginStartOptions contains the optional parameters for the IntegrationRuntimesClient.BeginStart +// method. +type IntegrationRuntimesClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IntegrationRuntimesClientBeginStopOptions contains the optional parameters for the IntegrationRuntimesClient.BeginStop +// method. +type IntegrationRuntimesClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IntegrationRuntimesClientGetOptions contains the optional parameters for the IntegrationRuntimesClient.Get method. +type IntegrationRuntimesClientGetOptions struct { + // ETag of the integration runtime entity. Should only be specified for get. If the ETag matches the existing entity tag, + // or if * was provided, then no content will be returned. + IfNoneMatch *string +} + +// IntegrationRuntimesClientListByWorkspaceOptions contains the optional parameters for the IntegrationRuntimesClient.NewListByWorkspacePager +// method. +type IntegrationRuntimesClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the IntegrationRuntimesClient.ListOutboundNetworkDependenciesEndpoints +// method. +type IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimesClientUpdateOptions contains the optional parameters for the IntegrationRuntimesClient.Update method. +type IntegrationRuntimesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// IntegrationRuntimesClientUpgradeOptions contains the optional parameters for the IntegrationRuntimesClient.Upgrade method. +type IntegrationRuntimesClientUpgradeOptions struct { + // placeholder for future optional parameters +} + +// KeysClientCreateOrUpdateOptions contains the optional parameters for the KeysClient.CreateOrUpdate method. +type KeysClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// KeysClientDeleteOptions contains the optional parameters for the KeysClient.Delete method. +type KeysClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. +type KeysClientGetOptions struct { + // placeholder for future optional parameters +} + +// KeysClientListByWorkspaceOptions contains the optional parameters for the KeysClient.NewListByWorkspacePager method. +type KeysClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// KustoOperationsClientListOptions contains the optional parameters for the KustoOperationsClient.NewListPager method. +type KustoOperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolAttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.BeginCreateOrUpdate +// method. +type KustoPoolAttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolAttachedDatabaseConfigurationsClientBeginDeleteOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.BeginDelete +// method. +type KustoPoolAttachedDatabaseConfigurationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolAttachedDatabaseConfigurationsClientGetOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.Get +// method. +type KustoPoolAttachedDatabaseConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.NewListByKustoPoolPager +// method. +type KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolChildResourceClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolChildResourceClient.CheckNameAvailability +// method. +type KustoPoolChildResourceClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolDataConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginCreateOrUpdate +// method. +type KustoPoolDataConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolDataConnectionsClientBeginDataConnectionValidationOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginDataConnectionValidation +// method. +type KustoPoolDataConnectionsClientBeginDataConnectionValidationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolDataConnectionsClientBeginDeleteOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginDelete +// method. +type KustoPoolDataConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolDataConnectionsClientBeginUpdateOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginUpdate +// method. +type KustoPoolDataConnectionsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolDataConnectionsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolDataConnectionsClient.CheckNameAvailability +// method. +type KustoPoolDataConnectionsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolDataConnectionsClientGetOptions contains the optional parameters for the KustoPoolDataConnectionsClient.Get method. +type KustoPoolDataConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolDataConnectionsClientListByDatabaseOptions contains the optional parameters for the KustoPoolDataConnectionsClient.NewListByDatabasePager +// method. +type KustoPoolDataConnectionsClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolDatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.BeginCreateOrUpdate +// method. +type KustoPoolDatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolDatabasePrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.BeginDelete +// method. +type KustoPoolDatabasePrincipalAssignmentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.CheckNameAvailability +// method. +type KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolDatabasePrincipalAssignmentsClientGetOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.Get +// method. +type KustoPoolDatabasePrincipalAssignmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolDatabasePrincipalAssignmentsClientListOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.NewListPager +// method. +type KustoPoolDatabasePrincipalAssignmentsClientListOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolDatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolDatabasesClient.BeginCreateOrUpdate +// method. +type KustoPoolDatabasesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolDatabasesClientBeginDeleteOptions contains the optional parameters for the KustoPoolDatabasesClient.BeginDelete +// method. +type KustoPoolDatabasesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolDatabasesClientBeginUpdateOptions contains the optional parameters for the KustoPoolDatabasesClient.BeginUpdate +// method. +type KustoPoolDatabasesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolDatabasesClientGetOptions contains the optional parameters for the KustoPoolDatabasesClient.Get method. +type KustoPoolDatabasesClientGetOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolDatabasesClientListByKustoPoolOptions contains the optional parameters for the KustoPoolDatabasesClient.NewListByKustoPoolPager +// method. +type KustoPoolDatabasesClientListByKustoPoolOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolPrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.BeginCreateOrUpdate +// method. +type KustoPoolPrincipalAssignmentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolPrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.BeginDelete +// method. +type KustoPoolPrincipalAssignmentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.CheckNameAvailability +// method. +type KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolPrincipalAssignmentsClientGetOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.Get +// method. +type KustoPoolPrincipalAssignmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolPrincipalAssignmentsClientListOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.NewListPager +// method. +type KustoPoolPrincipalAssignmentsClientListOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolPrivateLinkResourcesClientListOptions contains the optional parameters for the KustoPoolPrivateLinkResourcesClient.NewListPager +// method. +type KustoPoolPrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolsClientBeginAddLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.BeginAddLanguageExtensions +// method. +type KustoPoolsClientBeginAddLanguageExtensionsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolsClient.BeginCreateOrUpdate +// method. +type KustoPoolsClientBeginCreateOrUpdateOptions struct { + // The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify the last-seen ETag value + // to prevent accidentally overwriting concurrent changes. + IfMatch *string + + // Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto Pool. Other values will result + // in a 412 Pre-condition Failed response. + IfNoneMatch *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolsClientBeginDeleteOptions contains the optional parameters for the KustoPoolsClient.BeginDelete method. +type KustoPoolsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolsClientBeginDetachFollowerDatabasesOptions contains the optional parameters for the KustoPoolsClient.BeginDetachFollowerDatabases +// method. +type KustoPoolsClientBeginDetachFollowerDatabasesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolsClientBeginRemoveLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.BeginRemoveLanguageExtensions +// method. +type KustoPoolsClientBeginRemoveLanguageExtensionsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolsClientBeginStartOptions contains the optional parameters for the KustoPoolsClient.BeginStart method. +type KustoPoolsClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolsClientBeginStopOptions contains the optional parameters for the KustoPoolsClient.BeginStop method. +type KustoPoolsClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolsClientBeginUpdateOptions contains the optional parameters for the KustoPoolsClient.BeginUpdate method. +type KustoPoolsClientBeginUpdateOptions struct { + // The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify the last-seen ETag value + // to prevent accidentally overwriting concurrent changes. + IfMatch *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KustoPoolsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolsClient.CheckNameAvailability +// method. +type KustoPoolsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolsClientGetOptions contains the optional parameters for the KustoPoolsClient.Get method. +type KustoPoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolsClientListByWorkspaceOptions contains the optional parameters for the KustoPoolsClient.ListByWorkspace method. +type KustoPoolsClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolsClientListFollowerDatabasesOptions contains the optional parameters for the KustoPoolsClient.NewListFollowerDatabasesPager +// method. +type KustoPoolsClientListFollowerDatabasesOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolsClientListLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.NewListLanguageExtensionsPager +// method. +type KustoPoolsClientListLanguageExtensionsOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolsClientListSKUsByResourceOptions contains the optional parameters for the KustoPoolsClient.NewListSKUsByResourcePager +// method. +type KustoPoolsClientListSKUsByResourceOptions struct { + // placeholder for future optional parameters +} + +// KustoPoolsClientListSKUsOptions contains the optional parameters for the KustoPoolsClient.NewListSKUsPager method. +type KustoPoolsClientListSKUsOptions struct { + // placeholder for future optional parameters +} + +// LibrariesClientListByWorkspaceOptions contains the optional parameters for the LibrariesClient.NewListByWorkspacePager +// method. +type LibrariesClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// LibraryClientGetOptions contains the optional parameters for the LibraryClient.Get method. +type LibraryClientGetOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientCheckNameAvailabilityOptions contains the optional parameters for the OperationsClient.CheckNameAvailability +// method. +type OperationsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientGetAzureAsyncHeaderResultOptions contains the optional parameters for the OperationsClient.GetAzureAsyncHeaderResult +// method. +type OperationsClientGetAzureAsyncHeaderResultOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientGetLocationHeaderResultOptions contains the optional parameters for the OperationsClient.GetLocationHeaderResult +// method. +type OperationsClientGetLocationHeaderResultOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientBeginCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreate +// method. +type PrivateEndpointConnectionsClientBeginCreateOptions 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 +} + +// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager +// method. +type PrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsPrivateLinkHubClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsPrivateLinkHubClient.Get +// method. +type PrivateEndpointConnectionsPrivateLinkHubClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsPrivateLinkHubClientListOptions contains the optional parameters for the PrivateEndpointConnectionsPrivateLinkHubClient.NewListPager +// method. +type PrivateEndpointConnectionsPrivateLinkHubClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkHubPrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkHubPrivateLinkResourcesClient.Get +// method. +type PrivateLinkHubPrivateLinkResourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkHubPrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkHubPrivateLinkResourcesClient.NewListPager +// method. +type PrivateLinkHubPrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkHubsClientBeginDeleteOptions contains the optional parameters for the PrivateLinkHubsClient.BeginDelete method. +type PrivateLinkHubsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateLinkHubsClientCreateOrUpdateOptions contains the optional parameters for the PrivateLinkHubsClient.CreateOrUpdate +// method. +type PrivateLinkHubsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkHubsClientGetOptions contains the optional parameters for the PrivateLinkHubsClient.Get method. +type PrivateLinkHubsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkHubsClientListByResourceGroupOptions contains the optional parameters for the PrivateLinkHubsClient.NewListByResourceGroupPager +// method. +type PrivateLinkHubsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkHubsClientListOptions contains the optional parameters for the PrivateLinkHubsClient.NewListPager method. +type PrivateLinkHubsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkHubsClientUpdateOptions contains the optional parameters for the PrivateLinkHubsClient.Update method. +type PrivateLinkHubsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. +type PrivateLinkResourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager +// method. +type PrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + +// RestorableDroppedSQLPoolsClientGetOptions contains the optional parameters for the RestorableDroppedSQLPoolsClient.Get +// method. +type RestorableDroppedSQLPoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RestorableDroppedSQLPoolsClientListByWorkspaceOptions contains the optional parameters for the RestorableDroppedSQLPoolsClient.NewListByWorkspacePager +// method. +type RestorableDroppedSQLPoolsClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.CreateOrUpdate +// method. +type SQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolBlobAuditingPoliciesClientGetOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.Get +// method. +type SQLPoolBlobAuditingPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager +// method. +type SQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolColumnsClientGetOptions contains the optional parameters for the SQLPoolColumnsClient.Get method. +type SQLPoolColumnsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolConnectionPoliciesClientGetOptions contains the optional parameters for the SQLPoolConnectionPoliciesClient.Get +// method. +type SQLPoolConnectionPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolDataWarehouseUserActivitiesClientGetOptions contains the optional parameters for the SQLPoolDataWarehouseUserActivitiesClient.Get +// method. +type SQLPoolDataWarehouseUserActivitiesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolGeoBackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.CreateOrUpdate +// method. +type SQLPoolGeoBackupPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolGeoBackupPoliciesClientGetOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.Get method. +type SQLPoolGeoBackupPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolGeoBackupPoliciesClientListOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.NewListPager +// method. +type SQLPoolGeoBackupPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolMaintenanceWindowOptionsClientGetOptions contains the optional parameters for the SQLPoolMaintenanceWindowOptionsClient.Get +// method. +type SQLPoolMaintenanceWindowOptionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolMaintenanceWindowsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolMaintenanceWindowsClient.CreateOrUpdate +// method. +type SQLPoolMaintenanceWindowsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolMaintenanceWindowsClientGetOptions contains the optional parameters for the SQLPoolMaintenanceWindowsClient.Get +// method. +type SQLPoolMaintenanceWindowsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolMetadataSyncConfigsClientCreateOptions contains the optional parameters for the SQLPoolMetadataSyncConfigsClient.Create +// method. +type SQLPoolMetadataSyncConfigsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolMetadataSyncConfigsClientGetOptions contains the optional parameters for the SQLPoolMetadataSyncConfigsClient.Get +// method. +type SQLPoolMetadataSyncConfigsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolOperationResultsClientBeginGetLocationHeaderResultOptions contains the optional parameters for the SQLPoolOperationResultsClient.BeginGetLocationHeaderResult +// method. +type SQLPoolOperationResultsClientBeginGetLocationHeaderResultOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SQLPoolOperationsClientListOptions contains the optional parameters for the SQLPoolOperationsClient.NewListPager method. +type SQLPoolOperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolRecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the SQLPoolRecommendedSensitivityLabelsClient.Update +// method. +type SQLPoolRecommendedSensitivityLabelsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolReplicationLinksClientGetByNameOptions contains the optional parameters for the SQLPoolReplicationLinksClient.GetByName +// method. +type SQLPoolReplicationLinksClientGetByNameOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolReplicationLinksClientListOptions contains the optional parameters for the SQLPoolReplicationLinksClient.NewListPager +// method. +type SQLPoolReplicationLinksClientListOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolRestorePointsClientBeginCreateOptions contains the optional parameters for the SQLPoolRestorePointsClient.BeginCreate +// method. +type SQLPoolRestorePointsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SQLPoolRestorePointsClientDeleteOptions contains the optional parameters for the SQLPoolRestorePointsClient.Delete method. +type SQLPoolRestorePointsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolRestorePointsClientGetOptions contains the optional parameters for the SQLPoolRestorePointsClient.Get method. +type SQLPoolRestorePointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolRestorePointsClientListOptions contains the optional parameters for the SQLPoolRestorePointsClient.NewListPager +// method. +type SQLPoolRestorePointsClientListOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolSchemasClientGetOptions contains the optional parameters for the SQLPoolSchemasClient.Get method. +type SQLPoolSchemasClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolSchemasClientListOptions contains the optional parameters for the SQLPoolSchemasClient.NewListPager method. +type SQLPoolSchemasClientListOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string +} + +// SQLPoolSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.CreateOrUpdate +// method. +type SQLPoolSecurityAlertPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolSecurityAlertPoliciesClientGetOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.Get +// method. +type SQLPoolSecurityAlertPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolSecurityAlertPoliciesClientListOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.NewListPager +// method. +type SQLPoolSecurityAlertPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolSensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.CreateOrUpdate +// method. +type SQLPoolSensitivityLabelsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolSensitivityLabelsClientDeleteOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Delete +// method. +type SQLPoolSensitivityLabelsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolSensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.DisableRecommendation +// method. +type SQLPoolSensitivityLabelsClientDisableRecommendationOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolSensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.EnableRecommendation +// method. +type SQLPoolSensitivityLabelsClientEnableRecommendationOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolSensitivityLabelsClientGetOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Get method. +type SQLPoolSensitivityLabelsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolSensitivityLabelsClientListCurrentOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.NewListCurrentPager +// method. +type SQLPoolSensitivityLabelsClientListCurrentOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string +} + +// SQLPoolSensitivityLabelsClientListRecommendedOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.NewListRecommendedPager +// method. +type SQLPoolSensitivityLabelsClientListRecommendedOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string + + // Specifies whether to include disabled recommendations or not. + IncludeDisabledRecommendations *bool + + // An OData query option to indicate how many elements to skip in the collection. + SkipToken *string +} + +// SQLPoolSensitivityLabelsClientUpdateOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Update +// method. +type SQLPoolSensitivityLabelsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolTableColumnsClientListByTableNameOptions contains the optional parameters for the SQLPoolTableColumnsClient.NewListByTableNamePager +// method. +type SQLPoolTableColumnsClientListByTableNameOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string +} + +// SQLPoolTablesClientGetOptions contains the optional parameters for the SQLPoolTablesClient.Get method. +type SQLPoolTablesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolTablesClientListBySchemaOptions contains the optional parameters for the SQLPoolTablesClient.NewListBySchemaPager +// method. +type SQLPoolTablesClientListBySchemaOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string +} + +// SQLPoolTransparentDataEncryptionsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.CreateOrUpdate +// method. +type SQLPoolTransparentDataEncryptionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolTransparentDataEncryptionsClientGetOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.Get +// method. +type SQLPoolTransparentDataEncryptionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolTransparentDataEncryptionsClientListOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.NewListPager +// method. +type SQLPoolTransparentDataEncryptionsClientListOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolUsagesClientListOptions contains the optional parameters for the SQLPoolUsagesClient.NewListPager method. +type SQLPoolUsagesClientListOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate +// method. +type SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentRuleBaselinesClient.Delete +// method. +type SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentRuleBaselinesClient.Get +// method. +type SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.BeginInitiateScan +// method. +type SQLPoolVulnerabilityAssessmentScansClientBeginInitiateScanOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SQLPoolVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.Export +// method. +type SQLPoolVulnerabilityAssessmentScansClientExportOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.Get +// method. +type SQLPoolVulnerabilityAssessmentScansClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolVulnerabilityAssessmentScansClientListOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.NewListPager +// method. +type SQLPoolVulnerabilityAssessmentScansClientListOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.CreateOrUpdate +// method. +type SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.Delete +// method. +type SQLPoolVulnerabilityAssessmentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.Get +// method. +type SQLPoolVulnerabilityAssessmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolVulnerabilityAssessmentsClientListOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.NewListPager +// method. +type SQLPoolVulnerabilityAssessmentsClientListOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolWorkloadClassifierClientBeginCreateOrUpdateOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.BeginCreateOrUpdate +// method. +type SQLPoolWorkloadClassifierClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SQLPoolWorkloadClassifierClientBeginDeleteOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.BeginDelete +// method. +type SQLPoolWorkloadClassifierClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SQLPoolWorkloadClassifierClientGetOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.Get +// method. +type SQLPoolWorkloadClassifierClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolWorkloadClassifierClientListOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.NewListPager +// method. +type SQLPoolWorkloadClassifierClientListOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolWorkloadGroupClientBeginCreateOrUpdateOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.BeginCreateOrUpdate +// method. +type SQLPoolWorkloadGroupClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SQLPoolWorkloadGroupClientBeginDeleteOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.BeginDelete +// method. +type SQLPoolWorkloadGroupClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SQLPoolWorkloadGroupClientGetOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.Get method. +type SQLPoolWorkloadGroupClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolWorkloadGroupClientListOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.NewListPager +// method. +type SQLPoolWorkloadGroupClientListOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolsClientBeginCreateOptions contains the optional parameters for the SQLPoolsClient.BeginCreate method. +type SQLPoolsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SQLPoolsClientBeginDeleteOptions contains the optional parameters for the SQLPoolsClient.BeginDelete method. +type SQLPoolsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SQLPoolsClientBeginPauseOptions contains the optional parameters for the SQLPoolsClient.BeginPause method. +type SQLPoolsClientBeginPauseOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SQLPoolsClientBeginResumeOptions contains the optional parameters for the SQLPoolsClient.BeginResume method. +type SQLPoolsClientBeginResumeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SQLPoolsClientBeginUpdateOptions contains the optional parameters for the SQLPoolsClient.BeginUpdate method. +type SQLPoolsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SQLPoolsClientGetOptions contains the optional parameters for the SQLPoolsClient.Get method. +type SQLPoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolsClientListByWorkspaceOptions contains the optional parameters for the SQLPoolsClient.NewListByWorkspacePager method. +type SQLPoolsClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// SQLPoolsClientRenameOptions contains the optional parameters for the SQLPoolsClient.Rename method. +type SQLPoolsClientRenameOptions struct { + // placeholder for future optional parameters +} + +// SparkConfigurationClientGetOptions contains the optional parameters for the SparkConfigurationClient.Get method. +type SparkConfigurationClientGetOptions struct { + // placeholder for future optional parameters +} + +// SparkConfigurationsClientListByWorkspaceOptions contains the optional parameters for the SparkConfigurationsClient.NewListByWorkspacePager +// method. +type SparkConfigurationsClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAADAdminsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceAADAdminsClient.BeginCreateOrUpdate +// method. +type WorkspaceAADAdminsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspaceAADAdminsClientBeginDeleteOptions contains the optional parameters for the WorkspaceAADAdminsClient.BeginDelete +// method. +type WorkspaceAADAdminsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspaceAADAdminsClientGetOptions contains the optional parameters for the WorkspaceAADAdminsClient.Get method. +type WorkspaceAADAdminsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedIdentitySQLControlSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceManagedIdentitySQLControlSettingsClient.BeginCreateOrUpdate +// method. +type WorkspaceManagedIdentitySQLControlSettingsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspaceManagedIdentitySQLControlSettingsClientGetOptions contains the optional parameters for the WorkspaceManagedIdentitySQLControlSettingsClient.Get +// method. +type WorkspaceManagedIdentitySQLControlSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the +// WorkspaceManagedSQLServerBlobAuditingPoliciesClient.BeginCreateOrUpdate method. +type WorkspaceManagedSQLServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerBlobAuditingPoliciesClient.Get +// method. +type WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceOptions contains the optional parameters for the WorkspaceManagedSQLServerBlobAuditingPoliciesClient.NewListByWorkspacePager +// method. +type WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientBeginUpdateOptions contains the optional parameters for the +// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.BeginUpdate method. +type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.Get +// method. +type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.NewListPager +// method. +type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerEncryptionProtectorClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.BeginCreateOrUpdate +// method. +type WorkspaceManagedSQLServerEncryptionProtectorClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspaceManagedSQLServerEncryptionProtectorClientBeginRevalidateOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.BeginRevalidate +// method. +type WorkspaceManagedSQLServerEncryptionProtectorClientBeginRevalidateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspaceManagedSQLServerEncryptionProtectorClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.Get +// method. +type WorkspaceManagedSQLServerEncryptionProtectorClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerEncryptionProtectorClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.NewListPager +// method. +type WorkspaceManagedSQLServerEncryptionProtectorClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters +// for the WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.BeginCreateOrUpdate method. +type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.Get +// method. +type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceOptions contains the optional parameters for +// the WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.NewListByWorkspacePager method. +type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerRecoverableSQLPoolsClient.Get +// method. +type WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerRecoverableSQLPoolsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerRecoverableSQLPoolsClient.NewListPager +// method. +type WorkspaceManagedSQLServerRecoverableSQLPoolsClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerSecurityAlertPolicyClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.BeginCreateOrUpdate +// method. +type WorkspaceManagedSQLServerSecurityAlertPolicyClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspaceManagedSQLServerSecurityAlertPolicyClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.Get +// method. +type WorkspaceManagedSQLServerSecurityAlertPolicyClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerSecurityAlertPolicyClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.NewListPager +// method. +type WorkspaceManagedSQLServerSecurityAlertPolicyClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerUsagesClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerUsagesClient.NewListPager +// method. +type WorkspaceManagedSQLServerUsagesClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.CreateOrUpdate +// method. +type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.Delete +// method. +type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.Get +// method. +type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.NewListPager +// method. +type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceSQLAADAdminsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceSQLAADAdminsClient.BeginCreateOrUpdate +// method. +type WorkspaceSQLAADAdminsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspaceSQLAADAdminsClientBeginDeleteOptions contains the optional parameters for the WorkspaceSQLAADAdminsClient.BeginDelete +// method. +type WorkspaceSQLAADAdminsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspaceSQLAADAdminsClientGetOptions contains the optional parameters for the WorkspaceSQLAADAdminsClient.Get method. +type WorkspaceSQLAADAdminsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.BeginCreateOrUpdate +// method. +type WorkspacesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. +type WorkspacesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspacesClientBeginUpdateOptions contains the optional parameters for the WorkspacesClient.BeginUpdate method. +type WorkspacesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. +type WorkspacesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager +// method. +type WorkspacesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// WorkspacesClientListOptions contains the optional parameters for the WorkspacesClient.NewListPager method. +type WorkspacesClientListOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/polymorphic_helpers.go index 1a05b548..af11c71e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/polymorphic_helpers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/polymorphic_helpers.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -30,7 +29,10 @@ func unmarshalCustomSetupBaseClassification(rawMsg json.RawMessage) (CustomSetup default: b = &CustomSetupBase{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalCustomSetupBaseClassificationArray(rawMsg json.RawMessage) ([]CustomSetupBaseClassification, error) { @@ -71,7 +73,10 @@ func unmarshalDataConnectionClassification(rawMsg json.RawMessage) (DataConnecti default: b = &DataConnection{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalDataConnectionClassificationArray(rawMsg json.RawMessage) ([]DataConnectionClassification, error) { @@ -110,7 +115,10 @@ func unmarshalDatabaseClassification(rawMsg json.RawMessage) (DatabaseClassifica default: b = &Database{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalDatabaseClassificationArray(rawMsg json.RawMessage) ([]DatabaseClassification, error) { @@ -149,7 +157,10 @@ func unmarshalIntegrationRuntimeClassification(rawMsg json.RawMessage) (Integrat default: b = &IntegrationRuntime{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalIntegrationRuntimeStatusClassification(rawMsg json.RawMessage) (IntegrationRuntimeStatusClassification, error) { @@ -169,7 +180,10 @@ func unmarshalIntegrationRuntimeStatusClassification(rawMsg json.RawMessage) (In default: b = &IntegrationRuntimeStatus{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalLinkedIntegrationRuntimeTypeClassification(rawMsg json.RawMessage) (LinkedIntegrationRuntimeTypeClassification, error) { @@ -189,7 +203,10 @@ func unmarshalLinkedIntegrationRuntimeTypeClassification(rawMsg json.RawMessage) default: b = &LinkedIntegrationRuntimeType{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalSecretBaseClassification(rawMsg json.RawMessage) (SecretBaseClassification, error) { @@ -207,7 +224,10 @@ func unmarshalSecretBaseClassification(rawMsg json.RawMessage) (SecretBaseClassi default: b = &SecretBase{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalSsisObjectMetadataClassification(rawMsg json.RawMessage) (SsisObjectMetadataClassification, error) { @@ -231,7 +251,10 @@ func unmarshalSsisObjectMetadataClassification(rawMsg json.RawMessage) (SsisObje default: b = &SsisObjectMetadata{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalSsisObjectMetadataClassificationArray(rawMsg json.RawMessage) ([]SsisObjectMetadataClassification, error) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privateendpointconnections_client.go index 5d7d794c..e7cb27b8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privateendpointconnections_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type PrivateEndpointConnectionsClient struct { // - 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+".PrivateEndpointConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,11 +59,15 @@ func (client *PrivateEndpointConnectionsClient) BeginCreate(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +76,24 @@ func (client *PrivateEndpointConnectionsClient) BeginCreate(ctx context.Context, // // Generated from API version 2021-06-01 func (client *PrivateEndpointConnectionsClient) create(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, request PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.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, workspaceName, privateEndpointConnectionName, request, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -114,7 +123,10 @@ func (client *PrivateEndpointConnectionsClient) createCreateRequest(ctx context. reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a private endpoint connection. @@ -132,9 +144,14 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -143,18 +160,24 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // // Generated from API version 2021-06-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName 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, workspaceName, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -197,18 +220,25 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get // method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName 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, workspaceName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -263,25 +293,20 @@ func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsClientListResponse) (PrivateEndpointConnectionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateEndpointConnectionsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointConnectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 PrivateEndpointConnectionsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privateendpointconnectionsprivatelinkhub_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privateendpointconnectionsprivatelinkhub_client.go index 9a0f146f..faff4f89 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privateendpointconnectionsprivatelinkhub_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privateendpointconnectionsprivatelinkhub_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type PrivateEndpointConnectionsPrivateLinkHubClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPrivateEndpointConnectionsPrivateLinkHubClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsPrivateLinkHubClient, error) { - cl, err := arm.NewClient(moduleName+".PrivateEndpointConnectionsPrivateLinkHubClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewPrivateEndpointConnectionsPrivateLinkHubClient(subscriptionID string, cr // - options - PrivateEndpointConnectionsPrivateLinkHubClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsPrivateLinkHubClient.Get // method. func (client *PrivateEndpointConnectionsPrivateLinkHubClient) Get(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsPrivateLinkHubClientGetOptions) (PrivateEndpointConnectionsPrivateLinkHubClientGetResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsPrivateLinkHubClient.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, privateLinkHubName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsPrivateLinkHubClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsPrivateLinkHubClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsPrivateLinkHubClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsPrivateLinkHubClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -120,25 +126,20 @@ func (client *PrivateEndpointConnectionsPrivateLinkHubClient) NewListPager(resou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsPrivateLinkHubClientListResponse) (PrivateEndpointConnectionsPrivateLinkHubClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, privateLinkHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointConnectionsPrivateLinkHubClient.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, privateLinkHubName, options) + }, nil) if err != nil { return PrivateEndpointConnectionsPrivateLinkHubClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateEndpointConnectionsPrivateLinkHubClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsPrivateLinkHubClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privatelinkhubprivatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privatelinkhubprivatelinkresources_client.go index ff2635cc..d9964a7c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privatelinkhubprivatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privatelinkhubprivatelinkresources_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type PrivateLinkHubPrivateLinkResourcesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPrivateLinkHubPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkHubPrivateLinkResourcesClient, error) { - cl, err := arm.NewClient(moduleName+".PrivateLinkHubPrivateLinkResourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewPrivateLinkHubPrivateLinkResourcesClient(subscriptionID string, credenti // - options - PrivateLinkHubPrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkHubPrivateLinkResourcesClient.Get // method. func (client *PrivateLinkHubPrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateLinkResourceName string, options *PrivateLinkHubPrivateLinkResourcesClientGetOptions) (PrivateLinkHubPrivateLinkResourcesClientGetResponse, error) { + var err error + const operationName = "PrivateLinkHubPrivateLinkResourcesClient.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, privateLinkHubName, privateLinkResourceName, options) if err != nil { return PrivateLinkHubPrivateLinkResourcesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkHubPrivateLinkResourcesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkHubPrivateLinkResourcesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkHubPrivateLinkResourcesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -120,25 +126,20 @@ func (client *PrivateLinkHubPrivateLinkResourcesClient) NewListPager(resourceGro return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PrivateLinkHubPrivateLinkResourcesClientListResponse) (PrivateLinkHubPrivateLinkResourcesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, privateLinkHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkHubPrivateLinkResourcesClient.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, privateLinkHubName, options) + }, nil) if err != nil { return PrivateLinkHubPrivateLinkResourcesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateLinkHubPrivateLinkResourcesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkHubPrivateLinkResourcesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client.go index 5d23ebb7..1475a0cf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type PrivateLinkHubsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPrivateLinkHubsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkHubsClient, error) { - cl, err := arm.NewClient(moduleName+".PrivateLinkHubsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewPrivateLinkHubsClient(subscriptionID string, credential azcore.TokenCred // - options - PrivateLinkHubsClientCreateOrUpdateOptions contains the optional parameters for the PrivateLinkHubsClient.CreateOrUpdate // method. func (client *PrivateLinkHubsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateLinkHubInfo PrivateLinkHub, options *PrivateLinkHubsClientCreateOrUpdateOptions) (PrivateLinkHubsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "PrivateLinkHubsClient.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, privateLinkHubName, privateLinkHubInfo, options) if err != nil { return PrivateLinkHubsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkHubsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return PrivateLinkHubsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkHubsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -91,7 +97,10 @@ func (client *PrivateLinkHubsClient) createOrUpdateCreateRequest(ctx context.Con reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateLinkHubInfo) + if err := runtime.MarshalAsJSON(req, privateLinkHubInfo); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,9 +126,14 @@ func (client *PrivateLinkHubsClient) BeginDelete(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[PrivateLinkHubsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateLinkHubsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateLinkHubsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateLinkHubsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -128,18 +142,24 @@ func (client *PrivateLinkHubsClient) BeginDelete(ctx context.Context, resourceGr // // Generated from API version 2021-06-01 func (client *PrivateLinkHubsClient) deleteOperation(ctx context.Context, resourceGroupName string, privateLinkHubName string, options *PrivateLinkHubsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PrivateLinkHubsClient.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, privateLinkHubName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -176,18 +196,25 @@ func (client *PrivateLinkHubsClient) deleteCreateRequest(ctx context.Context, re // - privateLinkHubName - Name of the privateLinkHub // - options - PrivateLinkHubsClientGetOptions contains the optional parameters for the PrivateLinkHubsClient.Get method. func (client *PrivateLinkHubsClient) Get(ctx context.Context, resourceGroupName string, privateLinkHubName string, options *PrivateLinkHubsClientGetOptions) (PrivateLinkHubsClientGetResponse, error) { + var err error + const operationName = "PrivateLinkHubsClient.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, privateLinkHubName, options) if err != nil { return PrivateLinkHubsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkHubsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkHubsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkHubsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -236,25 +263,20 @@ func (client *PrivateLinkHubsClient) NewListPager(options *PrivateLinkHubsClient return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PrivateLinkHubsClientListResponse) (PrivateLinkHubsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateLinkHubsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkHubsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 PrivateLinkHubsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkHubsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -297,25 +319,20 @@ func (client *PrivateLinkHubsClient) NewListByResourceGroupPager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PrivateLinkHubsClientListByResourceGroupResponse) (PrivateLinkHubsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkHubsClient.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 PrivateLinkHubsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateLinkHubsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkHubsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -359,18 +376,25 @@ func (client *PrivateLinkHubsClient) listByResourceGroupHandleResponse(resp *htt // - privateLinkHubPatchInfo - PrivateLinkHub patch request properties // - options - PrivateLinkHubsClientUpdateOptions contains the optional parameters for the PrivateLinkHubsClient.Update method. func (client *PrivateLinkHubsClient) Update(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateLinkHubPatchInfo PrivateLinkHubPatchInfo, options *PrivateLinkHubsClientUpdateOptions) (PrivateLinkHubsClientUpdateResponse, error) { + var err error + const operationName = "PrivateLinkHubsClient.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, privateLinkHubName, privateLinkHubPatchInfo, options) if err != nil { return PrivateLinkHubsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkHubsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return PrivateLinkHubsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkHubsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -396,7 +420,10 @@ func (client *PrivateLinkHubsClient) updateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateLinkHubPatchInfo) + if err := runtime.MarshalAsJSON(req, privateLinkHubPatchInfo); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privatelinkresources_client.go index 365f96fd..a6d1350a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/privatelinkresources_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type PrivateLinkResourcesClient struct { // - 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+".PrivateLinkResourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // - options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get // method. func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, privateLinkResourceName 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, workspaceName, privateLinkResourceName, options) if err != nil { return PrivateLinkResourcesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -120,25 +126,20 @@ func (client *PrivateLinkResourcesClient) NewListPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PrivateLinkResourcesClientListResponse) (PrivateLinkResourcesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkResourcesClient.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 PrivateLinkResourcesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateLinkResourcesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/response_types.go index f3bea848..ec6d1d5f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/response_types.go @@ -3,49 +3,58 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse +import "encoding/json" + // AzureADOnlyAuthenticationsClientCreateResponse contains the response from method AzureADOnlyAuthenticationsClient.BeginCreate. type AzureADOnlyAuthenticationsClientCreateResponse struct { + // Azure Active Directory Only Authentication Info AzureADOnlyAuthentication } // AzureADOnlyAuthenticationsClientGetResponse contains the response from method AzureADOnlyAuthenticationsClient.Get. type AzureADOnlyAuthenticationsClientGetResponse struct { + // Azure Active Directory Only Authentication Info AzureADOnlyAuthentication } // AzureADOnlyAuthenticationsClientListResponse contains the response from method AzureADOnlyAuthenticationsClient.NewListPager. type AzureADOnlyAuthenticationsClientListResponse struct { + // A list of active directory only authentications. AzureADOnlyAuthenticationListResult } // BigDataPoolsClientCreateOrUpdateResponse contains the response from method BigDataPoolsClient.BeginCreateOrUpdate. type BigDataPoolsClientCreateOrUpdateResponse struct { + // A Big Data pool BigDataPoolResourceInfo } // BigDataPoolsClientDeleteResponse contains the response from method BigDataPoolsClient.BeginDelete. type BigDataPoolsClientDeleteResponse struct { + // A Big Data pool BigDataPoolResourceInfo } // BigDataPoolsClientGetResponse contains the response from method BigDataPoolsClient.Get. type BigDataPoolsClientGetResponse struct { + // A Big Data pool BigDataPoolResourceInfo } // BigDataPoolsClientListByWorkspaceResponse contains the response from method BigDataPoolsClient.NewListByWorkspacePager. type BigDataPoolsClientListByWorkspaceResponse struct { + // Collection of Big Data pool information BigDataPoolResourceInfoListResult } // BigDataPoolsClientUpdateResponse contains the response from method BigDataPoolsClient.Update. type BigDataPoolsClientUpdateResponse struct { + // A Big Data pool BigDataPoolResourceInfo } @@ -61,86 +70,103 @@ type DataMaskingPoliciesClientGetResponse struct { // DataMaskingRulesClientCreateOrUpdateResponse contains the response from method DataMaskingRulesClient.CreateOrUpdate. type DataMaskingRulesClientCreateOrUpdateResponse struct { + // Represents a Sql pool data masking rule. DataMaskingRule } // DataMaskingRulesClientGetResponse contains the response from method DataMaskingRulesClient.Get. type DataMaskingRulesClientGetResponse struct { + // Represents a Sql pool data masking rule. DataMaskingRule } // DataMaskingRulesClientListBySQLPoolResponse contains the response from method DataMaskingRulesClient.NewListBySQLPoolPager. type DataMaskingRulesClientListBySQLPoolResponse struct { + // The response to a list data masking rules request. DataMaskingRuleListResult } // ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method ExtendedSQLPoolBlobAuditingPoliciesClient.CreateOrUpdate. type ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse struct { + // An extended Sql pool blob auditing policy. ExtendedSQLPoolBlobAuditingPolicy } // ExtendedSQLPoolBlobAuditingPoliciesClientGetResponse contains the response from method ExtendedSQLPoolBlobAuditingPoliciesClient.Get. type ExtendedSQLPoolBlobAuditingPoliciesClientGetResponse struct { + // An extended Sql pool blob auditing policy. ExtendedSQLPoolBlobAuditingPolicy } // ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse contains the response from method ExtendedSQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager. type ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse struct { + // A list of sql pool extended auditing settings. ExtendedSQLPoolBlobAuditingPolicyListResult } // GetClientIntegrationRuntimeEnableInteractivequeryResponse contains the response from method GetClient.IntegrationRuntimeEnableInteractivequery. type GetClientIntegrationRuntimeEnableInteractivequeryResponse struct { + // Integration Runtime Operation Status Properties IntegrationRuntimeEnableinteractivequery } // GetClientIntegrationRuntimeStartResponse contains the response from method GetClient.IntegrationRuntimeStart. type GetClientIntegrationRuntimeStartResponse struct { + // Integration Runtime Operation Status Properties IntegrationRuntimeOperationStatus } // GetClientIntegrationRuntimeStopResponse contains the response from method GetClient.IntegrationRuntimeStop. type GetClientIntegrationRuntimeStopResponse struct { + // Integration Runtime Operation Status Properties IntegrationRuntimeStopOperationStatus } // IPFirewallRulesClientCreateOrUpdateResponse contains the response from method IPFirewallRulesClient.BeginCreateOrUpdate. type IPFirewallRulesClientCreateOrUpdateResponse struct { + // IP firewall rule IPFirewallRuleInfo } // IPFirewallRulesClientDeleteResponse contains the response from method IPFirewallRulesClient.BeginDelete. type IPFirewallRulesClientDeleteResponse struct { + // IP firewall rule IPFirewallRuleInfo } // IPFirewallRulesClientGetResponse contains the response from method IPFirewallRulesClient.Get. type IPFirewallRulesClientGetResponse struct { + // IP firewall rule IPFirewallRuleInfo } // IPFirewallRulesClientListByWorkspaceResponse contains the response from method IPFirewallRulesClient.NewListByWorkspacePager. type IPFirewallRulesClientListByWorkspaceResponse struct { + // List of IP firewall rules IPFirewallRuleInfoListResult } // IPFirewallRulesClientReplaceAllResponse contains the response from method IPFirewallRulesClient.BeginReplaceAll. type IPFirewallRulesClientReplaceAllResponse struct { + // An existing operation for replacing the firewall rules ReplaceAllFirewallRulesOperationResponse } // IntegrationRuntimeAuthKeysClientListResponse contains the response from method IntegrationRuntimeAuthKeysClient.List. type IntegrationRuntimeAuthKeysClientListResponse struct { + // The integration runtime authentication keys. IntegrationRuntimeAuthKeys } // IntegrationRuntimeAuthKeysClientRegenerateResponse contains the response from method IntegrationRuntimeAuthKeysClient.Regenerate. type IntegrationRuntimeAuthKeysClientRegenerateResponse struct { + // The integration runtime authentication keys. IntegrationRuntimeAuthKeys } // IntegrationRuntimeConnectionInfosClientGetResponse contains the response from method IntegrationRuntimeConnectionInfosClient.Get. type IntegrationRuntimeConnectionInfosClientGetResponse struct { + // Connection information for encrypting the on-premises data source credentials. IntegrationRuntimeConnectionInfo } @@ -151,11 +177,13 @@ type IntegrationRuntimeCredentialsClientSyncResponse struct { // IntegrationRuntimeMonitoringDataClientListResponse contains the response from method IntegrationRuntimeMonitoringDataClient.List. type IntegrationRuntimeMonitoringDataClientListResponse struct { + // Get monitoring data response. IntegrationRuntimeMonitoringData } // IntegrationRuntimeNodeIPAddressClientGetResponse contains the response from method IntegrationRuntimeNodeIPAddressClient.Get. type IntegrationRuntimeNodeIPAddressClientGetResponse struct { + // The IP address of self-hosted integration runtime node. IntegrationRuntimeNodeIPAddress } @@ -166,31 +194,37 @@ type IntegrationRuntimeNodesClientDeleteResponse struct { // IntegrationRuntimeNodesClientGetResponse contains the response from method IntegrationRuntimeNodesClient.Get. type IntegrationRuntimeNodesClientGetResponse struct { + // Properties of Self-hosted integration runtime node. SelfHostedIntegrationRuntimeNode } // IntegrationRuntimeNodesClientUpdateResponse contains the response from method IntegrationRuntimeNodesClient.Update. type IntegrationRuntimeNodesClientUpdateResponse struct { + // Properties of Self-hosted integration runtime node. SelfHostedIntegrationRuntimeNode } // IntegrationRuntimeObjectMetadataClientListResponse contains the response from method IntegrationRuntimeObjectMetadataClient.List. type IntegrationRuntimeObjectMetadataClientListResponse struct { + // A list of SSIS object metadata. SsisObjectMetadataListResponse } // IntegrationRuntimeObjectMetadataClientRefreshResponse contains the response from method IntegrationRuntimeObjectMetadataClient.BeginRefresh. type IntegrationRuntimeObjectMetadataClientRefreshResponse struct { + // The status of the operation. SsisObjectMetadataStatusResponse } // IntegrationRuntimeStatusClientGetResponse contains the response from method IntegrationRuntimeStatusClient.Get. type IntegrationRuntimeStatusClientGetResponse struct { + // Integration runtime status response. IntegrationRuntimeStatusResponse } // IntegrationRuntimesClientCreateResponse contains the response from method IntegrationRuntimesClient.BeginCreate. type IntegrationRuntimesClientCreateResponse struct { + // Integration runtime resource type. IntegrationRuntimeResource } @@ -211,21 +245,25 @@ type IntegrationRuntimesClientEnableInteractiveQueryResponse struct { // IntegrationRuntimesClientGetResponse contains the response from method IntegrationRuntimesClient.Get. type IntegrationRuntimesClientGetResponse struct { + // Integration runtime resource type. IntegrationRuntimeResource } // IntegrationRuntimesClientListByWorkspaceResponse contains the response from method IntegrationRuntimesClient.NewListByWorkspacePager. type IntegrationRuntimesClientListByWorkspaceResponse struct { + // A list of integration runtime resources. IntegrationRuntimeListResponse } // IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method IntegrationRuntimesClient.ListOutboundNetworkDependenciesEndpoints. type IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsResponse struct { + // Azure-SSIS integration runtime outbound network dependency endpoints. IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse } // IntegrationRuntimesClientStartResponse contains the response from method IntegrationRuntimesClient.BeginStart. type IntegrationRuntimesClientStartResponse struct { + // Integration runtime status response. IntegrationRuntimeStatusResponse } @@ -236,6 +274,7 @@ type IntegrationRuntimesClientStopResponse struct { // IntegrationRuntimesClientUpdateResponse contains the response from method IntegrationRuntimesClient.Update. type IntegrationRuntimesClientUpdateResponse struct { + // Integration runtime resource type. IntegrationRuntimeResource } @@ -246,31 +285,38 @@ type IntegrationRuntimesClientUpgradeResponse struct { // KeysClientCreateOrUpdateResponse contains the response from method KeysClient.CreateOrUpdate. type KeysClientCreateOrUpdateResponse struct { + // A workspace key Key } // KeysClientDeleteResponse contains the response from method KeysClient.Delete. type KeysClientDeleteResponse struct { + // A workspace key Key } // KeysClientGetResponse contains the response from method KeysClient.Get. type KeysClientGetResponse struct { + // A workspace key Key } // KeysClientListByWorkspaceResponse contains the response from method KeysClient.NewListByWorkspacePager. type KeysClientListByWorkspaceResponse struct { + // List of keys KeyInfoListResult } // KustoOperationsClientListResponse contains the response from method KustoOperationsClient.NewListPager. type KustoOperationsClientListResponse struct { + // Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next + // set of results. OperationListResult } // KustoPoolAttachedDatabaseConfigurationsClientCreateOrUpdateResponse contains the response from method KustoPoolAttachedDatabaseConfigurationsClient.BeginCreateOrUpdate. type KustoPoolAttachedDatabaseConfigurationsClientCreateOrUpdateResponse struct { + // Class representing an attached database configuration. AttachedDatabaseConfiguration } @@ -281,29 +327,39 @@ type KustoPoolAttachedDatabaseConfigurationsClientDeleteResponse struct { // KustoPoolAttachedDatabaseConfigurationsClientGetResponse contains the response from method KustoPoolAttachedDatabaseConfigurationsClient.Get. type KustoPoolAttachedDatabaseConfigurationsClientGetResponse struct { + // Class representing an attached database configuration. AttachedDatabaseConfiguration } // KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolResponse contains the response from method KustoPoolAttachedDatabaseConfigurationsClient.NewListByKustoPoolPager. type KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolResponse struct { + // The list attached database configurations operation response. AttachedDatabaseConfigurationListResult } // KustoPoolChildResourceClientCheckNameAvailabilityResponse contains the response from method KustoPoolChildResourceClient.CheckNameAvailability. type KustoPoolChildResourceClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. CheckNameResult } // KustoPoolDataConnectionsClientCheckNameAvailabilityResponse contains the response from method KustoPoolDataConnectionsClient.CheckNameAvailability. type KustoPoolDataConnectionsClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. CheckNameResult } // KustoPoolDataConnectionsClientCreateOrUpdateResponse contains the response from method KustoPoolDataConnectionsClient.BeginCreateOrUpdate. type KustoPoolDataConnectionsClientCreateOrUpdateResponse struct { + // Class representing a data connection. DataConnectionClassification } +// MarshalJSON implements the json.Marshaller interface for type KustoPoolDataConnectionsClientCreateOrUpdateResponse. +func (k KustoPoolDataConnectionsClientCreateOrUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(k.DataConnectionClassification) +} + // UnmarshalJSON implements the json.Unmarshaller interface for type KustoPoolDataConnectionsClientCreateOrUpdateResponse. func (k *KustoPoolDataConnectionsClientCreateOrUpdateResponse) UnmarshalJSON(data []byte) error { res, err := unmarshalDataConnectionClassification(data) @@ -316,6 +372,7 @@ func (k *KustoPoolDataConnectionsClientCreateOrUpdateResponse) UnmarshalJSON(dat // KustoPoolDataConnectionsClientDataConnectionValidationResponse contains the response from method KustoPoolDataConnectionsClient.BeginDataConnectionValidation. type KustoPoolDataConnectionsClientDataConnectionValidationResponse struct { + // The list Kusto data connection validation result. DataConnectionValidationListResult } @@ -326,6 +383,7 @@ type KustoPoolDataConnectionsClientDeleteResponse struct { // KustoPoolDataConnectionsClientGetResponse contains the response from method KustoPoolDataConnectionsClient.Get. type KustoPoolDataConnectionsClientGetResponse struct { + // Class representing a data connection. DataConnectionClassification } @@ -341,14 +399,21 @@ func (k *KustoPoolDataConnectionsClientGetResponse) UnmarshalJSON(data []byte) e // KustoPoolDataConnectionsClientListByDatabaseResponse contains the response from method KustoPoolDataConnectionsClient.NewListByDatabasePager. type KustoPoolDataConnectionsClientListByDatabaseResponse struct { + // The list Kusto data connections operation response. DataConnectionListResult } // KustoPoolDataConnectionsClientUpdateResponse contains the response from method KustoPoolDataConnectionsClient.BeginUpdate. type KustoPoolDataConnectionsClientUpdateResponse struct { + // Class representing a data connection. DataConnectionClassification } +// MarshalJSON implements the json.Marshaller interface for type KustoPoolDataConnectionsClientUpdateResponse. +func (k KustoPoolDataConnectionsClientUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(k.DataConnectionClassification) +} + // UnmarshalJSON implements the json.Unmarshaller interface for type KustoPoolDataConnectionsClientUpdateResponse. func (k *KustoPoolDataConnectionsClientUpdateResponse) UnmarshalJSON(data []byte) error { res, err := unmarshalDataConnectionClassification(data) @@ -361,11 +426,13 @@ func (k *KustoPoolDataConnectionsClientUpdateResponse) UnmarshalJSON(data []byte // KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse contains the response from method KustoPoolDatabasePrincipalAssignmentsClient.CheckNameAvailability. type KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. CheckNameResult } // KustoPoolDatabasePrincipalAssignmentsClientCreateOrUpdateResponse contains the response from method KustoPoolDatabasePrincipalAssignmentsClient.BeginCreateOrUpdate. type KustoPoolDatabasePrincipalAssignmentsClientCreateOrUpdateResponse struct { + // Class representing a database principal assignment. DatabasePrincipalAssignment } @@ -376,19 +443,27 @@ type KustoPoolDatabasePrincipalAssignmentsClientDeleteResponse struct { // KustoPoolDatabasePrincipalAssignmentsClientGetResponse contains the response from method KustoPoolDatabasePrincipalAssignmentsClient.Get. type KustoPoolDatabasePrincipalAssignmentsClientGetResponse struct { + // Class representing a database principal assignment. DatabasePrincipalAssignment } // KustoPoolDatabasePrincipalAssignmentsClientListResponse contains the response from method KustoPoolDatabasePrincipalAssignmentsClient.NewListPager. type KustoPoolDatabasePrincipalAssignmentsClientListResponse struct { + // The list Kusto database principal assignments operation response. DatabasePrincipalAssignmentListResult } // KustoPoolDatabasesClientCreateOrUpdateResponse contains the response from method KustoPoolDatabasesClient.BeginCreateOrUpdate. type KustoPoolDatabasesClientCreateOrUpdateResponse struct { + // Class representing a Kusto database. DatabaseClassification } +// MarshalJSON implements the json.Marshaller interface for type KustoPoolDatabasesClientCreateOrUpdateResponse. +func (k KustoPoolDatabasesClientCreateOrUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(k.DatabaseClassification) +} + // UnmarshalJSON implements the json.Unmarshaller interface for type KustoPoolDatabasesClientCreateOrUpdateResponse. func (k *KustoPoolDatabasesClientCreateOrUpdateResponse) UnmarshalJSON(data []byte) error { res, err := unmarshalDatabaseClassification(data) @@ -406,6 +481,7 @@ type KustoPoolDatabasesClientDeleteResponse struct { // KustoPoolDatabasesClientGetResponse contains the response from method KustoPoolDatabasesClient.Get. type KustoPoolDatabasesClientGetResponse struct { + // Class representing a Kusto database. DatabaseClassification } @@ -421,14 +497,21 @@ func (k *KustoPoolDatabasesClientGetResponse) UnmarshalJSON(data []byte) error { // KustoPoolDatabasesClientListByKustoPoolResponse contains the response from method KustoPoolDatabasesClient.NewListByKustoPoolPager. type KustoPoolDatabasesClientListByKustoPoolResponse struct { + // The list Kusto databases operation response. DatabaseListResult } // KustoPoolDatabasesClientUpdateResponse contains the response from method KustoPoolDatabasesClient.BeginUpdate. type KustoPoolDatabasesClientUpdateResponse struct { + // Class representing a Kusto database. DatabaseClassification } +// MarshalJSON implements the json.Marshaller interface for type KustoPoolDatabasesClientUpdateResponse. +func (k KustoPoolDatabasesClientUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(k.DatabaseClassification) +} + // UnmarshalJSON implements the json.Unmarshaller interface for type KustoPoolDatabasesClientUpdateResponse. func (k *KustoPoolDatabasesClientUpdateResponse) UnmarshalJSON(data []byte) error { res, err := unmarshalDatabaseClassification(data) @@ -441,11 +524,13 @@ func (k *KustoPoolDatabasesClientUpdateResponse) UnmarshalJSON(data []byte) erro // KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityResponse contains the response from method KustoPoolPrincipalAssignmentsClient.CheckNameAvailability. type KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. CheckNameResult } // KustoPoolPrincipalAssignmentsClientCreateOrUpdateResponse contains the response from method KustoPoolPrincipalAssignmentsClient.BeginCreateOrUpdate. type KustoPoolPrincipalAssignmentsClientCreateOrUpdateResponse struct { + // Class representing a cluster principal assignment. ClusterPrincipalAssignment } @@ -456,16 +541,19 @@ type KustoPoolPrincipalAssignmentsClientDeleteResponse struct { // KustoPoolPrincipalAssignmentsClientGetResponse contains the response from method KustoPoolPrincipalAssignmentsClient.Get. type KustoPoolPrincipalAssignmentsClientGetResponse struct { + // Class representing a cluster principal assignment. ClusterPrincipalAssignment } // KustoPoolPrincipalAssignmentsClientListResponse contains the response from method KustoPoolPrincipalAssignmentsClient.NewListPager. type KustoPoolPrincipalAssignmentsClientListResponse struct { + // The list Kusto cluster principal assignments operation response. ClusterPrincipalAssignmentListResult } // KustoPoolPrivateLinkResourcesClientListResponse contains the response from method KustoPoolPrivateLinkResourcesClient.NewListPager. type KustoPoolPrivateLinkResourcesClientListResponse struct { + // The list Kusto Private Link Resources operation response. PrivateLinkResources } @@ -476,11 +564,13 @@ type KustoPoolsClientAddLanguageExtensionsResponse struct { // KustoPoolsClientCheckNameAvailabilityResponse contains the response from method KustoPoolsClient.CheckNameAvailability. type KustoPoolsClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. CheckNameResult } // KustoPoolsClientCreateOrUpdateResponse contains the response from method KustoPoolsClient.BeginCreateOrUpdate. type KustoPoolsClientCreateOrUpdateResponse struct { + // Class representing a Kusto kusto pool. KustoPool } @@ -496,31 +586,37 @@ type KustoPoolsClientDetachFollowerDatabasesResponse struct { // KustoPoolsClientGetResponse contains the response from method KustoPoolsClient.Get. type KustoPoolsClientGetResponse struct { + // Class representing a Kusto kusto pool. KustoPool } // KustoPoolsClientListByWorkspaceResponse contains the response from method KustoPoolsClient.ListByWorkspace. type KustoPoolsClientListByWorkspaceResponse struct { + // The list Kusto pools operation response. KustoPoolListResult } // KustoPoolsClientListFollowerDatabasesResponse contains the response from method KustoPoolsClient.NewListFollowerDatabasesPager. type KustoPoolsClientListFollowerDatabasesResponse struct { + // The list Kusto database principals operation response. FollowerDatabaseListResult } // KustoPoolsClientListLanguageExtensionsResponse contains the response from method KustoPoolsClient.NewListLanguageExtensionsPager. type KustoPoolsClientListLanguageExtensionsResponse struct { + // The list of language extension objects. LanguageExtensionsList } // KustoPoolsClientListSKUsByResourceResponse contains the response from method KustoPoolsClient.NewListSKUsByResourcePager. type KustoPoolsClientListSKUsByResourceResponse struct { + // List of available SKUs for a Kusto Pool. ListResourceSKUsResult } // KustoPoolsClientListSKUsResponse contains the response from method KustoPoolsClient.NewListSKUsPager. type KustoPoolsClientListSKUsResponse struct { + // The list of the SKU descriptions SKUDescriptionList } @@ -541,26 +637,31 @@ type KustoPoolsClientStopResponse struct { // KustoPoolsClientUpdateResponse contains the response from method KustoPoolsClient.BeginUpdate. type KustoPoolsClientUpdateResponse struct { + // Class representing a Kusto kusto pool. KustoPool } // LibrariesClientListByWorkspaceResponse contains the response from method LibrariesClient.NewListByWorkspacePager. type LibrariesClientListByWorkspaceResponse struct { + // A list of Library resources. LibraryListResponse } // LibraryClientGetResponse contains the response from method LibraryClient.Get. type LibraryClientGetResponse struct { + // Library response details LibraryResource } // OperationsClientCheckNameAvailabilityResponse contains the response from method OperationsClient.CheckNameAvailability. type OperationsClientCheckNameAvailabilityResponse struct { + // A response saying whether the workspace name is available CheckNameAvailabilityResponse } // OperationsClientGetAzureAsyncHeaderResultResponse contains the response from method OperationsClient.GetAzureAsyncHeaderResult. type OperationsClientGetAzureAsyncHeaderResultResponse struct { + // An operation OperationResource } @@ -577,21 +678,25 @@ type OperationsClientListResponse struct { // PrivateEndpointConnectionsClientCreateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreate. type PrivateEndpointConnectionsClientCreateResponse struct { + // A private endpoint connection PrivateEndpointConnection } // PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete. type PrivateEndpointConnectionsClientDeleteResponse struct { + // An operation OperationResource } // PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. type PrivateEndpointConnectionsClientGetResponse struct { + // A private endpoint connection PrivateEndpointConnection } // PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager. type PrivateEndpointConnectionsClientListResponse struct { + // A list of private endpoint connections PrivateEndpointConnectionList } @@ -607,16 +712,19 @@ type PrivateEndpointConnectionsPrivateLinkHubClientListResponse struct { // PrivateLinkHubPrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkHubPrivateLinkResourcesClient.Get. type PrivateLinkHubPrivateLinkResourcesClientGetResponse struct { + // A private link resource PrivateLinkResource } // PrivateLinkHubPrivateLinkResourcesClientListResponse contains the response from method PrivateLinkHubPrivateLinkResourcesClient.NewListPager. type PrivateLinkHubPrivateLinkResourcesClientListResponse struct { + // A list of private link resources PrivateLinkResourceListResult } // PrivateLinkHubsClientCreateOrUpdateResponse contains the response from method PrivateLinkHubsClient.CreateOrUpdate. type PrivateLinkHubsClientCreateOrUpdateResponse struct { + // A privateLinkHub PrivateLinkHub } @@ -627,91 +735,109 @@ type PrivateLinkHubsClientDeleteResponse struct { // PrivateLinkHubsClientGetResponse contains the response from method PrivateLinkHubsClient.Get. type PrivateLinkHubsClientGetResponse struct { + // A privateLinkHub PrivateLinkHub } // PrivateLinkHubsClientListByResourceGroupResponse contains the response from method PrivateLinkHubsClient.NewListByResourceGroupPager. type PrivateLinkHubsClientListByResourceGroupResponse struct { + // List of privateLinkHubs PrivateLinkHubInfoListResult } // PrivateLinkHubsClientListResponse contains the response from method PrivateLinkHubsClient.NewListPager. type PrivateLinkHubsClientListResponse struct { + // List of privateLinkHubs PrivateLinkHubInfoListResult } // PrivateLinkHubsClientUpdateResponse contains the response from method PrivateLinkHubsClient.Update. type PrivateLinkHubsClientUpdateResponse struct { + // A privateLinkHub PrivateLinkHub } // PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get. type PrivateLinkResourcesClientGetResponse struct { + // A private link resource PrivateLinkResource } // PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.NewListPager. type PrivateLinkResourcesClientListResponse struct { + // A list of private link resources PrivateLinkResourceListResult } // RestorableDroppedSQLPoolsClientGetResponse contains the response from method RestorableDroppedSQLPoolsClient.Get. type RestorableDroppedSQLPoolsClientGetResponse struct { + // A restorable dropped Sql pool RestorableDroppedSQLPool } // RestorableDroppedSQLPoolsClientListByWorkspaceResponse contains the response from method RestorableDroppedSQLPoolsClient.NewListByWorkspacePager. type RestorableDroppedSQLPoolsClientListByWorkspaceResponse struct { + // The response to a list restorable dropped Sql pools request RestorableDroppedSQLPoolListResult } // SQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method SQLPoolBlobAuditingPoliciesClient.CreateOrUpdate. type SQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse struct { + // A Sql pool blob auditing policy. SQLPoolBlobAuditingPolicy } // SQLPoolBlobAuditingPoliciesClientGetResponse contains the response from method SQLPoolBlobAuditingPoliciesClient.Get. type SQLPoolBlobAuditingPoliciesClientGetResponse struct { + // A Sql pool blob auditing policy. SQLPoolBlobAuditingPolicy } // SQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse contains the response from method SQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager. type SQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse struct { + // A list of Sql pool auditing settings. SQLPoolBlobAuditingPolicyListResult } // SQLPoolColumnsClientGetResponse contains the response from method SQLPoolColumnsClient.Get. type SQLPoolColumnsClientGetResponse struct { + // A Sql pool column resource. SQLPoolColumn } // SQLPoolConnectionPoliciesClientGetResponse contains the response from method SQLPoolConnectionPoliciesClient.Get. type SQLPoolConnectionPoliciesClientGetResponse struct { + // A Sql pool connection policy. SQLPoolConnectionPolicy } // SQLPoolDataWarehouseUserActivitiesClientGetResponse contains the response from method SQLPoolDataWarehouseUserActivitiesClient.Get. type SQLPoolDataWarehouseUserActivitiesClientGetResponse struct { + // User activities of a data warehouse DataWarehouseUserActivities } // SQLPoolGeoBackupPoliciesClientCreateOrUpdateResponse contains the response from method SQLPoolGeoBackupPoliciesClient.CreateOrUpdate. type SQLPoolGeoBackupPoliciesClientCreateOrUpdateResponse struct { + // A database geo backup policy. GeoBackupPolicy } // SQLPoolGeoBackupPoliciesClientGetResponse contains the response from method SQLPoolGeoBackupPoliciesClient.Get. type SQLPoolGeoBackupPoliciesClientGetResponse struct { + // A database geo backup policy. GeoBackupPolicy } // SQLPoolGeoBackupPoliciesClientListResponse contains the response from method SQLPoolGeoBackupPoliciesClient.NewListPager. type SQLPoolGeoBackupPoliciesClientListResponse struct { + // The response to a list geo backup policies request. GeoBackupPolicyListResult } // SQLPoolMaintenanceWindowOptionsClientGetResponse contains the response from method SQLPoolMaintenanceWindowOptionsClient.Get. type SQLPoolMaintenanceWindowOptionsClientGetResponse struct { + // Maintenance window options. MaintenanceWindowOptions } @@ -722,26 +848,31 @@ type SQLPoolMaintenanceWindowsClientCreateOrUpdateResponse struct { // SQLPoolMaintenanceWindowsClientGetResponse contains the response from method SQLPoolMaintenanceWindowsClient.Get. type SQLPoolMaintenanceWindowsClientGetResponse struct { + // Maintenance windows. MaintenanceWindows } // SQLPoolMetadataSyncConfigsClientCreateResponse contains the response from method SQLPoolMetadataSyncConfigsClient.Create. type SQLPoolMetadataSyncConfigsClientCreateResponse struct { + // Configuration for metadata sync MetadataSyncConfig } // SQLPoolMetadataSyncConfigsClientGetResponse contains the response from method SQLPoolMetadataSyncConfigsClient.Get. type SQLPoolMetadataSyncConfigsClientGetResponse struct { + // Configuration for metadata sync MetadataSyncConfig } // SQLPoolOperationResultsClientGetLocationHeaderResultResponse contains the response from method SQLPoolOperationResultsClient.BeginGetLocationHeaderResult. type SQLPoolOperationResultsClientGetLocationHeaderResultResponse struct { + // A SQL Analytics pool SQLPool } // SQLPoolOperationsClientListResponse contains the response from method SQLPoolOperationsClient.NewListPager. type SQLPoolOperationsClientListResponse struct { + // The response to a list Sql pool operations request SQLPoolBlobAuditingPolicySQLPoolOperationListResult } @@ -752,16 +883,19 @@ type SQLPoolRecommendedSensitivityLabelsClientUpdateResponse struct { // SQLPoolReplicationLinksClientGetByNameResponse contains the response from method SQLPoolReplicationLinksClient.GetByName. type SQLPoolReplicationLinksClientGetByNameResponse struct { + // Represents a Sql pool replication link. ReplicationLink } // SQLPoolReplicationLinksClientListResponse contains the response from method SQLPoolReplicationLinksClient.NewListPager. type SQLPoolReplicationLinksClientListResponse struct { + // Represents the response to a List Sql pool replication link request. ReplicationLinkListResult } // SQLPoolRestorePointsClientCreateResponse contains the response from method SQLPoolRestorePointsClient.BeginCreate. type SQLPoolRestorePointsClientCreateResponse struct { + // Database restore points. RestorePoint } @@ -772,41 +906,49 @@ type SQLPoolRestorePointsClientDeleteResponse struct { // SQLPoolRestorePointsClientGetResponse contains the response from method SQLPoolRestorePointsClient.Get. type SQLPoolRestorePointsClientGetResponse struct { + // Database restore points. RestorePoint } // SQLPoolRestorePointsClientListResponse contains the response from method SQLPoolRestorePointsClient.NewListPager. type SQLPoolRestorePointsClientListResponse struct { + // A list of long term retention backups. RestorePointListResult } // SQLPoolSchemasClientGetResponse contains the response from method SQLPoolSchemasClient.Get. type SQLPoolSchemasClientGetResponse struct { + // A Sql pool schema resource. SQLPoolSchema } // SQLPoolSchemasClientListResponse contains the response from method SQLPoolSchemasClient.NewListPager. type SQLPoolSchemasClientListResponse struct { + // A list of Sql pool schemas. SQLPoolSchemaListResult } // SQLPoolSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method SQLPoolSecurityAlertPoliciesClient.CreateOrUpdate. type SQLPoolSecurityAlertPoliciesClientCreateOrUpdateResponse struct { + // A Sql pool security alert policy. SQLPoolSecurityAlertPolicy } // SQLPoolSecurityAlertPoliciesClientGetResponse contains the response from method SQLPoolSecurityAlertPoliciesClient.Get. type SQLPoolSecurityAlertPoliciesClientGetResponse struct { + // A Sql pool security alert policy. SQLPoolSecurityAlertPolicy } // SQLPoolSecurityAlertPoliciesClientListResponse contains the response from method SQLPoolSecurityAlertPoliciesClient.NewListPager. type SQLPoolSecurityAlertPoliciesClientListResponse struct { + // A list of SQL pool security alert policies. ListSQLPoolSecurityAlertPolicies } // SQLPoolSensitivityLabelsClientCreateOrUpdateResponse contains the response from method SQLPoolSensitivityLabelsClient.CreateOrUpdate. type SQLPoolSensitivityLabelsClientCreateOrUpdateResponse struct { + // A sensitivity label. SensitivityLabel } @@ -827,16 +969,19 @@ type SQLPoolSensitivityLabelsClientEnableRecommendationResponse struct { // SQLPoolSensitivityLabelsClientGetResponse contains the response from method SQLPoolSensitivityLabelsClient.Get. type SQLPoolSensitivityLabelsClientGetResponse struct { + // A sensitivity label. SensitivityLabel } // SQLPoolSensitivityLabelsClientListCurrentResponse contains the response from method SQLPoolSensitivityLabelsClient.NewListCurrentPager. type SQLPoolSensitivityLabelsClientListCurrentResponse struct { + // A list of sensitivity labels. SensitivityLabelListResult } // SQLPoolSensitivityLabelsClientListRecommendedResponse contains the response from method SQLPoolSensitivityLabelsClient.NewListRecommendedPager. type SQLPoolSensitivityLabelsClientListRecommendedResponse struct { + // A list of sensitivity labels. SensitivityLabelListResult } @@ -847,41 +992,49 @@ type SQLPoolSensitivityLabelsClientUpdateResponse struct { // SQLPoolTableColumnsClientListByTableNameResponse contains the response from method SQLPoolTableColumnsClient.NewListByTableNamePager. type SQLPoolTableColumnsClientListByTableNameResponse struct { + // A list of Sql pool columns. SQLPoolColumnListResult } // SQLPoolTablesClientGetResponse contains the response from method SQLPoolTablesClient.Get. type SQLPoolTablesClientGetResponse struct { + // A Sql pool table resource. SQLPoolTable } // SQLPoolTablesClientListBySchemaResponse contains the response from method SQLPoolTablesClient.NewListBySchemaPager. type SQLPoolTablesClientListBySchemaResponse struct { + // A list of Sql pool tables. SQLPoolTableListResult } // SQLPoolTransparentDataEncryptionsClientCreateOrUpdateResponse contains the response from method SQLPoolTransparentDataEncryptionsClient.CreateOrUpdate. type SQLPoolTransparentDataEncryptionsClientCreateOrUpdateResponse struct { + // Represents a Sql pool transparent data encryption configuration. TransparentDataEncryption } // SQLPoolTransparentDataEncryptionsClientGetResponse contains the response from method SQLPoolTransparentDataEncryptionsClient.Get. type SQLPoolTransparentDataEncryptionsClientGetResponse struct { + // Represents a Sql pool transparent data encryption configuration. TransparentDataEncryption } // SQLPoolTransparentDataEncryptionsClientListResponse contains the response from method SQLPoolTransparentDataEncryptionsClient.NewListPager. type SQLPoolTransparentDataEncryptionsClientListResponse struct { + // A list of transparent data encryption configurations. TransparentDataEncryptionListResult } // SQLPoolUsagesClientListResponse contains the response from method SQLPoolUsagesClient.NewListPager. type SQLPoolUsagesClientListResponse struct { + // The response to a list Sql pool usages request. SQLPoolUsageListResult } // SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse contains the response from method SQLPoolVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate. type SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse struct { + // A Sql pool vulnerability assessment rule baseline. SQLPoolVulnerabilityAssessmentRuleBaseline } @@ -892,16 +1045,19 @@ type SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteResponse struct { // SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetResponse contains the response from method SQLPoolVulnerabilityAssessmentRuleBaselinesClient.Get. type SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetResponse struct { + // A Sql pool vulnerability assessment rule baseline. SQLPoolVulnerabilityAssessmentRuleBaseline } // SQLPoolVulnerabilityAssessmentScansClientExportResponse contains the response from method SQLPoolVulnerabilityAssessmentScansClient.Export. type SQLPoolVulnerabilityAssessmentScansClientExportResponse struct { + // A Sql pool Vulnerability Assessment scan export resource. SQLPoolVulnerabilityAssessmentScansExport } // SQLPoolVulnerabilityAssessmentScansClientGetResponse contains the response from method SQLPoolVulnerabilityAssessmentScansClient.Get. type SQLPoolVulnerabilityAssessmentScansClientGetResponse struct { + // A vulnerability assessment scan record. VulnerabilityAssessmentScanRecord } @@ -912,11 +1068,13 @@ type SQLPoolVulnerabilityAssessmentScansClientInitiateScanResponse struct { // SQLPoolVulnerabilityAssessmentScansClientListResponse contains the response from method SQLPoolVulnerabilityAssessmentScansClient.NewListPager. type SQLPoolVulnerabilityAssessmentScansClientListResponse struct { + // A list of vulnerability assessment scan records. VulnerabilityAssessmentScanRecordListResult } // SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method SQLPoolVulnerabilityAssessmentsClient.CreateOrUpdate. type SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { + // A Sql pool vulnerability assessment. SQLPoolVulnerabilityAssessment } @@ -927,16 +1085,19 @@ type SQLPoolVulnerabilityAssessmentsClientDeleteResponse struct { // SQLPoolVulnerabilityAssessmentsClientGetResponse contains the response from method SQLPoolVulnerabilityAssessmentsClient.Get. type SQLPoolVulnerabilityAssessmentsClientGetResponse struct { + // A Sql pool vulnerability assessment. SQLPoolVulnerabilityAssessment } // SQLPoolVulnerabilityAssessmentsClientListResponse contains the response from method SQLPoolVulnerabilityAssessmentsClient.NewListPager. type SQLPoolVulnerabilityAssessmentsClientListResponse struct { + // A list of the Sql pool's vulnerability assessments. SQLPoolVulnerabilityAssessmentListResult } // SQLPoolWorkloadClassifierClientCreateOrUpdateResponse contains the response from method SQLPoolWorkloadClassifierClient.BeginCreateOrUpdate. type SQLPoolWorkloadClassifierClientCreateOrUpdateResponse struct { + // Workload classifier operations for a data warehouse WorkloadClassifier } @@ -947,16 +1108,19 @@ type SQLPoolWorkloadClassifierClientDeleteResponse struct { // SQLPoolWorkloadClassifierClientGetResponse contains the response from method SQLPoolWorkloadClassifierClient.Get. type SQLPoolWorkloadClassifierClientGetResponse struct { + // Workload classifier operations for a data warehouse WorkloadClassifier } // SQLPoolWorkloadClassifierClientListResponse contains the response from method SQLPoolWorkloadClassifierClient.NewListPager. type SQLPoolWorkloadClassifierClientListResponse struct { + // A list of workload classifiers for a workload group. WorkloadClassifierListResult } // SQLPoolWorkloadGroupClientCreateOrUpdateResponse contains the response from method SQLPoolWorkloadGroupClient.BeginCreateOrUpdate. type SQLPoolWorkloadGroupClientCreateOrUpdateResponse struct { + // Workload group operations for a sql pool WorkloadGroup } @@ -967,36 +1131,43 @@ type SQLPoolWorkloadGroupClientDeleteResponse struct { // SQLPoolWorkloadGroupClientGetResponse contains the response from method SQLPoolWorkloadGroupClient.Get. type SQLPoolWorkloadGroupClientGetResponse struct { + // Workload group operations for a sql pool WorkloadGroup } // SQLPoolWorkloadGroupClientListResponse contains the response from method SQLPoolWorkloadGroupClient.NewListPager. type SQLPoolWorkloadGroupClientListResponse struct { + // A list of workload groups. WorkloadGroupListResult } // SQLPoolsClientCreateResponse contains the response from method SQLPoolsClient.BeginCreate. type SQLPoolsClientCreateResponse struct { + // A SQL Analytics pool SQLPool } // SQLPoolsClientDeleteResponse contains the response from method SQLPoolsClient.BeginDelete. type SQLPoolsClientDeleteResponse struct { + // A SQL Analytics pool SQLPool } // SQLPoolsClientGetResponse contains the response from method SQLPoolsClient.Get. type SQLPoolsClientGetResponse struct { + // A SQL Analytics pool SQLPool } // SQLPoolsClientListByWorkspaceResponse contains the response from method SQLPoolsClient.NewListByWorkspacePager. type SQLPoolsClientListByWorkspaceResponse struct { + // List of SQL pools SQLPoolInfoListResult } // SQLPoolsClientPauseResponse contains the response from method SQLPoolsClient.BeginPause. type SQLPoolsClientPauseResponse struct { + // A SQL Analytics pool SQLPool } @@ -1007,26 +1178,31 @@ type SQLPoolsClientRenameResponse struct { // SQLPoolsClientResumeResponse contains the response from method SQLPoolsClient.BeginResume. type SQLPoolsClientResumeResponse struct { + // A SQL Analytics pool SQLPool } // SQLPoolsClientUpdateResponse contains the response from method SQLPoolsClient.BeginUpdate. type SQLPoolsClientUpdateResponse struct { + // A SQL Analytics pool SQLPool } // SparkConfigurationClientGetResponse contains the response from method SparkConfigurationClient.Get. type SparkConfigurationClientGetResponse struct { + // SparkConfiguration response details SparkConfigurationResource } // SparkConfigurationsClientListByWorkspaceResponse contains the response from method SparkConfigurationsClient.NewListByWorkspacePager. type SparkConfigurationsClientListByWorkspaceResponse struct { + // A list of SparkConfiguration resources. SparkConfigurationListResponse } // WorkspaceAADAdminsClientCreateOrUpdateResponse contains the response from method WorkspaceAADAdminsClient.BeginCreateOrUpdate. type WorkspaceAADAdminsClientCreateOrUpdateResponse struct { + // Workspace active directory administrator WorkspaceAADAdminInfo } @@ -1037,61 +1213,73 @@ type WorkspaceAADAdminsClientDeleteResponse struct { // WorkspaceAADAdminsClientGetResponse contains the response from method WorkspaceAADAdminsClient.Get. type WorkspaceAADAdminsClientGetResponse struct { + // Workspace active directory administrator WorkspaceAADAdminInfo } // WorkspaceManagedIdentitySQLControlSettingsClientCreateOrUpdateResponse contains the response from method WorkspaceManagedIdentitySQLControlSettingsClient.BeginCreateOrUpdate. type WorkspaceManagedIdentitySQLControlSettingsClientCreateOrUpdateResponse struct { + // Sql Control Settings for workspace managed identity ManagedIdentitySQLControlSettingsModel } // WorkspaceManagedIdentitySQLControlSettingsClientGetResponse contains the response from method WorkspaceManagedIdentitySQLControlSettingsClient.Get. type WorkspaceManagedIdentitySQLControlSettingsClientGetResponse struct { + // Sql Control Settings for workspace managed identity ManagedIdentitySQLControlSettingsModel } // WorkspaceManagedSQLServerBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method WorkspaceManagedSQLServerBlobAuditingPoliciesClient.BeginCreateOrUpdate. type WorkspaceManagedSQLServerBlobAuditingPoliciesClientCreateOrUpdateResponse struct { + // A server blob auditing policy. ServerBlobAuditingPolicy } // WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetResponse contains the response from method WorkspaceManagedSQLServerBlobAuditingPoliciesClient.Get. type WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetResponse struct { + // A server blob auditing policy. ServerBlobAuditingPolicy } // WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceResponse contains the response from method WorkspaceManagedSQLServerBlobAuditingPoliciesClient.NewListByWorkspacePager. type WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceResponse struct { + // A list of server auditing settings. ServerBlobAuditingPolicyListResult } // WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetResponse contains the response from method WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.Get. type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetResponse struct { + // Dedicated Sql Minimal Tls Settings Info DedicatedSQLminimalTLSSettings } // WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListResponse contains the response from method WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.NewListPager. type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListResponse struct { + // A list of the server's dedicated sql minimal tls settings. DedicatedSQLminimalTLSSettingsListResult } // WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientUpdateResponse contains the response from method WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.BeginUpdate. type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientUpdateResponse struct { + // Dedicated Sql Minimal Tls Settings Info DedicatedSQLminimalTLSSettings } // WorkspaceManagedSQLServerEncryptionProtectorClientCreateOrUpdateResponse contains the response from method WorkspaceManagedSQLServerEncryptionProtectorClient.BeginCreateOrUpdate. type WorkspaceManagedSQLServerEncryptionProtectorClientCreateOrUpdateResponse struct { + // The server encryption protector. EncryptionProtector } // WorkspaceManagedSQLServerEncryptionProtectorClientGetResponse contains the response from method WorkspaceManagedSQLServerEncryptionProtectorClient.Get. type WorkspaceManagedSQLServerEncryptionProtectorClientGetResponse struct { + // The server encryption protector. EncryptionProtector } // WorkspaceManagedSQLServerEncryptionProtectorClientListResponse contains the response from method WorkspaceManagedSQLServerEncryptionProtectorClient.NewListPager. type WorkspaceManagedSQLServerEncryptionProtectorClientListResponse struct { + // A list of server encryption protectors. EncryptionProtectorListResult } @@ -1102,51 +1290,61 @@ type WorkspaceManagedSQLServerEncryptionProtectorClientRevalidateResponse struct // WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.BeginCreateOrUpdate. type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientCreateOrUpdateResponse struct { + // An extended server blob auditing policy. ExtendedServerBlobAuditingPolicy } // WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetResponse contains the response from method WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.Get. type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetResponse struct { + // An extended server blob auditing policy. ExtendedServerBlobAuditingPolicy } // WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceResponse contains the response from method WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.NewListByWorkspacePager. type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceResponse struct { + // A list of server extended auditing settings. ExtendedServerBlobAuditingPolicyListResult } // WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetResponse contains the response from method WorkspaceManagedSQLServerRecoverableSQLPoolsClient.Get. type WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetResponse struct { + // A recoverable sql pool RecoverableSQLPool } // WorkspaceManagedSQLServerRecoverableSQLPoolsClientListResponse contains the response from method WorkspaceManagedSQLServerRecoverableSQLPoolsClient.NewListPager. type WorkspaceManagedSQLServerRecoverableSQLPoolsClientListResponse struct { + // The response to a list recoverable sql pools request RecoverableSQLPoolListResult } // WorkspaceManagedSQLServerSecurityAlertPolicyClientCreateOrUpdateResponse contains the response from method WorkspaceManagedSQLServerSecurityAlertPolicyClient.BeginCreateOrUpdate. type WorkspaceManagedSQLServerSecurityAlertPolicyClientCreateOrUpdateResponse struct { + // Workspace managed Sql server security alert policy. ServerSecurityAlertPolicy } // WorkspaceManagedSQLServerSecurityAlertPolicyClientGetResponse contains the response from method WorkspaceManagedSQLServerSecurityAlertPolicyClient.Get. type WorkspaceManagedSQLServerSecurityAlertPolicyClientGetResponse struct { + // Workspace managed Sql server security alert policy. ServerSecurityAlertPolicy } // WorkspaceManagedSQLServerSecurityAlertPolicyClientListResponse contains the response from method WorkspaceManagedSQLServerSecurityAlertPolicyClient.NewListPager. type WorkspaceManagedSQLServerSecurityAlertPolicyClientListResponse struct { + // A list of the workspace managed sql server's security alert policies. ServerSecurityAlertPolicyListResult } // WorkspaceManagedSQLServerUsagesClientListResponse contains the response from method WorkspaceManagedSQLServerUsagesClient.NewListPager. type WorkspaceManagedSQLServerUsagesClientListResponse struct { + // Represents the response to a list server metrics request. ServerUsageListResult } // WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.CreateOrUpdate. type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { + // A server vulnerability assessment. ServerVulnerabilityAssessment } @@ -1157,16 +1355,19 @@ type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteResponse struc // WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetResponse contains the response from method WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.Get. type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetResponse struct { + // A server vulnerability assessment. ServerVulnerabilityAssessment } // WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListResponse contains the response from method WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.NewListPager. type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListResponse struct { + // A list of the server's vulnerability assessments. ServerVulnerabilityAssessmentListResult } // WorkspaceSQLAADAdminsClientCreateOrUpdateResponse contains the response from method WorkspaceSQLAADAdminsClient.BeginCreateOrUpdate. type WorkspaceSQLAADAdminsClientCreateOrUpdateResponse struct { + // Workspace active directory administrator WorkspaceAADAdminInfo } @@ -1177,35 +1378,42 @@ type WorkspaceSQLAADAdminsClientDeleteResponse struct { // WorkspaceSQLAADAdminsClientGetResponse contains the response from method WorkspaceSQLAADAdminsClient.Get. type WorkspaceSQLAADAdminsClientGetResponse struct { + // Workspace active directory administrator WorkspaceAADAdminInfo } // WorkspacesClientCreateOrUpdateResponse contains the response from method WorkspacesClient.BeginCreateOrUpdate. type WorkspacesClientCreateOrUpdateResponse struct { + // A workspace Workspace } // WorkspacesClientDeleteResponse contains the response from method WorkspacesClient.BeginDelete. type WorkspacesClientDeleteResponse struct { + // A workspace Workspace } // WorkspacesClientGetResponse contains the response from method WorkspacesClient.Get. type WorkspacesClientGetResponse struct { + // A workspace Workspace } // WorkspacesClientListByResourceGroupResponse contains the response from method WorkspacesClient.NewListByResourceGroupPager. type WorkspacesClientListByResourceGroupResponse struct { + // List of workspaces WorkspaceInfoListResult } // WorkspacesClientListResponse contains the response from method WorkspacesClient.NewListPager. type WorkspacesClientListResponse struct { + // List of workspaces WorkspaceInfoListResult } // WorkspacesClientUpdateResponse contains the response from method WorkspacesClient.BeginUpdate. type WorkspacesClientUpdateResponse struct { + // A workspace Workspace } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/restorabledroppedsqlpools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/restorabledroppedsqlpools_client.go index 5c7898b1..6f16e2b8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/restorabledroppedsqlpools_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/restorabledroppedsqlpools_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type RestorableDroppedSQLPoolsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRestorableDroppedSQLPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableDroppedSQLPoolsClient, error) { - cl, err := arm.NewClient(moduleName+".RestorableDroppedSQLPoolsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewRestorableDroppedSQLPoolsClient(subscriptionID string, credential azcore // - options - RestorableDroppedSQLPoolsClientGetOptions contains the optional parameters for the RestorableDroppedSQLPoolsClient.Get // method. func (client *RestorableDroppedSQLPoolsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, restorableDroppedSQLPoolID string, options *RestorableDroppedSQLPoolsClientGetOptions) (RestorableDroppedSQLPoolsClientGetResponse, error) { + var err error + const operationName = "RestorableDroppedSQLPoolsClient.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, restorableDroppedSQLPoolID, options) if err != nil { return RestorableDroppedSQLPoolsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RestorableDroppedSQLPoolsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RestorableDroppedSQLPoolsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RestorableDroppedSQLPoolsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -120,6 +126,7 @@ func (client *RestorableDroppedSQLPoolsClient) NewListByWorkspacePager(resourceG return false }, Fetcher: func(ctx context.Context, page *RestorableDroppedSQLPoolsClientListByWorkspaceResponse) (RestorableDroppedSQLPoolsClientListByWorkspaceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RestorableDroppedSQLPoolsClient.NewListByWorkspacePager") req, err := client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { return RestorableDroppedSQLPoolsClientListByWorkspaceResponse{}, err @@ -133,6 +140,7 @@ func (client *RestorableDroppedSQLPoolsClient) NewListByWorkspacePager(resourceG } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sparkconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sparkconfiguration_client.go index 4b9f787f..652621db 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sparkconfiguration_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sparkconfiguration_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SparkConfigurationClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSparkConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SparkConfigurationClient, error) { - cl, err := arm.NewClient(moduleName+".SparkConfigurationClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -53,18 +52,25 @@ func NewSparkConfigurationClient(subscriptionID string, credential azcore.TokenC // - workspaceName - The name of the workspace. // - options - SparkConfigurationClientGetOptions contains the optional parameters for the SparkConfigurationClient.Get method. func (client *SparkConfigurationClient) Get(ctx context.Context, resourceGroupName string, sparkConfigurationName string, workspaceName string, options *SparkConfigurationClientGetOptions) (SparkConfigurationClientGetResponse, error) { + var err error + const operationName = "SparkConfigurationClient.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, sparkConfigurationName, workspaceName, options) if err != nil { return SparkConfigurationClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SparkConfigurationClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SparkConfigurationClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SparkConfigurationClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sparkconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sparkconfigurations_client.go index 7d402cc6..5d7b16ba 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sparkconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sparkconfigurations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SparkConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSparkConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SparkConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".SparkConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,25 +56,20 @@ func (client *SparkConfigurationsClient) NewListByWorkspacePager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SparkConfigurationsClientListByWorkspaceResponse) (SparkConfigurationsClientListByWorkspaceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SparkConfigurationsClient.NewListByWorkspacePager") + 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.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) if err != nil { return SparkConfigurationsClientListByWorkspaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SparkConfigurationsClientListByWorkspaceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SparkConfigurationsClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) - } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolblobauditingpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolblobauditingpolicies_client.go index 35cc3778..a5791d2b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolblobauditingpolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolblobauditingpolicies_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolBlobAuditingPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolBlobAuditingPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolBlobAuditingPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewSQLPoolBlobAuditingPoliciesClient(subscriptionID string, credential azco // - options - SQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.CreateOrUpdate // method. func (client *SQLPoolBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters SQLPoolBlobAuditingPolicy, options *SQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions) (SQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SQLPoolBlobAuditingPoliciesClient.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, workspaceName, sqlPoolName, parameters, options) if err != nil { return SQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,7 +103,10 @@ func (client *SQLPoolBlobAuditingPoliciesClient) createOrUpdateCreateRequest(ctx reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,18 +128,25 @@ func (client *SQLPoolBlobAuditingPoliciesClient) createOrUpdateHandleResponse(re // - options - SQLPoolBlobAuditingPoliciesClientGetOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.Get // method. func (client *SQLPoolBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolBlobAuditingPoliciesClientGetOptions) (SQLPoolBlobAuditingPoliciesClientGetResponse, error) { + var err error + const operationName = "SQLPoolBlobAuditingPoliciesClient.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, sqlPoolName, options) if err != nil { return SQLPoolBlobAuditingPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolBlobAuditingPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolBlobAuditingPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolBlobAuditingPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -187,25 +203,20 @@ func (client *SQLPoolBlobAuditingPoliciesClient) NewListBySQLPoolPager(resourceG return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse) (SQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySQLPoolCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager") + 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.listBySQLPoolCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) + }, nil) if err != nil { return SQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse{}, runtime.NewResponseError(resp) - } return client.listBySQLPoolHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolcolumns_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolcolumns_client.go index 0a48dc83..cc3e876b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolcolumns_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolcolumns_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolColumnsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolColumnsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolColumnsClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolColumnsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewSQLPoolColumnsClient(subscriptionID string, credential azcore.TokenCrede // - columnName - The name of the column. // - options - SQLPoolColumnsClientGetOptions contains the optional parameters for the SQLPoolColumnsClient.Get method. func (client *SQLPoolColumnsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, columnName string, options *SQLPoolColumnsClientGetOptions) (SQLPoolColumnsClientGetResponse, error) { + var err error + const operationName = "SQLPoolColumnsClient.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, sqlPoolName, schemaName, tableName, columnName, options) if err != nil { return SQLPoolColumnsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolColumnsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolColumnsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolColumnsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolconnectionpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolconnectionpolicies_client.go index 817d83fb..4b454e4b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolconnectionpolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolconnectionpolicies_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolConnectionPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolConnectionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolConnectionPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolConnectionPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewSQLPoolConnectionPoliciesClient(subscriptionID string, credential azcore // - options - SQLPoolConnectionPoliciesClientGetOptions contains the optional parameters for the SQLPoolConnectionPoliciesClient.Get // method. func (client *SQLPoolConnectionPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, connectionPolicyName ConnectionPolicyName, options *SQLPoolConnectionPoliciesClientGetOptions) (SQLPoolConnectionPoliciesClientGetResponse, error) { + var err error + const operationName = "SQLPoolConnectionPoliciesClient.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, sqlPoolName, connectionPolicyName, options) if err != nil { return SQLPoolConnectionPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolConnectionPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolConnectionPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolConnectionPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooldatawarehouseuseractivities_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooldatawarehouseuseractivities_client.go index 7e6b9ec3..4c902f61 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooldatawarehouseuseractivities_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooldatawarehouseuseractivities_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolDataWarehouseUserActivitiesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolDataWarehouseUserActivitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolDataWarehouseUserActivitiesClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolDataWarehouseUserActivitiesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewSQLPoolDataWarehouseUserActivitiesClient(subscriptionID string, credenti // - options - SQLPoolDataWarehouseUserActivitiesClientGetOptions contains the optional parameters for the SQLPoolDataWarehouseUserActivitiesClient.Get // method. func (client *SQLPoolDataWarehouseUserActivitiesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, dataWarehouseUserActivityName DataWarehouseUserActivityName, options *SQLPoolDataWarehouseUserActivitiesClientGetOptions) (SQLPoolDataWarehouseUserActivitiesClientGetResponse, error) { + var err error + const operationName = "SQLPoolDataWarehouseUserActivitiesClient.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, sqlPoolName, dataWarehouseUserActivityName, options) if err != nil { return SQLPoolDataWarehouseUserActivitiesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolDataWarehouseUserActivitiesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolDataWarehouseUserActivitiesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolDataWarehouseUserActivitiesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolgeobackuppolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolgeobackuppolicies_client.go index 1cecdd4d..121eb3db 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolgeobackuppolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolgeobackuppolicies_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolGeoBackupPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolGeoBackupPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolGeoBackupPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolGeoBackupPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewSQLPoolGeoBackupPoliciesClient(subscriptionID string, credential azcore. // - options - SQLPoolGeoBackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.CreateOrUpdate // method. func (client *SQLPoolGeoBackupPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, geoBackupPolicyName GeoBackupPolicyName, parameters GeoBackupPolicy, options *SQLPoolGeoBackupPoliciesClientCreateOrUpdateOptions) (SQLPoolGeoBackupPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SQLPoolGeoBackupPoliciesClient.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, workspaceName, sqlPoolName, geoBackupPolicyName, parameters, options) if err != nil { return SQLPoolGeoBackupPoliciesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolGeoBackupPoliciesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SQLPoolGeoBackupPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SQLPoolGeoBackupPoliciesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -101,7 +107,10 @@ func (client *SQLPoolGeoBackupPoliciesClient) createOrUpdateCreateRequest(ctx co reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -124,18 +133,25 @@ func (client *SQLPoolGeoBackupPoliciesClient) createOrUpdateHandleResponse(resp // - options - SQLPoolGeoBackupPoliciesClientGetOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.Get // method. func (client *SQLPoolGeoBackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, geoBackupPolicyName GeoBackupPolicyName, options *SQLPoolGeoBackupPoliciesClientGetOptions) (SQLPoolGeoBackupPoliciesClientGetResponse, error) { + var err error + const operationName = "SQLPoolGeoBackupPoliciesClient.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, sqlPoolName, geoBackupPolicyName, options) if err != nil { return SQLPoolGeoBackupPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolGeoBackupPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolGeoBackupPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolGeoBackupPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -195,6 +211,7 @@ func (client *SQLPoolGeoBackupPoliciesClient) NewListPager(resourceGroupName str return false }, Fetcher: func(ctx context.Context, page *SQLPoolGeoBackupPoliciesClientListResponse) (SQLPoolGeoBackupPoliciesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolGeoBackupPoliciesClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) if err != nil { return SQLPoolGeoBackupPoliciesClientListResponse{}, err @@ -208,6 +225,7 @@ func (client *SQLPoolGeoBackupPoliciesClient) NewListPager(resourceGroupName str } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindowoptions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindowoptions_client.go index b4313d19..9c7982d7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindowoptions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindowoptions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolMaintenanceWindowOptionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolMaintenanceWindowOptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolMaintenanceWindowOptionsClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolMaintenanceWindowOptionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewSQLPoolMaintenanceWindowOptionsClient(subscriptionID string, credential // - options - SQLPoolMaintenanceWindowOptionsClientGetOptions contains the optional parameters for the SQLPoolMaintenanceWindowOptionsClient.Get // method. func (client *SQLPoolMaintenanceWindowOptionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, maintenanceWindowOptionsName string, options *SQLPoolMaintenanceWindowOptionsClientGetOptions) (SQLPoolMaintenanceWindowOptionsClientGetResponse, error) { + var err error + const operationName = "SQLPoolMaintenanceWindowOptionsClient.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, sqlPoolName, maintenanceWindowOptionsName, options) if err != nil { return SQLPoolMaintenanceWindowOptionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolMaintenanceWindowOptionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolMaintenanceWindowOptionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolMaintenanceWindowOptionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindows_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindows_client.go index 0974103c..ef73cde9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindows_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindows_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolMaintenanceWindowsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolMaintenanceWindowsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolMaintenanceWindowsClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolMaintenanceWindowsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,16 +55,22 @@ func NewSQLPoolMaintenanceWindowsClient(subscriptionID string, credential azcore // - options - SQLPoolMaintenanceWindowsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolMaintenanceWindowsClient.CreateOrUpdate // method. func (client *SQLPoolMaintenanceWindowsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, maintenanceWindowName string, parameters MaintenanceWindows, options *SQLPoolMaintenanceWindowsClientCreateOrUpdateOptions) (SQLPoolMaintenanceWindowsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SQLPoolMaintenanceWindowsClient.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, workspaceName, sqlPoolName, maintenanceWindowName, parameters, options) if err != nil { return SQLPoolMaintenanceWindowsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolMaintenanceWindowsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolMaintenanceWindowsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolMaintenanceWindowsClientCreateOrUpdateResponse{}, err } return SQLPoolMaintenanceWindowsClientCreateOrUpdateResponse{}, nil } @@ -97,7 +102,10 @@ func (client *SQLPoolMaintenanceWindowsClient) createOrUpdateCreateRequest(ctx c reqQP.Set("api-version", "2021-06-01") reqQP.Set("maintenanceWindowName", maintenanceWindowName) req.Raw().URL.RawQuery = reqQP.Encode() - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Get - Get a SQL pool's Maintenance Windows. @@ -111,18 +119,25 @@ func (client *SQLPoolMaintenanceWindowsClient) createOrUpdateCreateRequest(ctx c // - options - SQLPoolMaintenanceWindowsClientGetOptions contains the optional parameters for the SQLPoolMaintenanceWindowsClient.Get // method. func (client *SQLPoolMaintenanceWindowsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, maintenanceWindowName string, options *SQLPoolMaintenanceWindowsClientGetOptions) (SQLPoolMaintenanceWindowsClientGetResponse, error) { + var err error + const operationName = "SQLPoolMaintenanceWindowsClient.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, sqlPoolName, maintenanceWindowName, options) if err != nil { return SQLPoolMaintenanceWindowsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolMaintenanceWindowsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolMaintenanceWindowsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolMaintenanceWindowsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolmetadatasyncconfigs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolmetadatasyncconfigs_client.go index 1fa624aa..3958a636 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolmetadatasyncconfigs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolmetadatasyncconfigs_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolMetadataSyncConfigsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolMetadataSyncConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolMetadataSyncConfigsClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolMetadataSyncConfigsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewSQLPoolMetadataSyncConfigsClient(subscriptionID string, credential azcor // - options - SQLPoolMetadataSyncConfigsClientCreateOptions contains the optional parameters for the SQLPoolMetadataSyncConfigsClient.Create // method. func (client *SQLPoolMetadataSyncConfigsClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, metadataSyncConfiguration MetadataSyncConfig, options *SQLPoolMetadataSyncConfigsClientCreateOptions) (SQLPoolMetadataSyncConfigsClientCreateResponse, error) { + var err error + const operationName = "SQLPoolMetadataSyncConfigsClient.Create" + 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, workspaceName, sqlPoolName, metadataSyncConfiguration, options) if err != nil { return SQLPoolMetadataSyncConfigsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolMetadataSyncConfigsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolMetadataSyncConfigsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolMetadataSyncConfigsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -96,7 +102,10 @@ func (client *SQLPoolMetadataSyncConfigsClient) createCreateRequest(ctx context. reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, metadataSyncConfiguration) + if err := runtime.MarshalAsJSON(req, metadataSyncConfiguration); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -118,18 +127,25 @@ func (client *SQLPoolMetadataSyncConfigsClient) createHandleResponse(resp *http. // - options - SQLPoolMetadataSyncConfigsClientGetOptions contains the optional parameters for the SQLPoolMetadataSyncConfigsClient.Get // method. func (client *SQLPoolMetadataSyncConfigsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolMetadataSyncConfigsClientGetOptions) (SQLPoolMetadataSyncConfigsClientGetResponse, error) { + var err error + const operationName = "SQLPoolMetadataSyncConfigsClient.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, sqlPoolName, options) if err != nil { return SQLPoolMetadataSyncConfigsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolMetadataSyncConfigsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolMetadataSyncConfigsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolMetadataSyncConfigsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go index 0b3a900e..c7d4e754 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolOperationResultsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolOperationResultsClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolOperationResultsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *SQLPoolOperationResultsClient) BeginGetLocationHeaderResult(ctx co if err != nil { return nil, err } - return runtime.NewPoller[SQLPoolOperationResultsClientGetLocationHeaderResultResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolOperationResultsClientGetLocationHeaderResultResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SQLPoolOperationResultsClientGetLocationHeaderResultResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SQLPoolOperationResultsClientGetLocationHeaderResultResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *SQLPoolOperationResultsClient) BeginGetLocationHeaderResult(ctx co // // Generated from API version 2021-06-01 func (client *SQLPoolOperationResultsClient) getLocationHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, operationID string, options *SQLPoolOperationResultsClientBeginGetLocationHeaderResultOptions) (*http.Response, error) { + var err error + const operationName = "SQLPoolOperationResultsClient.BeginGetLocationHeaderResult" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getLocationHeaderResultCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, operationID, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // getLocationHeaderResultCreateRequest creates the GetLocationHeaderResult request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooloperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooloperations_client.go index edbf4a50..5cae317e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooloperations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooloperations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolOperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolOperationsClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolOperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,25 +57,20 @@ func (client *SQLPoolOperationsClient) NewListPager(resourceGroupName string, wo return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolOperationsClientListResponse) (SQLPoolOperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolOperationsClient.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, sqlPoolName, options) + }, nil) if err != nil { return SQLPoolOperationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolOperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolOperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolrecommendedsensitivitylabels_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolrecommendedsensitivitylabels_client.go index 97230f2f..a904efc1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolrecommendedsensitivitylabels_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolrecommendedsensitivitylabels_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolRecommendedSensitivityLabelsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolRecommendedSensitivityLabelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolRecommendedSensitivityLabelsClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolRecommendedSensitivityLabelsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,16 +53,22 @@ func NewSQLPoolRecommendedSensitivityLabelsClient(subscriptionID string, credent // - options - SQLPoolRecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the SQLPoolRecommendedSensitivityLabelsClient.Update // method. func (client *SQLPoolRecommendedSensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters RecommendedSensitivityLabelUpdateList, options *SQLPoolRecommendedSensitivityLabelsClientUpdateOptions) (SQLPoolRecommendedSensitivityLabelsClientUpdateResponse, error) { + var err error + const operationName = "SQLPoolRecommendedSensitivityLabelsClient.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, workspaceName, sqlPoolName, parameters, options) if err != nil { return SQLPoolRecommendedSensitivityLabelsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolRecommendedSensitivityLabelsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolRecommendedSensitivityLabelsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolRecommendedSensitivityLabelsClientUpdateResponse{}, err } return SQLPoolRecommendedSensitivityLabelsClientUpdateResponse{}, nil } @@ -94,5 +99,8 @@ func (client *SQLPoolRecommendedSensitivityLabelsClient) updateCreateRequest(ctx reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() - return req, runtime.MarshalAsJSON(req, parameters) + 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/synapse/armsynapse/sqlpoolreplicationlinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolreplicationlinks_client.go index 2b22afa3..255fbfb0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolreplicationlinks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolreplicationlinks_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolReplicationLinksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolReplicationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolReplicationLinksClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolReplicationLinksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewSQLPoolReplicationLinksClient(subscriptionID string, credential azcore.T // - options - SQLPoolReplicationLinksClientGetByNameOptions contains the optional parameters for the SQLPoolReplicationLinksClient.GetByName // method. func (client *SQLPoolReplicationLinksClient) GetByName(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, linkID string, options *SQLPoolReplicationLinksClientGetByNameOptions) (SQLPoolReplicationLinksClientGetByNameResponse, error) { + var err error + const operationName = "SQLPoolReplicationLinksClient.GetByName" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByNameCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, linkID, options) if err != nil { return SQLPoolReplicationLinksClientGetByNameResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolReplicationLinksClientGetByNameResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolReplicationLinksClientGetByNameResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolReplicationLinksClientGetByNameResponse{}, err } - return client.getByNameHandleResponse(resp) + resp, err := client.getByNameHandleResponse(httpResp) + return resp, err } // getByNameCreateRequest creates the GetByName request. @@ -126,25 +132,20 @@ func (client *SQLPoolReplicationLinksClient) NewListPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolReplicationLinksClientListResponse) (SQLPoolReplicationLinksClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolReplicationLinksClient.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, sqlPoolName, options) + }, nil) if err != nil { return SQLPoolReplicationLinksClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolReplicationLinksClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolReplicationLinksClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolrestorepoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolrestorepoints_client.go index b8067f0f..dfc8c741 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolrestorepoints_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolrestorepoints_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolRestorePointsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolRestorePointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolRestorePointsClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolRestorePointsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,11 +59,15 @@ func (client *SQLPoolRestorePointsClient) BeginCreate(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolRestorePointsClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolRestorePointsClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SQLPoolRestorePointsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SQLPoolRestorePointsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +76,24 @@ func (client *SQLPoolRestorePointsClient) BeginCreate(ctx context.Context, resou // // Generated from API version 2021-06-01 func (client *SQLPoolRestorePointsClient) create(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters CreateSQLPoolRestorePointDefinition, options *SQLPoolRestorePointsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "SQLPoolRestorePointsClient.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, workspaceName, sqlPoolName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -114,7 +123,10 @@ func (client *SQLPoolRestorePointsClient) createCreateRequest(ctx context.Contex reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Delete - Deletes a restore point. @@ -128,16 +140,22 @@ func (client *SQLPoolRestorePointsClient) createCreateRequest(ctx context.Contex // - options - SQLPoolRestorePointsClientDeleteOptions contains the optional parameters for the SQLPoolRestorePointsClient.Delete // method. func (client *SQLPoolRestorePointsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, restorePointName string, options *SQLPoolRestorePointsClientDeleteOptions) (SQLPoolRestorePointsClientDeleteResponse, error) { + var err error + const operationName = "SQLPoolRestorePointsClient.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, workspaceName, sqlPoolName, restorePointName, options) if err != nil { return SQLPoolRestorePointsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolRestorePointsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SQLPoolRestorePointsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SQLPoolRestorePointsClientDeleteResponse{}, err } return SQLPoolRestorePointsClientDeleteResponse{}, nil } @@ -186,18 +204,25 @@ func (client *SQLPoolRestorePointsClient) deleteCreateRequest(ctx context.Contex // - options - SQLPoolRestorePointsClientGetOptions contains the optional parameters for the SQLPoolRestorePointsClient.Get // method. func (client *SQLPoolRestorePointsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, restorePointName string, options *SQLPoolRestorePointsClientGetOptions) (SQLPoolRestorePointsClientGetResponse, error) { + var err error + const operationName = "SQLPoolRestorePointsClient.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, sqlPoolName, restorePointName, options) if err != nil { return SQLPoolRestorePointsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolRestorePointsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolRestorePointsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolRestorePointsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -257,25 +282,20 @@ func (client *SQLPoolRestorePointsClient) NewListPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolRestorePointsClientListResponse) (SQLPoolRestorePointsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolRestorePointsClient.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, sqlPoolName, options) + }, nil) if err != nil { return SQLPoolRestorePointsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolRestorePointsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolRestorePointsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpools_client.go index 77ddcb4d..48ef07b6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpools_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpools_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolsClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,11 +58,15 @@ func (client *SQLPoolsClient) BeginCreate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolsClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolsClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SQLPoolsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SQLPoolsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +75,24 @@ func (client *SQLPoolsClient) BeginCreate(ctx context.Context, resourceGroupName // // Generated from API version 2021-06-01 func (client *SQLPoolsClient) create(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, sqlPoolInfo SQLPool, options *SQLPoolsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "SQLPoolsClient.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, workspaceName, sqlPoolName, sqlPoolInfo, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -113,7 +122,10 @@ func (client *SQLPoolsClient) createCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, sqlPoolInfo) + if err := runtime.MarshalAsJSON(req, sqlPoolInfo); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a SQL pool @@ -130,11 +142,15 @@ func (client *SQLPoolsClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SQLPoolsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SQLPoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -143,18 +159,24 @@ func (client *SQLPoolsClient) BeginDelete(ctx context.Context, resourceGroupName // // Generated from API version 2021-06-01 func (client *SQLPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SQLPoolsClient.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, sqlPoolName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -196,18 +218,25 @@ func (client *SQLPoolsClient) deleteCreateRequest(ctx context.Context, resourceG // - sqlPoolName - SQL pool name // - options - SQLPoolsClientGetOptions contains the optional parameters for the SQLPoolsClient.Get method. func (client *SQLPoolsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolsClientGetOptions) (SQLPoolsClientGetResponse, error) { + var err error + const operationName = "SQLPoolsClient.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, sqlPoolName, options) if err != nil { return SQLPoolsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -262,25 +291,20 @@ func (client *SQLPoolsClient) NewListByWorkspacePager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolsClientListByWorkspaceResponse) (SQLPoolsClientListByWorkspaceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SQLPoolsClientListByWorkspaceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolsClient.NewListByWorkspacePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) if err != nil { return SQLPoolsClientListByWorkspaceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolsClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) - } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -333,11 +357,15 @@ func (client *SQLPoolsClient) BeginPause(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolsClientPauseResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolsClientPauseResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SQLPoolsClientPauseResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SQLPoolsClientPauseResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -346,18 +374,24 @@ func (client *SQLPoolsClient) BeginPause(ctx context.Context, resourceGroupName // // Generated from API version 2021-06-01 func (client *SQLPoolsClient) pause(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolsClientBeginPauseOptions) (*http.Response, error) { + var err error + const operationName = "SQLPoolsClient.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, workspaceName, sqlPoolName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // pauseCreateRequest creates the Pause request. @@ -400,16 +434,22 @@ func (client *SQLPoolsClient) pauseCreateRequest(ctx context.Context, resourceGr // - parameters - The resource move definition for renaming this Sql pool. // - options - SQLPoolsClientRenameOptions contains the optional parameters for the SQLPoolsClient.Rename method. func (client *SQLPoolsClient) Rename(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters ResourceMoveDefinition, options *SQLPoolsClientRenameOptions) (SQLPoolsClientRenameResponse, error) { + var err error + const operationName = "SQLPoolsClient.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, workspaceName, sqlPoolName, parameters, options) if err != nil { return SQLPoolsClientRenameResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolsClientRenameResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolsClientRenameResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolsClientRenameResponse{}, err } return SQLPoolsClientRenameResponse{}, nil } @@ -440,7 +480,10 @@ func (client *SQLPoolsClient) renameCreateRequest(ctx context.Context, resourceG reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginResume - Resume a SQL pool @@ -457,11 +500,15 @@ func (client *SQLPoolsClient) BeginResume(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolsClientResumeResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolsClientResumeResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SQLPoolsClientResumeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SQLPoolsClientResumeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -470,18 +517,24 @@ func (client *SQLPoolsClient) BeginResume(ctx context.Context, resourceGroupName // // Generated from API version 2021-06-01 func (client *SQLPoolsClient) resume(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolsClientBeginResumeOptions) (*http.Response, error) { + var err error + const operationName = "SQLPoolsClient.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, workspaceName, sqlPoolName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // resumeCreateRequest creates the Resume request. @@ -529,9 +582,14 @@ func (client *SQLPoolsClient) BeginUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[SQLPoolsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SQLPoolsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SQLPoolsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -540,18 +598,24 @@ func (client *SQLPoolsClient) BeginUpdate(ctx context.Context, resourceGroupName // // Generated from API version 2021-06-01 func (client *SQLPoolsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, sqlPoolInfo SQLPoolPatchInfo, options *SQLPoolsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SQLPoolsClient.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, sqlPoolName, sqlPoolInfo, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -581,5 +645,8 @@ func (client *SQLPoolsClient) updateCreateRequest(ctx context.Context, resourceG reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, sqlPoolInfo) + if err := runtime.MarshalAsJSON(req, sqlPoolInfo); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client.go index cf290f5b..71666981 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolSchemasClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolSchemasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolSchemasClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolSchemasClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewSQLPoolSchemasClient(subscriptionID string, credential azcore.TokenCrede // - schemaName - The name of the schema. // - options - SQLPoolSchemasClientGetOptions contains the optional parameters for the SQLPoolSchemasClient.Get method. func (client *SQLPoolSchemasClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, options *SQLPoolSchemasClientGetOptions) (SQLPoolSchemasClientGetResponse, error) { + var err error + const operationName = "SQLPoolSchemasClient.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, sqlPoolName, schemaName, options) if err != nil { return SQLPoolSchemasClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolSchemasClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolSchemasClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolSchemasClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -124,25 +130,20 @@ func (client *SQLPoolSchemasClient) NewListPager(resourceGroupName string, works return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolSchemasClientListResponse) (SQLPoolSchemasClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolSchemasClient.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, sqlPoolName, options) + }, nil) if err != nil { return SQLPoolSchemasClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolSchemasClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolSchemasClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolsecurityalertpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolsecurityalertpolicies_client.go index b5c351b3..bf5e6c94 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolsecurityalertpolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolsecurityalertpolicies_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolSecurityAlertPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolSecurityAlertPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolSecurityAlertPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolSecurityAlertPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewSQLPoolSecurityAlertPoliciesClient(subscriptionID string, credential azc // - options - SQLPoolSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.CreateOrUpdate // method. func (client *SQLPoolSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, securityAlertPolicyName SecurityAlertPolicyName, parameters SQLPoolSecurityAlertPolicy, options *SQLPoolSecurityAlertPoliciesClientCreateOrUpdateOptions) (SQLPoolSecurityAlertPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SQLPoolSecurityAlertPoliciesClient.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, workspaceName, sqlPoolName, securityAlertPolicyName, parameters, options) if err != nil { return SQLPoolSecurityAlertPoliciesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolSecurityAlertPoliciesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SQLPoolSecurityAlertPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SQLPoolSecurityAlertPoliciesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -101,7 +107,10 @@ func (client *SQLPoolSecurityAlertPoliciesClient) createOrUpdateCreateRequest(ct reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -124,18 +133,25 @@ func (client *SQLPoolSecurityAlertPoliciesClient) createOrUpdateHandleResponse(r // - options - SQLPoolSecurityAlertPoliciesClientGetOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.Get // method. func (client *SQLPoolSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, securityAlertPolicyName SecurityAlertPolicyName, options *SQLPoolSecurityAlertPoliciesClientGetOptions) (SQLPoolSecurityAlertPoliciesClientGetResponse, error) { + var err error + const operationName = "SQLPoolSecurityAlertPoliciesClient.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, sqlPoolName, securityAlertPolicyName, options) if err != nil { return SQLPoolSecurityAlertPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolSecurityAlertPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolSecurityAlertPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolSecurityAlertPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -195,25 +211,20 @@ func (client *SQLPoolSecurityAlertPoliciesClient) NewListPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolSecurityAlertPoliciesClientListResponse) (SQLPoolSecurityAlertPoliciesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolSecurityAlertPoliciesClient.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, sqlPoolName, options) + }, nil) if err != nil { return SQLPoolSecurityAlertPoliciesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolSecurityAlertPoliciesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolSecurityAlertPoliciesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client.go index 9b72ee36..aab6ebe5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -34,7 +33,7 @@ type SQLPoolSensitivityLabelsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolSensitivityLabelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolSensitivityLabelsClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolSensitivityLabelsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,18 +58,25 @@ func NewSQLPoolSensitivityLabelsClient(subscriptionID string, credential azcore. // - options - SQLPoolSensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.CreateOrUpdate // method. func (client *SQLPoolSensitivityLabelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel, options *SQLPoolSensitivityLabelsClientCreateOrUpdateOptions) (SQLPoolSensitivityLabelsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SQLPoolSensitivityLabelsClient.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, workspaceName, sqlPoolName, schemaName, tableName, columnName, parameters, options) if err != nil { return SQLPoolSensitivityLabelsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolSensitivityLabelsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SQLPoolSensitivityLabelsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SQLPoolSensitivityLabelsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -113,7 +119,10 @@ func (client *SQLPoolSensitivityLabelsClient) createOrUpdateCreateRequest(ctx co reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -138,16 +147,22 @@ func (client *SQLPoolSensitivityLabelsClient) createOrUpdateHandleResponse(resp // - options - SQLPoolSensitivityLabelsClientDeleteOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Delete // method. func (client *SQLPoolSensitivityLabelsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, columnName string, options *SQLPoolSensitivityLabelsClientDeleteOptions) (SQLPoolSensitivityLabelsClientDeleteResponse, error) { + var err error + const operationName = "SQLPoolSensitivityLabelsClient.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, workspaceName, sqlPoolName, schemaName, tableName, columnName, options) if err != nil { return SQLPoolSensitivityLabelsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolSensitivityLabelsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SQLPoolSensitivityLabelsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SQLPoolSensitivityLabelsClientDeleteResponse{}, err } return SQLPoolSensitivityLabelsClientDeleteResponse{}, nil } @@ -207,16 +222,22 @@ func (client *SQLPoolSensitivityLabelsClient) deleteCreateRequest(ctx context.Co // - options - SQLPoolSensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.DisableRecommendation // method. func (client *SQLPoolSensitivityLabelsClient) DisableRecommendation(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, columnName string, options *SQLPoolSensitivityLabelsClientDisableRecommendationOptions) (SQLPoolSensitivityLabelsClientDisableRecommendationResponse, error) { + var err error + const operationName = "SQLPoolSensitivityLabelsClient.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, workspaceName, sqlPoolName, schemaName, tableName, columnName, options) if err != nil { return SQLPoolSensitivityLabelsClientDisableRecommendationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolSensitivityLabelsClientDisableRecommendationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolSensitivityLabelsClientDisableRecommendationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolSensitivityLabelsClientDisableRecommendationResponse{}, err } return SQLPoolSensitivityLabelsClientDisableRecommendationResponse{}, nil } @@ -277,16 +298,22 @@ func (client *SQLPoolSensitivityLabelsClient) disableRecommendationCreateRequest // - options - SQLPoolSensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.EnableRecommendation // method. func (client *SQLPoolSensitivityLabelsClient) EnableRecommendation(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, columnName string, options *SQLPoolSensitivityLabelsClientEnableRecommendationOptions) (SQLPoolSensitivityLabelsClientEnableRecommendationResponse, error) { + var err error + const operationName = "SQLPoolSensitivityLabelsClient.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, workspaceName, sqlPoolName, schemaName, tableName, columnName, options) if err != nil { return SQLPoolSensitivityLabelsClientEnableRecommendationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolSensitivityLabelsClientEnableRecommendationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolSensitivityLabelsClientEnableRecommendationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolSensitivityLabelsClientEnableRecommendationResponse{}, err } return SQLPoolSensitivityLabelsClientEnableRecommendationResponse{}, nil } @@ -347,18 +374,25 @@ func (client *SQLPoolSensitivityLabelsClient) enableRecommendationCreateRequest( // - options - SQLPoolSensitivityLabelsClientGetOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Get // method. func (client *SQLPoolSensitivityLabelsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource, options *SQLPoolSensitivityLabelsClientGetOptions) (SQLPoolSensitivityLabelsClientGetResponse, error) { + var err error + const operationName = "SQLPoolSensitivityLabelsClient.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, sqlPoolName, schemaName, tableName, columnName, sensitivityLabelSource, options) if err != nil { return SQLPoolSensitivityLabelsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolSensitivityLabelsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolSensitivityLabelsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolSensitivityLabelsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -430,25 +464,20 @@ func (client *SQLPoolSensitivityLabelsClient) NewListCurrentPager(resourceGroupN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolSensitivityLabelsClientListCurrentResponse) (SQLPoolSensitivityLabelsClientListCurrentResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCurrentCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SQLPoolSensitivityLabelsClientListCurrentResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolSensitivityLabelsClient.NewListCurrentPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCurrentCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) + }, nil) if err != nil { return SQLPoolSensitivityLabelsClientListCurrentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolSensitivityLabelsClientListCurrentResponse{}, runtime.NewResponseError(resp) - } return client.listCurrentHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -508,25 +537,20 @@ func (client *SQLPoolSensitivityLabelsClient) NewListRecommendedPager(resourceGr return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolSensitivityLabelsClientListRecommendedResponse) (SQLPoolSensitivityLabelsClientListRecommendedResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listRecommendedCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SQLPoolSensitivityLabelsClientListRecommendedResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolSensitivityLabelsClient.NewListRecommendedPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listRecommendedCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) + }, nil) if err != nil { return SQLPoolSensitivityLabelsClientListRecommendedResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolSensitivityLabelsClientListRecommendedResponse{}, runtime.NewResponseError(resp) - } return client.listRecommendedHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -588,16 +612,22 @@ func (client *SQLPoolSensitivityLabelsClient) listRecommendedHandleResponse(resp // - options - SQLPoolSensitivityLabelsClientUpdateOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Update // method. func (client *SQLPoolSensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters SensitivityLabelUpdateList, options *SQLPoolSensitivityLabelsClientUpdateOptions) (SQLPoolSensitivityLabelsClientUpdateResponse, error) { + var err error + const operationName = "SQLPoolSensitivityLabelsClient.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, workspaceName, sqlPoolName, parameters, options) if err != nil { return SQLPoolSensitivityLabelsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolSensitivityLabelsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolSensitivityLabelsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolSensitivityLabelsClientUpdateResponse{}, err } return SQLPoolSensitivityLabelsClientUpdateResponse{}, nil } @@ -628,5 +658,8 @@ func (client *SQLPoolSensitivityLabelsClient) updateCreateRequest(ctx context.Co reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() - return req, runtime.MarshalAsJSON(req, parameters) + 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/synapse/armsynapse/sqlpooltablecolumns_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client.go index 0cf89ae1..4a864e7e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolTableColumnsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolTableColumnsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolTableColumnsClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolTableColumnsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,25 +59,20 @@ func (client *SQLPoolTableColumnsClient) NewListByTableNamePager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolTableColumnsClientListByTableNameResponse) (SQLPoolTableColumnsClientListByTableNameResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByTableNameCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolTableColumnsClient.NewListByTableNamePager") + 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.listByTableNameCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, options) + }, nil) if err != nil { return SQLPoolTableColumnsClientListByTableNameResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolTableColumnsClientListByTableNameResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolTableColumnsClientListByTableNameResponse{}, runtime.NewResponseError(resp) - } return client.listByTableNameHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client.go index 51657f82..28435afa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolTablesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolTablesClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolTablesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewSQLPoolTablesClient(subscriptionID string, credential azcore.TokenCreden // - tableName - The name of the table. // - options - SQLPoolTablesClientGetOptions contains the optional parameters for the SQLPoolTablesClient.Get method. func (client *SQLPoolTablesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, options *SQLPoolTablesClientGetOptions) (SQLPoolTablesClientGetResponse, error) { + var err error + const operationName = "SQLPoolTablesClient.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, sqlPoolName, schemaName, tableName, options) if err != nil { return SQLPoolTablesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolTablesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolTablesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolTablesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -131,25 +137,20 @@ func (client *SQLPoolTablesClient) NewListBySchemaPager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolTablesClientListBySchemaResponse) (SQLPoolTablesClientListBySchemaResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySchemaCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, schemaName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolTablesClient.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, workspaceName, sqlPoolName, schemaName, options) + }, nil) if err != nil { return SQLPoolTablesClientListBySchemaResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolTablesClientListBySchemaResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolTablesClientListBySchemaResponse{}, runtime.NewResponseError(resp) - } return client.listBySchemaHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooltransparentdataencryptions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooltransparentdataencryptions_client.go index 7016d8c4..65904fdc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooltransparentdataencryptions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpooltransparentdataencryptions_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolTransparentDataEncryptionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolTransparentDataEncryptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolTransparentDataEncryptionsClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolTransparentDataEncryptionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewSQLPoolTransparentDataEncryptionsClient(subscriptionID string, credentia // - options - SQLPoolTransparentDataEncryptionsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.CreateOrUpdate // method. func (client *SQLPoolTransparentDataEncryptionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, transparentDataEncryptionName TransparentDataEncryptionName, parameters TransparentDataEncryption, options *SQLPoolTransparentDataEncryptionsClientCreateOrUpdateOptions) (SQLPoolTransparentDataEncryptionsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SQLPoolTransparentDataEncryptionsClient.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, workspaceName, sqlPoolName, transparentDataEncryptionName, parameters, options) if err != nil { return SQLPoolTransparentDataEncryptionsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolTransparentDataEncryptionsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SQLPoolTransparentDataEncryptionsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SQLPoolTransparentDataEncryptionsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -101,7 +107,10 @@ func (client *SQLPoolTransparentDataEncryptionsClient) createOrUpdateCreateReque reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -124,18 +133,25 @@ func (client *SQLPoolTransparentDataEncryptionsClient) createOrUpdateHandleRespo // - options - SQLPoolTransparentDataEncryptionsClientGetOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.Get // method. func (client *SQLPoolTransparentDataEncryptionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, transparentDataEncryptionName TransparentDataEncryptionName, options *SQLPoolTransparentDataEncryptionsClientGetOptions) (SQLPoolTransparentDataEncryptionsClientGetResponse, error) { + var err error + const operationName = "SQLPoolTransparentDataEncryptionsClient.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, sqlPoolName, transparentDataEncryptionName, options) if err != nil { return SQLPoolTransparentDataEncryptionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolTransparentDataEncryptionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolTransparentDataEncryptionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolTransparentDataEncryptionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -195,25 +211,20 @@ func (client *SQLPoolTransparentDataEncryptionsClient) NewListPager(resourceGrou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolTransparentDataEncryptionsClientListResponse) (SQLPoolTransparentDataEncryptionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolTransparentDataEncryptionsClient.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, sqlPoolName, options) + }, nil) if err != nil { return SQLPoolTransparentDataEncryptionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolTransparentDataEncryptionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolTransparentDataEncryptionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolusages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolusages_client.go index ec2ece91..6097295c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolusages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolusages_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolUsagesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolUsagesClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolUsagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,25 +56,20 @@ func (client *SQLPoolUsagesClient) NewListPager(resourceGroupName string, worksp return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolUsagesClientListResponse) (SQLPoolUsagesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolUsagesClient.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, sqlPoolName, options) + }, nil) if err != nil { return SQLPoolUsagesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolUsagesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolUsagesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentrulebaselines_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentrulebaselines_client.go index 27cf547e..98b23048 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentrulebaselines_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentrulebaselines_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolVulnerabilityAssessmentRuleBaselinesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolVulnerabilityAssessmentRuleBaselinesClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolVulnerabilityAssessmentRuleBaselinesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,18 +58,25 @@ func NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string, // - options - SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the // SQLPoolVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method. func (client *SQLPoolVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters SQLPoolVulnerabilityAssessmentRuleBaseline, options *SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions) (SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SQLPoolVulnerabilityAssessmentRuleBaselinesClient.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, workspaceName, sqlPoolName, vulnerabilityAssessmentName, ruleID, baselineName, parameters, options) if err != nil { return SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -112,7 +118,10 @@ func (client *SQLPoolVulnerabilityAssessmentRuleBaselinesClient) createOrUpdateC reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -138,16 +147,22 @@ func (client *SQLPoolVulnerabilityAssessmentRuleBaselinesClient) createOrUpdateH // - options - SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentRuleBaselinesClient.Delete // method. func (client *SQLPoolVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteOptions) (SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteResponse, error) { + var err error + const operationName = "SQLPoolVulnerabilityAssessmentRuleBaselinesClient.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, workspaceName, sqlPoolName, vulnerabilityAssessmentName, ruleID, baselineName, options) if err != nil { return SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteResponse{}, err } return SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteResponse{}, nil } @@ -207,18 +222,25 @@ func (client *SQLPoolVulnerabilityAssessmentRuleBaselinesClient) deleteCreateReq // - options - SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentRuleBaselinesClient.Get // method. func (client *SQLPoolVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetOptions) (SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetResponse, error) { + var err error + const operationName = "SQLPoolVulnerabilityAssessmentRuleBaselinesClient.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, sqlPoolName, vulnerabilityAssessmentName, ruleID, baselineName, options) if err != nil { return SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessments_client.go index 5d215faf..9cbbd67e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessments_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolVulnerabilityAssessmentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolVulnerabilityAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolVulnerabilityAssessmentsClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolVulnerabilityAssessmentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewSQLPoolVulnerabilityAssessmentsClient(subscriptionID string, credential // - options - SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.CreateOrUpdate // method. func (client *SQLPoolVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters SQLPoolVulnerabilityAssessment, options *SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateOptions) (SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SQLPoolVulnerabilityAssessmentsClient.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, workspaceName, sqlPoolName, vulnerabilityAssessmentName, parameters, options) if err != nil { return SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -101,7 +107,10 @@ func (client *SQLPoolVulnerabilityAssessmentsClient) createOrUpdateCreateRequest reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -124,16 +133,22 @@ func (client *SQLPoolVulnerabilityAssessmentsClient) createOrUpdateHandleRespons // - options - SQLPoolVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.Delete // method. func (client *SQLPoolVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *SQLPoolVulnerabilityAssessmentsClientDeleteOptions) (SQLPoolVulnerabilityAssessmentsClientDeleteResponse, error) { + var err error + const operationName = "SQLPoolVulnerabilityAssessmentsClient.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, workspaceName, sqlPoolName, vulnerabilityAssessmentName, options) if err != nil { return SQLPoolVulnerabilityAssessmentsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolVulnerabilityAssessmentsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SQLPoolVulnerabilityAssessmentsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SQLPoolVulnerabilityAssessmentsClientDeleteResponse{}, err } return SQLPoolVulnerabilityAssessmentsClientDeleteResponse{}, nil } @@ -182,18 +197,25 @@ func (client *SQLPoolVulnerabilityAssessmentsClient) deleteCreateRequest(ctx con // - options - SQLPoolVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.Get // method. func (client *SQLPoolVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *SQLPoolVulnerabilityAssessmentsClientGetOptions) (SQLPoolVulnerabilityAssessmentsClientGetResponse, error) { + var err error + const operationName = "SQLPoolVulnerabilityAssessmentsClient.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, sqlPoolName, vulnerabilityAssessmentName, options) if err != nil { return SQLPoolVulnerabilityAssessmentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolVulnerabilityAssessmentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolVulnerabilityAssessmentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolVulnerabilityAssessmentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -253,25 +275,20 @@ func (client *SQLPoolVulnerabilityAssessmentsClient) NewListPager(resourceGroupN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolVulnerabilityAssessmentsClientListResponse) (SQLPoolVulnerabilityAssessmentsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolVulnerabilityAssessmentsClient.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, sqlPoolName, options) + }, nil) if err != nil { return SQLPoolVulnerabilityAssessmentsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolVulnerabilityAssessmentsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolVulnerabilityAssessmentsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentscans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentscans_client.go index 35a23622..02efa64f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentscans_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentscans_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolVulnerabilityAssessmentScansClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolVulnerabilityAssessmentScansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolVulnerabilityAssessmentScansClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolVulnerabilityAssessmentScansClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,18 +55,25 @@ func NewSQLPoolVulnerabilityAssessmentScansClient(subscriptionID string, credent // - options - SQLPoolVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.Export // method. func (client *SQLPoolVulnerabilityAssessmentScansClient) Export(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *SQLPoolVulnerabilityAssessmentScansClientExportOptions) (SQLPoolVulnerabilityAssessmentScansClientExportResponse, error) { + var err error + const operationName = "SQLPoolVulnerabilityAssessmentScansClient.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, workspaceName, sqlPoolName, vulnerabilityAssessmentName, scanID, options) if err != nil { return SQLPoolVulnerabilityAssessmentScansClientExportResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolVulnerabilityAssessmentScansClientExportResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SQLPoolVulnerabilityAssessmentScansClientExportResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SQLPoolVulnerabilityAssessmentScansClientExportResponse{}, err } - return client.exportHandleResponse(resp) + resp, err := client.exportHandleResponse(httpResp) + return resp, err } // exportCreateRequest creates the Export request. @@ -129,18 +135,25 @@ func (client *SQLPoolVulnerabilityAssessmentScansClient) exportHandleResponse(re // - options - SQLPoolVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.Get // method. func (client *SQLPoolVulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *SQLPoolVulnerabilityAssessmentScansClientGetOptions) (SQLPoolVulnerabilityAssessmentScansClientGetResponse, error) { + var err error + const operationName = "SQLPoolVulnerabilityAssessmentScansClient.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, sqlPoolName, vulnerabilityAssessmentName, scanID, options) if err != nil { return SQLPoolVulnerabilityAssessmentScansClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolVulnerabilityAssessmentScansClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolVulnerabilityAssessmentScansClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolVulnerabilityAssessmentScansClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -207,9 +220,14 @@ func (client *SQLPoolVulnerabilityAssessmentScansClient) BeginInitiateScan(ctx c if err != nil { return nil, err } - return runtime.NewPoller[SQLPoolVulnerabilityAssessmentScansClientInitiateScanResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolVulnerabilityAssessmentScansClientInitiateScanResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SQLPoolVulnerabilityAssessmentScansClientInitiateScanResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SQLPoolVulnerabilityAssessmentScansClientInitiateScanResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -218,18 +236,24 @@ func (client *SQLPoolVulnerabilityAssessmentScansClient) BeginInitiateScan(ctx c // // Generated from API version 2021-06-01 func (client *SQLPoolVulnerabilityAssessmentScansClient) initiateScan(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *SQLPoolVulnerabilityAssessmentScansClientBeginInitiateScanOptions) (*http.Response, error) { + var err error + const operationName = "SQLPoolVulnerabilityAssessmentScansClient.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, workspaceName, sqlPoolName, vulnerabilityAssessmentName, scanID, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // initiateScanCreateRequest creates the InitiateScan request. @@ -284,25 +308,20 @@ func (client *SQLPoolVulnerabilityAssessmentScansClient) NewListPager(resourceGr return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolVulnerabilityAssessmentScansClientListResponse) (SQLPoolVulnerabilityAssessmentScansClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, vulnerabilityAssessmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolVulnerabilityAssessmentScansClient.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, sqlPoolName, vulnerabilityAssessmentName, options) + }, nil) if err != nil { return SQLPoolVulnerabilityAssessmentScansClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolVulnerabilityAssessmentScansClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolVulnerabilityAssessmentScansClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadclassifier_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadclassifier_client.go index 33ecaa55..ed3fbcdb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadclassifier_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadclassifier_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolWorkloadClassifierClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolWorkloadClassifierClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolWorkloadClassifierClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolWorkloadClassifierClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,9 +61,14 @@ func (client *SQLPoolWorkloadClassifierClient) BeginCreateOrUpdate(ctx context.C if err != nil { return nil, err } - return runtime.NewPoller[SQLPoolWorkloadClassifierClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolWorkloadClassifierClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SQLPoolWorkloadClassifierClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SQLPoolWorkloadClassifierClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -73,18 +77,24 @@ func (client *SQLPoolWorkloadClassifierClient) BeginCreateOrUpdate(ctx context.C // // Generated from API version 2021-06-01 func (client *SQLPoolWorkloadClassifierClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, workloadClassifierName string, parameters WorkloadClassifier, options *SQLPoolWorkloadClassifierClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SQLPoolWorkloadClassifierClient.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, sqlPoolName, workloadGroupName, workloadClassifierName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -122,7 +132,10 @@ func (client *SQLPoolWorkloadClassifierClient) createOrUpdateCreateRequest(ctx c reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Remove workload classifier of a Sql pool's workload group. @@ -142,9 +155,14 @@ func (client *SQLPoolWorkloadClassifierClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[SQLPoolWorkloadClassifierClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolWorkloadClassifierClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SQLPoolWorkloadClassifierClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SQLPoolWorkloadClassifierClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -153,18 +171,24 @@ func (client *SQLPoolWorkloadClassifierClient) BeginDelete(ctx context.Context, // // Generated from API version 2021-06-01 func (client *SQLPoolWorkloadClassifierClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, workloadClassifierName string, options *SQLPoolWorkloadClassifierClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SQLPoolWorkloadClassifierClient.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, sqlPoolName, workloadGroupName, workloadClassifierName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -216,18 +240,25 @@ func (client *SQLPoolWorkloadClassifierClient) deleteCreateRequest(ctx context.C // - options - SQLPoolWorkloadClassifierClientGetOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.Get // method. func (client *SQLPoolWorkloadClassifierClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, workloadClassifierName string, options *SQLPoolWorkloadClassifierClientGetOptions) (SQLPoolWorkloadClassifierClientGetResponse, error) { + var err error + const operationName = "SQLPoolWorkloadClassifierClient.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, sqlPoolName, workloadGroupName, workloadClassifierName, options) if err != nil { return SQLPoolWorkloadClassifierClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolWorkloadClassifierClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolWorkloadClassifierClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolWorkloadClassifierClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -292,25 +323,20 @@ func (client *SQLPoolWorkloadClassifierClient) NewListPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolWorkloadClassifierClientListResponse) (SQLPoolWorkloadClassifierClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, workloadGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolWorkloadClassifierClient.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, sqlPoolName, workloadGroupName, options) + }, nil) if err != nil { return SQLPoolWorkloadClassifierClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolWorkloadClassifierClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolWorkloadClassifierClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadgroup_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadgroup_client.go index 0d819a99..b1621722 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadgroup_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadgroup_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type SQLPoolWorkloadGroupClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSQLPoolWorkloadGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolWorkloadGroupClient, error) { - cl, err := arm.NewClient(moduleName+".SQLPoolWorkloadGroupClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,9 +60,14 @@ func (client *SQLPoolWorkloadGroupClient) BeginCreateOrUpdate(ctx context.Contex if err != nil { return nil, err } - return runtime.NewPoller[SQLPoolWorkloadGroupClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolWorkloadGroupClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SQLPoolWorkloadGroupClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SQLPoolWorkloadGroupClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +76,24 @@ func (client *SQLPoolWorkloadGroupClient) BeginCreateOrUpdate(ctx context.Contex // // Generated from API version 2021-06-01 func (client *SQLPoolWorkloadGroupClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, parameters WorkloadGroup, options *SQLPoolWorkloadGroupClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SQLPoolWorkloadGroupClient.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, sqlPoolName, workloadGroupName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -117,7 +127,10 @@ func (client *SQLPoolWorkloadGroupClient) createOrUpdateCreateRequest(ctx contex reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Remove Sql pool's workload group. @@ -136,9 +149,14 @@ func (client *SQLPoolWorkloadGroupClient) BeginDelete(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller[SQLPoolWorkloadGroupClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SQLPoolWorkloadGroupClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SQLPoolWorkloadGroupClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SQLPoolWorkloadGroupClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -147,18 +165,24 @@ func (client *SQLPoolWorkloadGroupClient) BeginDelete(ctx context.Context, resou // // Generated from API version 2021-06-01 func (client *SQLPoolWorkloadGroupClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, options *SQLPoolWorkloadGroupClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SQLPoolWorkloadGroupClient.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, sqlPoolName, workloadGroupName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -205,18 +229,25 @@ func (client *SQLPoolWorkloadGroupClient) deleteCreateRequest(ctx context.Contex // - options - SQLPoolWorkloadGroupClientGetOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.Get // method. func (client *SQLPoolWorkloadGroupClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, options *SQLPoolWorkloadGroupClientGetOptions) (SQLPoolWorkloadGroupClientGetResponse, error) { + var err error + const operationName = "SQLPoolWorkloadGroupClient.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, sqlPoolName, workloadGroupName, options) if err != nil { return SQLPoolWorkloadGroupClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SQLPoolWorkloadGroupClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolWorkloadGroupClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SQLPoolWorkloadGroupClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -276,25 +307,20 @@ func (client *SQLPoolWorkloadGroupClient) NewListPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SQLPoolWorkloadGroupClientListResponse) (SQLPoolWorkloadGroupClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SQLPoolWorkloadGroupClient.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, sqlPoolName, options) + }, nil) if err != nil { return SQLPoolWorkloadGroupClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolWorkloadGroupClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SQLPoolWorkloadGroupClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/time_rfc3339.go index ae82870e..51b9c693 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspaceaadadmins_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspaceaadadmins_client.go index 275bf4cb..8da643d2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspaceaadadmins_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspaceaadadmins_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type WorkspaceAADAdminsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspaceAADAdminsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceAADAdminsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspaceAADAdminsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,11 +58,15 @@ func (client *WorkspaceAADAdminsClient) BeginCreateOrUpdate(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceAADAdminsClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceAADAdminsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspaceAADAdminsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceAADAdminsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +75,24 @@ func (client *WorkspaceAADAdminsClient) BeginCreateOrUpdate(ctx context.Context, // // Generated from API version 2021-06-01 func (client *WorkspaceAADAdminsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, aadAdminInfo WorkspaceAADAdminInfo, options *WorkspaceAADAdminsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceAADAdminsClient.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, aadAdminInfo, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -109,7 +118,10 @@ func (client *WorkspaceAADAdminsClient) createOrUpdateCreateRequest(ctx context. reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, aadAdminInfo) + if err := runtime.MarshalAsJSON(req, aadAdminInfo); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a workspace active directory admin @@ -126,11 +138,15 @@ func (client *WorkspaceAADAdminsClient) BeginDelete(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceAADAdminsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceAADAdminsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspaceAADAdminsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceAADAdminsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -139,18 +155,24 @@ func (client *WorkspaceAADAdminsClient) BeginDelete(ctx context.Context, resourc // // Generated from API version 2021-06-01 func (client *WorkspaceAADAdminsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspaceAADAdminsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceAADAdminsClient.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, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -187,18 +209,25 @@ func (client *WorkspaceAADAdminsClient) deleteCreateRequest(ctx context.Context, // - workspaceName - The name of the workspace. // - options - WorkspaceAADAdminsClientGetOptions contains the optional parameters for the WorkspaceAADAdminsClient.Get method. func (client *WorkspaceAADAdminsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspaceAADAdminsClientGetOptions) (WorkspaceAADAdminsClientGetResponse, error) { + var err error + const operationName = "WorkspaceAADAdminsClient.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, options) if err != nil { return WorkspaceAADAdminsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspaceAADAdminsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceAADAdminsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAADAdminsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedidentitysqlcontrolsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedidentitysqlcontrolsettings_client.go index 4594a0c0..b5fab477 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedidentitysqlcontrolsettings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedidentitysqlcontrolsettings_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type WorkspaceManagedIdentitySQLControlSettingsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspaceManagedIdentitySQLControlSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedIdentitySQLControlSettingsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspaceManagedIdentitySQLControlSettingsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,11 +58,15 @@ func (client *WorkspaceManagedIdentitySQLControlSettingsClient) BeginCreateOrUpd if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceManagedIdentitySQLControlSettingsClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceManagedIdentitySQLControlSettingsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspaceManagedIdentitySQLControlSettingsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceManagedIdentitySQLControlSettingsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +75,24 @@ func (client *WorkspaceManagedIdentitySQLControlSettingsClient) BeginCreateOrUpd // // Generated from API version 2021-06-01 func (client *WorkspaceManagedIdentitySQLControlSettingsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, managedIdentitySQLControlSettings ManagedIdentitySQLControlSettingsModel, options *WorkspaceManagedIdentitySQLControlSettingsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceManagedIdentitySQLControlSettingsClient.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, managedIdentitySQLControlSettings, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -109,7 +118,10 @@ func (client *WorkspaceManagedIdentitySQLControlSettingsClient) createOrUpdateCr reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, managedIdentitySQLControlSettings) + if err := runtime.MarshalAsJSON(req, managedIdentitySQLControlSettings); err != nil { + return nil, err + } + return req, nil } // Get - Get Managed Identity Sql Control Settings @@ -121,18 +133,25 @@ func (client *WorkspaceManagedIdentitySQLControlSettingsClient) createOrUpdateCr // - options - WorkspaceManagedIdentitySQLControlSettingsClientGetOptions contains the optional parameters for the WorkspaceManagedIdentitySQLControlSettingsClient.Get // method. func (client *WorkspaceManagedIdentitySQLControlSettingsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspaceManagedIdentitySQLControlSettingsClientGetOptions) (WorkspaceManagedIdentitySQLControlSettingsClientGetResponse, error) { + var err error + const operationName = "WorkspaceManagedIdentitySQLControlSettingsClient.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, options) if err != nil { return WorkspaceManagedIdentitySQLControlSettingsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspaceManagedIdentitySQLControlSettingsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedIdentitySQLControlSettingsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceManagedIdentitySQLControlSettingsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverblobauditingpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverblobauditingpolicies_client.go index f285e711..1b19890a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverblobauditingpolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverblobauditingpolicies_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type WorkspaceManagedSQLServerBlobAuditingPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerBlobAuditingPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspaceManagedSQLServerBlobAuditingPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) BeginCreateOr if err != nil { return nil, err } - return runtime.NewPoller[WorkspaceManagedSQLServerBlobAuditingPoliciesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceManagedSQLServerBlobAuditingPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspaceManagedSQLServerBlobAuditingPoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceManagedSQLServerBlobAuditingPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) BeginCreateOr // // Generated from API version 2021-06-01 func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, blobAuditingPolicyName BlobAuditingPolicyName, parameters ServerBlobAuditingPolicy, options *WorkspaceManagedSQLServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceManagedSQLServerBlobAuditingPoliciesClient.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, blobAuditingPolicyName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -112,7 +122,10 @@ func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) createOrUpdat reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Get - Get a workspace managed sql server's blob auditing policy. @@ -125,18 +138,25 @@ func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) createOrUpdat // - options - WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerBlobAuditingPoliciesClient.Get // method. func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, blobAuditingPolicyName BlobAuditingPolicyName, options *WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetOptions) (WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetResponse, error) { + var err error + const operationName = "WorkspaceManagedSQLServerBlobAuditingPoliciesClient.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, blobAuditingPolicyName, options) if err != nil { return WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -191,25 +211,20 @@ func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) NewListByWork return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceResponse) (WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceManagedSQLServerBlobAuditingPoliciesClient.NewListByWorkspacePager") + 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.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) if err != nil { return WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) - } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go index 0c20fd35..9671021b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient(subscripti // - options - WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetOptions contains the optional parameters for // the WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.Get method. func (client *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, dedicatedSQLminimalTLSSettingsName string, options *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetOptions) (WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetResponse, error) { + var err error + const operationName = "WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.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, dedicatedSQLminimalTLSSettingsName, options) if err != nil { return WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -120,25 +126,20 @@ func (client *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient) New return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListResponse) (WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.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 WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -193,9 +194,14 @@ func (client *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient) Beg if err != nil { return nil, err } - return runtime.NewPoller[WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -204,18 +210,24 @@ func (client *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient) Beg // // Generated from API version 2021-06-01 func (client *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, dedicatedSQLminimalTLSSettingsName DedicatedSQLMinimalTLSSettingsName, parameters DedicatedSQLminimalTLSSettings, options *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.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, dedicatedSQLminimalTLSSettingsName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -245,5 +257,8 @@ func (client *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient) upd reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + 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/synapse/armsynapse/workspacemanagedsqlserverencryptionprotector_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverencryptionprotector_client.go index 2b3050be..4540f6ef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverencryptionprotector_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverencryptionprotector_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type WorkspaceManagedSQLServerEncryptionProtectorClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerEncryptionProtectorClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerEncryptionProtectorClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspaceManagedSQLServerEncryptionProtectorClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) BeginCreateOrU if err != nil { return nil, err } - return runtime.NewPoller[WorkspaceManagedSQLServerEncryptionProtectorClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceManagedSQLServerEncryptionProtectorClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspaceManagedSQLServerEncryptionProtectorClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceManagedSQLServerEncryptionProtectorClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) BeginCreateOrU // // Generated from API version 2021-06-01 func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, encryptionProtectorName EncryptionProtectorName, parameters EncryptionProtector, options *WorkspaceManagedSQLServerEncryptionProtectorClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceManagedSQLServerEncryptionProtectorClient.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, encryptionProtectorName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -112,7 +122,10 @@ func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) createOrUpdate reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Get - Get workspace managed sql server's encryption protector. @@ -125,18 +138,25 @@ func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) createOrUpdate // - options - WorkspaceManagedSQLServerEncryptionProtectorClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.Get // method. func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, encryptionProtectorName EncryptionProtectorName, options *WorkspaceManagedSQLServerEncryptionProtectorClientGetOptions) (WorkspaceManagedSQLServerEncryptionProtectorClientGetResponse, error) { + var err error + const operationName = "WorkspaceManagedSQLServerEncryptionProtectorClient.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, encryptionProtectorName, options) if err != nil { return WorkspaceManagedSQLServerEncryptionProtectorClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspaceManagedSQLServerEncryptionProtectorClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerEncryptionProtectorClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceManagedSQLServerEncryptionProtectorClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -191,25 +211,20 @@ func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) NewListPager(r return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkspaceManagedSQLServerEncryptionProtectorClientListResponse) (WorkspaceManagedSQLServerEncryptionProtectorClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceManagedSQLServerEncryptionProtectorClient.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 WorkspaceManagedSQLServerEncryptionProtectorClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkspaceManagedSQLServerEncryptionProtectorClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerEncryptionProtectorClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -263,9 +278,14 @@ func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) BeginRevalidat if err != nil { return nil, err } - return runtime.NewPoller[WorkspaceManagedSQLServerEncryptionProtectorClientRevalidateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceManagedSQLServerEncryptionProtectorClientRevalidateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspaceManagedSQLServerEncryptionProtectorClientRevalidateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceManagedSQLServerEncryptionProtectorClientRevalidateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -274,18 +294,24 @@ func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) BeginRevalidat // // Generated from API version 2021-06-01 func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) revalidate(ctx context.Context, resourceGroupName string, workspaceName string, encryptionProtectorName EncryptionProtectorName, options *WorkspaceManagedSQLServerEncryptionProtectorClientBeginRevalidateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceManagedSQLServerEncryptionProtectorClient.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, workspaceName, encryptionProtectorName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // revalidateCreateRequest creates the Revalidate request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverextendedblobauditingpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverextendedblobauditingpolicies_client.go index fc30fd2e..6fd5e548 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverextendedblobauditingpolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverextendedblobauditingpolicies_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) Begin if err != nil { return nil, err } - return runtime.NewPoller[WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) Begin // // Generated from API version 2021-06-01 func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, blobAuditingPolicyName BlobAuditingPolicyName, parameters ExtendedServerBlobAuditingPolicy, options *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.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, blobAuditingPolicyName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -112,7 +122,10 @@ func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) creat reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Get - Get a workspace SQL server's extended blob auditing policy. @@ -125,18 +138,25 @@ func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) creat // - options - WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetOptions contains the optional parameters for the // WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.Get method. func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, blobAuditingPolicyName BlobAuditingPolicyName, options *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetOptions) (WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetResponse, error) { + var err error + const operationName = "WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.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, blobAuditingPolicyName, options) if err != nil { return WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -191,25 +211,20 @@ func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) NewLi return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceResponse) (WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.NewListByWorkspacePager") + 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.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) if err != nil { return WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceResponse{}, runtime.NewResponseError(resp) - } return client.listByWorkspaceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverrecoverablesqlpools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverrecoverablesqlpools_client.go index 035495b3..831b38c4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverrecoverablesqlpools_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverrecoverablesqlpools_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type WorkspaceManagedSQLServerRecoverableSQLPoolsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerRecoverableSQLPoolsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspaceManagedSQLServerRecoverableSQLPoolsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -54,18 +53,25 @@ func NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient(subscriptionID string // - options - WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerRecoverableSQLPoolsClient.Get // method. func (client *WorkspaceManagedSQLServerRecoverableSQLPoolsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetOptions) (WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetResponse, error) { + var err error + const operationName = "WorkspaceManagedSQLServerRecoverableSQLPoolsClient.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, sqlPoolName, options) if err != nil { return WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -120,25 +126,20 @@ func (client *WorkspaceManagedSQLServerRecoverableSQLPoolsClient) NewListPager(r return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkspaceManagedSQLServerRecoverableSQLPoolsClientListResponse) (WorkspaceManagedSQLServerRecoverableSQLPoolsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceManagedSQLServerRecoverableSQLPoolsClient.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 WorkspaceManagedSQLServerRecoverableSQLPoolsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkspaceManagedSQLServerRecoverableSQLPoolsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerRecoverableSQLPoolsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserversecurityalertpolicy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserversecurityalertpolicy_client.go index 00fb8d59..3e3bffef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserversecurityalertpolicy_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserversecurityalertpolicy_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type WorkspaceManagedSQLServerSecurityAlertPolicyClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerSecurityAlertPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerSecurityAlertPolicyClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspaceManagedSQLServerSecurityAlertPolicyClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,9 +59,14 @@ func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) BeginCreateOrU if err != nil { return nil, err } - return runtime.NewPoller[WorkspaceManagedSQLServerSecurityAlertPolicyClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceManagedSQLServerSecurityAlertPolicyClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspaceManagedSQLServerSecurityAlertPolicyClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceManagedSQLServerSecurityAlertPolicyClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -71,18 +75,24 @@ func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) BeginCreateOrU // // Generated from API version 2021-06-01 func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, securityAlertPolicyName SecurityAlertPolicyNameAutoGenerated, parameters ServerSecurityAlertPolicy, options *WorkspaceManagedSQLServerSecurityAlertPolicyClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceManagedSQLServerSecurityAlertPolicyClient.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, securityAlertPolicyName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -112,7 +122,10 @@ func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) createOrUpdate reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Get - Get a workspace managed sql server's security alert policy. @@ -125,18 +138,25 @@ func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) createOrUpdate // - options - WorkspaceManagedSQLServerSecurityAlertPolicyClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.Get // method. func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, securityAlertPolicyName SecurityAlertPolicyNameAutoGenerated, options *WorkspaceManagedSQLServerSecurityAlertPolicyClientGetOptions) (WorkspaceManagedSQLServerSecurityAlertPolicyClientGetResponse, error) { + var err error + const operationName = "WorkspaceManagedSQLServerSecurityAlertPolicyClient.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, securityAlertPolicyName, options) if err != nil { return WorkspaceManagedSQLServerSecurityAlertPolicyClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspaceManagedSQLServerSecurityAlertPolicyClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerSecurityAlertPolicyClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceManagedSQLServerSecurityAlertPolicyClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -191,25 +211,20 @@ func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) NewListPager(r return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkspaceManagedSQLServerSecurityAlertPolicyClientListResponse) (WorkspaceManagedSQLServerSecurityAlertPolicyClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceManagedSQLServerSecurityAlertPolicyClient.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 WorkspaceManagedSQLServerSecurityAlertPolicyClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkspaceManagedSQLServerSecurityAlertPolicyClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerSecurityAlertPolicyClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverusages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverusages_client.go index 133d43c7..dd68eed2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverusages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverusages_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type WorkspaceManagedSQLServerUsagesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerUsagesClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspaceManagedSQLServerUsagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,25 +56,20 @@ func (client *WorkspaceManagedSQLServerUsagesClient) NewListPager(resourceGroupN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkspaceManagedSQLServerUsagesClientListResponse) (WorkspaceManagedSQLServerUsagesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceManagedSQLServerUsagesClient.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 WorkspaceManagedSQLServerUsagesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkspaceManagedSQLServerUsagesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerUsagesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlservervulnerabilityassessments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlservervulnerabilityassessments_client.go index e531a779..c63b85b5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlservervulnerabilityassessments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlservervulnerabilityassessments_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type WorkspaceManagedSQLServerVulnerabilityAssessmentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerVulnerabilityAssessmentsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspaceManagedSQLServerVulnerabilityAssessmentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient(subscriptionID s // - options - WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters // for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.CreateOrUpdate method. func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters ServerVulnerabilityAssessment, options *WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateOptions) (WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.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, workspaceName, vulnerabilityAssessmentName, parameters, options) if err != nil { return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) createOrU reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) createOrU // - options - WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the // WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.Delete method. func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteOptions) (WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.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, workspaceName, vulnerabilityAssessmentName, options) if err != nil { return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteResponse{}, err } return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteResponse{}, nil } @@ -171,18 +186,25 @@ func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) deleteCre // - options - WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.Get // method. func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetOptions) (WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetResponse, error) { + var err error + const operationName = "WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.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, vulnerabilityAssessmentName, options) if err != nil { return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -237,25 +259,20 @@ func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) NewListPa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListResponse) (WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.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 WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspaces_client.go index e5379548..9f0de213 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspaces_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspaces_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type WorkspacesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacesClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspacesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,11 +58,15 @@ func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspacesClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspacesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspacesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspacesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +75,24 @@ func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourc // // Generated from API version 2021-06-01 func (client *WorkspacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, workspaceInfo Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspacesClient.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, workspaceInfo, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -109,7 +118,10 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workspaceInfo) + if err := runtime.MarshalAsJSON(req, workspaceInfo); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a workspace @@ -125,11 +137,15 @@ func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspacesClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspacesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspacesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspacesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,18 +154,24 @@ func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupNa // // Generated from API version 2021-06-01 func (client *WorkspacesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "WorkspacesClient.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, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -186,18 +208,25 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc // - workspaceName - The name of the workspace. // - options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. func (client *WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (WorkspacesClientGetResponse, error) { + var err error + const operationName = "WorkspacesClient.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, options) if err != nil { return WorkspacesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspacesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspacesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspacesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -245,25 +274,20 @@ func (client *WorkspacesClient) NewListPager(options *WorkspacesClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkspacesClientListResponse) (WorkspacesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WorkspacesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspacesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + 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 WorkspacesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspacesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -306,25 +330,20 @@ func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkspacesClientListByResourceGroupResponse) (WorkspacesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspacesClient.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 WorkspacesClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkspacesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspacesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -373,11 +392,15 @@ func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspacesClientUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspacesClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspacesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspacesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -386,18 +409,24 @@ func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupNa // // Generated from API version 2021-06-01 func (client *WorkspacesClient) update(ctx context.Context, resourceGroupName string, workspaceName string, workspacePatchInfo WorkspacePatchInfo, options *WorkspacesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspacesClient.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, workspacePatchInfo, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -423,5 +452,8 @@ func (client *WorkspacesClient) updateCreateRequest(ctx context.Context, resourc reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workspacePatchInfo) + if err := runtime.MarshalAsJSON(req, workspacePatchInfo); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacesqlaadadmins_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacesqlaadadmins_client.go index 747ba9da..26d6d0ba 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacesqlaadadmins_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse/workspacesqlaadadmins_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armsynapse @@ -33,7 +32,7 @@ type WorkspaceSQLAADAdminsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkspaceSQLAADAdminsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceSQLAADAdminsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkspaceSQLAADAdminsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,11 +58,15 @@ func (client *WorkspaceSQLAADAdminsClient) BeginCreateOrUpdate(ctx context.Conte if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceSQLAADAdminsClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceSQLAADAdminsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspaceSQLAADAdminsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceSQLAADAdminsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -72,18 +75,24 @@ func (client *WorkspaceSQLAADAdminsClient) BeginCreateOrUpdate(ctx context.Conte // // Generated from API version 2021-06-01 func (client *WorkspaceSQLAADAdminsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, aadAdminInfo WorkspaceAADAdminInfo, options *WorkspaceSQLAADAdminsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceSQLAADAdminsClient.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, aadAdminInfo, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -109,7 +118,10 @@ func (client *WorkspaceSQLAADAdminsClient) createOrUpdateCreateRequest(ctx conte reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, aadAdminInfo) + if err := runtime.MarshalAsJSON(req, aadAdminInfo); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a workspace SQL active directory admin @@ -126,11 +138,15 @@ func (client *WorkspaceSQLAADAdminsClient) BeginDelete(ctx context.Context, reso if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceSQLAADAdminsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceSQLAADAdminsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkspaceSQLAADAdminsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceSQLAADAdminsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -139,18 +155,24 @@ func (client *WorkspaceSQLAADAdminsClient) BeginDelete(ctx context.Context, reso // // Generated from API version 2021-06-01 func (client *WorkspaceSQLAADAdminsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspaceSQLAADAdminsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceSQLAADAdminsClient.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, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -188,18 +210,25 @@ func (client *WorkspaceSQLAADAdminsClient) deleteCreateRequest(ctx context.Conte // - options - WorkspaceSQLAADAdminsClientGetOptions contains the optional parameters for the WorkspaceSQLAADAdminsClient.Get // method. func (client *WorkspaceSQLAADAdminsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspaceSQLAADAdminsClientGetOptions) (WorkspaceSQLAADAdminsClientGetResponse, error) { + var err error + const operationName = "WorkspaceSQLAADAdminsClient.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, options) if err != nil { return WorkspaceSQLAADAdminsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkspaceSQLAADAdminsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspaceSQLAADAdminsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceSQLAADAdminsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/CHANGELOG.md index 0ebfa698..1074f18c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.2.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + ## 1.1.0 (2023-03-31) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/README.md index 2e4f9a7f..b812295c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/README.md @@ -60,6 +60,13 @@ A client groups a set of related APIs, providing access to its functionality. C client := clientFactory.NewEventSourcesClient() ``` +## 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 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/accesspolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/accesspolicies_client.go index dcb410bf..9e2ea4eb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/accesspolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/accesspolicies_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armtimeseriesinsights @@ -33,7 +32,7 @@ type AccessPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAccessPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".AccessPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewAccessPoliciesClient(subscriptionID string, credential azcore.TokenCrede // - options - AccessPoliciesClientCreateOrUpdateOptions contains the optional parameters for the AccessPoliciesClient.CreateOrUpdate // method. func (client *AccessPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, accessPolicyName string, parameters AccessPolicyCreateOrUpdateParameters, options *AccessPoliciesClientCreateOrUpdateOptions) (AccessPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AccessPoliciesClient.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, environmentName, accessPolicyName, parameters, options) if err != nil { return AccessPoliciesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccessPoliciesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return AccessPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return AccessPoliciesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *AccessPoliciesClient) createOrUpdateCreateRequest(ctx context.Cont reqQP.Set("api-version", "2020-05-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *AccessPoliciesClient) createOrUpdateHandleResponse(resp *http.Resp // - accessPolicyName - The name of the Time Series Insights access policy associated with the specified environment. // - options - AccessPoliciesClientDeleteOptions contains the optional parameters for the AccessPoliciesClient.Delete method. func (client *AccessPoliciesClient) Delete(ctx context.Context, resourceGroupName string, environmentName string, accessPolicyName string, options *AccessPoliciesClientDeleteOptions) (AccessPoliciesClientDeleteResponse, error) { + var err error + const operationName = "AccessPoliciesClient.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, environmentName, accessPolicyName, options) if err != nil { return AccessPoliciesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccessPoliciesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return AccessPoliciesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return AccessPoliciesClientDeleteResponse{}, err } return AccessPoliciesClientDeleteResponse{}, nil } @@ -170,18 +185,25 @@ func (client *AccessPoliciesClient) deleteCreateRequest(ctx context.Context, res // - accessPolicyName - The name of the Time Series Insights access policy associated with the specified environment. // - options - AccessPoliciesClientGetOptions contains the optional parameters for the AccessPoliciesClient.Get method. func (client *AccessPoliciesClient) Get(ctx context.Context, resourceGroupName string, environmentName string, accessPolicyName string, options *AccessPoliciesClientGetOptions) (AccessPoliciesClientGetResponse, error) { + var err error + const operationName = "AccessPoliciesClient.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, environmentName, accessPolicyName, options) if err != nil { return AccessPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccessPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccessPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccessPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -232,18 +254,25 @@ func (client *AccessPoliciesClient) getHandleResponse(resp *http.Response) (Acce // - options - AccessPoliciesClientListByEnvironmentOptions contains the optional parameters for the AccessPoliciesClient.ListByEnvironment // method. func (client *AccessPoliciesClient) ListByEnvironment(ctx context.Context, resourceGroupName string, environmentName string, options *AccessPoliciesClientListByEnvironmentOptions) (AccessPoliciesClientListByEnvironmentResponse, error) { + var err error + const operationName = "AccessPoliciesClient.ListByEnvironment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByEnvironmentCreateRequest(ctx, resourceGroupName, environmentName, options) if err != nil { return AccessPoliciesClientListByEnvironmentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccessPoliciesClientListByEnvironmentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccessPoliciesClientListByEnvironmentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccessPoliciesClientListByEnvironmentResponse{}, err } - return client.listByEnvironmentHandleResponse(resp) + resp, err := client.listByEnvironmentHandleResponse(httpResp) + return resp, err } // listByEnvironmentCreateRequest creates the ListByEnvironment request. @@ -291,18 +320,25 @@ func (client *AccessPoliciesClient) listByEnvironmentHandleResponse(resp *http.R // - accessPolicyUpdateParameters - Request object that contains the updated information for the access policy. // - options - AccessPoliciesClientUpdateOptions contains the optional parameters for the AccessPoliciesClient.Update method. func (client *AccessPoliciesClient) Update(ctx context.Context, resourceGroupName string, environmentName string, accessPolicyName string, accessPolicyUpdateParameters AccessPolicyUpdateParameters, options *AccessPoliciesClientUpdateOptions) (AccessPoliciesClientUpdateResponse, error) { + var err error + const operationName = "AccessPoliciesClient.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, environmentName, accessPolicyName, accessPolicyUpdateParameters, options) if err != nil { return AccessPoliciesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccessPoliciesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccessPoliciesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccessPoliciesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -332,7 +368,10 @@ func (client *AccessPoliciesClient) updateCreateRequest(ctx context.Context, res reqQP.Set("api-version", "2020-05-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, accessPolicyUpdateParameters) + if err := runtime.MarshalAsJSON(req, accessPolicyUpdateParameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/autorest.md index 806fd2b0..05e6c846 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/autorest.md @@ -8,6 +8,6 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/timeseriesinsights/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/timeseriesinsights/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0 +module-version: 1.2.0 tag: package-2020-05-15 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/client_factory.go index d7689349..71b82006 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/client_factory.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armtimeseriesinsights @@ -28,7 +27,7 @@ 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+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,27 +37,32 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +// NewAccessPoliciesClient creates a new instance of AccessPoliciesClient. +func (c *ClientFactory) NewAccessPoliciesClient() *AccessPoliciesClient { + subClient, _ := NewAccessPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewEnvironmentsClient creates a new instance of EnvironmentsClient. func (c *ClientFactory) NewEnvironmentsClient() *EnvironmentsClient { subClient, _ := NewEnvironmentsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewEventSourcesClient creates a new instance of EventSourcesClient. func (c *ClientFactory) NewEventSourcesClient() *EventSourcesClient { subClient, _ := NewEventSourcesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewReferenceDataSetsClient() *ReferenceDataSetsClient { - subClient, _ := NewReferenceDataSetsClient(c.subscriptionID, c.credential, c.options) +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewAccessPoliciesClient() *AccessPoliciesClient { - subClient, _ := NewAccessPoliciesClient(c.subscriptionID, c.credential, c.options) +// NewReferenceDataSetsClient creates a new instance of ReferenceDataSetsClient. +func (c *ClientFactory) NewReferenceDataSetsClient() *ReferenceDataSetsClient { + subClient, _ := NewReferenceDataSetsClient(c.subscriptionID, c.credential, c.options) return subClient } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/constants.go index a35c741c..3c8d13ff 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/constants.go @@ -3,15 +3,14 @@ // 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. +// 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. -// DO NOT EDIT. package armtimeseriesinsights const ( - moduleName = "armtimeseriesinsights" - moduleVersion = "v1.1.0" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights" + moduleVersion = "v1.2.0" ) // AccessPolicyRole - A role defining the data plane operations that a principal can perform on a Time Series Insights client. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/environments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/environments_client.go index 10b44ebc..4fe5f27b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/environments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/environments_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armtimeseriesinsights @@ -33,7 +32,7 @@ type EnvironmentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEnvironmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EnvironmentsClient, error) { - cl, err := arm.NewClient(moduleName+".EnvironmentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,9 +58,14 @@ func (client *EnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller[EnvironmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -70,18 +74,24 @@ func (client *EnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, resou // // Generated from API version 2020-05-15 func (client *EnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, parameters EnvironmentCreateOrUpdateParametersClassification, options *EnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.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, environmentName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusNotFound) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusNotFound) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -107,7 +117,10 @@ func (client *EnvironmentsClient) createOrUpdateCreateRequest(ctx context.Contex reqQP.Set("api-version", "2020-05-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Delete - Deletes the environment with the specified name in the specified subscription and resource group. @@ -118,16 +131,22 @@ func (client *EnvironmentsClient) createOrUpdateCreateRequest(ctx context.Contex // - environmentName - The name of the Time Series Insights environment associated with the specified resource group. // - options - EnvironmentsClientDeleteOptions contains the optional parameters for the EnvironmentsClient.Delete method. func (client *EnvironmentsClient) Delete(ctx context.Context, resourceGroupName string, environmentName string, options *EnvironmentsClientDeleteOptions) (EnvironmentsClientDeleteResponse, error) { + var err error + const operationName = "EnvironmentsClient.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, environmentName, options) if err != nil { return EnvironmentsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return EnvironmentsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientDeleteResponse{}, err } return EnvironmentsClientDeleteResponse{}, nil } @@ -166,18 +185,25 @@ func (client *EnvironmentsClient) deleteCreateRequest(ctx context.Context, resou // - environmentName - The name of the Time Series Insights environment associated with the specified resource group. // - options - EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. func (client *EnvironmentsClient) Get(ctx context.Context, resourceGroupName string, environmentName string, options *EnvironmentsClientGetOptions) (EnvironmentsClientGetResponse, error) { + var err error + const operationName = "EnvironmentsClient.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, environmentName, options) if err != nil { return EnvironmentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -227,18 +253,25 @@ func (client *EnvironmentsClient) getHandleResponse(resp *http.Response) (Enviro // - options - EnvironmentsClientListByResourceGroupOptions contains the optional parameters for the EnvironmentsClient.ListByResourceGroup // method. func (client *EnvironmentsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, options *EnvironmentsClientListByResourceGroupOptions) (EnvironmentsClientListByResourceGroupResponse, error) { + var err error + const operationName = "EnvironmentsClient.ListByResourceGroup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) if err != nil { return EnvironmentsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientListByResourceGroupResponse{}, err } - return client.listByResourceGroupHandleResponse(resp) + resp, err := client.listByResourceGroupHandleResponse(httpResp) + return resp, err } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -279,18 +312,25 @@ func (client *EnvironmentsClient) listByResourceGroupHandleResponse(resp *http.R // - options - EnvironmentsClientListBySubscriptionOptions contains the optional parameters for the EnvironmentsClient.ListBySubscription // method. func (client *EnvironmentsClient) ListBySubscription(ctx context.Context, options *EnvironmentsClientListBySubscriptionOptions) (EnvironmentsClientListBySubscriptionResponse, error) { + var err error + const operationName = "EnvironmentsClient.ListBySubscription" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listBySubscriptionCreateRequest(ctx, options) if err != nil { return EnvironmentsClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientListBySubscriptionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientListBySubscriptionResponse{}, err } - return client.listBySubscriptionHandleResponse(resp) + resp, err := client.listBySubscriptionHandleResponse(httpResp) + return resp, err } // listBySubscriptionCreateRequest creates the ListBySubscription request. @@ -335,9 +375,14 @@ func (client *EnvironmentsClient) BeginUpdate(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[EnvironmentsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -346,18 +391,24 @@ func (client *EnvironmentsClient) BeginUpdate(ctx context.Context, resourceGroup // // Generated from API version 2020-05-15 func (client *EnvironmentsClient) update(ctx context.Context, resourceGroupName string, environmentName string, environmentUpdateParameters EnvironmentUpdateParametersClassification, options *EnvironmentsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.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, environmentName, environmentUpdateParameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -383,5 +434,8 @@ func (client *EnvironmentsClient) updateCreateRequest(ctx context.Context, resou reqQP.Set("api-version", "2020-05-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, environmentUpdateParameters) + if err := runtime.MarshalAsJSON(req, environmentUpdateParameters); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/eventsources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/eventsources_client.go index 7e3596df..f63361b3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/eventsources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/eventsources_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armtimeseriesinsights @@ -33,7 +32,7 @@ type EventSourcesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEventSourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EventSourcesClient, error) { - cl, err := arm.NewClient(moduleName+".EventSourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewEventSourcesClient(subscriptionID string, credential azcore.TokenCredent // - options - EventSourcesClientCreateOrUpdateOptions contains the optional parameters for the EventSourcesClient.CreateOrUpdate // method. func (client *EventSourcesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, eventSourceName string, parameters EventSourceCreateOrUpdateParametersClassification, options *EventSourcesClientCreateOrUpdateOptions) (EventSourcesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "EventSourcesClient.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, environmentName, eventSourceName, parameters, options) if err != nil { return EventSourcesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EventSourcesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return EventSourcesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return EventSourcesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *EventSourcesClient) createOrUpdateCreateRequest(ctx context.Contex reqQP.Set("api-version", "2020-05-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +126,22 @@ func (client *EventSourcesClient) createOrUpdateHandleResponse(resp *http.Respon // - eventSourceName - The name of the Time Series Insights event source associated with the specified environment. // - options - EventSourcesClientDeleteOptions contains the optional parameters for the EventSourcesClient.Delete method. func (client *EventSourcesClient) Delete(ctx context.Context, resourceGroupName string, environmentName string, eventSourceName string, options *EventSourcesClientDeleteOptions) (EventSourcesClientDeleteResponse, error) { + var err error + const operationName = "EventSourcesClient.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, environmentName, eventSourceName, options) if err != nil { return EventSourcesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EventSourcesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return EventSourcesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return EventSourcesClientDeleteResponse{}, err } return EventSourcesClientDeleteResponse{}, nil } @@ -170,18 +185,25 @@ func (client *EventSourcesClient) deleteCreateRequest(ctx context.Context, resou // - eventSourceName - The name of the Time Series Insights event source associated with the specified environment. // - options - EventSourcesClientGetOptions contains the optional parameters for the EventSourcesClient.Get method. func (client *EventSourcesClient) Get(ctx context.Context, resourceGroupName string, environmentName string, eventSourceName string, options *EventSourcesClientGetOptions) (EventSourcesClientGetResponse, error) { + var err error + const operationName = "EventSourcesClient.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, environmentName, eventSourceName, options) if err != nil { return EventSourcesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EventSourcesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EventSourcesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EventSourcesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -233,18 +255,25 @@ func (client *EventSourcesClient) getHandleResponse(resp *http.Response) (EventS // - options - EventSourcesClientListByEnvironmentOptions contains the optional parameters for the EventSourcesClient.ListByEnvironment // method. func (client *EventSourcesClient) ListByEnvironment(ctx context.Context, resourceGroupName string, environmentName string, options *EventSourcesClientListByEnvironmentOptions) (EventSourcesClientListByEnvironmentResponse, error) { + var err error + const operationName = "EventSourcesClient.ListByEnvironment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByEnvironmentCreateRequest(ctx, resourceGroupName, environmentName, options) if err != nil { return EventSourcesClientListByEnvironmentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EventSourcesClientListByEnvironmentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EventSourcesClientListByEnvironmentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EventSourcesClientListByEnvironmentResponse{}, err } - return client.listByEnvironmentHandleResponse(resp) + resp, err := client.listByEnvironmentHandleResponse(httpResp) + return resp, err } // listByEnvironmentCreateRequest creates the ListByEnvironment request. @@ -292,18 +321,25 @@ func (client *EventSourcesClient) listByEnvironmentHandleResponse(resp *http.Res // - eventSourceUpdateParameters - Request object that contains the updated information for the event source. // - options - EventSourcesClientUpdateOptions contains the optional parameters for the EventSourcesClient.Update method. func (client *EventSourcesClient) Update(ctx context.Context, resourceGroupName string, environmentName string, eventSourceName string, eventSourceUpdateParameters EventSourceUpdateParametersClassification, options *EventSourcesClientUpdateOptions) (EventSourcesClientUpdateResponse, error) { + var err error + const operationName = "EventSourcesClient.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, environmentName, eventSourceName, eventSourceUpdateParameters, options) if err != nil { return EventSourcesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EventSourcesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EventSourcesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EventSourcesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -333,7 +369,10 @@ func (client *EventSourcesClient) updateCreateRequest(ctx context.Context, resou reqQP.Set("api-version", "2020-05-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, eventSourceUpdateParameters) + if err := runtime.MarshalAsJSON(req, eventSourceUpdateParameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/interfaces.go new file mode 100644 index 00000000..c46f76a1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/interfaces.go @@ -0,0 +1,63 @@ +//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 armtimeseriesinsights + +// EnvironmentCreateOrUpdateParametersClassification provides polymorphic access to related types. +// Call the interface's GetEnvironmentCreateOrUpdateParameters() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EnvironmentCreateOrUpdateParameters, *Gen1EnvironmentCreateOrUpdateParameters, *Gen2EnvironmentCreateOrUpdateParameters +type EnvironmentCreateOrUpdateParametersClassification interface { + // GetEnvironmentCreateOrUpdateParameters returns the EnvironmentCreateOrUpdateParameters content of the underlying type. + GetEnvironmentCreateOrUpdateParameters() *EnvironmentCreateOrUpdateParameters +} + +// EnvironmentResourceClassification provides polymorphic access to related types. +// Call the interface's GetEnvironmentResource() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EnvironmentResource, *Gen1EnvironmentResource, *Gen2EnvironmentResource +type EnvironmentResourceClassification interface { + // GetEnvironmentResource returns the EnvironmentResource content of the underlying type. + GetEnvironmentResource() *EnvironmentResource +} + +// EnvironmentUpdateParametersClassification provides polymorphic access to related types. +// Call the interface's GetEnvironmentUpdateParameters() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EnvironmentUpdateParameters, *Gen1EnvironmentUpdateParameters, *Gen2EnvironmentUpdateParameters +type EnvironmentUpdateParametersClassification interface { + // GetEnvironmentUpdateParameters returns the EnvironmentUpdateParameters content of the underlying type. + GetEnvironmentUpdateParameters() *EnvironmentUpdateParameters +} + +// EventSourceCreateOrUpdateParametersClassification provides polymorphic access to related types. +// Call the interface's GetEventSourceCreateOrUpdateParameters() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EventHubEventSourceCreateOrUpdateParameters, *EventSourceCreateOrUpdateParameters, *IoTHubEventSourceCreateOrUpdateParameters +type EventSourceCreateOrUpdateParametersClassification interface { + // GetEventSourceCreateOrUpdateParameters returns the EventSourceCreateOrUpdateParameters content of the underlying type. + GetEventSourceCreateOrUpdateParameters() *EventSourceCreateOrUpdateParameters +} + +// EventSourceResourceClassification provides polymorphic access to related types. +// Call the interface's GetEventSourceResource() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EventHubEventSourceResource, *EventSourceResource, *IoTHubEventSourceResource +type EventSourceResourceClassification interface { + // GetEventSourceResource returns the EventSourceResource content of the underlying type. + GetEventSourceResource() *EventSourceResource +} + +// EventSourceUpdateParametersClassification provides polymorphic access to related types. +// Call the interface's GetEventSourceUpdateParameters() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EventHubEventSourceUpdateParameters, *EventSourceUpdateParameters, *IoTHubEventSourceUpdateParameters +type EventSourceUpdateParametersClassification interface { + // GetEventSourceUpdateParameters returns the EventSourceUpdateParameters content of the underlying type. + GetEventSourceUpdateParameters() *EventSourceUpdateParameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/models.go index 5a571d82..d6044a45 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/models.go @@ -3,159 +3,122 @@ // 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. +// 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. -// DO NOT EDIT. package armtimeseriesinsights import "time" -// AccessPoliciesClientCreateOrUpdateOptions contains the optional parameters for the AccessPoliciesClient.CreateOrUpdate -// method. -type AccessPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AccessPoliciesClientDeleteOptions contains the optional parameters for the AccessPoliciesClient.Delete method. -type AccessPoliciesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// AccessPoliciesClientGetOptions contains the optional parameters for the AccessPoliciesClient.Get method. -type AccessPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// AccessPoliciesClientListByEnvironmentOptions contains the optional parameters for the AccessPoliciesClient.ListByEnvironment -// method. -type AccessPoliciesClientListByEnvironmentOptions struct { - // placeholder for future optional parameters -} - -// AccessPoliciesClientUpdateOptions contains the optional parameters for the AccessPoliciesClient.Update method. -type AccessPoliciesClientUpdateOptions struct { - // placeholder for future optional parameters -} - type AccessPolicyCreateOrUpdateParameters struct { // REQUIRED - Properties *AccessPolicyResourceProperties `json:"properties,omitempty"` + Properties *AccessPolicyResourceProperties } // AccessPolicyListResponse - The response of the List access policies operation. type AccessPolicyListResponse struct { // Result of the List access policies operation. - Value []*AccessPolicyResource `json:"value,omitempty"` + Value []*AccessPolicyResource } // AccessPolicyMutableProperties - An object that represents a set of mutable access policy resource properties. type AccessPolicyMutableProperties struct { // An description of the access policy. - Description *string `json:"description,omitempty"` + Description *string // The list of roles the principal is assigned on the environment. - Roles []*AccessPolicyRole `json:"roles,omitempty"` + Roles []*AccessPolicyRole } // AccessPolicyResource - An access policy is used to grant users and applications access to the environment. Roles are assigned // to service principals in Azure Active Directory. These roles define the actions the principal can // perform through the Time Series Insights data plane APIs. type AccessPolicyResource struct { - Properties *AccessPolicyResourceProperties `json:"properties,omitempty"` + Properties *AccessPolicyResourceProperties // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } type AccessPolicyResourceProperties struct { // An description of the access policy. - Description *string `json:"description,omitempty"` + Description *string // The objectId of the principal in Azure Active Directory. - PrincipalObjectID *string `json:"principalObjectId,omitempty"` + PrincipalObjectID *string // The list of roles the principal is assigned on the environment. - Roles []*AccessPolicyRole `json:"roles,omitempty"` + Roles []*AccessPolicyRole } type AccessPolicyUpdateParameters struct { // An object that represents a set of mutable access policy resource properties. - Properties *AccessPolicyMutableProperties `json:"properties,omitempty"` + Properties *AccessPolicyMutableProperties } // AzureEventSourceProperties - Properties of an event source that reads events from an event broker in Azure. type AzureEventSourceProperties struct { // REQUIRED; The resource id of the event source in Azure Resource Manager. - EventSourceResourceID *string `json:"eventSourceResourceId,omitempty"` + EventSourceResourceID *string // An object that contains the details about the starting point in time to ingest events. - IngressStartAt *IngressStartAtProperties `json:"ingressStartAt,omitempty"` + IngressStartAt *IngressStartAtProperties // An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used // and the corresponding timezone offset information. If a value isn't specified // for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. - LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` + LocalTimestamp *LocalTimestamp // The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, // or if null or empty-string is specified, the event creation time will be // used. - TimestampPropertyName *string `json:"timestampPropertyName,omitempty"` + TimestampPropertyName *string // READ-ONLY; The time the resource was created. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; Provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // CreateOrUpdateTrackedResourceProperties - Properties required to create any resource tracked by Azure Resource Manager. type CreateOrUpdateTrackedResourceProperties struct { // REQUIRED; The location of the resource. - Location *string `json:"location,omitempty"` + Location *string // Key-value pairs of additional properties for the resource. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // Dimension of blobs, possibly be blob type or access tier. type Dimension struct { // Display name of dimension. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Display name of dimension. - Name *string `json:"name,omitempty"` -} - -// EnvironmentCreateOrUpdateParametersClassification provides polymorphic access to related types. -// Call the interface's GetEnvironmentCreateOrUpdateParameters() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *EnvironmentCreateOrUpdateParameters, *Gen1EnvironmentCreateOrUpdateParameters, *Gen2EnvironmentCreateOrUpdateParameters -type EnvironmentCreateOrUpdateParametersClassification interface { - // GetEnvironmentCreateOrUpdateParameters returns the EnvironmentCreateOrUpdateParameters content of the underlying type. - GetEnvironmentCreateOrUpdateParameters() *EnvironmentCreateOrUpdateParameters + Name *string } // EnvironmentCreateOrUpdateParameters - Parameters supplied to the CreateOrUpdate Environment operation. type EnvironmentCreateOrUpdateParameters struct { // REQUIRED; The kind of the environment. - Kind *EnvironmentKind `json:"kind,omitempty"` + Kind *EnvironmentKind // REQUIRED; The location of the resource. - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku // determines the capacity of the environment, the ingress rate, and the billing rate. - SKU *SKU `json:"sku,omitempty"` + SKU *SKU // Key-value pairs of additional properties for the resource. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // GetEnvironmentCreateOrUpdateParameters implements the EnvironmentCreateOrUpdateParametersClassification interface for type @@ -167,42 +130,33 @@ func (e *EnvironmentCreateOrUpdateParameters) GetEnvironmentCreateOrUpdateParame // EnvironmentListResponse - The response of the List Environments operation. type EnvironmentListResponse struct { // Result of the List Environments operation. - Value []EnvironmentResourceClassification `json:"value,omitempty"` -} - -// EnvironmentResourceClassification provides polymorphic access to related types. -// Call the interface's GetEnvironmentResource() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *EnvironmentResource, *Gen1EnvironmentResource, *Gen2EnvironmentResource -type EnvironmentResourceClassification interface { - // GetEnvironmentResource returns the EnvironmentResource content of the underlying type. - GetEnvironmentResource() *EnvironmentResource + Value []EnvironmentResourceClassification } // EnvironmentResource - An environment is a set of time-series data available for query, and is the top level Azure Time // Series Insights resource. type EnvironmentResource struct { // REQUIRED; The kind of the environment. - Kind *EnvironmentResourceKind `json:"kind,omitempty"` + Kind *EnvironmentResourceKind // REQUIRED; Resource location - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku // determines the capacity of the environment, the ingress rate, and the billing rate. - SKU *SKU `json:"sku,omitempty"` + SKU *SKU // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEnvironmentResource implements the EnvironmentResourceClassification interface for type EnvironmentResource. @@ -211,60 +165,51 @@ func (e *EnvironmentResource) GetEnvironmentResource() *EnvironmentResource { re // EnvironmentResourceProperties - Properties of the environment. type EnvironmentResourceProperties struct { // READ-ONLY; The time the resource was created. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; The fully qualified domain name used to access the environment data, e.g. to query the environment's events // or upload reference data for the environment. - DataAccessFqdn *string `json:"dataAccessFqdn,omitempty" azure:"ro"` + DataAccessFqdn *string // READ-ONLY; An id used to access the environment data, e.g. to query the environment's events or upload reference data for // the environment. - DataAccessID *string `json:"dataAccessId,omitempty" azure:"ro"` + DataAccessID *string // READ-ONLY; Provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState // READ-ONLY; An object that represents the status of the environment, and its internal state in the Time Series Insights // service. - Status *EnvironmentStatus `json:"status,omitempty" azure:"ro"` + Status *EnvironmentStatus } // EnvironmentStateDetails - An object that contains the details about an environment's state. type EnvironmentStateDetails struct { // Contains the code that represents the reason of an environment being in a particular state. Can be used to programmatically // handle specific cases. - Code *string `json:"code,omitempty"` + Code *string // A message that describes the state in detail. - Message *string `json:"message,omitempty"` + Message *string } // EnvironmentStatus - An object that represents the status of the environment, and its internal state in the Time Series // Insights service. type EnvironmentStatus struct { // READ-ONLY; An object that represents the status of ingress on an environment. - Ingress *IngressEnvironmentStatus `json:"ingress,omitempty" azure:"ro"` + Ingress *IngressEnvironmentStatus // READ-ONLY; An object that represents the status of warm storage on an environment. - WarmStorage *WarmStorageEnvironmentStatus `json:"warmStorage,omitempty" azure:"ro"` -} - -// EnvironmentUpdateParametersClassification provides polymorphic access to related types. -// Call the interface's GetEnvironmentUpdateParameters() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *EnvironmentUpdateParameters, *Gen1EnvironmentUpdateParameters, *Gen2EnvironmentUpdateParameters -type EnvironmentUpdateParametersClassification interface { - // GetEnvironmentUpdateParameters returns the EnvironmentUpdateParameters content of the underlying type. - GetEnvironmentUpdateParameters() *EnvironmentUpdateParameters + WarmStorage *WarmStorageEnvironmentStatus } // EnvironmentUpdateParameters - Parameters supplied to the Update Environment operation. type EnvironmentUpdateParameters struct { // REQUIRED; The kind of the environment. - Kind *EnvironmentKind `json:"kind,omitempty"` + Kind *EnvironmentKind // Key-value pairs of additional properties for the environment. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // GetEnvironmentUpdateParameters implements the EnvironmentUpdateParametersClassification interface for type EnvironmentUpdateParameters. @@ -272,100 +217,63 @@ func (e *EnvironmentUpdateParameters) GetEnvironmentUpdateParameters() *Environm return e } -// EnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdate -// method. -type EnvironmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientBeginUpdateOptions contains the optional parameters for the EnvironmentsClient.BeginUpdate method. -type EnvironmentsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientDeleteOptions contains the optional parameters for the EnvironmentsClient.Delete method. -type EnvironmentsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. -type EnvironmentsClientGetOptions struct { - // Setting $expand=status will include the status of the internal services of the environment in the Time Series Insights - // service. - Expand *string -} - -// EnvironmentsClientListByResourceGroupOptions contains the optional parameters for the EnvironmentsClient.ListByResourceGroup -// method. -type EnvironmentsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListBySubscriptionOptions contains the optional parameters for the EnvironmentsClient.ListBySubscription -// method. -type EnvironmentsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - // EventHubEventSourceCommonProperties - Properties of the EventHub event source. type EventHubEventSourceCommonProperties struct { // REQUIRED; The name of the event hub's consumer group that holds the partitions from which events will be read. - ConsumerGroupName *string `json:"consumerGroupName,omitempty"` + ConsumerGroupName *string // REQUIRED; The name of the event hub. - EventHubName *string `json:"eventHubName,omitempty"` + EventHubName *string // REQUIRED; The resource id of the event source in Azure Resource Manager. - EventSourceResourceID *string `json:"eventSourceResourceId,omitempty"` + EventSourceResourceID *string // REQUIRED; The name of the SAS key that grants the Time Series Insights service access to the event hub. The shared access // policies for this key must grant 'Listen' permissions to the event hub. - KeyName *string `json:"keyName,omitempty"` + KeyName *string // REQUIRED; The name of the service bus that contains the event hub. - ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` + ServiceBusNamespace *string // An object that contains the details about the starting point in time to ingest events. - IngressStartAt *IngressStartAtProperties `json:"ingressStartAt,omitempty"` + IngressStartAt *IngressStartAtProperties // An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used // and the corresponding timezone offset information. If a value isn't specified // for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. - LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` + LocalTimestamp *LocalTimestamp // The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, // or if null or empty-string is specified, the event creation time will be // used. - TimestampPropertyName *string `json:"timestampPropertyName,omitempty"` + TimestampPropertyName *string // READ-ONLY; The time the resource was created. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; Provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // EventHubEventSourceCreateOrUpdateParameters - Parameters supplied to the Create or Update Event Source operation for an // EventHub event source. type EventHubEventSourceCreateOrUpdateParameters struct { // REQUIRED; The kind of the event source. - Kind *EventSourceKind `json:"kind,omitempty"` + Kind *EventSourceKind // REQUIRED; The location of the resource. - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; Properties of the EventHub event source that are required on create or update requests. - Properties *EventHubEventSourceCreationProperties `json:"properties,omitempty"` + Properties *EventHubEventSourceCreationProperties // An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used // and the corresponding timezone offset information. If a value isn't specified // for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. - LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` + LocalTimestamp *LocalTimestamp // Key-value pairs of additional properties for the resource. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // GetEventSourceCreateOrUpdateParameters implements the EventSourceCreateOrUpdateParametersClassification interface for type @@ -382,89 +290,89 @@ func (e *EventHubEventSourceCreateOrUpdateParameters) GetEventSourceCreateOrUpda // EventHubEventSourceCreationProperties - Properties of the EventHub event source that are required on create or update requests. type EventHubEventSourceCreationProperties struct { // REQUIRED; The name of the event hub's consumer group that holds the partitions from which events will be read. - ConsumerGroupName *string `json:"consumerGroupName,omitempty"` + ConsumerGroupName *string // REQUIRED; The name of the event hub. - EventHubName *string `json:"eventHubName,omitempty"` + EventHubName *string // REQUIRED; The resource id of the event source in Azure Resource Manager. - EventSourceResourceID *string `json:"eventSourceResourceId,omitempty"` + EventSourceResourceID *string // REQUIRED; The name of the SAS key that grants the Time Series Insights service access to the event hub. The shared access // policies for this key must grant 'Listen' permissions to the event hub. - KeyName *string `json:"keyName,omitempty"` + KeyName *string // REQUIRED; The name of the service bus that contains the event hub. - ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` + ServiceBusNamespace *string // REQUIRED; The value of the shared access key that grants the Time Series Insights service read access to the event hub. // This property is not shown in event source responses. - SharedAccessKey *string `json:"sharedAccessKey,omitempty"` + SharedAccessKey *string // An object that contains the details about the starting point in time to ingest events. - IngressStartAt *IngressStartAtProperties `json:"ingressStartAt,omitempty"` + IngressStartAt *IngressStartAtProperties // An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used // and the corresponding timezone offset information. If a value isn't specified // for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. - LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` + LocalTimestamp *LocalTimestamp // The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, // or if null or empty-string is specified, the event creation time will be // used. - TimestampPropertyName *string `json:"timestampPropertyName,omitempty"` + TimestampPropertyName *string // READ-ONLY; The time the resource was created. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; Provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // EventHubEventSourceMutableProperties - An object that represents a set of mutable EventHub event source resource properties. type EventHubEventSourceMutableProperties struct { // The value of the shared access key that grants the Time Series Insights service read access to the event hub. This property // is not shown in event source responses. - SharedAccessKey *string `json:"sharedAccessKey,omitempty"` + SharedAccessKey *string // The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, // or if null or empty-string is specified, the event creation time will be // used. - TimestampPropertyName *string `json:"timestampPropertyName,omitempty"` + TimestampPropertyName *string } // EventHubEventSourceResource - An event source that receives its data from an Azure EventHub. type EventHubEventSourceResource struct { // REQUIRED; The kind of the event source. - Kind *EventSourceResourceKind `json:"kind,omitempty"` + Kind *EventSourceResourceKind // REQUIRED; Resource location - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; Properties of the EventHub event source resource. - Properties *EventHubEventSourceResourceProperties `json:"properties,omitempty"` + Properties *EventHubEventSourceResourceProperties // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEventSourceResource implements the EventSourceResourceClassification interface for type EventHubEventSourceResource. func (e *EventHubEventSourceResource) GetEventSourceResource() *EventSourceResource { return &EventSourceResource{ + ID: e.ID, Kind: e.Kind, Location: e.Location, - Tags: e.Tags, - ID: e.ID, Name: e.Name, + Tags: e.Tags, Type: e.Type, } } @@ -472,52 +380,52 @@ func (e *EventHubEventSourceResource) GetEventSourceResource() *EventSourceResou // EventHubEventSourceResourceProperties - Properties of the EventHub event source resource. type EventHubEventSourceResourceProperties struct { // REQUIRED; The name of the event hub's consumer group that holds the partitions from which events will be read. - ConsumerGroupName *string `json:"consumerGroupName,omitempty"` + ConsumerGroupName *string // REQUIRED; The name of the event hub. - EventHubName *string `json:"eventHubName,omitempty"` + EventHubName *string // REQUIRED; The resource id of the event source in Azure Resource Manager. - EventSourceResourceID *string `json:"eventSourceResourceId,omitempty"` + EventSourceResourceID *string // REQUIRED; The name of the SAS key that grants the Time Series Insights service access to the event hub. The shared access // policies for this key must grant 'Listen' permissions to the event hub. - KeyName *string `json:"keyName,omitempty"` + KeyName *string // REQUIRED; The name of the service bus that contains the event hub. - ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` + ServiceBusNamespace *string // An object that contains the details about the starting point in time to ingest events. - IngressStartAt *IngressStartAtProperties `json:"ingressStartAt,omitempty"` + IngressStartAt *IngressStartAtProperties // An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used // and the corresponding timezone offset information. If a value isn't specified // for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. - LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` + LocalTimestamp *LocalTimestamp // The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, // or if null or empty-string is specified, the event creation time will be // used. - TimestampPropertyName *string `json:"timestampPropertyName,omitempty"` + TimestampPropertyName *string // READ-ONLY; The time the resource was created. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; Provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // EventHubEventSourceUpdateParameters - Parameters supplied to the Update Event Source operation to update an EventHub event // source. type EventHubEventSourceUpdateParameters struct { // REQUIRED; The kind of the event source. - Kind *EventSourceKind `json:"kind,omitempty"` + Kind *EventSourceKind // Properties of the EventHub event source. - Properties *EventHubEventSourceMutableProperties `json:"properties,omitempty"` + Properties *EventHubEventSourceMutableProperties // Key-value pairs of additional properties for the event source. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // GetEventSourceUpdateParameters implements the EventSourceUpdateParametersClassification interface for type EventHubEventSourceUpdateParameters. @@ -531,49 +439,40 @@ func (e *EventHubEventSourceUpdateParameters) GetEventSourceUpdateParameters() * // EventSourceCommonProperties - Properties of the event source. type EventSourceCommonProperties struct { // An object that contains the details about the starting point in time to ingest events. - IngressStartAt *IngressStartAtProperties `json:"ingressStartAt,omitempty"` + IngressStartAt *IngressStartAtProperties // An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used // and the corresponding timezone offset information. If a value isn't specified // for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. - LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` + LocalTimestamp *LocalTimestamp // The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, // or if null or empty-string is specified, the event creation time will be // used. - TimestampPropertyName *string `json:"timestampPropertyName,omitempty"` + TimestampPropertyName *string // READ-ONLY; The time the resource was created. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; Provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// EventSourceCreateOrUpdateParametersClassification provides polymorphic access to related types. -// Call the interface's GetEventSourceCreateOrUpdateParameters() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *EventHubEventSourceCreateOrUpdateParameters, *EventSourceCreateOrUpdateParameters, *IoTHubEventSourceCreateOrUpdateParameters -type EventSourceCreateOrUpdateParametersClassification interface { - // GetEventSourceCreateOrUpdateParameters returns the EventSourceCreateOrUpdateParameters content of the underlying type. - GetEventSourceCreateOrUpdateParameters() *EventSourceCreateOrUpdateParameters + ProvisioningState *ProvisioningState } // EventSourceCreateOrUpdateParameters - Parameters supplied to the Create or Update Event Source operation. type EventSourceCreateOrUpdateParameters struct { // REQUIRED; The kind of the event source. - Kind *EventSourceKind `json:"kind,omitempty"` + Kind *EventSourceKind // REQUIRED; The location of the resource. - Location *string `json:"location,omitempty"` + Location *string // An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used // and the corresponding timezone offset information. If a value isn't specified // for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. - LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` + LocalTimestamp *LocalTimestamp // Key-value pairs of additional properties for the resource. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // GetEventSourceCreateOrUpdateParameters implements the EventSourceCreateOrUpdateParametersClassification interface for type @@ -585,7 +484,7 @@ func (e *EventSourceCreateOrUpdateParameters) GetEventSourceCreateOrUpdateParame // EventSourceListResponse - The response of the List EventSources operation. type EventSourceListResponse struct { // Result of the List EventSources operation. - Value []EventSourceResourceClassification `json:"value,omitempty"` + Value []EventSourceResourceClassification } // EventSourceMutableProperties - An object that represents a set of mutable event source resource properties. @@ -593,16 +492,7 @@ type EventSourceMutableProperties struct { // The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, // or if null or empty-string is specified, the event creation time will be // used. - TimestampPropertyName *string `json:"timestampPropertyName,omitempty"` -} - -// EventSourceResourceClassification provides polymorphic access to related types. -// Call the interface's GetEventSourceResource() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *EventHubEventSourceResource, *EventSourceResource, *IoTHubEventSourceResource -type EventSourceResourceClassification interface { - // GetEventSourceResource returns the EventSourceResource content of the underlying type. - GetEventSourceResource() *EventSourceResource + TimestampPropertyName *string } // EventSourceResource - An environment receives data from one or more event sources. Each event source has associated connection @@ -610,43 +500,34 @@ type EventSourceResourceClassification interface { // event source type EventSourceResource struct { // REQUIRED; The kind of the event source. - Kind *EventSourceResourceKind `json:"kind,omitempty"` + Kind *EventSourceResourceKind // REQUIRED; Resource location - Location *string `json:"location,omitempty"` + Location *string // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEventSourceResource implements the EventSourceResourceClassification interface for type EventSourceResource. func (e *EventSourceResource) GetEventSourceResource() *EventSourceResource { return e } -// EventSourceUpdateParametersClassification provides polymorphic access to related types. -// Call the interface's GetEventSourceUpdateParameters() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *EventHubEventSourceUpdateParameters, *EventSourceUpdateParameters, *IoTHubEventSourceUpdateParameters -type EventSourceUpdateParametersClassification interface { - // GetEventSourceUpdateParameters returns the EventSourceUpdateParameters content of the underlying type. - GetEventSourceUpdateParameters() *EventSourceUpdateParameters -} - // EventSourceUpdateParameters - Parameters supplied to the Update Event Source operation. type EventSourceUpdateParameters struct { // REQUIRED; The kind of the event source. - Kind *EventSourceKind `json:"kind,omitempty"` + Kind *EventSourceKind // Key-value pairs of additional properties for the event source. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // GetEventSourceUpdateParameters implements the EventSourceUpdateParametersClassification interface for type EventSourceUpdateParameters. @@ -654,50 +535,24 @@ func (e *EventSourceUpdateParameters) GetEventSourceUpdateParameters() *EventSou return e } -// EventSourcesClientCreateOrUpdateOptions contains the optional parameters for the EventSourcesClient.CreateOrUpdate method. -type EventSourcesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// EventSourcesClientDeleteOptions contains the optional parameters for the EventSourcesClient.Delete method. -type EventSourcesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// EventSourcesClientGetOptions contains the optional parameters for the EventSourcesClient.Get method. -type EventSourcesClientGetOptions struct { - // placeholder for future optional parameters -} - -// EventSourcesClientListByEnvironmentOptions contains the optional parameters for the EventSourcesClient.ListByEnvironment -// method. -type EventSourcesClientListByEnvironmentOptions struct { - // placeholder for future optional parameters -} - -// EventSourcesClientUpdateOptions contains the optional parameters for the EventSourcesClient.Update method. -type EventSourcesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // Gen1EnvironmentCreateOrUpdateParameters - Parameters supplied to the Create or Update Environment operation for a Gen1 // environment. type Gen1EnvironmentCreateOrUpdateParameters struct { // REQUIRED; The kind of the environment. - Kind *EnvironmentKind `json:"kind,omitempty"` + Kind *EnvironmentKind // REQUIRED; The location of the resource. - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; Properties used to create a Gen1 environment. - Properties *Gen1EnvironmentCreationProperties `json:"properties,omitempty"` + Properties *Gen1EnvironmentCreationProperties // REQUIRED; The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku // determines the capacity of the environment, the ingress rate, and the billing rate. - SKU *SKU `json:"sku,omitempty"` + SKU *SKU // Key-value pairs of additional properties for the resource. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // GetEnvironmentCreateOrUpdateParameters implements the EnvironmentCreateOrUpdateParametersClassification interface for type @@ -705,8 +560,8 @@ type Gen1EnvironmentCreateOrUpdateParameters struct { func (g *Gen1EnvironmentCreateOrUpdateParameters) GetEnvironmentCreateOrUpdateParameters() *EnvironmentCreateOrUpdateParameters { return &EnvironmentCreateOrUpdateParameters{ Kind: g.Kind, - SKU: g.SKU, Location: g.Location, + SKU: g.SKU, Tags: g.Tags, } } @@ -714,69 +569,69 @@ func (g *Gen1EnvironmentCreateOrUpdateParameters) GetEnvironmentCreateOrUpdatePa // Gen1EnvironmentCreationProperties - Properties used to create a Gen1 environment. type Gen1EnvironmentCreationProperties struct { // REQUIRED; ISO8601 timespan specifying the minimum number of days the environment's events will be available for query. - DataRetentionTime *string `json:"dataRetentionTime,omitempty"` + DataRetentionTime *string // The list of event properties which will be used to partition data in the environment. Currently, only a single partition // key property is supported. - PartitionKeyProperties []*TimeSeriesIDProperty `json:"partitionKeyProperties,omitempty"` + PartitionKeyProperties []*TimeSeriesIDProperty // The behavior the Time Series Insights service should take when the environment's capacity has been exceeded. If "PauseIngress" // is specified, new events will not be read from the event source. If // "PurgeOldData" is specified, new events will continue to be read and old events will be deleted from the environment. The // default behavior is PurgeOldData. - StorageLimitExceededBehavior *StorageLimitExceededBehavior `json:"storageLimitExceededBehavior,omitempty"` + StorageLimitExceededBehavior *StorageLimitExceededBehavior } // Gen1EnvironmentMutableProperties - An object that represents a set of mutable Gen1 environment resource properties. type Gen1EnvironmentMutableProperties struct { // ISO8601 timespan specifying the minimum number of days the environment's events will be available for query. - DataRetentionTime *string `json:"dataRetentionTime,omitempty"` + DataRetentionTime *string // The behavior the Time Series Insights service should take when the environment's capacity has been exceeded. If "PauseIngress" // is specified, new events will not be read from the event source. If // "PurgeOldData" is specified, new events will continue to be read and old events will be deleted from the environment. The // default behavior is PurgeOldData. - StorageLimitExceededBehavior *StorageLimitExceededBehavior `json:"storageLimitExceededBehavior,omitempty"` + StorageLimitExceededBehavior *StorageLimitExceededBehavior } // Gen1EnvironmentResource - An environment is a set of time-series data available for query, and is the top level Azure Time // Series Insights resource. Gen1 environments have data retention limits. type Gen1EnvironmentResource struct { // REQUIRED; The kind of the environment. - Kind *EnvironmentResourceKind `json:"kind,omitempty"` + Kind *EnvironmentResourceKind // REQUIRED; Resource location - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; Properties of the Gen1 environment. - Properties *Gen1EnvironmentResourceProperties `json:"properties,omitempty"` + Properties *Gen1EnvironmentResourceProperties // REQUIRED; The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku // determines the capacity of the environment, the ingress rate, and the billing rate. - SKU *SKU `json:"sku,omitempty"` + SKU *SKU // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEnvironmentResource implements the EnvironmentResourceClassification interface for type Gen1EnvironmentResource. func (g *Gen1EnvironmentResource) GetEnvironmentResource() *EnvironmentResource { return &EnvironmentResource{ - SKU: g.SKU, + ID: g.ID, Kind: g.Kind, Location: g.Location, - Tags: g.Tags, - ID: g.ID, Name: g.Name, + SKU: g.SKU, + Tags: g.Tags, Type: g.Type, } } @@ -784,50 +639,50 @@ func (g *Gen1EnvironmentResource) GetEnvironmentResource() *EnvironmentResource // Gen1EnvironmentResourceProperties - Properties of the Gen1 environment. type Gen1EnvironmentResourceProperties struct { // REQUIRED; ISO8601 timespan specifying the minimum number of days the environment's events will be available for query. - DataRetentionTime *string `json:"dataRetentionTime,omitempty"` + DataRetentionTime *string // The list of event properties which will be used to partition data in the environment. Currently, only a single partition // key property is supported. - PartitionKeyProperties []*TimeSeriesIDProperty `json:"partitionKeyProperties,omitempty"` + PartitionKeyProperties []*TimeSeriesIDProperty // The behavior the Time Series Insights service should take when the environment's capacity has been exceeded. If "PauseIngress" // is specified, new events will not be read from the event source. If // "PurgeOldData" is specified, new events will continue to be read and old events will be deleted from the environment. The // default behavior is PurgeOldData. - StorageLimitExceededBehavior *StorageLimitExceededBehavior `json:"storageLimitExceededBehavior,omitempty"` + StorageLimitExceededBehavior *StorageLimitExceededBehavior // READ-ONLY; The time the resource was created. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; The fully qualified domain name used to access the environment data, e.g. to query the environment's events // or upload reference data for the environment. - DataAccessFqdn *string `json:"dataAccessFqdn,omitempty" azure:"ro"` + DataAccessFqdn *string // READ-ONLY; An id used to access the environment data, e.g. to query the environment's events or upload reference data for // the environment. - DataAccessID *string `json:"dataAccessId,omitempty" azure:"ro"` + DataAccessID *string // READ-ONLY; Provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState // READ-ONLY; An object that represents the status of the environment, and its internal state in the Time Series Insights // service. - Status *EnvironmentStatus `json:"status,omitempty" azure:"ro"` + Status *EnvironmentStatus } // Gen1EnvironmentUpdateParameters - Parameters supplied to the Update Environment operation to update a Gen1 environment. type Gen1EnvironmentUpdateParameters struct { // REQUIRED; The kind of the environment. - Kind *EnvironmentKind `json:"kind,omitempty"` + Kind *EnvironmentKind // Properties of the Gen1 environment. - Properties *Gen1EnvironmentMutableProperties `json:"properties,omitempty"` + Properties *Gen1EnvironmentMutableProperties // The sku of the environment. - SKU *SKU `json:"sku,omitempty"` + SKU *SKU // Key-value pairs of additional properties for the environment. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // GetEnvironmentUpdateParameters implements the EnvironmentUpdateParametersClassification interface for type Gen1EnvironmentUpdateParameters. @@ -842,20 +697,20 @@ func (g *Gen1EnvironmentUpdateParameters) GetEnvironmentUpdateParameters() *Envi // environment. type Gen2EnvironmentCreateOrUpdateParameters struct { // REQUIRED; The kind of the environment. - Kind *EnvironmentKind `json:"kind,omitempty"` + Kind *EnvironmentKind // REQUIRED; The location of the resource. - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; Properties used to create a Gen2 environment. - Properties *Gen2EnvironmentCreationProperties `json:"properties,omitempty"` + Properties *Gen2EnvironmentCreationProperties // REQUIRED; The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku // determines the capacity of the environment, the ingress rate, and the billing rate. - SKU *SKU `json:"sku,omitempty"` + SKU *SKU // Key-value pairs of additional properties for the resource. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // GetEnvironmentCreateOrUpdateParameters implements the EnvironmentCreateOrUpdateParametersClassification interface for type @@ -863,8 +718,8 @@ type Gen2EnvironmentCreateOrUpdateParameters struct { func (g *Gen2EnvironmentCreateOrUpdateParameters) GetEnvironmentCreateOrUpdateParameters() *EnvironmentCreateOrUpdateParameters { return &EnvironmentCreateOrUpdateParameters{ Kind: g.Kind, - SKU: g.SKU, Location: g.Location, + SKU: g.SKU, Tags: g.Tags, } } @@ -873,65 +728,65 @@ func (g *Gen2EnvironmentCreateOrUpdateParameters) GetEnvironmentCreateOrUpdatePa type Gen2EnvironmentCreationProperties struct { // REQUIRED; The storage configuration provides the connection details that allows the Time Series Insights service to connect // to the customer storage account that is used to store the environment's data. - StorageConfiguration *Gen2StorageConfigurationInput `json:"storageConfiguration,omitempty"` + StorageConfiguration *Gen2StorageConfigurationInput // REQUIRED; The list of event properties which will be used to define the environment's time series id. - TimeSeriesIDProperties []*TimeSeriesIDProperty `json:"timeSeriesIdProperties,omitempty"` + TimeSeriesIDProperties []*TimeSeriesIDProperty // The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's // data available for faster query. - WarmStoreConfiguration *WarmStoreConfigurationProperties `json:"warmStoreConfiguration,omitempty"` + WarmStoreConfiguration *WarmStoreConfigurationProperties } // Gen2EnvironmentMutableProperties - An object that represents a set of mutable Gen2 environment resource properties. type Gen2EnvironmentMutableProperties struct { // The storage configuration provides the connection details that allows the Time Series Insights service to connect to the // customer storage account that is used to store the environment's data. - StorageConfiguration *Gen2StorageConfigurationMutableProperties `json:"storageConfiguration,omitempty"` + StorageConfiguration *Gen2StorageConfigurationMutableProperties // The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's // data available for faster query. - WarmStoreConfiguration *WarmStoreConfigurationProperties `json:"warmStoreConfiguration,omitempty"` + WarmStoreConfiguration *WarmStoreConfigurationProperties } // Gen2EnvironmentResource - An environment is a set of time-series data available for query, and is the top level Azure Time // Series Insights resource. Gen2 environments do not have set data retention limits. type Gen2EnvironmentResource struct { // REQUIRED; The kind of the environment. - Kind *EnvironmentResourceKind `json:"kind,omitempty"` + Kind *EnvironmentResourceKind // REQUIRED; Resource location - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; Properties of the Gen2 environment. - Properties *Gen2EnvironmentResourceProperties `json:"properties,omitempty"` + Properties *Gen2EnvironmentResourceProperties // REQUIRED; The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku // determines the capacity of the environment, the ingress rate, and the billing rate. - SKU *SKU `json:"sku,omitempty"` + SKU *SKU // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEnvironmentResource implements the EnvironmentResourceClassification interface for type Gen2EnvironmentResource. func (g *Gen2EnvironmentResource) GetEnvironmentResource() *EnvironmentResource { return &EnvironmentResource{ - SKU: g.SKU, + ID: g.ID, Kind: g.Kind, Location: g.Location, - Tags: g.Tags, - ID: g.ID, Name: g.Name, + SKU: g.SKU, + Tags: g.Tags, Type: g.Type, } } @@ -940,44 +795,44 @@ func (g *Gen2EnvironmentResource) GetEnvironmentResource() *EnvironmentResource type Gen2EnvironmentResourceProperties struct { // REQUIRED; The storage configuration provides the connection details that allows the Time Series Insights service to connect // to the customer storage account that is used to store the environment's data. - StorageConfiguration *Gen2StorageConfigurationOutput `json:"storageConfiguration,omitempty"` + StorageConfiguration *Gen2StorageConfigurationOutput // REQUIRED; The list of event properties which will be used to define the environment's time series id. - TimeSeriesIDProperties []*TimeSeriesIDProperty `json:"timeSeriesIdProperties,omitempty"` + TimeSeriesIDProperties []*TimeSeriesIDProperty // The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's // data available for faster query. - WarmStoreConfiguration *WarmStoreConfigurationProperties `json:"warmStoreConfiguration,omitempty"` + WarmStoreConfiguration *WarmStoreConfigurationProperties // READ-ONLY; The time the resource was created. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; The fully qualified domain name used to access the environment data, e.g. to query the environment's events // or upload reference data for the environment. - DataAccessFqdn *string `json:"dataAccessFqdn,omitempty" azure:"ro"` + DataAccessFqdn *string // READ-ONLY; An id used to access the environment data, e.g. to query the environment's events or upload reference data for // the environment. - DataAccessID *string `json:"dataAccessId,omitempty" azure:"ro"` + DataAccessID *string // READ-ONLY; Provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState // READ-ONLY; An object that represents the status of the environment, and its internal state in the Time Series Insights // service. - Status *EnvironmentStatus `json:"status,omitempty" azure:"ro"` + Status *EnvironmentStatus } // Gen2EnvironmentUpdateParameters - Parameters supplied to the Update Environment operation to update a Gen2 environment. type Gen2EnvironmentUpdateParameters struct { // REQUIRED; The kind of the environment. - Kind *EnvironmentKind `json:"kind,omitempty"` + Kind *EnvironmentKind // Properties of the Gen2 environment. - Properties *Gen2EnvironmentMutableProperties `json:"properties,omitempty"` + Properties *Gen2EnvironmentMutableProperties // Key-value pairs of additional properties for the environment. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // GetEnvironmentUpdateParameters implements the EnvironmentUpdateParametersClassification interface for type Gen2EnvironmentUpdateParameters. @@ -992,11 +847,11 @@ func (g *Gen2EnvironmentUpdateParameters) GetEnvironmentUpdateParameters() *Envi // service to connect to the customer storage account that is used to store the environment's data. type Gen2StorageConfigurationInput struct { // REQUIRED; The name of the storage account that will hold the environment's Gen2 data. - AccountName *string `json:"accountName,omitempty"` + AccountName *string // REQUIRED; The value of the management key that grants the Time Series Insights service write access to the storage account. // This property is not shown in environment responses. - ManagementKey *string `json:"managementKey,omitempty"` + ManagementKey *string } // Gen2StorageConfigurationMutableProperties - The storage configuration provides the connection details that allows the Time @@ -1004,90 +859,90 @@ type Gen2StorageConfigurationInput struct { type Gen2StorageConfigurationMutableProperties struct { // REQUIRED; The value of the management key that grants the Time Series Insights service write access to the storage account. // This property is not shown in environment responses. - ManagementKey *string `json:"managementKey,omitempty"` + ManagementKey *string } // Gen2StorageConfigurationOutput - The storage configuration provides the non-secret connection details about the customer // storage account that is used to store the environment's data. type Gen2StorageConfigurationOutput struct { // REQUIRED; The name of the storage account that will hold the environment's Gen2 data. - AccountName *string `json:"accountName,omitempty"` + AccountName *string } // IngressEnvironmentStatus - An object that represents the status of ingress on an environment. type IngressEnvironmentStatus struct { // This string represents the state of ingress operations on an environment. It can be "Disabled", "Ready", "Running", "Paused" // or "Unknown" - State *IngressState `json:"state,omitempty"` + State *IngressState // READ-ONLY; An object that contains the details about an environment's state. - StateDetails *EnvironmentStateDetails `json:"stateDetails,omitempty" azure:"ro"` + StateDetails *EnvironmentStateDetails } // IngressStartAtProperties - An object that contains the details about the starting point in time to ingest events. type IngressStartAtProperties struct { // ISO8601 UTC datetime with seconds precision (milliseconds are optional), specifying the date and time that will be the // starting point for Events to be consumed. - Time *string `json:"time,omitempty"` + Time *string // The type of the ingressStartAt, It can be "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". - Type *IngressStartAtType `json:"type,omitempty"` + Type *IngressStartAtType } // IoTHubEventSourceCommonProperties - Properties of the IoTHub event source. type IoTHubEventSourceCommonProperties struct { // REQUIRED; The name of the iot hub's consumer group that holds the partitions from which events will be read. - ConsumerGroupName *string `json:"consumerGroupName,omitempty"` + ConsumerGroupName *string // REQUIRED; The resource id of the event source in Azure Resource Manager. - EventSourceResourceID *string `json:"eventSourceResourceId,omitempty"` + EventSourceResourceID *string // REQUIRED; The name of the iot hub. - IotHubName *string `json:"iotHubName,omitempty"` + IotHubName *string // REQUIRED; The name of the Shared Access Policy key that grants the Time Series Insights service access to the iot hub. // This shared access policy key must grant 'service connect' permissions to the iot hub. - KeyName *string `json:"keyName,omitempty"` + KeyName *string // An object that contains the details about the starting point in time to ingest events. - IngressStartAt *IngressStartAtProperties `json:"ingressStartAt,omitempty"` + IngressStartAt *IngressStartAtProperties // An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used // and the corresponding timezone offset information. If a value isn't specified // for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. - LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` + LocalTimestamp *LocalTimestamp // The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, // or if null or empty-string is specified, the event creation time will be // used. - TimestampPropertyName *string `json:"timestampPropertyName,omitempty"` + TimestampPropertyName *string // READ-ONLY; The time the resource was created. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; Provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // IoTHubEventSourceCreateOrUpdateParameters - Parameters supplied to the Create or Update Event Source operation for an IoTHub // event source. type IoTHubEventSourceCreateOrUpdateParameters struct { // REQUIRED; The kind of the event source. - Kind *EventSourceKind `json:"kind,omitempty"` + Kind *EventSourceKind // REQUIRED; The location of the resource. - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; Properties of the IoTHub event source that are required on create or update requests. - Properties *IoTHubEventSourceCreationProperties `json:"properties,omitempty"` + Properties *IoTHubEventSourceCreationProperties // An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used // and the corresponding timezone offset information. If a value isn't specified // for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. - LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` + LocalTimestamp *LocalTimestamp // Key-value pairs of additional properties for the resource. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // GetEventSourceCreateOrUpdateParameters implements the EventSourceCreateOrUpdateParametersClassification interface for type @@ -1104,86 +959,86 @@ func (i *IoTHubEventSourceCreateOrUpdateParameters) GetEventSourceCreateOrUpdate // IoTHubEventSourceCreationProperties - Properties of the IoTHub event source that are required on create or update requests. type IoTHubEventSourceCreationProperties struct { // REQUIRED; The name of the iot hub's consumer group that holds the partitions from which events will be read. - ConsumerGroupName *string `json:"consumerGroupName,omitempty"` + ConsumerGroupName *string // REQUIRED; The resource id of the event source in Azure Resource Manager. - EventSourceResourceID *string `json:"eventSourceResourceId,omitempty"` + EventSourceResourceID *string // REQUIRED; The name of the iot hub. - IotHubName *string `json:"iotHubName,omitempty"` + IotHubName *string // REQUIRED; The name of the Shared Access Policy key that grants the Time Series Insights service access to the iot hub. // This shared access policy key must grant 'service connect' permissions to the iot hub. - KeyName *string `json:"keyName,omitempty"` + KeyName *string // REQUIRED; The value of the Shared Access Policy key that grants the Time Series Insights service read access to the iot // hub. This property is not shown in event source responses. - SharedAccessKey *string `json:"sharedAccessKey,omitempty"` + SharedAccessKey *string // An object that contains the details about the starting point in time to ingest events. - IngressStartAt *IngressStartAtProperties `json:"ingressStartAt,omitempty"` + IngressStartAt *IngressStartAtProperties // An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used // and the corresponding timezone offset information. If a value isn't specified // for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. - LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` + LocalTimestamp *LocalTimestamp // The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, // or if null or empty-string is specified, the event creation time will be // used. - TimestampPropertyName *string `json:"timestampPropertyName,omitempty"` + TimestampPropertyName *string // READ-ONLY; The time the resource was created. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; Provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // IoTHubEventSourceMutableProperties - An object that represents a set of mutable IoTHub event source resource properties. type IoTHubEventSourceMutableProperties struct { // The value of the shared access key that grants the Time Series Insights service read access to the iot hub. This property // is not shown in event source responses. - SharedAccessKey *string `json:"sharedAccessKey,omitempty"` + SharedAccessKey *string // The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, // or if null or empty-string is specified, the event creation time will be // used. - TimestampPropertyName *string `json:"timestampPropertyName,omitempty"` + TimestampPropertyName *string } // IoTHubEventSourceResource - An event source that receives its data from an Azure IoTHub. type IoTHubEventSourceResource struct { // REQUIRED; The kind of the event source. - Kind *EventSourceResourceKind `json:"kind,omitempty"` + Kind *EventSourceResourceKind // REQUIRED; Resource location - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; Properties of the IoTHub event source resource. - Properties *IoTHubEventSourceResourceProperties `json:"properties,omitempty"` + Properties *IoTHubEventSourceResourceProperties // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // GetEventSourceResource implements the EventSourceResourceClassification interface for type IoTHubEventSourceResource. func (i *IoTHubEventSourceResource) GetEventSourceResource() *EventSourceResource { return &EventSourceResource{ + ID: i.ID, Kind: i.Kind, Location: i.Location, - Tags: i.Tags, - ID: i.ID, Name: i.Name, + Tags: i.Tags, Type: i.Type, } } @@ -1191,49 +1046,49 @@ func (i *IoTHubEventSourceResource) GetEventSourceResource() *EventSourceResourc // IoTHubEventSourceResourceProperties - Properties of the IoTHub event source resource. type IoTHubEventSourceResourceProperties struct { // REQUIRED; The name of the iot hub's consumer group that holds the partitions from which events will be read. - ConsumerGroupName *string `json:"consumerGroupName,omitempty"` + ConsumerGroupName *string // REQUIRED; The resource id of the event source in Azure Resource Manager. - EventSourceResourceID *string `json:"eventSourceResourceId,omitempty"` + EventSourceResourceID *string // REQUIRED; The name of the iot hub. - IotHubName *string `json:"iotHubName,omitempty"` + IotHubName *string // REQUIRED; The name of the Shared Access Policy key that grants the Time Series Insights service access to the iot hub. // This shared access policy key must grant 'service connect' permissions to the iot hub. - KeyName *string `json:"keyName,omitempty"` + KeyName *string // An object that contains the details about the starting point in time to ingest events. - IngressStartAt *IngressStartAtProperties `json:"ingressStartAt,omitempty"` + IngressStartAt *IngressStartAtProperties // An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used // and the corresponding timezone offset information. If a value isn't specified // for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. - LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` + LocalTimestamp *LocalTimestamp // The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, // or if null or empty-string is specified, the event creation time will be // used. - TimestampPropertyName *string `json:"timestampPropertyName,omitempty"` + TimestampPropertyName *string // READ-ONLY; The time the resource was created. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; Provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // IoTHubEventSourceUpdateParameters - Parameters supplied to the Update Event Source operation to update an IoTHub event // source. type IoTHubEventSourceUpdateParameters struct { // REQUIRED; The kind of the event source. - Kind *EventSourceKind `json:"kind,omitempty"` + Kind *EventSourceKind // Properties of the IoTHub event source. - Properties *IoTHubEventSourceMutableProperties `json:"properties,omitempty"` + Properties *IoTHubEventSourceMutableProperties // Key-value pairs of additional properties for the event source. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // GetEventSourceUpdateParameters implements the EventSourceUpdateParametersClassification interface for type IoTHubEventSourceUpdateParameters. @@ -1249,11 +1104,11 @@ func (i *IoTHubEventSourceUpdateParameters) GetEventSourceUpdateParameters() *Ev // for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. type LocalTimestamp struct { // An enum that represents the format of the local timestamp property that needs to be set. - Format *LocalTimestampFormat `json:"format,omitempty"` + Format *LocalTimestampFormat // An object that represents the offset information for the local timestamp format specified. Should not be specified for // LocalTimestampFormat - Embedded. - TimeZoneOffset *LocalTimestampTimeZoneOffset `json:"timeZoneOffset,omitempty"` + TimeZoneOffset *LocalTimestampTimeZoneOffset } // LocalTimestampTimeZoneOffset - An object that represents the offset information for the local timestamp format specified. @@ -1263,141 +1118,136 @@ type LocalTimestampTimeZoneOffset struct { // is Iana, the property name will contain the name of the column which // contains IANA Timezone Name (eg: Americas/Los Angeles). When LocalTimestampFormat is Timespan, it contains the name of // property which contains values representing the offset (eg: P1D or 1.00:00:00) - PropertyName *string `json:"propertyName,omitempty"` + PropertyName *string } // LogSpecification - The specification of an Azure Monitoring log. type LogSpecification struct { // Log display name. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Log name. - Name *string `json:"name,omitempty"` + Name *string } // MetricAvailability - Retention policy of a resource metric. type MetricAvailability struct { - BlobDuration *string `json:"blobDuration,omitempty"` - TimeGrain *string `json:"timeGrain,omitempty"` + BlobDuration *string + TimeGrain *string } // MetricSpecification - Metric specification of operation. type MetricSpecification struct { // Aggregation type could be Average. - AggregationType *string `json:"aggregationType,omitempty"` + AggregationType *string // Retention policies of a resource metric. - Availabilities []*MetricAvailability `json:"availabilities,omitempty"` + Availabilities []*MetricAvailability // The category this metric specification belong to, could be Capacity. - Category *string `json:"category,omitempty"` + Category *string // Dimensions of blobs, including blob type and access tier. - Dimensions []*Dimension `json:"dimensions,omitempty"` + Dimensions []*Dimension // Display description of metric specification. - DisplayDescription *string `json:"displayDescription,omitempty"` + DisplayDescription *string // Display name of metric specification. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Name of metric specification. - Name *string `json:"name,omitempty"` + Name *string // Account Resource Id. - ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` + ResourceIDDimensionNameOverride *string // Unit could be Bytes or Count. - Unit *string `json:"unit,omitempty"` + Unit *string } // Operation - A Time Series Insights REST API operation type Operation struct { // Properties of operation, include metric specifications. - OperationProperties *OperationProperties `json:"properties,omitempty"` + OperationProperties *OperationProperties // The intended executor of the operation. - Origin *string `json:"origin,omitempty"` + Origin *string // READ-ONLY; Contains the localized display information for this particular operation / action. - Display *OperationDisplay `json:"display,omitempty" azure:"ro"` + Display *OperationDisplay // READ-ONLY; The name of the operation being performed on this particular object. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string } // OperationDisplay - Contains the localized display information for this particular operation / action. type OperationDisplay struct { // READ-ONLY; The localized friendly description for the operation. - Description *string `json:"description,omitempty" azure:"ro"` + Description *string // READ-ONLY; The localized friendly name for the operation. - Operation *string `json:"operation,omitempty" azure:"ro"` + Operation *string // READ-ONLY; The localized friendly form of the resource provider name. - Provider *string `json:"provider,omitempty" azure:"ro"` + Provider *string // READ-ONLY; The localized friendly form of the resource type related to this action/operation. - Resource *string `json:"resource,omitempty" azure:"ro"` + Resource *string } // OperationListResult - Result of the request to list Time Series Insights operations. It contains a list of operations and // a 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 `json:"nextLink,omitempty" azure:"ro"` + NextLink *string // READ-ONLY; List of Time Series Insights operations supported by the Microsoft.TimeSeriesInsights resource provider. - Value []*Operation `json:"value,omitempty" azure:"ro"` + Value []*Operation } // OperationProperties - Properties of operation, include metric specifications. type OperationProperties struct { // One property of operation, include metric specifications. - ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters + ServiceSpecification *ServiceSpecification } type ReferenceDataSetCreateOrUpdateParameters struct { // REQUIRED; The location of the resource. - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; Properties used to create a reference data set. - Properties *ReferenceDataSetCreationProperties `json:"properties,omitempty"` + Properties *ReferenceDataSetCreationProperties // Key-value pairs of additional properties for the resource. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // ReferenceDataSetCreationProperties - Properties used to create a reference data set. type ReferenceDataSetCreationProperties struct { // REQUIRED; The list of key properties for the reference data set. - KeyProperties []*ReferenceDataSetKeyProperty `json:"keyProperties,omitempty"` + KeyProperties []*ReferenceDataSetKeyProperty // The reference data set key comparison behavior can be set using this property. By default, the value is 'Ordinal' - which // means case sensitive key comparison will be performed while joining reference // data with events or while adding new reference data. When 'OrdinalIgnoreCase' is set, case insensitive comparison will // be used. - DataStringComparisonBehavior *DataStringComparisonBehavior `json:"dataStringComparisonBehavior,omitempty"` + DataStringComparisonBehavior *DataStringComparisonBehavior } // ReferenceDataSetKeyProperty - A key property for the reference data set. A reference data set can have multiple key properties. type ReferenceDataSetKeyProperty struct { // The name of the key property. - Name *string `json:"name,omitempty"` + Name *string // The type of the key property. - Type *ReferenceDataKeyPropertyType `json:"type,omitempty"` + Type *ReferenceDataKeyPropertyType } // ReferenceDataSetListResponse - The response of the List Reference Data Sets operation. type ReferenceDataSetListResponse struct { // Result of the List Reference Data Sets operation. - Value []*ReferenceDataSetResource `json:"value,omitempty"` + Value []*ReferenceDataSetResource } // ReferenceDataSetResource - A reference data set provides metadata about the events in an environment. Metadata in the reference @@ -1405,94 +1255,67 @@ type ReferenceDataSetListResponse struct { // the reference data set is uploaded or modified through the Time Series Insights data plane APIs. type ReferenceDataSetResource struct { // REQUIRED; Resource location - Location *string `json:"location,omitempty"` + Location *string // Properties of the reference data set. - Properties *ReferenceDataSetResourceProperties `json:"properties,omitempty"` + Properties *ReferenceDataSetResourceProperties // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ReferenceDataSetResourceProperties - Properties of the reference data set. type ReferenceDataSetResourceProperties struct { // REQUIRED; The list of key properties for the reference data set. - KeyProperties []*ReferenceDataSetKeyProperty `json:"keyProperties,omitempty"` + KeyProperties []*ReferenceDataSetKeyProperty // The reference data set key comparison behavior can be set using this property. By default, the value is 'Ordinal' - which // means case sensitive key comparison will be performed while joining reference // data with events or while adding new reference data. When 'OrdinalIgnoreCase' is set, case insensitive comparison will // be used. - DataStringComparisonBehavior *DataStringComparisonBehavior `json:"dataStringComparisonBehavior,omitempty"` + DataStringComparisonBehavior *DataStringComparisonBehavior // READ-ONLY; The time the resource was created. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; Provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // ReferenceDataSetUpdateParameters - Parameters supplied to the Update Reference Data Set operation. type ReferenceDataSetUpdateParameters struct { // Key-value pairs of additional properties for the reference data set. - Tags map[string]*string `json:"tags,omitempty"` -} - -// ReferenceDataSetsClientCreateOrUpdateOptions contains the optional parameters for the ReferenceDataSetsClient.CreateOrUpdate -// method. -type ReferenceDataSetsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ReferenceDataSetsClientDeleteOptions contains the optional parameters for the ReferenceDataSetsClient.Delete method. -type ReferenceDataSetsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ReferenceDataSetsClientGetOptions contains the optional parameters for the ReferenceDataSetsClient.Get method. -type ReferenceDataSetsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReferenceDataSetsClientListByEnvironmentOptions contains the optional parameters for the ReferenceDataSetsClient.ListByEnvironment -// method. -type ReferenceDataSetsClientListByEnvironmentOptions struct { - // placeholder for future optional parameters -} - -// ReferenceDataSetsClientUpdateOptions contains the optional parameters for the ReferenceDataSetsClient.Update method. -type ReferenceDataSetsClientUpdateOptions struct { - // placeholder for future optional parameters + Tags map[string]*string } // Resource - Time Series Insights resource type Resource struct { // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ResourceProperties - Properties that are common to all tracked resources. type ResourceProperties struct { // READ-ONLY; The time the resource was created. - CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` + CreationTime *time.Time // READ-ONLY; Provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState } // SKU - The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines @@ -1500,73 +1323,73 @@ type ResourceProperties struct { type SKU struct { // REQUIRED; The capacity of the sku. For Gen1 environments, this value can be changed to support scale out of environments // after they have been created. - Capacity *int32 `json:"capacity,omitempty"` + Capacity *int32 // REQUIRED; The name of this SKU. - Name *SKUName `json:"name,omitempty"` + Name *SKUName } // ServiceSpecification - One property of operation, include metric specifications. type ServiceSpecification struct { // A list of Azure Monitoring log definitions. - LogSpecifications []*LogSpecification `json:"logSpecifications,omitempty"` + LogSpecifications []*LogSpecification // Metric specifications of operation. - MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"` + MetricSpecifications []*MetricSpecification } // TimeSeriesIDProperty - The structure of the property that a time series id can have. An environment can have multiple such // properties. type TimeSeriesIDProperty struct { // The name of the property. - Name *string `json:"name,omitempty"` + Name *string // The type of the property. - Type *PropertyType `json:"type,omitempty"` + Type *PropertyType } // TrackedResource - Time Series Insights resource that is tracked by Azure Resource Manager. type TrackedResource struct { // REQUIRED; Resource location - Location *string `json:"location,omitempty"` + Location *string // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // WarmStorageEnvironmentStatus - An object that represents the status of warm storage on an environment. type WarmStorageEnvironmentStatus struct { // READ-ONLY; An object that contains the status of warm storage properties usage. - PropertiesUsage *WarmStoragePropertiesUsage `json:"propertiesUsage,omitempty" azure:"ro"` + PropertiesUsage *WarmStoragePropertiesUsage } // WarmStoragePropertiesUsage - An object that contains the status of warm storage properties usage. type WarmStoragePropertiesUsage struct { // This string represents the state of warm storage properties usage. It can be "Ok", "Error", "Unknown". - State *WarmStoragePropertiesState `json:"state,omitempty"` + State *WarmStoragePropertiesState // READ-ONLY; An object that contains the details about warm storage properties usage state. - StateDetails *WarmStoragePropertiesUsageStateDetails `json:"stateDetails,omitempty" azure:"ro"` + StateDetails *WarmStoragePropertiesUsageStateDetails } // WarmStoragePropertiesUsageStateDetails - An object that contains the details about warm storage properties usage state. type WarmStoragePropertiesUsageStateDetails struct { // A value that represents the number of properties used by the environment for S1/S2 SKU and number of properties used by // Warm Store for PAYG SKU - CurrentCount *int32 `json:"currentCount,omitempty"` + CurrentCount *int32 // A value that represents the maximum number of properties used allowed by the environment for S1/S2 SKU and maximum number // of properties allowed by Warm Store for PAYG SKU. - MaxCount *int32 `json:"maxCount,omitempty"` + MaxCount *int32 } // WarmStoreConfigurationProperties - The warm store configuration provides the details to create a warm store cache that @@ -1574,5 +1397,5 @@ type WarmStoragePropertiesUsageStateDetails struct { type WarmStoreConfigurationProperties struct { // REQUIRED; ISO8601 timespan specifying the number of days the environment's events will be available for query from the // warm store. - DataRetention *string `json:"dataRetention,omitempty"` + DataRetention *string } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/models_serde.go index 943fc361..41e268e3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/models_serde.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armtimeseriesinsights @@ -205,7 +204,7 @@ func (a *AccessPolicyUpdateParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureEventSourceProperties. func (a AzureEventSourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", a.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", a.CreationTime) populate(objectMap, "eventSourceResourceId", a.EventSourceResourceID) populate(objectMap, "ingressStartAt", a.IngressStartAt) populate(objectMap, "localTimestamp", a.LocalTimestamp) @@ -224,7 +223,7 @@ func (a *AzureEventSourceProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &a.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &a.CreationTime) delete(rawMsg, key) case "eventSourceResourceId": err = unpopulate(val, "EventSourceResourceID", &a.EventSourceResourceID) @@ -431,7 +430,7 @@ func (e *EnvironmentResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EnvironmentResourceProperties. func (e EnvironmentResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", e.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", e.CreationTime) populate(objectMap, "dataAccessFqdn", e.DataAccessFqdn) populate(objectMap, "dataAccessId", e.DataAccessID) populate(objectMap, "provisioningState", e.ProvisioningState) @@ -449,7 +448,7 @@ func (e *EnvironmentResourceProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &e.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &e.CreationTime) delete(rawMsg, key) case "dataAccessFqdn": err = unpopulate(val, "DataAccessFqdn", &e.DataAccessFqdn) @@ -568,7 +567,7 @@ func (e *EnvironmentUpdateParameters) UnmarshalJSON(data []byte) error { func (e EventHubEventSourceCommonProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "consumerGroupName", e.ConsumerGroupName) - populateTimeRFC3339(objectMap, "creationTime", e.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", e.CreationTime) populate(objectMap, "eventHubName", e.EventHubName) populate(objectMap, "eventSourceResourceId", e.EventSourceResourceID) populate(objectMap, "ingressStartAt", e.IngressStartAt) @@ -593,7 +592,7 @@ func (e *EventHubEventSourceCommonProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ConsumerGroupName", &e.ConsumerGroupName) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &e.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &e.CreationTime) delete(rawMsg, key) case "eventHubName": err = unpopulate(val, "EventHubName", &e.EventHubName) @@ -674,7 +673,7 @@ func (e *EventHubEventSourceCreateOrUpdateParameters) UnmarshalJSON(data []byte) func (e EventHubEventSourceCreationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "consumerGroupName", e.ConsumerGroupName) - populateTimeRFC3339(objectMap, "creationTime", e.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", e.CreationTime) populate(objectMap, "eventHubName", e.EventHubName) populate(objectMap, "eventSourceResourceId", e.EventSourceResourceID) populate(objectMap, "ingressStartAt", e.IngressStartAt) @@ -700,7 +699,7 @@ func (e *EventHubEventSourceCreationProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "ConsumerGroupName", &e.ConsumerGroupName) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &e.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &e.CreationTime) delete(rawMsg, key) case "eventHubName": err = unpopulate(val, "EventHubName", &e.EventHubName) @@ -823,7 +822,7 @@ func (e *EventHubEventSourceResource) UnmarshalJSON(data []byte) error { func (e EventHubEventSourceResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "consumerGroupName", e.ConsumerGroupName) - populateTimeRFC3339(objectMap, "creationTime", e.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", e.CreationTime) populate(objectMap, "eventHubName", e.EventHubName) populate(objectMap, "eventSourceResourceId", e.EventSourceResourceID) populate(objectMap, "ingressStartAt", e.IngressStartAt) @@ -848,7 +847,7 @@ func (e *EventHubEventSourceResourceProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "ConsumerGroupName", &e.ConsumerGroupName) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &e.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &e.CreationTime) delete(rawMsg, key) case "eventHubName": err = unpopulate(val, "EventHubName", &e.EventHubName) @@ -920,7 +919,7 @@ func (e *EventHubEventSourceUpdateParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EventSourceCommonProperties. func (e EventSourceCommonProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", e.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", e.CreationTime) populate(objectMap, "ingressStartAt", e.IngressStartAt) populate(objectMap, "localTimestamp", e.LocalTimestamp) populate(objectMap, "provisioningState", e.ProvisioningState) @@ -938,7 +937,7 @@ func (e *EventSourceCommonProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &e.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &e.CreationTime) delete(rawMsg, key) case "ingressStartAt": err = unpopulate(val, "IngressStartAt", &e.IngressStartAt) @@ -1298,7 +1297,7 @@ func (g *Gen1EnvironmentResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Gen1EnvironmentResourceProperties. func (g Gen1EnvironmentResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", g.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", g.CreationTime) populate(objectMap, "dataAccessFqdn", g.DataAccessFqdn) populate(objectMap, "dataAccessId", g.DataAccessID) populate(objectMap, "dataRetentionTime", g.DataRetentionTime) @@ -1319,7 +1318,7 @@ func (g *Gen1EnvironmentResourceProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &g.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &g.CreationTime) delete(rawMsg, key) case "dataAccessFqdn": err = unpopulate(val, "DataAccessFqdn", &g.DataAccessFqdn) @@ -1556,7 +1555,7 @@ func (g *Gen2EnvironmentResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Gen2EnvironmentResourceProperties. func (g Gen2EnvironmentResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", g.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", g.CreationTime) populate(objectMap, "dataAccessFqdn", g.DataAccessFqdn) populate(objectMap, "dataAccessId", g.DataAccessID) populate(objectMap, "provisioningState", g.ProvisioningState) @@ -1577,7 +1576,7 @@ func (g *Gen2EnvironmentResourceProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &g.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &g.CreationTime) delete(rawMsg, key) case "dataAccessFqdn": err = unpopulate(val, "DataAccessFqdn", &g.DataAccessFqdn) @@ -1794,7 +1793,7 @@ func (i *IngressStartAtProperties) UnmarshalJSON(data []byte) error { func (i IoTHubEventSourceCommonProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "consumerGroupName", i.ConsumerGroupName) - populateTimeRFC3339(objectMap, "creationTime", i.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", i.CreationTime) populate(objectMap, "eventSourceResourceId", i.EventSourceResourceID) populate(objectMap, "ingressStartAt", i.IngressStartAt) populate(objectMap, "iotHubName", i.IotHubName) @@ -1818,7 +1817,7 @@ func (i *IoTHubEventSourceCommonProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ConsumerGroupName", &i.ConsumerGroupName) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &i.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &i.CreationTime) delete(rawMsg, key) case "eventSourceResourceId": err = unpopulate(val, "EventSourceResourceID", &i.EventSourceResourceID) @@ -1896,7 +1895,7 @@ func (i *IoTHubEventSourceCreateOrUpdateParameters) UnmarshalJSON(data []byte) e func (i IoTHubEventSourceCreationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "consumerGroupName", i.ConsumerGroupName) - populateTimeRFC3339(objectMap, "creationTime", i.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", i.CreationTime) populate(objectMap, "eventSourceResourceId", i.EventSourceResourceID) populate(objectMap, "ingressStartAt", i.IngressStartAt) populate(objectMap, "iotHubName", i.IotHubName) @@ -1921,7 +1920,7 @@ func (i *IoTHubEventSourceCreationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ConsumerGroupName", &i.ConsumerGroupName) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &i.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &i.CreationTime) delete(rawMsg, key) case "eventSourceResourceId": err = unpopulate(val, "EventSourceResourceID", &i.EventSourceResourceID) @@ -2041,7 +2040,7 @@ func (i *IoTHubEventSourceResource) UnmarshalJSON(data []byte) error { func (i IoTHubEventSourceResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "consumerGroupName", i.ConsumerGroupName) - populateTimeRFC3339(objectMap, "creationTime", i.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", i.CreationTime) populate(objectMap, "eventSourceResourceId", i.EventSourceResourceID) populate(objectMap, "ingressStartAt", i.IngressStartAt) populate(objectMap, "iotHubName", i.IotHubName) @@ -2065,7 +2064,7 @@ func (i *IoTHubEventSourceResourceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ConsumerGroupName", &i.ConsumerGroupName) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &i.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &i.CreationTime) delete(rawMsg, key) case "eventSourceResourceId": err = unpopulate(val, "EventSourceResourceID", &i.EventSourceResourceID) @@ -2620,7 +2619,7 @@ func (r *ReferenceDataSetResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ReferenceDataSetResourceProperties. func (r ReferenceDataSetResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", r.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", r.CreationTime) populate(objectMap, "dataStringComparisonBehavior", r.DataStringComparisonBehavior) populate(objectMap, "keyProperties", r.KeyProperties) populate(objectMap, "provisioningState", r.ProvisioningState) @@ -2637,7 +2636,7 @@ func (r *ReferenceDataSetResourceProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &r.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &r.CreationTime) delete(rawMsg, key) case "dataStringComparisonBehavior": err = unpopulate(val, "DataStringComparisonBehavior", &r.DataStringComparisonBehavior) @@ -2721,7 +2720,7 @@ func (r *Resource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceProperties. func (r ResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "creationTime", r.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", r.CreationTime) populate(objectMap, "provisioningState", r.ProvisioningState) return json.Marshal(objectMap) } @@ -2736,7 +2735,7 @@ func (r *ResourceProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &r.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &r.CreationTime) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/operations_client.go index 047eac35..a6df56b5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/operations_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armtimeseriesinsights @@ -28,7 +27,7 @@ type OperationsClient struct { // - 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+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,20 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + 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 } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/options.go new file mode 100644 index 00000000..e581712e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/options.go @@ -0,0 +1,131 @@ +//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 armtimeseriesinsights + +// AccessPoliciesClientCreateOrUpdateOptions contains the optional parameters for the AccessPoliciesClient.CreateOrUpdate +// method. +type AccessPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// AccessPoliciesClientDeleteOptions contains the optional parameters for the AccessPoliciesClient.Delete method. +type AccessPoliciesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AccessPoliciesClientGetOptions contains the optional parameters for the AccessPoliciesClient.Get method. +type AccessPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// AccessPoliciesClientListByEnvironmentOptions contains the optional parameters for the AccessPoliciesClient.ListByEnvironment +// method. +type AccessPoliciesClientListByEnvironmentOptions struct { + // placeholder for future optional parameters +} + +// AccessPoliciesClientUpdateOptions contains the optional parameters for the AccessPoliciesClient.Update method. +type AccessPoliciesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdate +// method. +type EnvironmentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginUpdateOptions contains the optional parameters for the EnvironmentsClient.BeginUpdate method. +type EnvironmentsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientDeleteOptions contains the optional parameters for the EnvironmentsClient.Delete method. +type EnvironmentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. +type EnvironmentsClientGetOptions struct { + // Setting $expand=status will include the status of the internal services of the environment in the Time Series Insights + // service. + Expand *string +} + +// EnvironmentsClientListByResourceGroupOptions contains the optional parameters for the EnvironmentsClient.ListByResourceGroup +// method. +type EnvironmentsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListBySubscriptionOptions contains the optional parameters for the EnvironmentsClient.ListBySubscription +// method. +type EnvironmentsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// EventSourcesClientCreateOrUpdateOptions contains the optional parameters for the EventSourcesClient.CreateOrUpdate method. +type EventSourcesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// EventSourcesClientDeleteOptions contains the optional parameters for the EventSourcesClient.Delete method. +type EventSourcesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// EventSourcesClientGetOptions contains the optional parameters for the EventSourcesClient.Get method. +type EventSourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// EventSourcesClientListByEnvironmentOptions contains the optional parameters for the EventSourcesClient.ListByEnvironment +// method. +type EventSourcesClientListByEnvironmentOptions struct { + // placeholder for future optional parameters +} + +// EventSourcesClientUpdateOptions contains the optional parameters for the EventSourcesClient.Update method. +type EventSourcesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ReferenceDataSetsClientCreateOrUpdateOptions contains the optional parameters for the ReferenceDataSetsClient.CreateOrUpdate +// method. +type ReferenceDataSetsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ReferenceDataSetsClientDeleteOptions contains the optional parameters for the ReferenceDataSetsClient.Delete method. +type ReferenceDataSetsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ReferenceDataSetsClientGetOptions contains the optional parameters for the ReferenceDataSetsClient.Get method. +type ReferenceDataSetsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReferenceDataSetsClientListByEnvironmentOptions contains the optional parameters for the ReferenceDataSetsClient.ListByEnvironment +// method. +type ReferenceDataSetsClientListByEnvironmentOptions struct { + // placeholder for future optional parameters +} + +// ReferenceDataSetsClientUpdateOptions contains the optional parameters for the ReferenceDataSetsClient.Update method. +type ReferenceDataSetsClientUpdateOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/polymorphic_helpers.go index 70f190f1..9d09bbf7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/polymorphic_helpers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/polymorphic_helpers.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armtimeseriesinsights @@ -28,7 +27,10 @@ func unmarshalEnvironmentResourceClassification(rawMsg json.RawMessage) (Environ default: b = &EnvironmentResource{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalEnvironmentResourceClassificationArray(rawMsg json.RawMessage) ([]EnvironmentResourceClassification, error) { @@ -67,7 +69,10 @@ func unmarshalEventSourceResourceClassification(rawMsg json.RawMessage) (EventSo default: b = &EventSourceResource{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalEventSourceResourceClassificationArray(rawMsg json.RawMessage) ([]EventSourceResourceClassification, error) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/referencedatasets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/referencedatasets_client.go index 14faf31b..a2664876 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/referencedatasets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/referencedatasets_client.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armtimeseriesinsights @@ -33,7 +32,7 @@ type ReferenceDataSetsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewReferenceDataSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReferenceDataSetsClient, error) { - cl, err := arm.NewClient(moduleName+".ReferenceDataSetsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -55,18 +54,25 @@ func NewReferenceDataSetsClient(subscriptionID string, credential azcore.TokenCr // - options - ReferenceDataSetsClientCreateOrUpdateOptions contains the optional parameters for the ReferenceDataSetsClient.CreateOrUpdate // method. func (client *ReferenceDataSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, referenceDataSetName string, parameters ReferenceDataSetCreateOrUpdateParameters, options *ReferenceDataSetsClientCreateOrUpdateOptions) (ReferenceDataSetsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ReferenceDataSetsClient.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, environmentName, referenceDataSetName, parameters, options) if err != nil { return ReferenceDataSetsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ReferenceDataSetsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ReferenceDataSetsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ReferenceDataSetsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +102,10 @@ func (client *ReferenceDataSetsClient) createOrUpdateCreateRequest(ctx context.C reqQP.Set("api-version", "2020-05-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,16 +127,22 @@ func (client *ReferenceDataSetsClient) createOrUpdateHandleResponse(resp *http.R // - options - ReferenceDataSetsClientDeleteOptions contains the optional parameters for the ReferenceDataSetsClient.Delete // method. func (client *ReferenceDataSetsClient) Delete(ctx context.Context, resourceGroupName string, environmentName string, referenceDataSetName string, options *ReferenceDataSetsClientDeleteOptions) (ReferenceDataSetsClientDeleteResponse, error) { + var err error + const operationName = "ReferenceDataSetsClient.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, environmentName, referenceDataSetName, options) if err != nil { return ReferenceDataSetsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ReferenceDataSetsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ReferenceDataSetsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ReferenceDataSetsClientDeleteResponse{}, err } return ReferenceDataSetsClientDeleteResponse{}, nil } @@ -171,18 +186,25 @@ func (client *ReferenceDataSetsClient) deleteCreateRequest(ctx context.Context, // - referenceDataSetName - The name of the Time Series Insights reference data set associated with the specified environment. // - options - ReferenceDataSetsClientGetOptions contains the optional parameters for the ReferenceDataSetsClient.Get method. func (client *ReferenceDataSetsClient) Get(ctx context.Context, resourceGroupName string, environmentName string, referenceDataSetName string, options *ReferenceDataSetsClientGetOptions) (ReferenceDataSetsClientGetResponse, error) { + var err error + const operationName = "ReferenceDataSetsClient.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, environmentName, referenceDataSetName, options) if err != nil { return ReferenceDataSetsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ReferenceDataSetsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReferenceDataSetsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReferenceDataSetsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -234,18 +256,25 @@ func (client *ReferenceDataSetsClient) getHandleResponse(resp *http.Response) (R // - options - ReferenceDataSetsClientListByEnvironmentOptions contains the optional parameters for the ReferenceDataSetsClient.ListByEnvironment // method. func (client *ReferenceDataSetsClient) ListByEnvironment(ctx context.Context, resourceGroupName string, environmentName string, options *ReferenceDataSetsClientListByEnvironmentOptions) (ReferenceDataSetsClientListByEnvironmentResponse, error) { + var err error + const operationName = "ReferenceDataSetsClient.ListByEnvironment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByEnvironmentCreateRequest(ctx, resourceGroupName, environmentName, options) if err != nil { return ReferenceDataSetsClientListByEnvironmentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ReferenceDataSetsClientListByEnvironmentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReferenceDataSetsClientListByEnvironmentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReferenceDataSetsClientListByEnvironmentResponse{}, err } - return client.listByEnvironmentHandleResponse(resp) + resp, err := client.listByEnvironmentHandleResponse(httpResp) + return resp, err } // listByEnvironmentCreateRequest creates the ListByEnvironment request. @@ -294,18 +323,25 @@ func (client *ReferenceDataSetsClient) listByEnvironmentHandleResponse(resp *htt // - options - ReferenceDataSetsClientUpdateOptions contains the optional parameters for the ReferenceDataSetsClient.Update // method. func (client *ReferenceDataSetsClient) Update(ctx context.Context, resourceGroupName string, environmentName string, referenceDataSetName string, referenceDataSetUpdateParameters ReferenceDataSetUpdateParameters, options *ReferenceDataSetsClientUpdateOptions) (ReferenceDataSetsClientUpdateResponse, error) { + var err error + const operationName = "ReferenceDataSetsClient.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, environmentName, referenceDataSetName, referenceDataSetUpdateParameters, options) if err != nil { return ReferenceDataSetsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ReferenceDataSetsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReferenceDataSetsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReferenceDataSetsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -335,7 +371,10 @@ func (client *ReferenceDataSetsClient) updateCreateRequest(ctx context.Context, reqQP.Set("api-version", "2020-05-15") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, referenceDataSetUpdateParameters) + if err := runtime.MarshalAsJSON(req, referenceDataSetUpdateParameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/response_types.go index c191576a..e4761ee0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/response_types.go @@ -3,14 +3,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. +// 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. -// DO NOT EDIT. package armtimeseriesinsights +import "encoding/json" + // AccessPoliciesClientCreateOrUpdateResponse contains the response from method AccessPoliciesClient.CreateOrUpdate. type AccessPoliciesClientCreateOrUpdateResponse struct { + // An access policy is used to grant users and applications access to the environment. Roles are assigned to service principals + // in Azure Active Directory. These roles define the actions the principal can perform through the Time Series Insights data + // plane APIs. AccessPolicyResource } @@ -21,24 +25,37 @@ type AccessPoliciesClientDeleteResponse struct { // AccessPoliciesClientGetResponse contains the response from method AccessPoliciesClient.Get. type AccessPoliciesClientGetResponse struct { + // An access policy is used to grant users and applications access to the environment. Roles are assigned to service principals + // in Azure Active Directory. These roles define the actions the principal can perform through the Time Series Insights data + // plane APIs. AccessPolicyResource } // AccessPoliciesClientListByEnvironmentResponse contains the response from method AccessPoliciesClient.ListByEnvironment. type AccessPoliciesClientListByEnvironmentResponse struct { + // The response of the List access policies operation. AccessPolicyListResponse } // AccessPoliciesClientUpdateResponse contains the response from method AccessPoliciesClient.Update. type AccessPoliciesClientUpdateResponse struct { + // An access policy is used to grant users and applications access to the environment. Roles are assigned to service principals + // in Azure Active Directory. These roles define the actions the principal can perform through the Time Series Insights data + // plane APIs. AccessPolicyResource } // EnvironmentsClientCreateOrUpdateResponse contains the response from method EnvironmentsClient.BeginCreateOrUpdate. type EnvironmentsClientCreateOrUpdateResponse struct { + // An environment is a set of time-series data available for query, and is the top level Azure Time Series Insights resource. EnvironmentResourceClassification } +// MarshalJSON implements the json.Marshaller interface for type EnvironmentsClientCreateOrUpdateResponse. +func (e EnvironmentsClientCreateOrUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(e.EnvironmentResourceClassification) +} + // UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentsClientCreateOrUpdateResponse. func (e *EnvironmentsClientCreateOrUpdateResponse) UnmarshalJSON(data []byte) error { res, err := unmarshalEnvironmentResourceClassification(data) @@ -56,6 +73,7 @@ type EnvironmentsClientDeleteResponse struct { // EnvironmentsClientGetResponse contains the response from method EnvironmentsClient.Get. type EnvironmentsClientGetResponse struct { + // An environment is a set of time-series data available for query, and is the top level Azure Time Series Insights resource. EnvironmentResourceClassification } @@ -71,19 +89,27 @@ func (e *EnvironmentsClientGetResponse) UnmarshalJSON(data []byte) error { // EnvironmentsClientListByResourceGroupResponse contains the response from method EnvironmentsClient.ListByResourceGroup. type EnvironmentsClientListByResourceGroupResponse struct { + // The response of the List Environments operation. EnvironmentListResponse } // EnvironmentsClientListBySubscriptionResponse contains the response from method EnvironmentsClient.ListBySubscription. type EnvironmentsClientListBySubscriptionResponse struct { + // The response of the List Environments operation. EnvironmentListResponse } // EnvironmentsClientUpdateResponse contains the response from method EnvironmentsClient.BeginUpdate. type EnvironmentsClientUpdateResponse struct { + // An environment is a set of time-series data available for query, and is the top level Azure Time Series Insights resource. EnvironmentResourceClassification } +// MarshalJSON implements the json.Marshaller interface for type EnvironmentsClientUpdateResponse. +func (e EnvironmentsClientUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(e.EnvironmentResourceClassification) +} + // UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentsClientUpdateResponse. func (e *EnvironmentsClientUpdateResponse) UnmarshalJSON(data []byte) error { res, err := unmarshalEnvironmentResourceClassification(data) @@ -96,6 +122,8 @@ func (e *EnvironmentsClientUpdateResponse) UnmarshalJSON(data []byte) error { // EventSourcesClientCreateOrUpdateResponse contains the response from method EventSourcesClient.CreateOrUpdate. type EventSourcesClientCreateOrUpdateResponse struct { + // An environment receives data from one or more event sources. Each event source has associated connection info that allows + // the Time Series Insights ingress pipeline to connect to and pull data from the event source EventSourceResourceClassification } @@ -116,6 +144,8 @@ type EventSourcesClientDeleteResponse struct { // EventSourcesClientGetResponse contains the response from method EventSourcesClient.Get. type EventSourcesClientGetResponse struct { + // An environment receives data from one or more event sources. Each event source has associated connection info that allows + // the Time Series Insights ingress pipeline to connect to and pull data from the event source EventSourceResourceClassification } @@ -131,11 +161,14 @@ func (e *EventSourcesClientGetResponse) UnmarshalJSON(data []byte) error { // EventSourcesClientListByEnvironmentResponse contains the response from method EventSourcesClient.ListByEnvironment. type EventSourcesClientListByEnvironmentResponse struct { + // The response of the List EventSources operation. EventSourceListResponse } // EventSourcesClientUpdateResponse contains the response from method EventSourcesClient.Update. type EventSourcesClientUpdateResponse struct { + // An environment receives data from one or more event sources. Each event source has associated connection info that allows + // the Time Series Insights ingress pipeline to connect to and pull data from the event source EventSourceResourceClassification } @@ -151,11 +184,16 @@ func (e *EventSourcesClientUpdateResponse) UnmarshalJSON(data []byte) error { // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list Time Series Insights operations. It contains a list of operations and a URL link to get the + // next set of results. OperationListResult } // ReferenceDataSetsClientCreateOrUpdateResponse contains the response from method ReferenceDataSetsClient.CreateOrUpdate. type ReferenceDataSetsClientCreateOrUpdateResponse struct { + // A reference data set provides metadata about the events in an environment. Metadata in the reference data set will be joined + // with events as they are read from event sources. The metadata that makes up the reference data set is uploaded or modified + // through the Time Series Insights data plane APIs. ReferenceDataSetResource } @@ -166,15 +204,22 @@ type ReferenceDataSetsClientDeleteResponse struct { // ReferenceDataSetsClientGetResponse contains the response from method ReferenceDataSetsClient.Get. type ReferenceDataSetsClientGetResponse struct { + // A reference data set provides metadata about the events in an environment. Metadata in the reference data set will be joined + // with events as they are read from event sources. The metadata that makes up the reference data set is uploaded or modified + // through the Time Series Insights data plane APIs. ReferenceDataSetResource } // ReferenceDataSetsClientListByEnvironmentResponse contains the response from method ReferenceDataSetsClient.ListByEnvironment. type ReferenceDataSetsClientListByEnvironmentResponse struct { + // The response of the List Reference Data Sets operation. ReferenceDataSetListResponse } // ReferenceDataSetsClientUpdateResponse contains the response from method ReferenceDataSetsClient.Update. type ReferenceDataSetsClientUpdateResponse struct { + // A reference data set provides metadata about the events in an environment. Metadata in the reference data set will be joined + // with events as they are read from event sources. The metadata that makes up the reference data set is uploaded or modified + // through the Time Series Insights data plane APIs. ReferenceDataSetResource } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/time_rfc3339.go index c17d3b40..582b8b77 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// 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. -// DO NOT EDIT. package armtimeseriesinsights @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // 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+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/CHANGELOG.md new file mode 100644 index 00000000..31b07b9e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/CHANGELOG.md @@ -0,0 +1,139 @@ +# Release History + +## 1.3.0 (2024-09-25) +### Features Added + +- New enum type `ServiceKind` with values `ServiceKindSocketIO`, `ServiceKindWebPubSub` +- New function `*Client.ListReplicaSKUs(context.Context, string, string, string, *ClientListReplicaSKUsOptions) (ClientListReplicaSKUsResponse, error)` +- New function `*ClientFactory.NewReplicaSharedPrivateLinkResourcesClient() *ReplicaSharedPrivateLinkResourcesClient` +- New function `*ClientFactory.NewReplicasClient() *ReplicasClient` +- New function `NewReplicaSharedPrivateLinkResourcesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ReplicaSharedPrivateLinkResourcesClient, error)` +- New function `*ReplicaSharedPrivateLinkResourcesClient.BeginCreateOrUpdate(context.Context, string, string, string, string, SharedPrivateLinkResource, *ReplicaSharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ReplicaSharedPrivateLinkResourcesClientCreateOrUpdateResponse], error)` +- New function `*ReplicaSharedPrivateLinkResourcesClient.Get(context.Context, string, string, string, string, *ReplicaSharedPrivateLinkResourcesClientGetOptions) (ReplicaSharedPrivateLinkResourcesClientGetResponse, error)` +- New function `*ReplicaSharedPrivateLinkResourcesClient.NewListPager(string, string, string, *ReplicaSharedPrivateLinkResourcesClientListOptions) *runtime.Pager[ReplicaSharedPrivateLinkResourcesClientListResponse]` +- New function `NewReplicasClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ReplicasClient, error)` +- New function `*ReplicasClient.BeginCreateOrUpdate(context.Context, string, string, string, Replica, *ReplicasClientBeginCreateOrUpdateOptions) (*runtime.Poller[ReplicasClientCreateOrUpdateResponse], error)` +- New function `*ReplicasClient.Delete(context.Context, string, string, string, *ReplicasClientDeleteOptions) (ReplicasClientDeleteResponse, error)` +- New function `*ReplicasClient.Get(context.Context, string, string, string, *ReplicasClientGetOptions) (ReplicasClientGetResponse, error)` +- New function `*ReplicasClient.NewListPager(string, string, *ReplicasClientListOptions) *runtime.Pager[ReplicasClientListResponse]` +- New function `*ReplicasClient.BeginRestart(context.Context, string, string, string, *ReplicasClientBeginRestartOptions) (*runtime.Poller[ReplicasClientRestartResponse], error)` +- New function `*ReplicasClient.BeginUpdate(context.Context, string, string, string, Replica, *ReplicasClientBeginUpdateOptions) (*runtime.Poller[ReplicasClientUpdateResponse], error)` +- New struct `IPRule` +- New struct `Replica` +- New struct `ReplicaList` +- New struct `ReplicaProperties` +- New struct `SocketIOSettings` +- New field `WebSocketKeepAliveIntervalInSeconds` in struct `HubProperties` +- New field `IPRules` in struct `NetworkACLs` +- New field `SystemData` in struct `PrivateLinkResource` +- New field `RegionEndpointEnabled`, `ResourceStopped`, `SocketIO` in struct `Properties` +- New field `Kind` in struct `ResourceInfo` + + +## 1.3.0-beta.1 (2023-11-30) +### Features Added + +- New enum type `ServiceKind` with values `ServiceKindSocketIO`, `ServiceKindWebPubSub` +- New function `*Client.ListReplicaSKUs(context.Context, string, string, string, *ClientListReplicaSKUsOptions) (ClientListReplicaSKUsResponse, error)` +- New function `*ClientFactory.NewReplicasClient() *ReplicasClient` +- New function `NewReplicasClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ReplicasClient, error)` +- New function `*ReplicasClient.BeginCreateOrUpdate(context.Context, string, string, string, Replica, *ReplicasClientBeginCreateOrUpdateOptions) (*runtime.Poller[ReplicasClientCreateOrUpdateResponse], error)` +- New function `*ReplicasClient.Delete(context.Context, string, string, string, *ReplicasClientDeleteOptions) (ReplicasClientDeleteResponse, error)` +- New function `*ReplicasClient.Get(context.Context, string, string, string, *ReplicasClientGetOptions) (ReplicasClientGetResponse, error)` +- New function `*ReplicasClient.NewListPager(string, string, *ReplicasClientListOptions) *runtime.Pager[ReplicasClientListResponse]` +- New function `*ReplicasClient.BeginRestart(context.Context, string, string, string, *ReplicasClientBeginRestartOptions) (*runtime.Poller[ReplicasClientRestartResponse], error)` +- New function `*ReplicasClient.BeginUpdate(context.Context, string, string, string, Replica, *ReplicasClientBeginUpdateOptions) (*runtime.Poller[ReplicasClientUpdateResponse], error)` +- New struct `IPRule` +- New struct `Replica` +- New struct `ReplicaList` +- New struct `ReplicaProperties` +- New field `IPRules` in struct `NetworkACLs` +- New field `SystemData` in struct `PrivateLinkResource` +- New field `RegionEndpointEnabled`, `ResourceStopped` in struct `Properties` +- New field `Kind` in struct `ResourceInfo` + + +## 1.2.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 1.2.0-beta.2 (2023-10-27) +### Features Added + +- New struct `IPRule` +- New field `IPRules` in struct `NetworkACLs` +- New field `RegionEndpointEnabled`, `ResourceStopped` in struct `Properties` +- New field `RegionEndpointEnabled`, `ResourceStopped` in struct `ReplicaProperties` + + +## 1.2.0-beta.1 (2023-07-28) +### Features Added + +- New enum type `ServiceKind` with values `ServiceKindSocketIO`, `ServiceKindWebPubSub` +- New function `*Client.ListReplicaSKUs(context.Context, string, string, string, *ClientListReplicaSKUsOptions) (ClientListReplicaSKUsResponse, error)` +- New function `*ClientFactory.NewReplicasClient() *ReplicasClient` +- New function `NewReplicasClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ReplicasClient, error)` +- New function `*ReplicasClient.BeginCreateOrUpdate(context.Context, string, string, string, Replica, *ReplicasClientBeginCreateOrUpdateOptions) (*runtime.Poller[ReplicasClientCreateOrUpdateResponse], error)` +- New function `*ReplicasClient.Delete(context.Context, string, string, string, *ReplicasClientDeleteOptions) (ReplicasClientDeleteResponse, error)` +- New function `*ReplicasClient.Get(context.Context, string, string, string, *ReplicasClientGetOptions) (ReplicasClientGetResponse, error)` +- New function `*ReplicasClient.NewListPager(string, string, *ReplicasClientListOptions) *runtime.Pager[ReplicasClientListResponse]` +- New function `*ReplicasClient.BeginRestart(context.Context, string, string, string, *ReplicasClientBeginRestartOptions) (*runtime.Poller[ReplicasClientRestartResponse], error)` +- New function `*ReplicasClient.BeginUpdate(context.Context, string, string, string, Replica, *ReplicasClientBeginUpdateOptions) (*runtime.Poller[ReplicasClientUpdateResponse], error)` +- New struct `Replica` +- New struct `ReplicaList` +- New struct `ReplicaProperties` +- New field `SystemData` in struct `PrivateLinkResource` +- New field `SystemData` in struct `ProxyResource` +- New field `SystemData` in struct `Resource` +- New field `Kind` in struct `ResourceInfo` +- New field `SystemData` in struct `TrackedResource` + + +## 1.1.1 (2023-04-14) +### Bug Fixes + +- Fix serialization bug of empty value of `any` type. + + +## 1.1.0 (2023-03-24) +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module +- New enum type `EventListenerEndpointDiscriminator` with values `EventListenerEndpointDiscriminatorEventHub` +- New enum type `EventListenerFilterDiscriminator` with values `EventListenerFilterDiscriminatorEventName` +- New function `NewCustomCertificatesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*CustomCertificatesClient, error)` +- New function `*CustomCertificatesClient.BeginCreateOrUpdate(context.Context, string, string, string, CustomCertificate, *CustomCertificatesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomCertificatesClientCreateOrUpdateResponse], error)` +- New function `*CustomCertificatesClient.Delete(context.Context, string, string, string, *CustomCertificatesClientDeleteOptions) (CustomCertificatesClientDeleteResponse, error)` +- New function `*CustomCertificatesClient.Get(context.Context, string, string, string, *CustomCertificatesClientGetOptions) (CustomCertificatesClientGetResponse, error)` +- New function `*CustomCertificatesClient.NewListPager(string, string, *CustomCertificatesClientListOptions) *runtime.Pager[CustomCertificatesClientListResponse]` +- New function `NewCustomDomainsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*CustomDomainsClient, error)` +- New function `*CustomDomainsClient.BeginCreateOrUpdate(context.Context, string, string, string, CustomDomain, *CustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomDomainsClientCreateOrUpdateResponse], error)` +- New function `*CustomDomainsClient.BeginDelete(context.Context, string, string, string, *CustomDomainsClientBeginDeleteOptions) (*runtime.Poller[CustomDomainsClientDeleteResponse], error)` +- New function `*CustomDomainsClient.Get(context.Context, string, string, string, *CustomDomainsClientGetOptions) (CustomDomainsClientGetResponse, error)` +- New function `*CustomDomainsClient.NewListPager(string, string, *CustomDomainsClientListOptions) *runtime.Pager[CustomDomainsClientListResponse]` +- New function `*EventHubEndpoint.GetEventListenerEndpoint() *EventListenerEndpoint` +- New function `*EventListenerEndpoint.GetEventListenerEndpoint() *EventListenerEndpoint` +- New function `*EventListenerFilter.GetEventListenerFilter() *EventListenerFilter` +- New function `*EventNameFilter.GetEventListenerFilter() *EventListenerFilter` +- New struct `CustomCertificate` +- New struct `CustomCertificateList` +- New struct `CustomCertificateProperties` +- New struct `CustomDomain` +- New struct `CustomDomainList` +- New struct `CustomDomainProperties` +- New struct `EventHubEndpoint` +- New struct `EventListener` +- New struct `EventNameFilter` +- New struct `ResourceReference` +- New field `EventListeners` in struct `HubProperties` + + +## 1.0.0 (2022-05-16) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub` 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/webpubsub/armwebpubsub/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/LICENSE.txt new file mode 100644 index 00000000..dc0c2ffb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/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/webpubsub/armwebpubsub/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/README.md new file mode 100644 index 00000000..ff4ace40 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/README.md @@ -0,0 +1,92 @@ +# Azure Web PubSub Module for Go + +[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub) + +The `armwebpubsub` module provides operations for working with Azure Web PubSub. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/webpubsub/armwebpubsub) + +# 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 Web PubSub module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure Web PubSub. 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 Web PubSub 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 := armwebpubsub.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 := armwebpubsub.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.NewClient() +``` + +## 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 `Web PubSub` 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/webpubsub/armwebpubsub/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/assets.json new file mode 100644 index 00000000..2a53d133 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/webpubsub/armwebpubsub", + "Tag": "go/resourcemanager/webpubsub/armwebpubsub_dcb176adbc" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/autorest.md new file mode 100644 index 00000000..f89402a0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 1.3.0 +tag: package-2024-03-01 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/build.go new file mode 100644 index 00000000..0c737f4b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/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 -removeUnreferencedTypes resourcemanager/webpubsub/armwebpubsub + +package armwebpubsub diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/ci.yml new file mode 100644 index 00000000..258b3953 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/ci.yml @@ -0,0 +1,29 @@ +# 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/webpubsub/armwebpubsub/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/webpubsub/armwebpubsub/ + +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + IncludeRelease: true + ServiceDirectory: 'resourcemanager/webpubsub/armwebpubsub' + UsePipelineProxy: false diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/client.go new file mode 100644 index 00000000..ae0114de --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/client.go @@ -0,0 +1,876 @@ +//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 armwebpubsub + +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" +) + +// Client contains the methods for the WebPubSub group. +// Don't use this type directly, use NewClient() instead. +type Client struct { + internal *arm.Client + subscriptionID string +} + +// NewClient creates a new instance of Client with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &Client{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckNameAvailability - Checks that the resource name is valid and is not already in use. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - location - the region +// - parameters - Parameters supplied to the operation. +// - options - ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method. +func (client *Client) CheckNameAvailability(ctx context.Context, location string, parameters NameAvailabilityParameters, options *ClientCheckNameAvailabilityOptions) (ClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "Client.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, location, parameters, options) + if err != nil { + return ClientCheckNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClientCheckNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientCheckNameAvailabilityResponse{}, err + } + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. +func (client *Client) checkNameAvailabilityCreateRequest(ctx context.Context, location string, parameters NameAvailabilityParameters, options *ClientCheckNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return 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-03-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 +} + +// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. +func (client *Client) checkNameAvailabilityHandleResponse(resp *http.Response) (ClientCheckNameAvailabilityResponse, error) { + result := ClientCheckNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NameAvailability); err != nil { + return ClientCheckNameAvailabilityResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Create or update a resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - parameters - Parameters for the create or update operation +// - options - ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method. +func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ResourceInfo, options *ClientBeginCreateOrUpdateOptions) (*runtime.Poller[ClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, resourceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *Client) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ResourceInfo, options *ClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "Client.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, resourceName, 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 *Client) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, parameters ResourceInfo, options *ClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-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 +} + +// BeginDelete - Operation to delete a resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method. +func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, options *ClientBeginDeleteOptions) (*runtime.Poller[ClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Operation to delete a resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *Client) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "Client.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, resourceName, 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 *Client) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the resource and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - ClientGetOptions contains the optional parameters for the Client.Get method. +func (client *Client) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ClientGetOptions) (ClientGetResponse, error) { + var err error + const operationName = "Client.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, resourceName, options) + if err != nil { + return ClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *Client) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *Client) getHandleResponse(resp *http.Response) (ClientGetResponse, error) { + result := ClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceInfo); err != nil { + return ClientGetResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Handles requests to list all resources in a resource group. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager +// method. +func (client *Client) NewListByResourceGroupPager(resourceGroupName string, options *ClientListByResourceGroupOptions) *runtime.Pager[ClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ClientListByResourceGroupResponse]{ + More: func(page ClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ClientListByResourceGroupResponse) (ClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.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 ClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *Client) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub" + 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *Client) listByResourceGroupHandleResponse(resp *http.Response) (ClientListByResourceGroupResponse, error) { + result := ClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceInfoList); err != nil { + return ClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - Handles requests to list all resources in a subscription. +// +// Generated from API version 2024-03-01 +// - options - ClientListBySubscriptionOptions contains the optional parameters for the Client.NewListBySubscriptionPager method. +func (client *Client) NewListBySubscriptionPager(options *ClientListBySubscriptionOptions) *runtime.Pager[ClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[ClientListBySubscriptionResponse]{ + More: func(page ClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ClientListBySubscriptionResponse) (ClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.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 ClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *Client) listBySubscriptionCreateRequest(ctx context.Context, options *ClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/webPubSub" + if client.subscriptionID == "" { + return 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *Client) listBySubscriptionHandleResponse(resp *http.Response) (ClientListBySubscriptionResponse, error) { + result := ClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceInfoList); err != nil { + return ClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// ListKeys - Get the access keys of the resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - ClientListKeysOptions contains the optional parameters for the Client.ListKeys method. +func (client *Client) ListKeys(ctx context.Context, resourceGroupName string, resourceName string, options *ClientListKeysOptions) (ClientListKeysResponse, error) { + var err error + const operationName = "Client.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, resourceName, options) + if err != nil { + return ClientListKeysResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClientListKeysResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientListKeysResponse{}, err + } + resp, err := client.listKeysHandleResponse(httpResp) + return resp, err +} + +// listKeysCreateRequest creates the ListKeys request. +func (client *Client) listKeysCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ClientListKeysOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listKeysHandleResponse handles the ListKeys response. +func (client *Client) listKeysHandleResponse(resp *http.Response) (ClientListKeysResponse, error) { + result := ClientListKeysResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Keys); err != nil { + return ClientListKeysResponse{}, err + } + return result, nil +} + +// ListReplicaSKUs - List all available skus of the replica resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - replicaName - The name of the replica. +// - options - ClientListReplicaSKUsOptions contains the optional parameters for the Client.ListReplicaSKUs method. +func (client *Client) ListReplicaSKUs(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ClientListReplicaSKUsOptions) (ClientListReplicaSKUsResponse, error) { + var err error + const operationName = "Client.ListReplicaSKUs" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listReplicaSKUsCreateRequest(ctx, resourceGroupName, resourceName, replicaName, options) + if err != nil { + return ClientListReplicaSKUsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClientListReplicaSKUsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientListReplicaSKUsResponse{}, err + } + resp, err := client.listReplicaSKUsHandleResponse(httpResp) + return resp, err +} + +// listReplicaSKUsCreateRequest creates the ListReplicaSKUs request. +func (client *Client) listReplicaSKUsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ClientListReplicaSKUsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/skus" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if replicaName == "" { + return nil, errors.New("parameter replicaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicaName}", url.PathEscape(replicaName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listReplicaSKUsHandleResponse handles the ListReplicaSKUs response. +func (client *Client) listReplicaSKUsHandleResponse(resp *http.Response) (ClientListReplicaSKUsResponse, error) { + result := ClientListReplicaSKUsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SKUList); err != nil { + return ClientListReplicaSKUsResponse{}, err + } + return result, nil +} + +// ListSKUs - List all available skus of the resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - ClientListSKUsOptions contains the optional parameters for the Client.ListSKUs method. +func (client *Client) ListSKUs(ctx context.Context, resourceGroupName string, resourceName string, options *ClientListSKUsOptions) (ClientListSKUsResponse, error) { + var err error + const operationName = "Client.ListSKUs" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSKUsCreateRequest(ctx, resourceGroupName, resourceName, options) + if err != nil { + return ClientListSKUsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClientListSKUsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientListSKUsResponse{}, err + } + resp, err := client.listSKUsHandleResponse(httpResp) + return resp, err +} + +// listSKUsCreateRequest creates the ListSKUs request. +func (client *Client) listSKUsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ClientListSKUsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/skus" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSKUsHandleResponse handles the ListSKUs response. +func (client *Client) listSKUsHandleResponse(resp *http.Response) (ClientListSKUsResponse, error) { + result := ClientListSKUsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SKUList); err != nil { + return ClientListSKUsResponse{}, err + } + return result, nil +} + +// BeginRegenerateKey - Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the +// same time. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - parameters - Parameter that describes the Regenerate Key Operation. +// - options - ClientBeginRegenerateKeyOptions contains the optional parameters for the Client.BeginRegenerateKey method. +func (client *Client) BeginRegenerateKey(ctx context.Context, resourceGroupName string, resourceName string, parameters RegenerateKeyParameters, options *ClientBeginRegenerateKeyOptions) (*runtime.Poller[ClientRegenerateKeyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.regenerateKey(ctx, resourceGroupName, resourceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientRegenerateKeyResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientRegenerateKeyResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RegenerateKey - Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same +// time. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *Client) regenerateKey(ctx context.Context, resourceGroupName string, resourceName string, parameters RegenerateKeyParameters, options *ClientBeginRegenerateKeyOptions) (*http.Response, error) { + var err error + const operationName = "Client.BeginRegenerateKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.regenerateKeyCreateRequest(ctx, resourceGroupName, resourceName, 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 +} + +// regenerateKeyCreateRequest creates the RegenerateKey request. +func (client *Client) regenerateKeyCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, parameters RegenerateKeyParameters, options *ClientBeginRegenerateKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/regenerateKey" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-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 +} + +// BeginRestart - Operation to restart a resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - ClientBeginRestartOptions contains the optional parameters for the Client.BeginRestart method. +func (client *Client) BeginRestart(ctx context.Context, resourceGroupName string, resourceName string, options *ClientBeginRestartOptions) (*runtime.Poller[ClientRestartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restart(ctx, resourceGroupName, resourceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientRestartResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Restart - Operation to restart a resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *Client) restart(ctx context.Context, resourceGroupName string, resourceName string, options *ClientBeginRestartOptions) (*http.Response, error) { + var err error + const operationName = "Client.BeginRestart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restartCreateRequest(ctx, resourceGroupName, resourceName, 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 +} + +// restartCreateRequest creates the Restart request. +func (client *Client) restartCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ClientBeginRestartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/restart" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginUpdate - Operation to update an exiting resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - parameters - Parameters for the update operation +// - options - ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method. +func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ResourceInfo, options *ClientBeginUpdateOptions) (*runtime.Poller[ClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, resourceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Operation to update an exiting resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *Client) update(ctx context.Context, resourceGroupName string, resourceName string, parameters ResourceInfo, options *ClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "Client.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, resourceName, 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 *Client) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, parameters ResourceInfo, options *ClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-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 +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/client_factory.go new file mode 100644 index 00000000..663b190c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/client_factory.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 armwebpubsub + +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. The value must be an UUID. +// - 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 +} + +// NewClient creates a new instance of Client. +func (c *ClientFactory) NewClient() *Client { + return &Client{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewCustomCertificatesClient creates a new instance of CustomCertificatesClient. +func (c *ClientFactory) NewCustomCertificatesClient() *CustomCertificatesClient { + return &CustomCertificatesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewCustomDomainsClient creates a new instance of CustomDomainsClient. +func (c *ClientFactory) NewCustomDomainsClient() *CustomDomainsClient { + return &CustomDomainsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewHubsClient creates a new instance of HubsClient. +func (c *ClientFactory) NewHubsClient() *HubsClient { + return &HubsClient{ + 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, + } +} + +// NewReplicaSharedPrivateLinkResourcesClient creates a new instance of ReplicaSharedPrivateLinkResourcesClient. +func (c *ClientFactory) NewReplicaSharedPrivateLinkResourcesClient() *ReplicaSharedPrivateLinkResourcesClient { + return &ReplicaSharedPrivateLinkResourcesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicasClient creates a new instance of ReplicasClient. +func (c *ClientFactory) NewReplicasClient() *ReplicasClient { + return &ReplicasClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSharedPrivateLinkResourcesClient creates a new instance of SharedPrivateLinkResourcesClient. +func (c *ClientFactory) NewSharedPrivateLinkResourcesClient() *SharedPrivateLinkResourcesClient { + return &SharedPrivateLinkResourcesClient{ + 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, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/constants.go new file mode 100644 index 00000000..0a6165d5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/constants.go @@ -0,0 +1,276 @@ +//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 armwebpubsub + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub" + moduleVersion = "v1.3.0" +) + +// ACLAction - Azure Networking ACL Action. +type ACLAction string + +const ( + ACLActionAllow ACLAction = "Allow" + ACLActionDeny ACLAction = "Deny" +) + +// PossibleACLActionValues returns the possible values for the ACLAction const type. +func PossibleACLActionValues() []ACLAction { + return []ACLAction{ + ACLActionAllow, + ACLActionDeny, + } +} + +// 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, + } +} + +type EventListenerEndpointDiscriminator string + +const ( + EventListenerEndpointDiscriminatorEventHub EventListenerEndpointDiscriminator = "EventHub" +) + +// PossibleEventListenerEndpointDiscriminatorValues returns the possible values for the EventListenerEndpointDiscriminator const type. +func PossibleEventListenerEndpointDiscriminatorValues() []EventListenerEndpointDiscriminator { + return []EventListenerEndpointDiscriminator{ + EventListenerEndpointDiscriminatorEventHub, + } +} + +type EventListenerFilterDiscriminator string + +const ( + EventListenerFilterDiscriminatorEventName EventListenerFilterDiscriminator = "EventName" +) + +// PossibleEventListenerFilterDiscriminatorValues returns the possible values for the EventListenerFilterDiscriminator const type. +func PossibleEventListenerFilterDiscriminatorValues() []EventListenerFilterDiscriminator { + return []EventListenerFilterDiscriminator{ + EventListenerFilterDiscriminatorEventName, + } +} + +// KeyType - The type of access key. +type KeyType string + +const ( + KeyTypePrimary KeyType = "Primary" + KeyTypeSalt KeyType = "Salt" + KeyTypeSecondary KeyType = "Secondary" +) + +// PossibleKeyTypeValues returns the possible values for the KeyType const type. +func PossibleKeyTypeValues() []KeyType { + return []KeyType{ + KeyTypePrimary, + KeyTypeSalt, + KeyTypeSecondary, + } +} + +// ManagedIdentityType - Represents the identity type: systemAssigned, userAssigned, None +type ManagedIdentityType string + +const ( + ManagedIdentityTypeNone ManagedIdentityType = "None" + ManagedIdentityTypeSystemAssigned ManagedIdentityType = "SystemAssigned" + ManagedIdentityTypeUserAssigned ManagedIdentityType = "UserAssigned" +) + +// PossibleManagedIdentityTypeValues returns the possible values for the ManagedIdentityType const type. +func PossibleManagedIdentityTypeValues() []ManagedIdentityType { + return []ManagedIdentityType{ + ManagedIdentityTypeNone, + ManagedIdentityTypeSystemAssigned, + ManagedIdentityTypeUserAssigned, + } +} + +// PrivateLinkServiceConnectionStatus - Indicates whether the connection has been Approved/Rejected/Removed by the owner of +// the service. +type PrivateLinkServiceConnectionStatus string + +const ( + PrivateLinkServiceConnectionStatusApproved PrivateLinkServiceConnectionStatus = "Approved" + PrivateLinkServiceConnectionStatusDisconnected PrivateLinkServiceConnectionStatus = "Disconnected" + PrivateLinkServiceConnectionStatusPending PrivateLinkServiceConnectionStatus = "Pending" + PrivateLinkServiceConnectionStatusRejected PrivateLinkServiceConnectionStatus = "Rejected" +) + +// PossiblePrivateLinkServiceConnectionStatusValues returns the possible values for the PrivateLinkServiceConnectionStatus const type. +func PossiblePrivateLinkServiceConnectionStatusValues() []PrivateLinkServiceConnectionStatus { + return []PrivateLinkServiceConnectionStatus{ + PrivateLinkServiceConnectionStatusApproved, + PrivateLinkServiceConnectionStatusDisconnected, + PrivateLinkServiceConnectionStatusPending, + PrivateLinkServiceConnectionStatusRejected, + } +} + +// ProvisioningState - Provisioning state of the resource. +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateMoving ProvisioningState = "Moving" + ProvisioningStateRunning ProvisioningState = "Running" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUnknown ProvisioningState = "Unknown" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ + ProvisioningStateCanceled, + ProvisioningStateCreating, + ProvisioningStateDeleting, + ProvisioningStateFailed, + ProvisioningStateMoving, + ProvisioningStateRunning, + ProvisioningStateSucceeded, + ProvisioningStateUnknown, + ProvisioningStateUpdating, + } +} + +// ScaleType - The scale type applicable to the sku. +type ScaleType string + +const ( + ScaleTypeAutomatic ScaleType = "Automatic" + ScaleTypeManual ScaleType = "Manual" + ScaleTypeNone ScaleType = "None" +) + +// PossibleScaleTypeValues returns the possible values for the ScaleType const type. +func PossibleScaleTypeValues() []ScaleType { + return []ScaleType{ + ScaleTypeAutomatic, + ScaleTypeManual, + ScaleTypeNone, + } +} + +// ServiceKind - The kind of the service +type ServiceKind string + +const ( + ServiceKindSocketIO ServiceKind = "SocketIO" + ServiceKindWebPubSub ServiceKind = "WebPubSub" +) + +// PossibleServiceKindValues returns the possible values for the ServiceKind const type. +func PossibleServiceKindValues() []ServiceKind { + return []ServiceKind{ + ServiceKindSocketIO, + ServiceKindWebPubSub, + } +} + +// SharedPrivateLinkResourceStatus - Status of the shared private link resource +type SharedPrivateLinkResourceStatus string + +const ( + SharedPrivateLinkResourceStatusApproved SharedPrivateLinkResourceStatus = "Approved" + SharedPrivateLinkResourceStatusDisconnected SharedPrivateLinkResourceStatus = "Disconnected" + SharedPrivateLinkResourceStatusPending SharedPrivateLinkResourceStatus = "Pending" + SharedPrivateLinkResourceStatusRejected SharedPrivateLinkResourceStatus = "Rejected" + SharedPrivateLinkResourceStatusTimeout SharedPrivateLinkResourceStatus = "Timeout" +) + +// PossibleSharedPrivateLinkResourceStatusValues returns the possible values for the SharedPrivateLinkResourceStatus const type. +func PossibleSharedPrivateLinkResourceStatusValues() []SharedPrivateLinkResourceStatus { + return []SharedPrivateLinkResourceStatus{ + SharedPrivateLinkResourceStatusApproved, + SharedPrivateLinkResourceStatusDisconnected, + SharedPrivateLinkResourceStatusPending, + SharedPrivateLinkResourceStatusRejected, + SharedPrivateLinkResourceStatusTimeout, + } +} + +// UpstreamAuthType - Upstream auth type enum. +type UpstreamAuthType string + +const ( + UpstreamAuthTypeManagedIdentity UpstreamAuthType = "ManagedIdentity" + UpstreamAuthTypeNone UpstreamAuthType = "None" +) + +// PossibleUpstreamAuthTypeValues returns the possible values for the UpstreamAuthType const type. +func PossibleUpstreamAuthTypeValues() []UpstreamAuthType { + return []UpstreamAuthType{ + UpstreamAuthTypeManagedIdentity, + UpstreamAuthTypeNone, + } +} + +// WebPubSubRequestType - The incoming request type to the service +type WebPubSubRequestType string + +const ( + WebPubSubRequestTypeClientConnection WebPubSubRequestType = "ClientConnection" + WebPubSubRequestTypeRESTAPI WebPubSubRequestType = "RESTAPI" + WebPubSubRequestTypeServerConnection WebPubSubRequestType = "ServerConnection" + WebPubSubRequestTypeTrace WebPubSubRequestType = "Trace" +) + +// PossibleWebPubSubRequestTypeValues returns the possible values for the WebPubSubRequestType const type. +func PossibleWebPubSubRequestTypeValues() []WebPubSubRequestType { + return []WebPubSubRequestType{ + WebPubSubRequestTypeClientConnection, + WebPubSubRequestTypeRESTAPI, + WebPubSubRequestTypeServerConnection, + WebPubSubRequestTypeTrace, + } +} + +// WebPubSubSKUTier - Optional tier of this particular SKU. 'Standard' or 'Free'. +// Basic is deprecated, use Standard instead. +type WebPubSubSKUTier string + +const ( + WebPubSubSKUTierBasic WebPubSubSKUTier = "Basic" + WebPubSubSKUTierFree WebPubSubSKUTier = "Free" + WebPubSubSKUTierPremium WebPubSubSKUTier = "Premium" + WebPubSubSKUTierStandard WebPubSubSKUTier = "Standard" +) + +// PossibleWebPubSubSKUTierValues returns the possible values for the WebPubSubSKUTier const type. +func PossibleWebPubSubSKUTierValues() []WebPubSubSKUTier { + return []WebPubSubSKUTier{ + WebPubSubSKUTierBasic, + WebPubSubSKUTierFree, + WebPubSubSKUTierPremium, + WebPubSubSKUTierStandard, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/customcertificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/customcertificates_client.go new file mode 100644 index 00000000..7d08d21b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/customcertificates_client.go @@ -0,0 +1,323 @@ +//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 armwebpubsub + +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" +) + +// CustomCertificatesClient contains the methods for the WebPubSubCustomCertificates group. +// Don't use this type directly, use NewCustomCertificatesClient() instead. +type CustomCertificatesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewCustomCertificatesClient creates a new instance of CustomCertificatesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewCustomCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomCertificatesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &CustomCertificatesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update a custom certificate. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - certificateName - Custom certificate name +// - options - CustomCertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomCertificatesClient.BeginCreateOrUpdate +// method. +func (client *CustomCertificatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, parameters CustomCertificate, options *CustomCertificatesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomCertificatesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, resourceName, certificateName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomCertificatesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomCertificatesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a custom certificate. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CustomCertificatesClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, parameters CustomCertificate, options *CustomCertificatesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CustomCertificatesClient.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, resourceName, 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) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *CustomCertificatesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, parameters CustomCertificate, options *CustomCertificatesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates/{certificateName}" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if certificateName == "" { + return nil, errors.New("parameter certificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) + 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-03-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 - Delete a custom certificate. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - certificateName - Custom certificate name +// - options - CustomCertificatesClientDeleteOptions contains the optional parameters for the CustomCertificatesClient.Delete +// method. +func (client *CustomCertificatesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, options *CustomCertificatesClientDeleteOptions) (CustomCertificatesClientDeleteResponse, error) { + var err error + const operationName = "CustomCertificatesClient.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, resourceName, certificateName, options) + if err != nil { + return CustomCertificatesClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CustomCertificatesClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CustomCertificatesClientDeleteResponse{}, err + } + return CustomCertificatesClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *CustomCertificatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, options *CustomCertificatesClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates/{certificateName}" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if certificateName == "" { + return nil, errors.New("parameter certificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) + 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a custom certificate. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - certificateName - Custom certificate name +// - options - CustomCertificatesClientGetOptions contains the optional parameters for the CustomCertificatesClient.Get method. +func (client *CustomCertificatesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, options *CustomCertificatesClientGetOptions) (CustomCertificatesClientGetResponse, error) { + var err error + const operationName = "CustomCertificatesClient.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, resourceName, certificateName, options) + if err != nil { + return CustomCertificatesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CustomCertificatesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CustomCertificatesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *CustomCertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, options *CustomCertificatesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates/{certificateName}" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if certificateName == "" { + return nil, errors.New("parameter certificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *CustomCertificatesClient) getHandleResponse(resp *http.Response) (CustomCertificatesClientGetResponse, error) { + result := CustomCertificatesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomCertificate); err != nil { + return CustomCertificatesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all custom certificates. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - CustomCertificatesClientListOptions contains the optional parameters for the CustomCertificatesClient.NewListPager +// method. +func (client *CustomCertificatesClient) NewListPager(resourceGroupName string, resourceName string, options *CustomCertificatesClientListOptions) *runtime.Pager[CustomCertificatesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[CustomCertificatesClientListResponse]{ + More: func(page CustomCertificatesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CustomCertificatesClientListResponse) (CustomCertificatesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CustomCertificatesClient.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, resourceName, options) + }, nil) + if err != nil { + return CustomCertificatesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *CustomCertificatesClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *CustomCertificatesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *CustomCertificatesClient) listHandleResponse(resp *http.Response) (CustomCertificatesClientListResponse, error) { + result := CustomCertificatesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomCertificateList); err != nil { + return CustomCertificatesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/customdomains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/customdomains_client.go new file mode 100644 index 00000000..ec03454f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/customdomains_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 armwebpubsub + +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" +) + +// CustomDomainsClient contains the methods for the WebPubSubCustomDomains group. +// Don't use this type directly, use NewCustomDomainsClient() instead. +type CustomDomainsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewCustomDomainsClient creates a new instance of CustomDomainsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomDomainsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &CustomDomainsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update a custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - name - Custom domain name. +// - options - CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate +// method. +func (client *CustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, name string, parameters CustomDomain, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomDomainsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, resourceName, name, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomDomainsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomDomainsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CustomDomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, name string, parameters CustomDomain, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CustomDomainsClient.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, resourceName, name, 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) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *CustomDomainsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, name string, parameters CustomDomain, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains/{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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-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 +} + +// BeginDelete - Delete a custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - name - Custom domain name. +// - options - CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete +// method. +func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, name string, options *CustomDomainsClientBeginDeleteOptions) (*runtime.Poller[CustomDomainsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomDomainsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomDomainsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete a custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, name string, options *CustomDomainsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "CustomDomainsClient.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, resourceName, 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 *CustomDomainsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, name string, options *CustomDomainsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains/{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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - name - Custom domain name. +// - options - CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. +func (client *CustomDomainsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, name string, options *CustomDomainsClientGetOptions) (CustomDomainsClientGetResponse, error) { + var err error + const operationName = "CustomDomainsClient.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, resourceName, name, options) + if err != nil { + return CustomDomainsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CustomDomainsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CustomDomainsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *CustomDomainsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, name string, options *CustomDomainsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains/{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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *CustomDomainsClient) getHandleResponse(resp *http.Response) (CustomDomainsClientGetResponse, error) { + result := CustomDomainsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomain); err != nil { + return CustomDomainsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all custom domains. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method. +func (client *CustomDomainsClient) NewListPager(resourceGroupName string, resourceName string, options *CustomDomainsClientListOptions) *runtime.Pager[CustomDomainsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[CustomDomainsClientListResponse]{ + More: func(page CustomDomainsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CustomDomainsClientListResponse) (CustomDomainsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CustomDomainsClient.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, resourceName, options) + }, nil) + if err != nil { + return CustomDomainsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *CustomDomainsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *CustomDomainsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *CustomDomainsClient) listHandleResponse(resp *http.Response) (CustomDomainsClientListResponse, error) { + result := CustomDomainsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainList); err != nil { + return CustomDomainsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/hubs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/hubs_client.go new file mode 100644 index 00000000..ce5054e4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/hubs_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 armwebpubsub + +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" +) + +// HubsClient contains the methods for the WebPubSubHubs group. +// Don't use this type directly, use NewHubsClient() instead. +type HubsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewHubsClient creates a new instance of HubsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewHubsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HubsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &HubsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update a hub setting. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - hubName - The hub name. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - parameters - The resource of WebPubSubHub and its properties +// - options - HubsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubsClient.BeginCreateOrUpdate +// method. +func (client *HubsClient) BeginCreateOrUpdate(ctx context.Context, hubName string, resourceGroupName string, resourceName string, parameters Hub, options *HubsClientBeginCreateOrUpdateOptions) (*runtime.Poller[HubsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, hubName, resourceGroupName, resourceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[HubsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[HubsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a hub setting. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *HubsClient) createOrUpdate(ctx context.Context, hubName string, resourceGroupName string, resourceName string, parameters Hub, options *HubsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "HubsClient.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, hubName, resourceGroupName, resourceName, 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) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *HubsClient) createOrUpdateCreateRequest(ctx context.Context, hubName string, resourceGroupName string, resourceName string, parameters Hub, options *HubsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}" + if hubName == "" { + return nil, errors.New("parameter hubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hubName}", url.PathEscape(hubName)) + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-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 +} + +// BeginDelete - Delete a hub setting. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - hubName - The hub name. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - HubsClientBeginDeleteOptions contains the optional parameters for the HubsClient.BeginDelete method. +func (client *HubsClient) BeginDelete(ctx context.Context, hubName string, resourceGroupName string, resourceName string, options *HubsClientBeginDeleteOptions) (*runtime.Poller[HubsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, hubName, resourceGroupName, resourceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[HubsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[HubsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete a hub setting. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *HubsClient) deleteOperation(ctx context.Context, hubName string, resourceGroupName string, resourceName string, options *HubsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "HubsClient.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, hubName, resourceGroupName, resourceName, 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 *HubsClient) deleteCreateRequest(ctx context.Context, hubName string, resourceGroupName string, resourceName string, options *HubsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}" + if hubName == "" { + return nil, errors.New("parameter hubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hubName}", url.PathEscape(hubName)) + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a hub setting. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - hubName - The hub name. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - HubsClientGetOptions contains the optional parameters for the HubsClient.Get method. +func (client *HubsClient) Get(ctx context.Context, hubName string, resourceGroupName string, resourceName string, options *HubsClientGetOptions) (HubsClientGetResponse, error) { + var err error + const operationName = "HubsClient.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, hubName, resourceGroupName, resourceName, options) + if err != nil { + return HubsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return HubsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HubsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *HubsClient) getCreateRequest(ctx context.Context, hubName string, resourceGroupName string, resourceName string, options *HubsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}" + if hubName == "" { + return nil, errors.New("parameter hubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hubName}", url.PathEscape(hubName)) + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *HubsClient) getHandleResponse(resp *http.Response) (HubsClientGetResponse, error) { + result := HubsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Hub); err != nil { + return HubsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List hub settings. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - HubsClientListOptions contains the optional parameters for the HubsClient.NewListPager method. +func (client *HubsClient) NewListPager(resourceGroupName string, resourceName string, options *HubsClientListOptions) *runtime.Pager[HubsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[HubsClientListResponse]{ + More: func(page HubsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *HubsClientListResponse) (HubsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "HubsClient.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, resourceName, options) + }, nil) + if err != nil { + return HubsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *HubsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *HubsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *HubsClient) listHandleResponse(resp *http.Response) (HubsClientListResponse, error) { + result := HubsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HubList); err != nil { + return HubsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/interfaces.go new file mode 100644 index 00000000..86b63c44 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/interfaces.go @@ -0,0 +1,27 @@ +//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 armwebpubsub + +// EventListenerEndpointClassification provides polymorphic access to related types. +// Call the interface's GetEventListenerEndpoint() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EventHubEndpoint, *EventListenerEndpoint +type EventListenerEndpointClassification interface { + // GetEventListenerEndpoint returns the EventListenerEndpoint content of the underlying type. + GetEventListenerEndpoint() *EventListenerEndpoint +} + +// EventListenerFilterClassification provides polymorphic access to related types. +// Call the interface's GetEventListenerFilter() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EventListenerFilter, *EventNameFilter +type EventListenerFilterClassification interface { + // GetEventListenerFilter returns the EventListenerFilter content of the underlying type. + GetEventListenerFilter() *EventListenerFilter +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/models.go new file mode 100644 index 00000000..feaa324a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/models.go @@ -0,0 +1,967 @@ +//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 armwebpubsub + +import "time" + +// CustomCertificate - A custom certificate. +type CustomCertificate struct { + // REQUIRED; Custom certificate properties. + Properties *CustomCertificateProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/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 +} + +// CustomCertificateList - Custom certificates list. +type CustomCertificateList struct { + // The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // List of custom certificates of this resource. + Value []*CustomCertificate +} + +// CustomCertificateProperties - Custom certificate properties. +type CustomCertificateProperties struct { + // REQUIRED; Base uri of the KeyVault that stores certificate. + KeyVaultBaseURI *string + + // REQUIRED; Certificate secret name. + KeyVaultSecretName *string + + // Certificate secret version. + KeyVaultSecretVersion *string + + // READ-ONLY; Provisioning state of the resource. + ProvisioningState *ProvisioningState +} + +// CustomDomain - A custom domain +type CustomDomain struct { + // REQUIRED; Properties of a custom domain. + Properties *CustomDomainProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/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 +} + +// CustomDomainList - Custom domains list +type CustomDomainList struct { + // The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // List of custom domains that bind to this resource. + Value []*CustomDomain +} + +// CustomDomainProperties - Properties of a custom domain. +type CustomDomainProperties struct { + // REQUIRED; Reference to a resource. + CustomCertificate *ResourceReference + + // REQUIRED; The custom domain name. + DomainName *string + + // READ-ONLY; Provisioning state of the resource. + ProvisioningState *ProvisioningState +} + +// Dimension - Specifications of the Dimension of metrics. +type Dimension struct { + // Localized friendly display name of the dimension. + DisplayName *string + + // Name of the dimension as it appears in MDM. + InternalName *string + + // The public facing name of the dimension. + Name *string + + // A Boolean flag indicating whether this dimension should be included for the shoebox export scenario. + ToBeExportedForShoebox *bool +} + +// EventHandler - Properties of event handler. +type EventHandler struct { + // REQUIRED; Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the template, + // the value of the EventHandler URL is dynamically calculated when the client + // request comes in. For example, UrlTemplate can be http://example.com/api/{hub}/{event}. The host part can't contains parameters. + URLTemplate *string + + // Upstream auth settings. If not set, no auth is used for upstream messages. + Auth *UpstreamAuthSettings + + // Gets or sets the list of system events. + SystemEvents []*string + + // Gets or sets the matching pattern for event names. There are 3 kinds of patterns supported: 1. "*", it matches any event + // name 2. Combine multiple events with ",", for example "event1,event2", it + // matches event "event1" and "event2" 3. A single event name, for example, "event1", it matches "event1" + UserEventPattern *string +} + +// EventHubEndpoint - An Event Hub endpoint. The managed identity of Web PubSub service must be enabled, and the identity +// should have the "Azure Event Hubs Data sender" role to access Event Hub. +type EventHubEndpoint struct { + // REQUIRED; The name of the Event Hub. + EventHubName *string + + // REQUIRED; The fully qualified namespace name of the Event Hub resource. For example, "example.servicebus.windows.net". + FullyQualifiedNamespace *string + + // REQUIRED + Type *EventListenerEndpointDiscriminator +} + +// GetEventListenerEndpoint implements the EventListenerEndpointClassification interface for type EventHubEndpoint. +func (e *EventHubEndpoint) GetEventListenerEndpoint() *EventListenerEndpoint { + return &EventListenerEndpoint{ + Type: e.Type, + } +} + +// EventListener - A setting defines which kinds of events should be sent to which endpoint. +type EventListener struct { + // REQUIRED; An endpoint specifying where Web PubSub should send events to. + Endpoint EventListenerEndpointClassification + + // REQUIRED; A base class for event filter which determines whether an event should be sent to an event listener. + Filter EventListenerFilterClassification +} + +// EventListenerEndpoint - An endpoint specifying where Web PubSub should send events to. +type EventListenerEndpoint struct { + // REQUIRED + Type *EventListenerEndpointDiscriminator +} + +// GetEventListenerEndpoint implements the EventListenerEndpointClassification interface for type EventListenerEndpoint. +func (e *EventListenerEndpoint) GetEventListenerEndpoint() *EventListenerEndpoint { return e } + +// EventListenerFilter - A base class for event filter which determines whether an event should be sent to an event listener. +type EventListenerFilter struct { + // REQUIRED + Type *EventListenerFilterDiscriminator +} + +// GetEventListenerFilter implements the EventListenerFilterClassification interface for type EventListenerFilter. +func (e *EventListenerFilter) GetEventListenerFilter() *EventListenerFilter { return e } + +// EventNameFilter - Filter events by their name. +type EventNameFilter struct { + // REQUIRED + Type *EventListenerFilterDiscriminator + + // Gets or sets a list of system events. Supported events: "connected" and "disconnected". Blocking event "connect" is not + // supported because it requires a response. + SystemEvents []*string + + // Gets or sets a matching pattern for event names. There are 3 kinds of patterns supported: 1. "*", it matches any event + // name 2. Combine multiple events with ",", for example "event1,event2", it matches + // events "event1" and "event2" 3. A single event name, for example, "event1", it matches "event1" + UserEventPattern *string +} + +// GetEventListenerFilter implements the EventListenerFilterClassification interface for type EventNameFilter. +func (e *EventNameFilter) GetEventListenerFilter() *EventListenerFilter { + return &EventListenerFilter{ + Type: e.Type, + } +} + +// Hub - A hub setting +type Hub struct { + // REQUIRED; Properties of a hub. + Properties *HubProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/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 +} + +// HubList - Hub setting list +type HubList struct { + // List of hub settings to this resource. + Value []*Hub + + // READ-ONLY; The URL the client should use to fetch the next page (per server side paging). It's null for now, added for + // future use. + NextLink *string +} + +// HubProperties - Properties of a hub. +type HubProperties struct { + // The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny". Default to "deny". + AnonymousConnectPolicy *string + + // Event handler of a hub. + EventHandlers []*EventHandler + + // Event listener settings for forwarding your client events to listeners. Event listener is transparent to Web PubSub clients, + // and it doesn't return any result to clients nor interrupt the lifetime of + // clients. One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of + // the array elements doesn't matter. Maximum count of event listeners among all + // hubs is 10. + EventListeners []*EventListener + + // The settings for configuring the WebSocket ping-pong interval in seconds for all clients in the hub. Valid range: 1 to + // 120. Default to 20 seconds. + WebSocketKeepAliveIntervalInSeconds *int32 +} + +// IPRule - An IP rule +type IPRule struct { + // Azure Networking ACL Action. + Action *ACLAction + + // An IP or CIDR or ServiceTag + Value *string +} + +// Keys - A class represents the access keys of the resource. +type Keys struct { + // Connection string constructed via the primaryKey + PrimaryConnectionString *string + + // The primary access key. + PrimaryKey *string + + // Connection string constructed via the secondaryKey + SecondaryConnectionString *string + + // The secondary access key. + SecondaryKey *string +} + +// LiveTraceCategory - Live trace category configuration of a Microsoft.SignalRService resource. +type LiveTraceCategory struct { + // Indicates whether or the live trace category is enabled. Available values: true, false. Case insensitive. + Enabled *string + + // Gets or sets the live trace category's name. Available values: ConnectivityLogs, MessagingLogs. Case insensitive. + Name *string +} + +// LiveTraceConfiguration - Live trace configuration of a Microsoft.SignalRService resource. +type LiveTraceConfiguration struct { + // Gets or sets the list of category configurations. + Categories []*LiveTraceCategory + + // Indicates whether or not enable live trace. When it's set to true, live trace client can connect to the service. Otherwise, + // live trace client can't connect to the service, so that you are unable to + // receive any log, no matter what you configure in "categories". Available values: true, false. Case insensitive. + Enabled *string +} + +// LogSpecification - Specifications of the Logs for Azure Monitoring. +type LogSpecification struct { + // Localized friendly display name of the log. + DisplayName *string + + // Name of the log. + Name *string +} + +// ManagedIdentity - A class represent managed identities used for request and response +type ManagedIdentity struct { + // Represents the identity type: systemAssigned, userAssigned, None + Type *ManagedIdentityType + + // Get or set the user assigned identities + UserAssignedIdentities map[string]*UserAssignedIdentityProperty + + // READ-ONLY; Get the principal id for the system assigned identity. Only be used in response. + PrincipalID *string + + // READ-ONLY; Get the tenant id for the system assigned identity. Only be used in response + TenantID *string +} + +// ManagedIdentitySettings - Managed identity settings for upstream. +type ManagedIdentitySettings struct { + // The Resource indicating the App ID URI of the target resource. It also appears in the aud (audience) claim of the issued + // token. + Resource *string +} + +// MetricSpecification - Specifications of the Metrics for Azure Monitoring. +type MetricSpecification struct { + // Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + AggregationType *string + + // The name of the metric category that the metric belongs to. A metric can only belong to a single category. + Category *string + + // The dimensions of the metrics. + Dimensions []*Dimension + + // Localized friendly description of the metric. + DisplayDescription *string + + // Localized friendly display name of the metric. + DisplayName *string + + // Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. Ex. a metric + // that returns the number of times a particular error code was emitted. The + // error code may not appear often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where nothing + // was emitted. + FillGapWithZero *string + + // Name of the metric. + Name *string + + // The unit that makes sense for the metric. + Unit *string +} + +// NameAvailability - Result of the request to check name availability. It contains a flag and possible reason of failure. +type NameAvailability struct { + // The message of the operation. + Message *string + + // Indicates whether the name is available or not. + NameAvailable *bool + + // The reason of the availability. Required if name is not available. + Reason *string +} + +// NameAvailabilityParameters - Data POST-ed to the nameAvailability action +type NameAvailabilityParameters struct { + // REQUIRED; The resource name to validate. e.g."my-resource-name" + Name *string + + // REQUIRED; The resource type. Can be "Microsoft.SignalRService/SignalR", "Microsoft.SignalRService/WebPubSub", "Microsoft.SignalRService/SignalR/replicas" + // or "Microsoft.SignalRService/WebPubSub/replicas" + Type *string +} + +// NetworkACL - Network ACL +type NetworkACL struct { + // Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. + Allow []*WebPubSubRequestType + + // Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. + Deny []*WebPubSubRequestType +} + +// NetworkACLs - Network ACLs for the resource +type NetworkACLs struct { + // Azure Networking ACL Action. + DefaultAction *ACLAction + + // IP rules for filtering public traffic + IPRules []*IPRule + + // ACLs for requests from private endpoints + PrivateEndpoints []*PrivateEndpointACL + + // Network ACL + PublicNetwork *NetworkACL +} + +// Operation - REST API operation supported by resource provider. +type Operation struct { + // The object that describes a operation. + Display *OperationDisplay + + // If the operation is a data action. (for data plane rbac) + IsDataAction *bool + + // Name of the operation with format: {provider}/{resource}/{operation} + Name *string + + // Optional. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs + // UX. + Origin *string + + // Extra Operation properties. + Properties *OperationProperties +} + +// OperationDisplay - The object that describes a operation. +type OperationDisplay struct { + // The localized friendly description for the operation + Description *string + + // The localized friendly name for the operation. + Operation *string + + // Friendly name of the resource provider + Provider *string + + // Resource type on which the operation is performed. + Resource *string +} + +// OperationList - Result of the request to list REST API operations. It contains a list of operations. +type OperationList struct { + // The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // List of operations supported by the resource provider. + Value []*Operation +} + +// OperationProperties - Extra Operation properties. +type OperationProperties struct { + // An object that describes a specification. + ServiceSpecification *ServiceSpecification +} + +// PrivateEndpoint - Private endpoint +type PrivateEndpoint struct { + // Full qualified Id of the private endpoint + ID *string +} + +// PrivateEndpointACL - ACL for a private endpoint +type PrivateEndpointACL struct { + // REQUIRED; Name of the private endpoint connection + Name *string + + // Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. + Allow []*WebPubSubRequestType + + // Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. + Deny []*WebPubSubRequestType +} + +// PrivateEndpointConnection - A private endpoint connection to an azure resource +type PrivateEndpointConnection struct { + // Private endpoint connection properties + Properties *PrivateEndpointConnectionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/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 +} + +// PrivateEndpointConnectionList - A list of private endpoint connections +type PrivateEndpointConnectionList struct { + // Request URL that can be used to query next page of private endpoint connections. Returned when the total number of requested + // private endpoint connections exceed maximum page size. + NextLink *string + + // The list of the private endpoint connections + Value []*PrivateEndpointConnection +} + +// PrivateEndpointConnectionProperties - Private endpoint connection properties +type PrivateEndpointConnectionProperties struct { + // Private endpoint + PrivateEndpoint *PrivateEndpoint + + // Connection state of the private endpoint connection + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState + + // READ-ONLY; Group IDs + GroupIDs []*string + + // READ-ONLY; Provisioning state of the resource. + ProvisioningState *ProvisioningState +} + +// PrivateLinkResource - Private link resource +type PrivateLinkResource struct { + // Private link resource properties + Properties *PrivateLinkResourceProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/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 +} + +// PrivateLinkResourceList - Contains a list of PrivateLinkResource and a possible link to query more results +type PrivateLinkResourceList struct { + // The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // List of PrivateLinkResource + Value []*PrivateLinkResource +} + +// PrivateLinkResourceProperties - Private link resource properties +type PrivateLinkResourceProperties struct { + // Group Id of the private link resource + GroupID *string + + // Required members of the private link resource + RequiredMembers []*string + + // Required private DNS zone names + RequiredZoneNames []*string + + // The list of resources that are onboarded to private link service + ShareablePrivateLinkResourceTypes []*ShareablePrivateLinkResourceType +} + +// PrivateLinkServiceConnectionState - Connection state of the private endpoint connection +type PrivateLinkServiceConnectionState struct { + // A message indicating if changes on the service provider require any updates on the consumer. + ActionsRequired *string + + // The reason for approval/rejection of the connection. + Description *string + + // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + Status *PrivateLinkServiceConnectionStatus +} + +// Properties - A class that describes the properties of the resource +type Properties struct { + // DisableLocalAuth Enable or disable aad auth When set as true, connection with AuthType=aad won't work. + DisableAADAuth *bool + + // DisableLocalAuth Enable or disable local auth with AccessKey When set as true, connection with AccessKey=xxx won't work. + DisableLocalAuth *bool + + // Live trace configuration of a Microsoft.SignalRService resource. + LiveTraceConfiguration *LiveTraceConfiguration + + // Network ACLs for the resource + NetworkACLs *NetworkACLs + + // Enable or disable public network access. Default to "Enabled". When it's Enabled, network ACLs still apply. When it's Disabled, + // public network access is always disabled no matter what you set in + // network ACLs. + PublicNetworkAccess *string + + // Enable or disable the regional endpoint. Default to "Enabled". When it's Disabled, new connections will not be routed to + // this endpoint, however existing connections will not be affected. This property + // is replica specific. Disable the regional endpoint without replica is not allowed. + RegionEndpointEnabled *string + + // Resource log configuration of a Microsoft.SignalRService resource. + ResourceLogConfiguration *ResourceLogConfiguration + + // Stop or start the resource. Default to "False". When it's true, the data plane of the resource is shutdown. When it's false, + // the data plane of the resource is started. + ResourceStopped *string + + // SocketIO settings for the resource + SocketIO *SocketIOSettings + + // TLS settings for the resource + TLS *TLSSettings + + // READ-ONLY; The publicly accessible IP of the resource. + ExternalIP *string + + // READ-ONLY; FQDN of the service instance. + HostName *string + + // READ-ONLY; Deprecated. + HostNamePrefix *string + + // READ-ONLY; Private endpoint connections to the resource. + PrivateEndpointConnections []*PrivateEndpointConnection + + // READ-ONLY; Provisioning state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The publicly accessible port of the resource which is designed for browser/client side usage. + PublicPort *int32 + + // READ-ONLY; The publicly accessible port of the resource which is designed for customer server side usage. + ServerPort *int32 + + // READ-ONLY; The list of shared private link resources. + SharedPrivateLinkResources []*SharedPrivateLinkResource + + // READ-ONLY; Version of the resource. Probably you need the same or higher version of client SDKs. + Version *string +} + +// RegenerateKeyParameters - Parameters describes the request to regenerate access keys +type RegenerateKeyParameters struct { + // The type of access key. + KeyType *KeyType +} + +// Replica - A class represent a replica resource. +type Replica struct { + // REQUIRED; The geo-location where the resource lives + Location *string + Properties *ReplicaProperties + + // The billing information of the resource. + SKU *ResourceSKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/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 ReplicaList struct { + // The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // List of the replica + Value []*Replica +} + +type ReplicaProperties struct { + // Enable or disable the regional endpoint. Default to "Enabled". When it's Disabled, new connections will not be routed to + // this endpoint, however existing connections will not be affected. + RegionEndpointEnabled *string + + // Stop or start the resource. Default to "false". When it's true, the data plane of the resource is shutdown. When it's false, + // the data plane of the resource is started. + ResourceStopped *string + + // READ-ONLY; Provisioning state of the resource. + ProvisioningState *ProvisioningState +} + +// ResourceInfo - A class represent a resource. +type ResourceInfo struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // A class represent managed identities used for request and response + Identity *ManagedIdentity + + // The kind of the service + Kind *ServiceKind + + // A class that describes the properties of the resource + Properties *Properties + + // The billing information of the resource. + SKU *ResourceSKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/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 +} + +// ResourceInfoList - Object that includes an array of resources and a possible link for next set. +type ResourceInfoList struct { + // The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // List of the resources + Value []*ResourceInfo +} + +// ResourceLogCategory - Resource log category configuration of a Microsoft.SignalRService resource. +type ResourceLogCategory struct { + // Indicates whether or the resource log category is enabled. Available values: true, false. Case insensitive. + Enabled *string + + // Gets or sets the resource log category's name. Available values: ConnectivityLogs, MessagingLogs. Case insensitive. + Name *string +} + +// ResourceLogConfiguration - Resource log configuration of a Microsoft.SignalRService resource. +type ResourceLogConfiguration struct { + // Gets or sets the list of category configurations. + Categories []*ResourceLogCategory +} + +// ResourceReference - Reference to a resource. +type ResourceReference struct { + // Resource ID. + ID *string +} + +// ResourceSKU - The billing information of the resource. +type ResourceSKU struct { + // REQUIRED; The name of the SKU. Required. + // Allowed values: StandardS1, FreeF1, PremiumP1, PremiumP2 + Name *string + + // Optional, integer. The unit count of the resource. 1 for FreeF1/StandardS1/PremiumP1, 100 for PremiumP2 by default. + // If present, following values are allowed: FreeF1: 1; StandardS1: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; PremiumP1: + // 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; PremiumP2: + // 100,200,300,400,500,600,700,800,900,1000; + Capacity *int32 + + // Optional tier of this particular SKU. 'Standard' or 'Free'. + // Basic is deprecated, use Standard instead. + Tier *WebPubSubSKUTier + + // READ-ONLY; Not used. Retained for future use. + Family *string + + // READ-ONLY; Not used. Retained for future use. + Size *string +} + +// SKU - Describes an available sku." +type SKU struct { + // READ-ONLY; Describes scaling information of a sku. + Capacity *SKUCapacity + + // READ-ONLY; The resource type that this object applies to + ResourceType *string + + // READ-ONLY; The billing information of the resource. + SKU *ResourceSKU +} + +// SKUCapacity - Describes scaling information of a sku. +type SKUCapacity struct { + // READ-ONLY; Allows capacity value list. + AllowedValues []*int32 + + // READ-ONLY; The default capacity. + Default *int32 + + // READ-ONLY; The highest permitted capacity for this resource + Maximum *int32 + + // READ-ONLY; The lowest permitted capacity for this resource + Minimum *int32 + + // READ-ONLY; The scale type applicable to the sku. + ScaleType *ScaleType +} + +// SKUList - The list skus operation response +type SKUList struct { + // READ-ONLY; The URL the client should use to fetch the next page (per server side paging). It's null for now, added for + // future use. + NextLink *string + + // READ-ONLY; The list of skus available for the resource. + Value []*SKU +} + +// ServiceSpecification - An object that describes a specification. +type ServiceSpecification struct { + // Specifications of the Logs for Azure Monitoring. + LogSpecifications []*LogSpecification + + // Specifications of the Metrics for Azure Monitoring. + MetricSpecifications []*MetricSpecification +} + +// ShareablePrivateLinkResourceProperties - Describes the properties of a resource type that has been onboarded to private +// link service +type ShareablePrivateLinkResourceProperties struct { + // The description of the resource type that has been onboarded to private link service + Description *string + + // The resource provider group id for the resource that has been onboarded to private link service + GroupID *string + + // The resource provider type for the resource that has been onboarded to private link service + Type *string +} + +// ShareablePrivateLinkResourceType - Describes a resource type that has been onboarded to private link service +type ShareablePrivateLinkResourceType struct { + // The name of the resource type that has been onboarded to private link service + Name *string + + // Describes the properties of a resource type that has been onboarded to private link service + Properties *ShareablePrivateLinkResourceProperties +} + +// SharedPrivateLinkResource - Describes a Shared Private Link Resource +type SharedPrivateLinkResource struct { + // Describes the properties of an existing Shared Private Link Resource + Properties *SharedPrivateLinkResourceProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/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 +} + +// SharedPrivateLinkResourceList - A list of shared private link resources +type SharedPrivateLinkResourceList struct { + // Request URL that can be used to query next page of private endpoint connections. Returned when the total number of requested + // private endpoint connections exceed maximum page size. + NextLink *string + + // The list of the shared private link resources + Value []*SharedPrivateLinkResource +} + +// SharedPrivateLinkResourceProperties - Describes the properties of an existing Shared Private Link Resource +type SharedPrivateLinkResourceProperties struct { + // REQUIRED; The group id from the provider of resource the shared private link resource is for + GroupID *string + + // REQUIRED; The resource id of the resource the shared private link resource is for + PrivateLinkResourceID *string + + // The request message for requesting approval of the shared private link resource + RequestMessage *string + + // READ-ONLY; Provisioning state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Status of the shared private link resource + Status *SharedPrivateLinkResourceStatus +} + +// SignalRServiceUsage - Object that describes a specific usage of the resources. +type SignalRServiceUsage struct { + // Current value for the usage quota. + CurrentValue *int64 + + // Fully qualified ARM resource id + ID *string + + // The maximum permitted value for the usage quota. If there is no limit, this value will be -1. + Limit *int64 + + // Localizable String object containing the name and a localized value. + Name *SignalRServiceUsageName + + // Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. + Unit *string +} + +// SignalRServiceUsageList - Object that includes an array of the resource usages and a possible link for next set. +type SignalRServiceUsageList struct { + // The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // List of the resource usages + Value []*SignalRServiceUsage +} + +// SignalRServiceUsageName - Localizable String object containing the name and a localized value. +type SignalRServiceUsageName struct { + // Localized name of the usage. + LocalizedValue *string + + // The identifier of the usage. + Value *string +} + +// SocketIOSettings - SocketIO settings for the resource +type SocketIOSettings struct { + // The service mode of Web PubSub for Socket.IO. Values allowed: "Default": have your own backend Socket.IO server "Serverless": + // your application doesn't have a backend server + ServiceMode *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 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 +} + +// TLSSettings - TLS settings for the resource +type TLSSettings struct { + // Request client certificate during TLS handshake if enabled. Not supported for free tier. Any input will be ignored for + // free tier. + ClientCertEnabled *bool +} + +// UpstreamAuthSettings - Upstream auth settings. If not set, no auth is used for upstream messages. +type UpstreamAuthSettings struct { + // Managed identity settings for upstream. + ManagedIdentity *ManagedIdentitySettings + + // Upstream auth type enum. + Type *UpstreamAuthType +} + +// UserAssignedIdentityProperty - Properties of user assigned identity. +type UserAssignedIdentityProperty struct { + // READ-ONLY; Get the client id for the user assigned identity + ClientID *string + + // READ-ONLY; Get the principal id for the user assigned identity + PrincipalID *string +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/models_serde.go new file mode 100644 index 00000000..539abca6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/models_serde.go @@ -0,0 +1,2547 @@ +//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 armwebpubsub + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type CustomCertificate. +func (c CustomCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomCertificate. +func (c *CustomCertificate) UnmarshalJSON(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 "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 "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 CustomCertificateList. +func (c CustomCertificateList) 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 CustomCertificateList. +func (c *CustomCertificateList) UnmarshalJSON(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 CustomCertificateProperties. +func (c CustomCertificateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyVaultBaseUri", c.KeyVaultBaseURI) + populate(objectMap, "keyVaultSecretName", c.KeyVaultSecretName) + populate(objectMap, "keyVaultSecretVersion", c.KeyVaultSecretVersion) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomCertificateProperties. +func (c *CustomCertificateProperties) UnmarshalJSON(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 "keyVaultBaseUri": + err = unpopulate(val, "KeyVaultBaseURI", &c.KeyVaultBaseURI) + delete(rawMsg, key) + case "keyVaultSecretName": + err = unpopulate(val, "KeyVaultSecretName", &c.KeyVaultSecretName) + delete(rawMsg, key) + case "keyVaultSecretVersion": + err = unpopulate(val, "KeyVaultSecretVersion", &c.KeyVaultSecretVersion) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + 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 CustomDomain. +func (c CustomDomain) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomain. +func (c *CustomDomain) UnmarshalJSON(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 "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 "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 CustomDomainList. +func (c CustomDomainList) 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 CustomDomainList. +func (c *CustomDomainList) UnmarshalJSON(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 CustomDomainProperties. +func (c CustomDomainProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customCertificate", c.CustomCertificate) + populate(objectMap, "domainName", c.DomainName) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainProperties. +func (c *CustomDomainProperties) UnmarshalJSON(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 "customCertificate": + err = unpopulate(val, "CustomCertificate", &c.CustomCertificate) + delete(rawMsg, key) + case "domainName": + err = unpopulate(val, "DomainName", &c.DomainName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + 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 Dimension. +func (d Dimension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", d.DisplayName) + populate(objectMap, "internalName", d.InternalName) + populate(objectMap, "name", d.Name) + populate(objectMap, "toBeExportedForShoebox", d.ToBeExportedForShoebox) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Dimension. +func (d *Dimension) UnmarshalJSON(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 "displayName": + err = unpopulate(val, "DisplayName", &d.DisplayName) + delete(rawMsg, key) + case "internalName": + err = unpopulate(val, "InternalName", &d.InternalName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "toBeExportedForShoebox": + err = unpopulate(val, "ToBeExportedForShoebox", &d.ToBeExportedForShoebox) + 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 EventHandler. +func (e EventHandler) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auth", e.Auth) + populate(objectMap, "systemEvents", e.SystemEvents) + populate(objectMap, "urlTemplate", e.URLTemplate) + populate(objectMap, "userEventPattern", e.UserEventPattern) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventHandler. +func (e *EventHandler) UnmarshalJSON(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 "auth": + err = unpopulate(val, "Auth", &e.Auth) + delete(rawMsg, key) + case "systemEvents": + err = unpopulate(val, "SystemEvents", &e.SystemEvents) + delete(rawMsg, key) + case "urlTemplate": + err = unpopulate(val, "URLTemplate", &e.URLTemplate) + delete(rawMsg, key) + case "userEventPattern": + err = unpopulate(val, "UserEventPattern", &e.UserEventPattern) + 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 EventHubEndpoint. +func (e EventHubEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eventHubName", e.EventHubName) + populate(objectMap, "fullyQualifiedNamespace", e.FullyQualifiedNamespace) + objectMap["type"] = EventListenerEndpointDiscriminatorEventHub + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventHubEndpoint. +func (e *EventHubEndpoint) UnmarshalJSON(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 "eventHubName": + err = unpopulate(val, "EventHubName", &e.EventHubName) + delete(rawMsg, key) + case "fullyQualifiedNamespace": + err = unpopulate(val, "FullyQualifiedNamespace", &e.FullyQualifiedNamespace) + 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 EventListener. +func (e EventListener) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endpoint", e.Endpoint) + populate(objectMap, "filter", e.Filter) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventListener. +func (e *EventListener) UnmarshalJSON(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 "endpoint": + e.Endpoint, err = unmarshalEventListenerEndpointClassification(val) + delete(rawMsg, key) + case "filter": + e.Filter, err = unmarshalEventListenerFilterClassification(val) + 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 EventListenerEndpoint. +func (e EventListenerEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = e.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventListenerEndpoint. +func (e *EventListenerEndpoint) UnmarshalJSON(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 "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 EventListenerFilter. +func (e EventListenerFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = e.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventListenerFilter. +func (e *EventListenerFilter) UnmarshalJSON(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 "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 EventNameFilter. +func (e EventNameFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "systemEvents", e.SystemEvents) + objectMap["type"] = EventListenerFilterDiscriminatorEventName + populate(objectMap, "userEventPattern", e.UserEventPattern) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventNameFilter. +func (e *EventNameFilter) UnmarshalJSON(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 "systemEvents": + err = unpopulate(val, "SystemEvents", &e.SystemEvents) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + case "userEventPattern": + err = unpopulate(val, "UserEventPattern", &e.UserEventPattern) + 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 Hub. +func (h Hub) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", h.ID) + populate(objectMap, "name", h.Name) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "systemData", h.SystemData) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Hub. +func (h *Hub) UnmarshalJSON(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 "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &h.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + 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 HubList. +func (h HubList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", h.NextLink) + populate(objectMap, "value", h.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HubList. +func (h *HubList) UnmarshalJSON(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 "nextLink": + err = unpopulate(val, "NextLink", &h.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &h.Value) + 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 HubProperties. +func (h HubProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "anonymousConnectPolicy", h.AnonymousConnectPolicy) + populate(objectMap, "eventHandlers", h.EventHandlers) + populate(objectMap, "eventListeners", h.EventListeners) + populate(objectMap, "webSocketKeepAliveIntervalInSeconds", h.WebSocketKeepAliveIntervalInSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HubProperties. +func (h *HubProperties) UnmarshalJSON(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 "anonymousConnectPolicy": + err = unpopulate(val, "AnonymousConnectPolicy", &h.AnonymousConnectPolicy) + delete(rawMsg, key) + case "eventHandlers": + err = unpopulate(val, "EventHandlers", &h.EventHandlers) + delete(rawMsg, key) + case "eventListeners": + err = unpopulate(val, "EventListeners", &h.EventListeners) + delete(rawMsg, key) + case "webSocketKeepAliveIntervalInSeconds": + err = unpopulate(val, "WebSocketKeepAliveIntervalInSeconds", &h.WebSocketKeepAliveIntervalInSeconds) + 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 IPRule. +func (i IPRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", i.Action) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPRule. +func (i *IPRule) UnmarshalJSON(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 "action": + err = unpopulate(val, "Action", &i.Action) + 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 Keys. +func (k Keys) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "primaryConnectionString", k.PrimaryConnectionString) + populate(objectMap, "primaryKey", k.PrimaryKey) + populate(objectMap, "secondaryConnectionString", k.SecondaryConnectionString) + populate(objectMap, "secondaryKey", k.SecondaryKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Keys. +func (k *Keys) UnmarshalJSON(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 "primaryConnectionString": + err = unpopulate(val, "PrimaryConnectionString", &k.PrimaryConnectionString) + delete(rawMsg, key) + case "primaryKey": + err = unpopulate(val, "PrimaryKey", &k.PrimaryKey) + delete(rawMsg, key) + case "secondaryConnectionString": + err = unpopulate(val, "SecondaryConnectionString", &k.SecondaryConnectionString) + delete(rawMsg, key) + case "secondaryKey": + err = unpopulate(val, "SecondaryKey", &k.SecondaryKey) + 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 LiveTraceCategory. +func (l LiveTraceCategory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", l.Enabled) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LiveTraceCategory. +func (l *LiveTraceCategory) UnmarshalJSON(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 "enabled": + err = unpopulate(val, "Enabled", &l.Enabled) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + 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 LiveTraceConfiguration. +func (l LiveTraceConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "categories", l.Categories) + populate(objectMap, "enabled", l.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LiveTraceConfiguration. +func (l *LiveTraceConfiguration) UnmarshalJSON(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 "categories": + err = unpopulate(val, "Categories", &l.Categories) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &l.Enabled) + 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 LogSpecification. +func (l LogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. +func (l *LogSpecification) UnmarshalJSON(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 "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + 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 ManagedIdentity. +func (m ManagedIdentity) 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 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 "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 ManagedIdentitySettings. +func (m ManagedIdentitySettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resource", m.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentitySettings. +func (m *ManagedIdentitySettings) UnmarshalJSON(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 "resource": + err = unpopulate(val, "Resource", &m.Resource) + 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 MetricSpecification. +func (m MetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationType", m.AggregationType) + populate(objectMap, "category", m.Category) + populate(objectMap, "dimensions", m.Dimensions) + populate(objectMap, "displayDescription", m.DisplayDescription) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "fillGapWithZero", m.FillGapWithZero) + populate(objectMap, "name", m.Name) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. +func (m *MetricSpecification) UnmarshalJSON(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 "aggregationType": + err = unpopulate(val, "AggregationType", &m.AggregationType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &m.Category) + delete(rawMsg, key) + case "dimensions": + err = unpopulate(val, "Dimensions", &m.Dimensions) + delete(rawMsg, key) + case "displayDescription": + err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "fillGapWithZero": + err = unpopulate(val, "FillGapWithZero", &m.FillGapWithZero) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + 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 NameAvailability. +func (n NameAvailability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", n.Message) + populate(objectMap, "nameAvailable", n.NameAvailable) + populate(objectMap, "reason", n.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailability. +func (n *NameAvailability) UnmarshalJSON(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 "message": + err = unpopulate(val, "Message", &n.Message) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &n.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &n.Reason) + 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 NameAvailabilityParameters. +func (n NameAvailabilityParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", n.Name) + populate(objectMap, "type", n.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailabilityParameters. +func (n *NameAvailabilityParameters) UnmarshalJSON(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 "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 NetworkACL. +func (n NetworkACL) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allow", n.Allow) + populate(objectMap, "deny", n.Deny) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkACL. +func (n *NetworkACL) UnmarshalJSON(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 "allow": + err = unpopulate(val, "Allow", &n.Allow) + delete(rawMsg, key) + case "deny": + err = unpopulate(val, "Deny", &n.Deny) + 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 NetworkACLs. +func (n NetworkACLs) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "defaultAction", n.DefaultAction) + populate(objectMap, "ipRules", n.IPRules) + populate(objectMap, "privateEndpoints", n.PrivateEndpoints) + populate(objectMap, "publicNetwork", n.PublicNetwork) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkACLs. +func (n *NetworkACLs) UnmarshalJSON(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 "defaultAction": + err = unpopulate(val, "DefaultAction", &n.DefaultAction) + delete(rawMsg, key) + case "ipRules": + err = unpopulate(val, "IPRules", &n.IPRules) + delete(rawMsg, key) + case "privateEndpoints": + err = unpopulate(val, "PrivateEndpoints", &n.PrivateEndpoints) + delete(rawMsg, key) + case "publicNetwork": + err = unpopulate(val, "PublicNetwork", &n.PublicNetwork) + 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, "isDataAction", o.IsDataAction) + 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 "isDataAction": + err = unpopulate(val, "IsDataAction", &o.IsDataAction) + 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 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 OperationProperties. +func (o OperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", o.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties. +func (o *OperationProperties) UnmarshalJSON(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 "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) + 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 PrivateEndpoint. +func (p PrivateEndpoint) 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 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", 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 PrivateEndpointACL. +func (p PrivateEndpointACL) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allow", p.Allow) + populate(objectMap, "deny", p.Deny) + populate(objectMap, "name", p.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointACL. +func (p *PrivateEndpointACL) UnmarshalJSON(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 "allow": + err = unpopulate(val, "Allow", &p.Allow) + delete(rawMsg, key) + case "deny": + err = unpopulate(val, "Deny", &p.Deny) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + 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, "systemData", p.SystemData) + 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 "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + 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 PrivateEndpointConnectionList. +func (p PrivateEndpointConnectionList) 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 PrivateEndpointConnectionList. +func (p *PrivateEndpointConnectionList) UnmarshalJSON(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, "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, "systemData", p.SystemData) + 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 "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + 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 PrivateLinkResourceList. +func (p PrivateLinkResourceList) 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 PrivateLinkResourceList. +func (p *PrivateLinkResourceList) UnmarshalJSON(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) + populate(objectMap, "shareablePrivateLinkResourceTypes", p.ShareablePrivateLinkResourceTypes) + 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) + case "shareablePrivateLinkResourceTypes": + err = unpopulate(val, "ShareablePrivateLinkResourceTypes", &p.ShareablePrivateLinkResourceTypes) + 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 Properties. +func (p Properties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disableAadAuth", p.DisableAADAuth) + populate(objectMap, "disableLocalAuth", p.DisableLocalAuth) + populate(objectMap, "externalIP", p.ExternalIP) + populate(objectMap, "hostName", p.HostName) + populate(objectMap, "hostNamePrefix", p.HostNamePrefix) + populate(objectMap, "liveTraceConfiguration", p.LiveTraceConfiguration) + populate(objectMap, "networkACLs", p.NetworkACLs) + populate(objectMap, "privateEndpointConnections", p.PrivateEndpointConnections) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "publicNetworkAccess", p.PublicNetworkAccess) + populate(objectMap, "publicPort", p.PublicPort) + populate(objectMap, "regionEndpointEnabled", p.RegionEndpointEnabled) + populate(objectMap, "resourceLogConfiguration", p.ResourceLogConfiguration) + populate(objectMap, "resourceStopped", p.ResourceStopped) + populate(objectMap, "serverPort", p.ServerPort) + populate(objectMap, "sharedPrivateLinkResources", p.SharedPrivateLinkResources) + populate(objectMap, "socketIO", p.SocketIO) + populate(objectMap, "tls", p.TLS) + populate(objectMap, "version", p.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Properties. +func (p *Properties) UnmarshalJSON(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 "disableAadAuth": + err = unpopulate(val, "DisableAADAuth", &p.DisableAADAuth) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &p.DisableLocalAuth) + delete(rawMsg, key) + case "externalIP": + err = unpopulate(val, "ExternalIP", &p.ExternalIP) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &p.HostName) + delete(rawMsg, key) + case "hostNamePrefix": + err = unpopulate(val, "HostNamePrefix", &p.HostNamePrefix) + delete(rawMsg, key) + case "liveTraceConfiguration": + err = unpopulate(val, "LiveTraceConfiguration", &p.LiveTraceConfiguration) + delete(rawMsg, key) + case "networkACLs": + err = unpopulate(val, "NetworkACLs", &p.NetworkACLs) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &p.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &p.PublicNetworkAccess) + delete(rawMsg, key) + case "publicPort": + err = unpopulate(val, "PublicPort", &p.PublicPort) + delete(rawMsg, key) + case "regionEndpointEnabled": + err = unpopulate(val, "RegionEndpointEnabled", &p.RegionEndpointEnabled) + delete(rawMsg, key) + case "resourceLogConfiguration": + err = unpopulate(val, "ResourceLogConfiguration", &p.ResourceLogConfiguration) + delete(rawMsg, key) + case "resourceStopped": + err = unpopulate(val, "ResourceStopped", &p.ResourceStopped) + delete(rawMsg, key) + case "serverPort": + err = unpopulate(val, "ServerPort", &p.ServerPort) + delete(rawMsg, key) + case "sharedPrivateLinkResources": + err = unpopulate(val, "SharedPrivateLinkResources", &p.SharedPrivateLinkResources) + delete(rawMsg, key) + case "socketIO": + err = unpopulate(val, "SocketIO", &p.SocketIO) + delete(rawMsg, key) + case "tls": + err = unpopulate(val, "TLS", &p.TLS) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &p.Version) + 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 RegenerateKeyParameters. +func (r RegenerateKeyParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyType", r.KeyType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateKeyParameters. +func (r *RegenerateKeyParameters) UnmarshalJSON(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 "keyType": + err = unpopulate(val, "KeyType", &r.KeyType) + 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 Replica. +func (r Replica) 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, "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 Replica. +func (r *Replica) UnmarshalJSON(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 "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 ReplicaList. +func (r ReplicaList) 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 ReplicaList. +func (r *ReplicaList) UnmarshalJSON(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 ReplicaProperties. +func (r ReplicaProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "regionEndpointEnabled", r.RegionEndpointEnabled) + populate(objectMap, "resourceStopped", r.ResourceStopped) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicaProperties. +func (r *ReplicaProperties) UnmarshalJSON(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 "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "regionEndpointEnabled": + err = unpopulate(val, "RegionEndpointEnabled", &r.RegionEndpointEnabled) + delete(rawMsg, key) + case "resourceStopped": + err = unpopulate(val, "ResourceStopped", &r.ResourceStopped) + 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 ResourceInfo. +func (r ResourceInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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 ResourceInfo. +func (r *ResourceInfo) UnmarshalJSON(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 "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", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceInfoList. +func (r ResourceInfoList) 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 ResourceInfoList. +func (r *ResourceInfoList) UnmarshalJSON(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 ResourceLogCategory. +func (r ResourceLogCategory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", r.Enabled) + populate(objectMap, "name", r.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceLogCategory. +func (r *ResourceLogCategory) UnmarshalJSON(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 "enabled": + err = unpopulate(val, "Enabled", &r.Enabled) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + 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 ResourceLogConfiguration. +func (r ResourceLogConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "categories", r.Categories) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceLogConfiguration. +func (r *ResourceLogConfiguration) UnmarshalJSON(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 "categories": + err = unpopulate(val, "Categories", &r.Categories) + 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 ResourceReference. +func (r ResourceReference) 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 ResourceReference. +func (r *ResourceReference) UnmarshalJSON(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 ResourceSKU. +func (r ResourceSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", r.Capacity) + populate(objectMap, "family", r.Family) + populate(objectMap, "name", r.Name) + populate(objectMap, "size", r.Size) + populate(objectMap, "tier", r.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU. +func (r *ResourceSKU) UnmarshalJSON(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 "capacity": + err = unpopulate(val, "Capacity", &r.Capacity) + delete(rawMsg, key) + case "family": + err = unpopulate(val, "Family", &r.Family) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &r.Size) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &r.Tier) + 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, "resourceType", s.ResourceType) + populate(objectMap, "sku", s.SKU) + 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 "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 SKUCapacity. +func (s SKUCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedValues", s.AllowedValues) + 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 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedValues": + err = unpopulate(val, "AllowedValues", &s.AllowedValues) + delete(rawMsg, key) + case "default": + err = unpopulate(val, "Default", &s.Default) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &s.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &s.Minimum) + delete(rawMsg, key) + case "scaleType": + err = unpopulate(val, "ScaleType", &s.ScaleType) + 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 SKUList. +func (s SKUList) 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 SKUList. +func (s *SKUList) UnmarshalJSON(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 ServiceSpecification. +func (s ServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", s.LogSpecifications) + populate(objectMap, "metricSpecifications", s.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification. +func (s *ServiceSpecification) UnmarshalJSON(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 "logSpecifications": + err = unpopulate(val, "LogSpecifications", &s.LogSpecifications) + delete(rawMsg, key) + case "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &s.MetricSpecifications) + 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 ShareablePrivateLinkResourceProperties. +func (s ShareablePrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "groupId", s.GroupID) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ShareablePrivateLinkResourceProperties. +func (s *ShareablePrivateLinkResourceProperties) UnmarshalJSON(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 "groupId": + err = unpopulate(val, "GroupID", &s.GroupID) + 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 ShareablePrivateLinkResourceType. +func (s ShareablePrivateLinkResourceType) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ShareablePrivateLinkResourceType. +func (s *ShareablePrivateLinkResourceType) UnmarshalJSON(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 "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 SharedPrivateLinkResource. +func (s SharedPrivateLinkResource) 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 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) + } + 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 SharedPrivateLinkResourceList. +func (s SharedPrivateLinkResourceList) 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 SharedPrivateLinkResourceList. +func (s *SharedPrivateLinkResourceList) UnmarshalJSON(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 SharedPrivateLinkResourceProperties. +func (s SharedPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", s.GroupID) + populate(objectMap, "privateLinkResourceId", s.PrivateLinkResourceID) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "requestMessage", s.RequestMessage) + populate(objectMap, "status", s.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResourceProperties. +func (s *SharedPrivateLinkResourceProperties) UnmarshalJSON(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 "groupId": + err = unpopulate(val, "GroupID", &s.GroupID) + delete(rawMsg, key) + case "privateLinkResourceId": + err = unpopulate(val, "PrivateLinkResourceID", &s.PrivateLinkResourceID) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + 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 { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SignalRServiceUsage. +func (s SignalRServiceUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", s.CurrentValue) + populate(objectMap, "id", s.ID) + populate(objectMap, "limit", s.Limit) + populate(objectMap, "name", s.Name) + populate(objectMap, "unit", s.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SignalRServiceUsage. +func (s *SignalRServiceUsage) UnmarshalJSON(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 "id": + err = unpopulate(val, "ID", &s.ID) + 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 "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 SignalRServiceUsageList. +func (s SignalRServiceUsageList) 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 SignalRServiceUsageList. +func (s *SignalRServiceUsageList) UnmarshalJSON(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 SignalRServiceUsageName. +func (s SignalRServiceUsageName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localizedValue", s.LocalizedValue) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SignalRServiceUsageName. +func (s *SignalRServiceUsageName) UnmarshalJSON(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 "localizedValue": + err = unpopulate(val, "LocalizedValue", &s.LocalizedValue) + 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 SocketIOSettings. +func (s SocketIOSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceMode", s.ServiceMode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SocketIOSettings. +func (s *SocketIOSettings) UnmarshalJSON(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 "serviceMode": + err = unpopulate(val, "ServiceMode", &s.ServiceMode) + 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 TLSSettings. +func (t TLSSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientCertEnabled", t.ClientCertEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TLSSettings. +func (t *TLSSettings) UnmarshalJSON(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 "clientCertEnabled": + err = unpopulate(val, "ClientCertEnabled", &t.ClientCertEnabled) + 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 UpstreamAuthSettings. +func (u UpstreamAuthSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "managedIdentity", u.ManagedIdentity) + populate(objectMap, "type", u.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpstreamAuthSettings. +func (u *UpstreamAuthSettings) UnmarshalJSON(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 "managedIdentity": + err = unpopulate(val, "ManagedIdentity", &u.ManagedIdentity) + 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 UserAssignedIdentityProperty. +func (u UserAssignedIdentityProperty) 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 UserAssignedIdentityProperty. +func (u *UserAssignedIdentityProperty) UnmarshalJSON(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 +} + +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 || string(data) == "null" { + 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/webpubsub/armwebpubsub/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/operations_client.go new file mode 100644 index 00000000..95cf9744 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/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 armwebpubsub + +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 REST API operations of the Microsoft.SignalRService provider. +// +// Generated from API version 2024-03-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]{ + 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.SignalRService/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", "2024-03-01") + 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.OperationList); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/options.go new file mode 100644 index 00000000..fea26f99 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/options.go @@ -0,0 +1,260 @@ +//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 armwebpubsub + +// ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method. +type ClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method. +type ClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginRegenerateKeyOptions contains the optional parameters for the Client.BeginRegenerateKey method. +type ClientBeginRegenerateKeyOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginRestartOptions contains the optional parameters for the Client.BeginRestart method. +type ClientBeginRestartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method. +type ClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method. +type ClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ClientGetOptions contains the optional parameters for the Client.Get method. +type ClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method. +type ClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ClientListBySubscriptionOptions contains the optional parameters for the Client.NewListBySubscriptionPager method. +type ClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ClientListKeysOptions contains the optional parameters for the Client.ListKeys method. +type ClientListKeysOptions struct { + // placeholder for future optional parameters +} + +// ClientListReplicaSKUsOptions contains the optional parameters for the Client.ListReplicaSKUs method. +type ClientListReplicaSKUsOptions struct { + // placeholder for future optional parameters +} + +// ClientListSKUsOptions contains the optional parameters for the Client.ListSKUs method. +type ClientListSKUsOptions struct { + // placeholder for future optional parameters +} + +// CustomCertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomCertificatesClient.BeginCreateOrUpdate +// method. +type CustomCertificatesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomCertificatesClientDeleteOptions contains the optional parameters for the CustomCertificatesClient.Delete method. +type CustomCertificatesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CustomCertificatesClientGetOptions contains the optional parameters for the CustomCertificatesClient.Get method. +type CustomCertificatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// CustomCertificatesClientListOptions contains the optional parameters for the CustomCertificatesClient.NewListPager method. +type CustomCertificatesClientListOptions struct { + // placeholder for future optional parameters +} + +// CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate +// method. +type CustomDomainsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete method. +type CustomDomainsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. +type CustomDomainsClientGetOptions struct { + // placeholder for future optional parameters +} + +// CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method. +type CustomDomainsClientListOptions struct { + // placeholder for future optional parameters +} + +// HubsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubsClient.BeginCreateOrUpdate method. +type HubsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// HubsClientBeginDeleteOptions contains the optional parameters for the HubsClient.BeginDelete method. +type HubsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// HubsClientGetOptions contains the optional parameters for the HubsClient.Get method. +type HubsClientGetOptions struct { + // placeholder for future optional parameters +} + +// HubsClientListOptions contains the optional parameters for the HubsClient.NewListPager method. +type HubsClientListOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// 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 +} + +// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager +// method. +type PrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Update +// method. +type PrivateEndpointConnectionsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager +// method. +type PrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicaSharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the ReplicaSharedPrivateLinkResourcesClient.BeginCreateOrUpdate +// method. +type ReplicaSharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ReplicaSharedPrivateLinkResourcesClientGetOptions contains the optional parameters for the ReplicaSharedPrivateLinkResourcesClient.Get +// method. +type ReplicaSharedPrivateLinkResourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicaSharedPrivateLinkResourcesClientListOptions contains the optional parameters for the ReplicaSharedPrivateLinkResourcesClient.NewListPager +// method. +type ReplicaSharedPrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicasClientBeginCreateOrUpdateOptions contains the optional parameters for the ReplicasClient.BeginCreateOrUpdate method. +type ReplicasClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ReplicasClientBeginRestartOptions contains the optional parameters for the ReplicasClient.BeginRestart method. +type ReplicasClientBeginRestartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ReplicasClientBeginUpdateOptions contains the optional parameters for the ReplicasClient.BeginUpdate method. +type ReplicasClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ReplicasClientDeleteOptions contains the optional parameters for the ReplicasClient.Delete method. +type ReplicasClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ReplicasClientGetOptions contains the optional parameters for the ReplicasClient.Get method. +type ReplicasClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicasClientListOptions contains the optional parameters for the ReplicasClient.NewListPager method. +type ReplicasClientListOptions struct { + // placeholder for future optional parameters +} + +// SharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.BeginCreateOrUpdate +// method. +type SharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SharedPrivateLinkResourcesClientBeginDeleteOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.BeginDelete +// method. +type SharedPrivateLinkResourcesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SharedPrivateLinkResourcesClientGetOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.Get +// method. +type SharedPrivateLinkResourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SharedPrivateLinkResourcesClientListOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.NewListPager +// method. +type SharedPrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + +// UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. +type UsagesClientListOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/polymorphic_helpers.go new file mode 100644 index 00000000..f1ad6dfa --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/polymorphic_helpers.go @@ -0,0 +1,53 @@ +//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 armwebpubsub + +import "encoding/json" + +func unmarshalEventListenerEndpointClassification(rawMsg json.RawMessage) (EventListenerEndpointClassification, 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 EventListenerEndpointClassification + switch m["type"] { + case string(EventListenerEndpointDiscriminatorEventHub): + b = &EventHubEndpoint{} + default: + b = &EventListenerEndpoint{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalEventListenerFilterClassification(rawMsg json.RawMessage) (EventListenerFilterClassification, 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 EventListenerFilterClassification + switch m["type"] { + case string(EventListenerFilterDiscriminatorEventName): + b = &EventNameFilter{} + default: + b = &EventListenerFilter{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/privateendpointconnections_client.go new file mode 100644 index 00000000..e1eed0f6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/privateendpointconnections_client.go @@ -0,0 +1,335 @@ +//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 armwebpubsub + +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 WebPubSubPrivateEndpointConnections 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 ID of the target subscription. The value must be an UUID. +// - 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 +} + +// BeginDelete - Delete the specified private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete +// method. +func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, privateEndpointConnectionName string, resourceGroupName string, resourceName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, privateEndpointConnectionName, resourceGroupName, resourceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the specified private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, privateEndpointConnectionName string, resourceGroupName string, resourceName 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, privateEndpointConnectionName, resourceGroupName, resourceName, 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, privateEndpointConnectionName string, resourceGroupName string, resourceName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + 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)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the specified private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, privateEndpointConnectionName string, resourceGroupName string, resourceName 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, privateEndpointConnectionName, resourceGroupName, resourceName, 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, privateEndpointConnectionName string, resourceGroupName string, resourceName string, options *PrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + 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)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := 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-03-01") + 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 +} + +// NewListPager - List private endpoint connections +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager +// method. +func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, resourceName string, options *PrivateEndpointConnectionsClientListOptions) *runtime.Pager[PrivateEndpointConnectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsClientListResponse]{ + More: func(page PrivateEndpointConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsClientListResponse) (PrivateEndpointConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointConnectionsClient.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, resourceName, options) + }, nil) + if err != nil { + return PrivateEndpointConnectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *PrivateEndpointConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *PrivateEndpointConnectionsClient) listHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientListResponse, error) { + result := PrivateEndpointConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionList); err != nil { + return PrivateEndpointConnectionsClientListResponse{}, err + } + return result, nil +} + +// Update - Update the state of specified private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - parameters - The resource of private endpoint and its properties +// - options - PrivateEndpointConnectionsClientUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Update +// method. +func (client *PrivateEndpointConnectionsClient) Update(ctx context.Context, privateEndpointConnectionName string, resourceGroupName string, resourceName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientUpdateOptions) (PrivateEndpointConnectionsClientUpdateResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.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, privateEndpointConnectionName, resourceGroupName, resourceName, parameters, options) + if err != nil { + return PrivateEndpointConnectionsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *PrivateEndpointConnectionsClient) updateCreateRequest(ctx context.Context, privateEndpointConnectionName string, resourceGroupName string, resourceName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + 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)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-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 +} + +// updateHandleResponse handles the Update response. +func (client *PrivateEndpointConnectionsClient) updateHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientUpdateResponse, error) { + result := PrivateEndpointConnectionsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { + return PrivateEndpointConnectionsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/buildsbybuilderresource_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/privatelinkresources_client.go similarity index 50% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/buildsbybuilderresource_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/privatelinkresources_client.go index 447c0825..2d5553df 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/buildsbybuilderresource_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/privatelinkresources_client.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 armappcontainers +package armwebpubsub import ( "context" @@ -20,52 +20,52 @@ import ( "strings" ) -// BuildsByBuilderResourceClient contains the methods for the BuildsByBuilderResource group. -// Don't use this type directly, use NewBuildsByBuilderResourceClient() instead. -type BuildsByBuilderResourceClient struct { +// PrivateLinkResourcesClient contains the methods for the WebPubSubPrivateLinkResources group. +// Don't use this type directly, use NewPrivateLinkResourcesClient() instead. +type PrivateLinkResourcesClient struct { internal *arm.Client subscriptionID string } -// NewBuildsByBuilderResourceClient creates a new instance of BuildsByBuilderResourceClient with the specified values. +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values. // - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. -func NewBuildsByBuilderResourceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildsByBuilderResourceClient, error) { +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 := &BuildsByBuilderResourceClient{ + client := &PrivateLinkResourcesClient{ subscriptionID: subscriptionID, internal: cl, } return client, nil } -// NewListPager - List BuildResource resources by BuilderResource +// NewListPager - Get the private link resources that need to be created for a resource. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - builderName - The name of the builder. -// - options - BuildsByBuilderResourceClientListOptions contains the optional parameters for the BuildsByBuilderResourceClient.NewListPager +// - resourceName - The name of the resource. +// - options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager // method. -func (client *BuildsByBuilderResourceClient) NewListPager(resourceGroupName string, builderName string, options *BuildsByBuilderResourceClientListOptions) *runtime.Pager[BuildsByBuilderResourceClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BuildsByBuilderResourceClientListResponse]{ - More: func(page BuildsByBuilderResourceClientListResponse) bool { +func (client *PrivateLinkResourcesClient) NewListPager(resourceGroupName string, resourceName string, options *PrivateLinkResourcesClientListOptions) *runtime.Pager[PrivateLinkResourcesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateLinkResourcesClientListResponse]{ + More: func(page PrivateLinkResourcesClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, - Fetcher: func(ctx context.Context, page *BuildsByBuilderResourceClientListResponse) (BuildsByBuilderResourceClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BuildsByBuilderResourceClient.NewListPager") + Fetcher: func(ctx context.Context, page *PrivateLinkResourcesClientListResponse) (PrivateLinkResourcesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkResourcesClient.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, builderName, options) + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) }, nil) if err != nil { - return BuildsByBuilderResourceClientListResponse{}, err + return PrivateLinkResourcesClientListResponse{}, err } return client.listHandleResponse(resp) }, @@ -74,8 +74,8 @@ func (client *BuildsByBuilderResourceClient) NewListPager(resourceGroupName stri } // listCreateRequest creates the List request. -func (client *BuildsByBuilderResourceClient) listCreateRequest(ctx context.Context, resourceGroupName string, builderName string, options *BuildsByBuilderResourceClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds" +func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *PrivateLinkResourcesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateLinkResources" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") } @@ -84,26 +84,26 @@ func (client *BuildsByBuilderResourceClient) listCreateRequest(ctx context.Conte return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) req, err := 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", "2023-11-02-preview") + reqQP.Set("api-version", "2024-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // listHandleResponse handles the List response. -func (client *BuildsByBuilderResourceClient) listHandleResponse(resp *http.Response) (BuildsByBuilderResourceClientListResponse, error) { - result := BuildsByBuilderResourceClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuildCollection); err != nil { - return BuildsByBuilderResourceClientListResponse{}, err +func (client *PrivateLinkResourcesClient) listHandleResponse(resp *http.Response) (PrivateLinkResourcesClientListResponse, error) { + result := PrivateLinkResourcesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourceList); err != nil { + return PrivateLinkResourcesClientListResponse{}, err } return result, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/replicas_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/replicas_client.go new file mode 100644 index 00000000..4a83af7e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/replicas_client.go @@ -0,0 +1,488 @@ +//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 armwebpubsub + +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" +) + +// ReplicasClient contains the methods for the WebPubSubReplicas group. +// Don't use this type directly, use NewReplicasClient() instead. +type ReplicasClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicasClient creates a new instance of ReplicasClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicasClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicasClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update a replica. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - replicaName - The name of the replica. +// - parameters - Parameters for the create or update operation +// - options - ReplicasClientBeginCreateOrUpdateOptions contains the optional parameters for the ReplicasClient.BeginCreateOrUpdate +// method. +func (client *ReplicasClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, parameters Replica, options *ReplicasClientBeginCreateOrUpdateOptions) (*runtime.Poller[ReplicasClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, resourceName, replicaName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicasClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicasClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a replica. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *ReplicasClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, parameters Replica, options *ReplicasClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicasClient.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, resourceName, replicaName, 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) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ReplicasClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, parameters Replica, options *ReplicasClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if replicaName == "" { + return nil, errors.New("parameter replicaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicaName}", url.PathEscape(replicaName)) + 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-03-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 - Operation to delete a replica. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - replicaName - The name of the replica. +// - options - ReplicasClientDeleteOptions contains the optional parameters for the ReplicasClient.Delete method. +func (client *ReplicasClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ReplicasClientDeleteOptions) (ReplicasClientDeleteResponse, error) { + var err error + const operationName = "ReplicasClient.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, resourceName, replicaName, options) + if err != nil { + return ReplicasClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicasClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ReplicasClientDeleteResponse{}, err + } + return ReplicasClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReplicasClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ReplicasClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if replicaName == "" { + return nil, errors.New("parameter replicaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicaName}", url.PathEscape(replicaName)) + 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the replica and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - replicaName - The name of the replica. +// - options - ReplicasClientGetOptions contains the optional parameters for the ReplicasClient.Get method. +func (client *ReplicasClient) Get(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ReplicasClientGetOptions) (ReplicasClientGetResponse, error) { + var err error + const operationName = "ReplicasClient.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, resourceName, replicaName, options) + if err != nil { + return ReplicasClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicasClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicasClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicasClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ReplicasClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if replicaName == "" { + return nil, errors.New("parameter replicaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicaName}", url.PathEscape(replicaName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicasClient) getHandleResponse(resp *http.Response) (ReplicasClientGetResponse, error) { + result := ReplicasClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Replica); err != nil { + return ReplicasClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all replicas belong to this resource +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - ReplicasClientListOptions contains the optional parameters for the ReplicasClient.NewListPager method. +func (client *ReplicasClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicasClientListOptions) *runtime.Pager[ReplicasClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicasClientListResponse]{ + More: func(page ReplicasClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicasClientListResponse) (ReplicasClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicasClient.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, resourceName, options) + }, nil) + if err != nil { + return ReplicasClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicasClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ReplicasClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicasClient) listHandleResponse(resp *http.Response) (ReplicasClientListResponse, error) { + result := ReplicasClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicaList); err != nil { + return ReplicasClientListResponse{}, err + } + return result, nil +} + +// BeginRestart - Operation to restart a replica. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - replicaName - The name of the replica. +// - options - ReplicasClientBeginRestartOptions contains the optional parameters for the ReplicasClient.BeginRestart method. +func (client *ReplicasClient) BeginRestart(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ReplicasClientBeginRestartOptions) (*runtime.Poller[ReplicasClientRestartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restart(ctx, resourceGroupName, resourceName, replicaName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicasClientRestartResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicasClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Restart - Operation to restart a replica. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *ReplicasClient) restart(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ReplicasClientBeginRestartOptions) (*http.Response, error) { + var err error + const operationName = "ReplicasClient.BeginRestart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restartCreateRequest(ctx, resourceGroupName, resourceName, replicaName, 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 +} + +// restartCreateRequest creates the Restart request. +func (client *ReplicasClient) restartCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ReplicasClientBeginRestartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/restart" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if replicaName == "" { + return nil, errors.New("parameter replicaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicaName}", url.PathEscape(replicaName)) + 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginUpdate - Operation to update an exiting replica. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - replicaName - The name of the replica. +// - parameters - Parameters for the update operation +// - options - ReplicasClientBeginUpdateOptions contains the optional parameters for the ReplicasClient.BeginUpdate method. +func (client *ReplicasClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, parameters Replica, options *ReplicasClientBeginUpdateOptions) (*runtime.Poller[ReplicasClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, resourceName, replicaName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicasClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicasClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Operation to update an exiting replica. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *ReplicasClient) update(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, parameters Replica, options *ReplicasClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicasClient.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, resourceName, replicaName, 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 *ReplicasClient) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, parameters Replica, options *ReplicasClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if replicaName == "" { + return nil, errors.New("parameter replicaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicaName}", url.PathEscape(replicaName)) + 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-03-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 +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/replicasharedprivatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/replicasharedprivatelinkresources_client.go new file mode 100644 index 00000000..491b5381 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/replicasharedprivatelinkresources_client.go @@ -0,0 +1,280 @@ +//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 armwebpubsub + +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" +) + +// ReplicaSharedPrivateLinkResourcesClient contains the methods for the WebPubSubReplicaSharedPrivateLinkResources group. +// Don't use this type directly, use NewReplicaSharedPrivateLinkResourcesClient() instead. +type ReplicaSharedPrivateLinkResourcesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicaSharedPrivateLinkResourcesClient creates a new instance of ReplicaSharedPrivateLinkResourcesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicaSharedPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicaSharedPrivateLinkResourcesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicaSharedPrivateLinkResourcesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update a shared private link resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - replicaName - The name of the replica. +// - sharedPrivateLinkResourceName - The name of the shared private link resource. +// - parameters - The shared private link resource +// - options - ReplicaSharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the ReplicaSharedPrivateLinkResourcesClient.BeginCreateOrUpdate +// method. +func (client *ReplicaSharedPrivateLinkResourcesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, sharedPrivateLinkResourceName string, parameters SharedPrivateLinkResource, options *ReplicaSharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ReplicaSharedPrivateLinkResourcesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicaSharedPrivateLinkResourcesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicaSharedPrivateLinkResourcesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a shared private link resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *ReplicaSharedPrivateLinkResourcesClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, sharedPrivateLinkResourceName string, parameters SharedPrivateLinkResource, options *ReplicaSharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicaSharedPrivateLinkResourcesClient.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, resourceName, replicaName, sharedPrivateLinkResourceName, 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) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ReplicaSharedPrivateLinkResourcesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, sharedPrivateLinkResourceName string, parameters SharedPrivateLinkResource, options *ReplicaSharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if replicaName == "" { + return nil, errors.New("parameter replicaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicaName}", url.PathEscape(replicaName)) + if sharedPrivateLinkResourceName == "" { + return nil, errors.New("parameter sharedPrivateLinkResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sharedPrivateLinkResourceName}", url.PathEscape(sharedPrivateLinkResourceName)) + 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-03-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 +} + +// Get - Get the specified shared private link resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - replicaName - The name of the replica. +// - sharedPrivateLinkResourceName - The name of the shared private link resource. +// - options - ReplicaSharedPrivateLinkResourcesClientGetOptions contains the optional parameters for the ReplicaSharedPrivateLinkResourcesClient.Get +// method. +func (client *ReplicaSharedPrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, sharedPrivateLinkResourceName string, options *ReplicaSharedPrivateLinkResourcesClientGetOptions) (ReplicaSharedPrivateLinkResourcesClientGetResponse, error) { + var err error + const operationName = "ReplicaSharedPrivateLinkResourcesClient.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, resourceName, replicaName, sharedPrivateLinkResourceName, options) + if err != nil { + return ReplicaSharedPrivateLinkResourcesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicaSharedPrivateLinkResourcesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicaSharedPrivateLinkResourcesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicaSharedPrivateLinkResourcesClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, sharedPrivateLinkResourceName string, options *ReplicaSharedPrivateLinkResourcesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if replicaName == "" { + return nil, errors.New("parameter replicaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicaName}", url.PathEscape(replicaName)) + if sharedPrivateLinkResourceName == "" { + return nil, errors.New("parameter sharedPrivateLinkResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sharedPrivateLinkResourceName}", url.PathEscape(sharedPrivateLinkResourceName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicaSharedPrivateLinkResourcesClient) getHandleResponse(resp *http.Response) (ReplicaSharedPrivateLinkResourcesClientGetResponse, error) { + result := ReplicaSharedPrivateLinkResourcesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SharedPrivateLinkResource); err != nil { + return ReplicaSharedPrivateLinkResourcesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List shared private link resources +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - replicaName - The name of the replica. +// - options - ReplicaSharedPrivateLinkResourcesClientListOptions contains the optional parameters for the ReplicaSharedPrivateLinkResourcesClient.NewListPager +// method. +func (client *ReplicaSharedPrivateLinkResourcesClient) NewListPager(resourceGroupName string, resourceName string, replicaName string, options *ReplicaSharedPrivateLinkResourcesClientListOptions) *runtime.Pager[ReplicaSharedPrivateLinkResourcesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicaSharedPrivateLinkResourcesClientListResponse]{ + More: func(page ReplicaSharedPrivateLinkResourcesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicaSharedPrivateLinkResourcesClientListResponse) (ReplicaSharedPrivateLinkResourcesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicaSharedPrivateLinkResourcesClient.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, resourceName, replicaName, options) + }, nil) + if err != nil { + return ReplicaSharedPrivateLinkResourcesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicaSharedPrivateLinkResourcesClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ReplicaSharedPrivateLinkResourcesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/sharedPrivateLinkResources" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if replicaName == "" { + return nil, errors.New("parameter replicaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicaName}", url.PathEscape(replicaName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicaSharedPrivateLinkResourcesClient) listHandleResponse(resp *http.Response) (ReplicaSharedPrivateLinkResourcesClientListResponse, error) { + result := ReplicaSharedPrivateLinkResourcesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SharedPrivateLinkResourceList); err != nil { + return ReplicaSharedPrivateLinkResourcesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/responses.go new file mode 100644 index 00000000..ffd89bd3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/responses.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 armwebpubsub + +// ClientCheckNameAvailabilityResponse contains the response from method Client.CheckNameAvailability. +type ClientCheckNameAvailabilityResponse struct { + // Result of the request to check name availability. It contains a flag and possible reason of failure. + NameAvailability +} + +// ClientCreateOrUpdateResponse contains the response from method Client.BeginCreateOrUpdate. +type ClientCreateOrUpdateResponse struct { + // A class represent a resource. + ResourceInfo +} + +// ClientDeleteResponse contains the response from method Client.BeginDelete. +type ClientDeleteResponse struct { + // placeholder for future response values +} + +// ClientGetResponse contains the response from method Client.Get. +type ClientGetResponse struct { + // A class represent a resource. + ResourceInfo +} + +// ClientListByResourceGroupResponse contains the response from method Client.NewListByResourceGroupPager. +type ClientListByResourceGroupResponse struct { + // Object that includes an array of resources and a possible link for next set. + ResourceInfoList +} + +// ClientListBySubscriptionResponse contains the response from method Client.NewListBySubscriptionPager. +type ClientListBySubscriptionResponse struct { + // Object that includes an array of resources and a possible link for next set. + ResourceInfoList +} + +// ClientListKeysResponse contains the response from method Client.ListKeys. +type ClientListKeysResponse struct { + // A class represents the access keys of the resource. + Keys +} + +// ClientListReplicaSKUsResponse contains the response from method Client.ListReplicaSKUs. +type ClientListReplicaSKUsResponse struct { + // The list skus operation response + SKUList +} + +// ClientListSKUsResponse contains the response from method Client.ListSKUs. +type ClientListSKUsResponse struct { + // The list skus operation response + SKUList +} + +// ClientRegenerateKeyResponse contains the response from method Client.BeginRegenerateKey. +type ClientRegenerateKeyResponse struct { + // A class represents the access keys of the resource. + Keys +} + +// ClientRestartResponse contains the response from method Client.BeginRestart. +type ClientRestartResponse struct { + // placeholder for future response values +} + +// ClientUpdateResponse contains the response from method Client.BeginUpdate. +type ClientUpdateResponse struct { + // A class represent a resource. + ResourceInfo +} + +// CustomCertificatesClientCreateOrUpdateResponse contains the response from method CustomCertificatesClient.BeginCreateOrUpdate. +type CustomCertificatesClientCreateOrUpdateResponse struct { + // A custom certificate. + CustomCertificate +} + +// CustomCertificatesClientDeleteResponse contains the response from method CustomCertificatesClient.Delete. +type CustomCertificatesClientDeleteResponse struct { + // placeholder for future response values +} + +// CustomCertificatesClientGetResponse contains the response from method CustomCertificatesClient.Get. +type CustomCertificatesClientGetResponse struct { + // A custom certificate. + CustomCertificate +} + +// CustomCertificatesClientListResponse contains the response from method CustomCertificatesClient.NewListPager. +type CustomCertificatesClientListResponse struct { + // Custom certificates list. + CustomCertificateList +} + +// CustomDomainsClientCreateOrUpdateResponse contains the response from method CustomDomainsClient.BeginCreateOrUpdate. +type CustomDomainsClientCreateOrUpdateResponse struct { + // A custom domain + CustomDomain +} + +// CustomDomainsClientDeleteResponse contains the response from method CustomDomainsClient.BeginDelete. +type CustomDomainsClientDeleteResponse struct { + // placeholder for future response values +} + +// CustomDomainsClientGetResponse contains the response from method CustomDomainsClient.Get. +type CustomDomainsClientGetResponse struct { + // A custom domain + CustomDomain +} + +// CustomDomainsClientListResponse contains the response from method CustomDomainsClient.NewListPager. +type CustomDomainsClientListResponse struct { + // Custom domains list + CustomDomainList +} + +// HubsClientCreateOrUpdateResponse contains the response from method HubsClient.BeginCreateOrUpdate. +type HubsClientCreateOrUpdateResponse struct { + // A hub setting + Hub +} + +// HubsClientDeleteResponse contains the response from method HubsClient.BeginDelete. +type HubsClientDeleteResponse struct { + // placeholder for future response values +} + +// HubsClientGetResponse contains the response from method HubsClient.Get. +type HubsClientGetResponse struct { + // A hub setting + Hub +} + +// HubsClientListResponse contains the response from method HubsClient.NewListPager. +type HubsClientListResponse struct { + // Hub setting list + HubList +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Result of the request to list REST API operations. It contains a list of operations. + OperationList +} + +// 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 to an azure resource + PrivateEndpointConnection +} + +// PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager. +type PrivateEndpointConnectionsClientListResponse struct { + // A list of private endpoint connections + PrivateEndpointConnectionList +} + +// PrivateEndpointConnectionsClientUpdateResponse contains the response from method PrivateEndpointConnectionsClient.Update. +type PrivateEndpointConnectionsClientUpdateResponse struct { + // A private endpoint connection to an azure resource + PrivateEndpointConnection +} + +// PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.NewListPager. +type PrivateLinkResourcesClientListResponse struct { + // Contains a list of PrivateLinkResource and a possible link to query more results + PrivateLinkResourceList +} + +// ReplicaSharedPrivateLinkResourcesClientCreateOrUpdateResponse contains the response from method ReplicaSharedPrivateLinkResourcesClient.BeginCreateOrUpdate. +type ReplicaSharedPrivateLinkResourcesClientCreateOrUpdateResponse struct { + // Describes a Shared Private Link Resource + SharedPrivateLinkResource +} + +// ReplicaSharedPrivateLinkResourcesClientGetResponse contains the response from method ReplicaSharedPrivateLinkResourcesClient.Get. +type ReplicaSharedPrivateLinkResourcesClientGetResponse struct { + // Describes a Shared Private Link Resource + SharedPrivateLinkResource +} + +// ReplicaSharedPrivateLinkResourcesClientListResponse contains the response from method ReplicaSharedPrivateLinkResourcesClient.NewListPager. +type ReplicaSharedPrivateLinkResourcesClientListResponse struct { + // A list of shared private link resources + SharedPrivateLinkResourceList +} + +// ReplicasClientCreateOrUpdateResponse contains the response from method ReplicasClient.BeginCreateOrUpdate. +type ReplicasClientCreateOrUpdateResponse struct { + // A class represent a replica resource. + Replica +} + +// ReplicasClientDeleteResponse contains the response from method ReplicasClient.Delete. +type ReplicasClientDeleteResponse struct { + // placeholder for future response values +} + +// ReplicasClientGetResponse contains the response from method ReplicasClient.Get. +type ReplicasClientGetResponse struct { + // A class represent a replica resource. + Replica +} + +// ReplicasClientListResponse contains the response from method ReplicasClient.NewListPager. +type ReplicasClientListResponse struct { + ReplicaList +} + +// ReplicasClientRestartResponse contains the response from method ReplicasClient.BeginRestart. +type ReplicasClientRestartResponse struct { + // placeholder for future response values +} + +// ReplicasClientUpdateResponse contains the response from method ReplicasClient.BeginUpdate. +type ReplicasClientUpdateResponse struct { + // A class represent a replica resource. + Replica +} + +// SharedPrivateLinkResourcesClientCreateOrUpdateResponse contains the response from method SharedPrivateLinkResourcesClient.BeginCreateOrUpdate. +type SharedPrivateLinkResourcesClientCreateOrUpdateResponse struct { + // Describes a Shared Private Link Resource + SharedPrivateLinkResource +} + +// SharedPrivateLinkResourcesClientDeleteResponse contains the response from method SharedPrivateLinkResourcesClient.BeginDelete. +type SharedPrivateLinkResourcesClientDeleteResponse struct { + // placeholder for future response values +} + +// SharedPrivateLinkResourcesClientGetResponse contains the response from method SharedPrivateLinkResourcesClient.Get. +type SharedPrivateLinkResourcesClientGetResponse struct { + // Describes a Shared Private Link Resource + SharedPrivateLinkResource +} + +// SharedPrivateLinkResourcesClientListResponse contains the response from method SharedPrivateLinkResourcesClient.NewListPager. +type SharedPrivateLinkResourcesClientListResponse struct { + // A list of shared private link resources + SharedPrivateLinkResourceList +} + +// UsagesClientListResponse contains the response from method UsagesClient.NewListPager. +type UsagesClientListResponse struct { + // Object that includes an array of the resource usages and a possible link for next set. + SignalRServiceUsageList +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/sharedprivatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/sharedprivatelinkresources_client.go new file mode 100644 index 00000000..0881b840 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/sharedprivatelinkresources_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 armwebpubsub + +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" +) + +// SharedPrivateLinkResourcesClient contains the methods for the WebPubSubSharedPrivateLinkResources group. +// Don't use this type directly, use NewSharedPrivateLinkResourcesClient() instead. +type SharedPrivateLinkResourcesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSharedPrivateLinkResourcesClient creates a new instance of SharedPrivateLinkResourcesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSharedPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharedPrivateLinkResourcesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SharedPrivateLinkResourcesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update a shared private link resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - sharedPrivateLinkResourceName - The name of the shared private link resource. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - parameters - The shared private link resource +// - options - SharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.BeginCreateOrUpdate +// method. +func (client *SharedPrivateLinkResourcesClient) BeginCreateOrUpdate(ctx context.Context, sharedPrivateLinkResourceName string, resourceGroupName string, resourceName string, parameters SharedPrivateLinkResource, options *SharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SharedPrivateLinkResourcesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SharedPrivateLinkResourcesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SharedPrivateLinkResourcesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a shared private link resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *SharedPrivateLinkResourcesClient) createOrUpdate(ctx context.Context, sharedPrivateLinkResourceName string, resourceGroupName string, resourceName string, parameters SharedPrivateLinkResource, options *SharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SharedPrivateLinkResourcesClient.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, sharedPrivateLinkResourceName, resourceGroupName, resourceName, 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) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SharedPrivateLinkResourcesClient) createOrUpdateCreateRequest(ctx context.Context, sharedPrivateLinkResourceName string, resourceGroupName string, resourceName string, parameters SharedPrivateLinkResource, options *SharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}" + if sharedPrivateLinkResourceName == "" { + return nil, errors.New("parameter sharedPrivateLinkResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sharedPrivateLinkResourceName}", url.PathEscape(sharedPrivateLinkResourceName)) + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-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 +} + +// BeginDelete - Delete the specified shared private link resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - sharedPrivateLinkResourceName - The name of the shared private link resource. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - SharedPrivateLinkResourcesClientBeginDeleteOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.BeginDelete +// method. +func (client *SharedPrivateLinkResourcesClient) BeginDelete(ctx context.Context, sharedPrivateLinkResourceName string, resourceGroupName string, resourceName string, options *SharedPrivateLinkResourcesClientBeginDeleteOptions) (*runtime.Poller[SharedPrivateLinkResourcesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, sharedPrivateLinkResourceName, resourceGroupName, resourceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SharedPrivateLinkResourcesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SharedPrivateLinkResourcesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the specified shared private link resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *SharedPrivateLinkResourcesClient) deleteOperation(ctx context.Context, sharedPrivateLinkResourceName string, resourceGroupName string, resourceName string, options *SharedPrivateLinkResourcesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SharedPrivateLinkResourcesClient.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, sharedPrivateLinkResourceName, resourceGroupName, resourceName, 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 *SharedPrivateLinkResourcesClient) deleteCreateRequest(ctx context.Context, sharedPrivateLinkResourceName string, resourceGroupName string, resourceName string, options *SharedPrivateLinkResourcesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}" + if sharedPrivateLinkResourceName == "" { + return nil, errors.New("parameter sharedPrivateLinkResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sharedPrivateLinkResourceName}", url.PathEscape(sharedPrivateLinkResourceName)) + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the specified shared private link resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - sharedPrivateLinkResourceName - The name of the shared private link resource. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - SharedPrivateLinkResourcesClientGetOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.Get +// method. +func (client *SharedPrivateLinkResourcesClient) Get(ctx context.Context, sharedPrivateLinkResourceName string, resourceGroupName string, resourceName string, options *SharedPrivateLinkResourcesClientGetOptions) (SharedPrivateLinkResourcesClientGetResponse, error) { + var err error + const operationName = "SharedPrivateLinkResourcesClient.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, sharedPrivateLinkResourceName, resourceGroupName, resourceName, options) + if err != nil { + return SharedPrivateLinkResourcesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SharedPrivateLinkResourcesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SharedPrivateLinkResourcesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SharedPrivateLinkResourcesClient) getCreateRequest(ctx context.Context, sharedPrivateLinkResourceName string, resourceGroupName string, resourceName string, options *SharedPrivateLinkResourcesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}" + if sharedPrivateLinkResourceName == "" { + return nil, errors.New("parameter sharedPrivateLinkResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sharedPrivateLinkResourceName}", url.PathEscape(sharedPrivateLinkResourceName)) + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SharedPrivateLinkResourcesClient) getHandleResponse(resp *http.Response) (SharedPrivateLinkResourcesClientGetResponse, error) { + result := SharedPrivateLinkResourcesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SharedPrivateLinkResource); err != nil { + return SharedPrivateLinkResourcesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List shared private link resources +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the resource. +// - options - SharedPrivateLinkResourcesClientListOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.NewListPager +// method. +func (client *SharedPrivateLinkResourcesClient) NewListPager(resourceGroupName string, resourceName string, options *SharedPrivateLinkResourcesClientListOptions) *runtime.Pager[SharedPrivateLinkResourcesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SharedPrivateLinkResourcesClientListResponse]{ + More: func(page SharedPrivateLinkResourcesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SharedPrivateLinkResourcesClientListResponse) (SharedPrivateLinkResourcesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SharedPrivateLinkResourcesClient.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, resourceName, options) + }, nil) + if err != nil { + return SharedPrivateLinkResourcesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SharedPrivateLinkResourcesClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *SharedPrivateLinkResourcesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources" + 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 resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SharedPrivateLinkResourcesClient) listHandleResponse(resp *http.Response) (SharedPrivateLinkResourcesClientListResponse, error) { + result := SharedPrivateLinkResourcesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SharedPrivateLinkResourceList); err != nil { + return SharedPrivateLinkResourcesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/time_rfc3339.go new file mode 100644 index 00000000..bc2cc7e4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/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 armwebpubsub + +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/webpubsub/armwebpubsub/usages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/usages_client.go new file mode 100644 index 00000000..a9b58c08 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub/usages_client.go @@ -0,0 +1,103 @@ +//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 armwebpubsub + +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" +) + +// 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 ID of the target subscription. The value must be an UUID. +// - 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 +} + +// NewListPager - List resource usage quotas by location. +// +// Generated from API version 2024-03-01 +// - location - the location like "eastus" +// - options - UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. +func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[UsagesClientListResponse]{ + More: func(page UsagesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *UsagesClientListResponse) (UsagesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UsagesClient.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 UsagesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *UsagesClient) listCreateRequest(ctx context.Context, location string, options *UsagesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return 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-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *UsagesClient) listHandleResponse(resp *http.Response) (UsagesClientListResponse, error) { + result := UsagesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SignalRServiceUsageList); err != nil { + return UsagesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/.gitignore b/vendor/github.com/golang-jwt/jwt/v4/.gitignore new file mode 100644 index 00000000..09573e01 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +bin +.idea/ + diff --git a/vendor/github.com/golang-jwt/jwt/v4/LICENSE b/vendor/github.com/golang-jwt/jwt/v4/LICENSE new file mode 100644 index 00000000..35dbc252 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/LICENSE @@ -0,0 +1,9 @@ +Copyright (c) 2012 Dave Grijalva +Copyright (c) 2021 golang-jwt maintainers + +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. + diff --git a/vendor/github.com/golang-jwt/jwt/v4/MIGRATION_GUIDE.md b/vendor/github.com/golang-jwt/jwt/v4/MIGRATION_GUIDE.md new file mode 100644 index 00000000..32966f59 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/MIGRATION_GUIDE.md @@ -0,0 +1,22 @@ +## Migration Guide (v4.0.0) + +Starting from [v4.0.0](https://github.com/golang-jwt/jwt/releases/tag/v4.0.0), the import path will be: + + "github.com/golang-jwt/jwt/v4" + +The `/v4` version will be backwards compatible with existing `v3.x.y` tags in this repo, as well as +`github.com/dgrijalva/jwt-go`. For most users this should be a drop-in replacement, if you're having +troubles migrating, please open an issue. + +You can replace all occurrences of `github.com/dgrijalva/jwt-go` or `github.com/golang-jwt/jwt` with `github.com/golang-jwt/jwt/v4`, either manually or by using tools such as `sed` or `gofmt`. + +And then you'd typically run: + +``` +go get github.com/golang-jwt/jwt/v4 +go mod tidy +``` + +## Older releases (before v3.2.0) + +The original migration guide for older releases can be found at https://github.com/dgrijalva/jwt-go/blob/master/MIGRATION_GUIDE.md. diff --git a/vendor/github.com/golang-jwt/jwt/v4/README.md b/vendor/github.com/golang-jwt/jwt/v4/README.md new file mode 100644 index 00000000..30f2f2a6 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/README.md @@ -0,0 +1,138 @@ +# jwt-go + +[![build](https://github.com/golang-jwt/jwt/actions/workflows/build.yml/badge.svg)](https://github.com/golang-jwt/jwt/actions/workflows/build.yml) +[![Go Reference](https://pkg.go.dev/badge/github.com/golang-jwt/jwt/v4.svg)](https://pkg.go.dev/github.com/golang-jwt/jwt/v4) + +A [go](http://www.golang.org) (or 'golang' for search engine friendliness) implementation of [JSON Web Tokens](https://datatracker.ietf.org/doc/html/rfc7519). + +Starting with [v4.0.0](https://github.com/golang-jwt/jwt/releases/tag/v4.0.0) this project adds Go module support, but maintains backwards compatibility with older `v3.x.y` tags and upstream `github.com/dgrijalva/jwt-go`. +See the [`MIGRATION_GUIDE.md`](./MIGRATION_GUIDE.md) for more information. + +> After the original author of the library suggested migrating the maintenance of `jwt-go`, a dedicated team of open source maintainers decided to clone the existing library into this repository. See [dgrijalva/jwt-go#462](https://github.com/dgrijalva/jwt-go/issues/462) for a detailed discussion on this topic. + + +**SECURITY NOTICE:** Some older versions of Go have a security issue in the crypto/elliptic. Recommendation is to upgrade to at least 1.15 See issue [dgrijalva/jwt-go#216](https://github.com/dgrijalva/jwt-go/issues/216) for more detail. + +**SECURITY NOTICE:** It's important that you [validate the `alg` presented is what you expect](https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/). This library attempts to make it easy to do the right thing by requiring key types match the expected alg, but you should take the extra step to verify it in your usage. See the examples provided. + +### Supported Go versions + +Our support of Go versions is aligned with Go's [version release policy](https://golang.org/doc/devel/release#policy). +So we will support a major version of Go until there are two newer major releases. +We no longer support building jwt-go with unsupported Go versions, as these contain security vulnerabilities +which will not be fixed. + +## What the heck is a JWT? + +JWT.io has [a great introduction](https://jwt.io/introduction) to JSON Web Tokens. + +In short, it's a signed JSON object that does something useful (for example, authentication). It's commonly used for `Bearer` tokens in Oauth 2. A token is made of three parts, separated by `.`'s. The first two parts are JSON objects, that have been [base64url](https://datatracker.ietf.org/doc/html/rfc4648) encoded. The last part is the signature, encoded the same way. + +The first part is called the header. It contains the necessary information for verifying the last part, the signature. For example, which encryption method was used for signing and what key was used. + +The part in the middle is the interesting bit. It's called the Claims and contains the actual stuff you care about. Refer to [RFC 7519](https://datatracker.ietf.org/doc/html/rfc7519) for information about reserved keys and the proper way to add your own. + +## What's in the box? + +This library supports the parsing and verification as well as the generation and signing of JWTs. Current supported signing algorithms are HMAC SHA, RSA, RSA-PSS, and ECDSA, though hooks are present for adding your own. + +## Installation Guidelines + +1. To install the jwt package, you first need to have [Go](https://go.dev/doc/install) installed, then you can use the command below to add `jwt-go` as a dependency in your Go program. + +```sh +go get -u github.com/golang-jwt/jwt/v4 +``` + +2. Import it in your code: + +```go +import "github.com/golang-jwt/jwt/v4" +``` + +## Examples + +See [the project documentation](https://pkg.go.dev/github.com/golang-jwt/jwt/v4) for examples of usage: + +* [Simple example of parsing and validating a token](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#example-Parse-Hmac) +* [Simple example of building and signing a token](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#example-New-Hmac) +* [Directory of Examples](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#pkg-examples) + +## Extensions + +This library publishes all the necessary components for adding your own signing methods or key functions. Simply implement the `SigningMethod` interface and register a factory method using `RegisterSigningMethod` or provide a `jwt.Keyfunc`. + +A common use case would be integrating with different 3rd party signature providers, like key management services from various cloud providers or Hardware Security Modules (HSMs) or to implement additional standards. + +| Extension | Purpose | Repo | +| --------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------ | +| GCP | Integrates with multiple Google Cloud Platform signing tools (AppEngine, IAM API, Cloud KMS) | https://github.com/someone1/gcp-jwt-go | +| AWS | Integrates with AWS Key Management Service, KMS | https://github.com/matelang/jwt-go-aws-kms | +| JWKS | Provides support for JWKS ([RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517)) as a `jwt.Keyfunc` | https://github.com/MicahParks/keyfunc | + +*Disclaimer*: Unless otherwise specified, these integrations are maintained by third parties and should not be considered as a primary offer by any of the mentioned cloud providers + +## Compliance + +This library was last reviewed to comply with [RFC 7519](https://datatracker.ietf.org/doc/html/rfc7519) dated May 2015 with a few notable differences: + +* In order to protect against accidental use of [Unsecured JWTs](https://datatracker.ietf.org/doc/html/rfc7519#section-6), tokens using `alg=none` will only be accepted if the constant `jwt.UnsafeAllowNoneSignatureType` is provided as the key. + +## Project Status & Versioning + +This library is considered production ready. Feedback and feature requests are appreciated. The API should be considered stable. There should be very few backwards-incompatible changes outside of major version updates (and only with good reason). + +This project uses [Semantic Versioning 2.0.0](http://semver.org). Accepted pull requests will land on `main`. Periodically, versions will be tagged from `main`. You can find all the releases on [the project releases page](https://github.com/golang-jwt/jwt/releases). + +**BREAKING CHANGES:*** +A full list of breaking changes is available in `VERSION_HISTORY.md`. See `MIGRATION_GUIDE.md` for more information on updating your code. + +## Usage Tips + +### Signing vs Encryption + +A token is simply a JSON object that is signed by its author. this tells you exactly two things about the data: + +* The author of the token was in the possession of the signing secret +* The data has not been modified since it was signed + +It's important to know that JWT does not provide encryption, which means anyone who has access to the token can read its contents. If you need to protect (encrypt) the data, there is a companion spec, `JWE`, that provides this functionality. The companion project https://github.com/golang-jwt/jwe aims at a (very) experimental implementation of the JWE standard. + +### Choosing a Signing Method + +There are several signing methods available, and you should probably take the time to learn about the various options before choosing one. The principal design decision is most likely going to be symmetric vs asymmetric. + +Symmetric signing methods, such as HSA, use only a single secret. This is probably the simplest signing method to use since any `[]byte` can be used as a valid secret. They are also slightly computationally faster to use, though this rarely is enough to matter. Symmetric signing methods work the best when both producers and consumers of tokens are trusted, or even the same system. Since the same secret is used to both sign and validate tokens, you can't easily distribute the key for validation. + +Asymmetric signing methods, such as RSA, use different keys for signing and verifying tokens. This makes it possible to produce tokens with a private key, and allow any consumer to access the public key for verification. + +### Signing Methods and Key Types + +Each signing method expects a different object type for its signing keys. See the package documentation for details. Here are the most common ones: + +* The [HMAC signing method](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#SigningMethodHMAC) (`HS256`,`HS384`,`HS512`) expect `[]byte` values for signing and validation +* The [RSA signing method](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#SigningMethodRSA) (`RS256`,`RS384`,`RS512`) expect `*rsa.PrivateKey` for signing and `*rsa.PublicKey` for validation +* The [ECDSA signing method](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#SigningMethodECDSA) (`ES256`,`ES384`,`ES512`) expect `*ecdsa.PrivateKey` for signing and `*ecdsa.PublicKey` for validation +* The [EdDSA signing method](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#SigningMethodEd25519) (`Ed25519`) expect `ed25519.PrivateKey` for signing and `ed25519.PublicKey` for validation + +### JWT and OAuth + +It's worth mentioning that OAuth and JWT are not the same thing. A JWT token is simply a signed JSON object. It can be used anywhere such a thing is useful. There is some confusion, though, as JWT is the most common type of bearer token used in OAuth2 authentication. + +Without going too far down the rabbit hole, here's a description of the interaction of these technologies: + +* OAuth is a protocol for allowing an identity provider to be separate from the service a user is logging in to. For example, whenever you use Facebook to log into a different service (Yelp, Spotify, etc), you are using OAuth. +* OAuth defines several options for passing around authentication data. One popular method is called a "bearer token". A bearer token is simply a string that _should_ only be held by an authenticated user. Thus, simply presenting this token proves your identity. You can probably derive from here why a JWT might make a good bearer token. +* Because bearer tokens are used for authentication, it's important they're kept secret. This is why transactions that use bearer tokens typically happen over SSL. + +### Troubleshooting + +This library uses descriptive error messages whenever possible. If you are not getting the expected result, have a look at the errors. The most common place people get stuck is providing the correct type of key to the parser. See the above section on signing methods and key types. + +## More + +Documentation can be found [on pkg.go.dev](https://pkg.go.dev/github.com/golang-jwt/jwt/v4). + +The command line utility included in this project (cmd/jwt) provides a straightforward example of token creation and parsing as well as a useful tool for debugging your own integration. You'll also find several implementation examples in the documentation. + +[golang-jwt](https://github.com/orgs/golang-jwt) incorporates a modified version of the JWT logo, which is distributed under the terms of the [MIT License](https://github.com/jsonwebtoken/jsonwebtoken.github.io/blob/master/LICENSE.txt). diff --git a/vendor/github.com/golang-jwt/jwt/v4/SECURITY.md b/vendor/github.com/golang-jwt/jwt/v4/SECURITY.md new file mode 100644 index 00000000..b08402c3 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +## Supported Versions + +As of February 2022 (and until this document is updated), the latest version `v4` is supported. + +## Reporting a Vulnerability + +If you think you found a vulnerability, and even if you are not sure, please report it to jwt-go-security@googlegroups.com or one of the other [golang-jwt maintainers](https://github.com/orgs/golang-jwt/people). Please try be explicit, describe steps to reproduce the security issue with code example(s). + +You will receive a response within a timely manner. If the issue is confirmed, we will do our best to release a patch as soon as possible given the complexity of the problem. + +## Public Discussions + +Please avoid publicly discussing a potential security vulnerability. + +Let's take this offline and find a solution first, this limits the potential impact as much as possible. + +We appreciate your help! diff --git a/vendor/github.com/golang-jwt/jwt/v4/VERSION_HISTORY.md b/vendor/github.com/golang-jwt/jwt/v4/VERSION_HISTORY.md new file mode 100644 index 00000000..afbfc4e4 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/VERSION_HISTORY.md @@ -0,0 +1,135 @@ +## `jwt-go` Version History + +#### 4.0.0 + +* Introduces support for Go modules. The `v4` version will be backwards compatible with `v3.x.y`. + +#### 3.2.2 + +* Starting from this release, we are adopting the policy to support the most 2 recent versions of Go currently available. By the time of this release, this is Go 1.15 and 1.16 ([#28](https://github.com/golang-jwt/jwt/pull/28)). +* Fixed a potential issue that could occur when the verification of `exp`, `iat` or `nbf` was not required and contained invalid contents, i.e. non-numeric/date. Thanks for @thaJeztah for making us aware of that and @giorgos-f3 for originally reporting it to the formtech fork ([#40](https://github.com/golang-jwt/jwt/pull/40)). +* Added support for EdDSA / ED25519 ([#36](https://github.com/golang-jwt/jwt/pull/36)). +* Optimized allocations ([#33](https://github.com/golang-jwt/jwt/pull/33)). + +#### 3.2.1 + +* **Import Path Change**: See MIGRATION_GUIDE.md for tips on updating your code + * Changed the import path from `github.com/dgrijalva/jwt-go` to `github.com/golang-jwt/jwt` +* Fixed type confusing issue between `string` and `[]string` in `VerifyAudience` ([#12](https://github.com/golang-jwt/jwt/pull/12)). This fixes CVE-2020-26160 + +#### 3.2.0 + +* Added method `ParseUnverified` to allow users to split up the tasks of parsing and validation +* HMAC signing method returns `ErrInvalidKeyType` instead of `ErrInvalidKey` where appropriate +* Added options to `request.ParseFromRequest`, which allows for an arbitrary list of modifiers to parsing behavior. Initial set include `WithClaims` and `WithParser`. Existing usage of this function will continue to work as before. +* Deprecated `ParseFromRequestWithClaims` to simplify API in the future. + +#### 3.1.0 + +* Improvements to `jwt` command line tool +* Added `SkipClaimsValidation` option to `Parser` +* Documentation updates + +#### 3.0.0 + +* **Compatibility Breaking Changes**: See MIGRATION_GUIDE.md for tips on updating your code + * Dropped support for `[]byte` keys when using RSA signing methods. This convenience feature could contribute to security vulnerabilities involving mismatched key types with signing methods. + * `ParseFromRequest` has been moved to `request` subpackage and usage has changed + * The `Claims` property on `Token` is now type `Claims` instead of `map[string]interface{}`. The default value is type `MapClaims`, which is an alias to `map[string]interface{}`. This makes it possible to use a custom type when decoding claims. +* Other Additions and Changes + * Added `Claims` interface type to allow users to decode the claims into a custom type + * Added `ParseWithClaims`, which takes a third argument of type `Claims`. Use this function instead of `Parse` if you have a custom type you'd like to decode into. + * Dramatically improved the functionality and flexibility of `ParseFromRequest`, which is now in the `request` subpackage + * Added `ParseFromRequestWithClaims` which is the `FromRequest` equivalent of `ParseWithClaims` + * Added new interface type `Extractor`, which is used for extracting JWT strings from http requests. Used with `ParseFromRequest` and `ParseFromRequestWithClaims`. + * Added several new, more specific, validation errors to error type bitmask + * Moved examples from README to executable example files + * Signing method registry is now thread safe + * Added new property to `ValidationError`, which contains the raw error returned by calls made by parse/verify (such as those returned by keyfunc or json parser) + +#### 2.7.0 + +This will likely be the last backwards compatible release before 3.0.0, excluding essential bug fixes. + +* Added new option `-show` to the `jwt` command that will just output the decoded token without verifying +* Error text for expired tokens includes how long it's been expired +* Fixed incorrect error returned from `ParseRSAPublicKeyFromPEM` +* Documentation updates + +#### 2.6.0 + +* Exposed inner error within ValidationError +* Fixed validation errors when using UseJSONNumber flag +* Added several unit tests + +#### 2.5.0 + +* Added support for signing method none. You shouldn't use this. The API tries to make this clear. +* Updated/fixed some documentation +* Added more helpful error message when trying to parse tokens that begin with `BEARER ` + +#### 2.4.0 + +* Added new type, Parser, to allow for configuration of various parsing parameters + * You can now specify a list of valid signing methods. Anything outside this set will be rejected. + * You can now opt to use the `json.Number` type instead of `float64` when parsing token JSON +* Added support for [Travis CI](https://travis-ci.org/dgrijalva/jwt-go) +* Fixed some bugs with ECDSA parsing + +#### 2.3.0 + +* Added support for ECDSA signing methods +* Added support for RSA PSS signing methods (requires go v1.4) + +#### 2.2.0 + +* Gracefully handle a `nil` `Keyfunc` being passed to `Parse`. Result will now be the parsed token and an error, instead of a panic. + +#### 2.1.0 + +Backwards compatible API change that was missed in 2.0.0. + +* The `SignedString` method on `Token` now takes `interface{}` instead of `[]byte` + +#### 2.0.0 + +There were two major reasons for breaking backwards compatibility with this update. The first was a refactor required to expand the width of the RSA and HMAC-SHA signing implementations. There will likely be no required code changes to support this change. + +The second update, while unfortunately requiring a small change in integration, is required to open up this library to other signing methods. Not all keys used for all signing methods have a single standard on-disk representation. Requiring `[]byte` as the type for all keys proved too limiting. Additionally, this implementation allows for pre-parsed tokens to be reused, which might matter in an application that parses a high volume of tokens with a small set of keys. Backwards compatibilty has been maintained for passing `[]byte` to the RSA signing methods, but they will also accept `*rsa.PublicKey` and `*rsa.PrivateKey`. + +It is likely the only integration change required here will be to change `func(t *jwt.Token) ([]byte, error)` to `func(t *jwt.Token) (interface{}, error)` when calling `Parse`. + +* **Compatibility Breaking Changes** + * `SigningMethodHS256` is now `*SigningMethodHMAC` instead of `type struct` + * `SigningMethodRS256` is now `*SigningMethodRSA` instead of `type struct` + * `KeyFunc` now returns `interface{}` instead of `[]byte` + * `SigningMethod.Sign` now takes `interface{}` instead of `[]byte` for the key + * `SigningMethod.Verify` now takes `interface{}` instead of `[]byte` for the key +* Renamed type `SigningMethodHS256` to `SigningMethodHMAC`. Specific sizes are now just instances of this type. + * Added public package global `SigningMethodHS256` + * Added public package global `SigningMethodHS384` + * Added public package global `SigningMethodHS512` +* Renamed type `SigningMethodRS256` to `SigningMethodRSA`. Specific sizes are now just instances of this type. + * Added public package global `SigningMethodRS256` + * Added public package global `SigningMethodRS384` + * Added public package global `SigningMethodRS512` +* Moved sample private key for HMAC tests from an inline value to a file on disk. Value is unchanged. +* Refactored the RSA implementation to be easier to read +* Exposed helper methods `ParseRSAPrivateKeyFromPEM` and `ParseRSAPublicKeyFromPEM` + +#### 1.0.2 + +* Fixed bug in parsing public keys from certificates +* Added more tests around the parsing of keys for RS256 +* Code refactoring in RS256 implementation. No functional changes + +#### 1.0.1 + +* Fixed panic if RS256 signing method was passed an invalid key + +#### 1.0.0 + +* First versioned release +* API stabilized +* Supports creating, signing, parsing, and validating JWT tokens +* Supports RS256 and HS256 signing methods diff --git a/vendor/github.com/golang-jwt/jwt/v4/claims.go b/vendor/github.com/golang-jwt/jwt/v4/claims.go new file mode 100644 index 00000000..364cec87 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/claims.go @@ -0,0 +1,269 @@ +package jwt + +import ( + "crypto/subtle" + "fmt" + "time" +) + +// Claims must just have a Valid method that determines +// if the token is invalid for any supported reason +type Claims interface { + Valid() error +} + +// RegisteredClaims are a structured version of the JWT Claims Set, +// restricted to Registered Claim Names, as referenced at +// https://datatracker.ietf.org/doc/html/rfc7519#section-4.1 +// +// This type can be used on its own, but then additional private and +// public claims embedded in the JWT will not be parsed. The typical usecase +// therefore is to embedded this in a user-defined claim type. +// +// See examples for how to use this with your own claim types. +type RegisteredClaims struct { + // the `iss` (Issuer) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.1 + Issuer string `json:"iss,omitempty"` + + // the `sub` (Subject) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2 + Subject string `json:"sub,omitempty"` + + // the `aud` (Audience) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3 + Audience ClaimStrings `json:"aud,omitempty"` + + // the `exp` (Expiration Time) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4 + ExpiresAt *NumericDate `json:"exp,omitempty"` + + // the `nbf` (Not Before) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.5 + NotBefore *NumericDate `json:"nbf,omitempty"` + + // the `iat` (Issued At) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.6 + IssuedAt *NumericDate `json:"iat,omitempty"` + + // the `jti` (JWT ID) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7 + ID string `json:"jti,omitempty"` +} + +// Valid validates time based claims "exp, iat, nbf". +// There is no accounting for clock skew. +// As well, if any of the above claims are not in the token, it will still +// be considered a valid claim. +func (c RegisteredClaims) Valid() error { + vErr := new(ValidationError) + now := TimeFunc() + + // The claims below are optional, by default, so if they are set to the + // default value in Go, let's not fail the verification for them. + if !c.VerifyExpiresAt(now, false) { + delta := now.Sub(c.ExpiresAt.Time) + vErr.Inner = fmt.Errorf("%s by %s", ErrTokenExpired, delta) + vErr.Errors |= ValidationErrorExpired + } + + if !c.VerifyIssuedAt(now, false) { + vErr.Inner = ErrTokenUsedBeforeIssued + vErr.Errors |= ValidationErrorIssuedAt + } + + if !c.VerifyNotBefore(now, false) { + vErr.Inner = ErrTokenNotValidYet + vErr.Errors |= ValidationErrorNotValidYet + } + + if vErr.valid() { + return nil + } + + return vErr +} + +// VerifyAudience compares the aud claim against cmp. +// If required is false, this method will return true if the value matches or is unset +func (c *RegisteredClaims) VerifyAudience(cmp string, req bool) bool { + return verifyAud(c.Audience, cmp, req) +} + +// VerifyExpiresAt compares the exp claim against cmp (cmp < exp). +// If req is false, it will return true, if exp is unset. +func (c *RegisteredClaims) VerifyExpiresAt(cmp time.Time, req bool) bool { + if c.ExpiresAt == nil { + return verifyExp(nil, cmp, req) + } + + return verifyExp(&c.ExpiresAt.Time, cmp, req) +} + +// VerifyIssuedAt compares the iat claim against cmp (cmp >= iat). +// If req is false, it will return true, if iat is unset. +func (c *RegisteredClaims) VerifyIssuedAt(cmp time.Time, req bool) bool { + if c.IssuedAt == nil { + return verifyIat(nil, cmp, req) + } + + return verifyIat(&c.IssuedAt.Time, cmp, req) +} + +// VerifyNotBefore compares the nbf claim against cmp (cmp >= nbf). +// If req is false, it will return true, if nbf is unset. +func (c *RegisteredClaims) VerifyNotBefore(cmp time.Time, req bool) bool { + if c.NotBefore == nil { + return verifyNbf(nil, cmp, req) + } + + return verifyNbf(&c.NotBefore.Time, cmp, req) +} + +// VerifyIssuer compares the iss claim against cmp. +// If required is false, this method will return true if the value matches or is unset +func (c *RegisteredClaims) VerifyIssuer(cmp string, req bool) bool { + return verifyIss(c.Issuer, cmp, req) +} + +// StandardClaims are a structured version of the JWT Claims Set, as referenced at +// https://datatracker.ietf.org/doc/html/rfc7519#section-4. They do not follow the +// specification exactly, since they were based on an earlier draft of the +// specification and not updated. The main difference is that they only +// support integer-based date fields and singular audiences. This might lead to +// incompatibilities with other JWT implementations. The use of this is discouraged, instead +// the newer RegisteredClaims struct should be used. +// +// Deprecated: Use RegisteredClaims instead for a forward-compatible way to access registered claims in a struct. +type StandardClaims struct { + Audience string `json:"aud,omitempty"` + ExpiresAt int64 `json:"exp,omitempty"` + Id string `json:"jti,omitempty"` + IssuedAt int64 `json:"iat,omitempty"` + Issuer string `json:"iss,omitempty"` + NotBefore int64 `json:"nbf,omitempty"` + Subject string `json:"sub,omitempty"` +} + +// Valid validates time based claims "exp, iat, nbf". There is no accounting for clock skew. +// As well, if any of the above claims are not in the token, it will still +// be considered a valid claim. +func (c StandardClaims) Valid() error { + vErr := new(ValidationError) + now := TimeFunc().Unix() + + // The claims below are optional, by default, so if they are set to the + // default value in Go, let's not fail the verification for them. + if !c.VerifyExpiresAt(now, false) { + delta := time.Unix(now, 0).Sub(time.Unix(c.ExpiresAt, 0)) + vErr.Inner = fmt.Errorf("%s by %s", ErrTokenExpired, delta) + vErr.Errors |= ValidationErrorExpired + } + + if !c.VerifyIssuedAt(now, false) { + vErr.Inner = ErrTokenUsedBeforeIssued + vErr.Errors |= ValidationErrorIssuedAt + } + + if !c.VerifyNotBefore(now, false) { + vErr.Inner = ErrTokenNotValidYet + vErr.Errors |= ValidationErrorNotValidYet + } + + if vErr.valid() { + return nil + } + + return vErr +} + +// VerifyAudience compares the aud claim against cmp. +// If required is false, this method will return true if the value matches or is unset +func (c *StandardClaims) VerifyAudience(cmp string, req bool) bool { + return verifyAud([]string{c.Audience}, cmp, req) +} + +// VerifyExpiresAt compares the exp claim against cmp (cmp < exp). +// If req is false, it will return true, if exp is unset. +func (c *StandardClaims) VerifyExpiresAt(cmp int64, req bool) bool { + if c.ExpiresAt == 0 { + return verifyExp(nil, time.Unix(cmp, 0), req) + } + + t := time.Unix(c.ExpiresAt, 0) + return verifyExp(&t, time.Unix(cmp, 0), req) +} + +// VerifyIssuedAt compares the iat claim against cmp (cmp >= iat). +// If req is false, it will return true, if iat is unset. +func (c *StandardClaims) VerifyIssuedAt(cmp int64, req bool) bool { + if c.IssuedAt == 0 { + return verifyIat(nil, time.Unix(cmp, 0), req) + } + + t := time.Unix(c.IssuedAt, 0) + return verifyIat(&t, time.Unix(cmp, 0), req) +} + +// VerifyNotBefore compares the nbf claim against cmp (cmp >= nbf). +// If req is false, it will return true, if nbf is unset. +func (c *StandardClaims) VerifyNotBefore(cmp int64, req bool) bool { + if c.NotBefore == 0 { + return verifyNbf(nil, time.Unix(cmp, 0), req) + } + + t := time.Unix(c.NotBefore, 0) + return verifyNbf(&t, time.Unix(cmp, 0), req) +} + +// VerifyIssuer compares the iss claim against cmp. +// If required is false, this method will return true if the value matches or is unset +func (c *StandardClaims) VerifyIssuer(cmp string, req bool) bool { + return verifyIss(c.Issuer, cmp, req) +} + +// ----- helpers + +func verifyAud(aud []string, cmp string, required bool) bool { + if len(aud) == 0 { + return !required + } + // use a var here to keep constant time compare when looping over a number of claims + result := false + + var stringClaims string + for _, a := range aud { + if subtle.ConstantTimeCompare([]byte(a), []byte(cmp)) != 0 { + result = true + } + stringClaims = stringClaims + a + } + + // case where "" is sent in one or many aud claims + if len(stringClaims) == 0 { + return !required + } + + return result +} + +func verifyExp(exp *time.Time, now time.Time, required bool) bool { + if exp == nil { + return !required + } + return now.Before(*exp) +} + +func verifyIat(iat *time.Time, now time.Time, required bool) bool { + if iat == nil { + return !required + } + return now.After(*iat) || now.Equal(*iat) +} + +func verifyNbf(nbf *time.Time, now time.Time, required bool) bool { + if nbf == nil { + return !required + } + return now.After(*nbf) || now.Equal(*nbf) +} + +func verifyIss(iss string, cmp string, required bool) bool { + if iss == "" { + return !required + } + return subtle.ConstantTimeCompare([]byte(iss), []byte(cmp)) != 0 +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/doc.go b/vendor/github.com/golang-jwt/jwt/v4/doc.go new file mode 100644 index 00000000..a86dc1a3 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/doc.go @@ -0,0 +1,4 @@ +// Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html +// +// See README.md for more info. +package jwt diff --git a/vendor/github.com/golang-jwt/jwt/v4/ecdsa.go b/vendor/github.com/golang-jwt/jwt/v4/ecdsa.go new file mode 100644 index 00000000..eac023fc --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/ecdsa.go @@ -0,0 +1,142 @@ +package jwt + +import ( + "crypto" + "crypto/ecdsa" + "crypto/rand" + "errors" + "math/big" +) + +var ( + // Sadly this is missing from crypto/ecdsa compared to crypto/rsa + ErrECDSAVerification = errors.New("crypto/ecdsa: verification error") +) + +// SigningMethodECDSA implements the ECDSA family of signing methods. +// Expects *ecdsa.PrivateKey for signing and *ecdsa.PublicKey for verification +type SigningMethodECDSA struct { + Name string + Hash crypto.Hash + KeySize int + CurveBits int +} + +// Specific instances for EC256 and company +var ( + SigningMethodES256 *SigningMethodECDSA + SigningMethodES384 *SigningMethodECDSA + SigningMethodES512 *SigningMethodECDSA +) + +func init() { + // ES256 + SigningMethodES256 = &SigningMethodECDSA{"ES256", crypto.SHA256, 32, 256} + RegisterSigningMethod(SigningMethodES256.Alg(), func() SigningMethod { + return SigningMethodES256 + }) + + // ES384 + SigningMethodES384 = &SigningMethodECDSA{"ES384", crypto.SHA384, 48, 384} + RegisterSigningMethod(SigningMethodES384.Alg(), func() SigningMethod { + return SigningMethodES384 + }) + + // ES512 + SigningMethodES512 = &SigningMethodECDSA{"ES512", crypto.SHA512, 66, 521} + RegisterSigningMethod(SigningMethodES512.Alg(), func() SigningMethod { + return SigningMethodES512 + }) +} + +func (m *SigningMethodECDSA) Alg() string { + return m.Name +} + +// Verify implements token verification for the SigningMethod. +// For this verify method, key must be an ecdsa.PublicKey struct +func (m *SigningMethodECDSA) Verify(signingString, signature string, key interface{}) error { + var err error + + // Decode the signature + var sig []byte + if sig, err = DecodeSegment(signature); err != nil { + return err + } + + // Get the key + var ecdsaKey *ecdsa.PublicKey + switch k := key.(type) { + case *ecdsa.PublicKey: + ecdsaKey = k + default: + return ErrInvalidKeyType + } + + if len(sig) != 2*m.KeySize { + return ErrECDSAVerification + } + + r := big.NewInt(0).SetBytes(sig[:m.KeySize]) + s := big.NewInt(0).SetBytes(sig[m.KeySize:]) + + // Create hasher + if !m.Hash.Available() { + return ErrHashUnavailable + } + hasher := m.Hash.New() + hasher.Write([]byte(signingString)) + + // Verify the signature + if verifystatus := ecdsa.Verify(ecdsaKey, hasher.Sum(nil), r, s); verifystatus { + return nil + } + + return ErrECDSAVerification +} + +// Sign implements token signing for the SigningMethod. +// For this signing method, key must be an ecdsa.PrivateKey struct +func (m *SigningMethodECDSA) Sign(signingString string, key interface{}) (string, error) { + // Get the key + var ecdsaKey *ecdsa.PrivateKey + switch k := key.(type) { + case *ecdsa.PrivateKey: + ecdsaKey = k + default: + return "", ErrInvalidKeyType + } + + // Create the hasher + if !m.Hash.Available() { + return "", ErrHashUnavailable + } + + hasher := m.Hash.New() + hasher.Write([]byte(signingString)) + + // Sign the string and return r, s + if r, s, err := ecdsa.Sign(rand.Reader, ecdsaKey, hasher.Sum(nil)); err == nil { + curveBits := ecdsaKey.Curve.Params().BitSize + + if m.CurveBits != curveBits { + return "", ErrInvalidKey + } + + keyBytes := curveBits / 8 + if curveBits%8 > 0 { + keyBytes += 1 + } + + // We serialize the outputs (r and s) into big-endian byte arrays + // padded with zeros on the left to make sure the sizes work out. + // Output must be 2*keyBytes long. + out := make([]byte, 2*keyBytes) + r.FillBytes(out[0:keyBytes]) // r is assigned to the first half of output. + s.FillBytes(out[keyBytes:]) // s is assigned to the second half of output. + + return EncodeSegment(out), nil + } else { + return "", err + } +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/ecdsa_utils.go b/vendor/github.com/golang-jwt/jwt/v4/ecdsa_utils.go new file mode 100644 index 00000000..5700636d --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/ecdsa_utils.go @@ -0,0 +1,69 @@ +package jwt + +import ( + "crypto/ecdsa" + "crypto/x509" + "encoding/pem" + "errors" +) + +var ( + ErrNotECPublicKey = errors.New("key is not a valid ECDSA public key") + ErrNotECPrivateKey = errors.New("key is not a valid ECDSA private key") +) + +// ParseECPrivateKeyFromPEM parses a PEM encoded Elliptic Curve Private Key Structure +func ParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error) { + var err error + + // Parse PEM block + var block *pem.Block + if block, _ = pem.Decode(key); block == nil { + return nil, ErrKeyMustBePEMEncoded + } + + // Parse the key + var parsedKey interface{} + if parsedKey, err = x509.ParseECPrivateKey(block.Bytes); err != nil { + if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil { + return nil, err + } + } + + var pkey *ecdsa.PrivateKey + var ok bool + if pkey, ok = parsedKey.(*ecdsa.PrivateKey); !ok { + return nil, ErrNotECPrivateKey + } + + return pkey, nil +} + +// ParseECPublicKeyFromPEM parses a PEM encoded PKCS1 or PKCS8 public key +func ParseECPublicKeyFromPEM(key []byte) (*ecdsa.PublicKey, error) { + var err error + + // Parse PEM block + var block *pem.Block + if block, _ = pem.Decode(key); block == nil { + return nil, ErrKeyMustBePEMEncoded + } + + // Parse the key + var parsedKey interface{} + if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil { + if cert, err := x509.ParseCertificate(block.Bytes); err == nil { + parsedKey = cert.PublicKey + } else { + return nil, err + } + } + + var pkey *ecdsa.PublicKey + var ok bool + if pkey, ok = parsedKey.(*ecdsa.PublicKey); !ok { + return nil, ErrNotECPublicKey + } + + return pkey, nil +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/ed25519.go b/vendor/github.com/golang-jwt/jwt/v4/ed25519.go new file mode 100644 index 00000000..07d3aacd --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/ed25519.go @@ -0,0 +1,85 @@ +package jwt + +import ( + "errors" + + "crypto" + "crypto/ed25519" + "crypto/rand" +) + +var ( + ErrEd25519Verification = errors.New("ed25519: verification error") +) + +// SigningMethodEd25519 implements the EdDSA family. +// Expects ed25519.PrivateKey for signing and ed25519.PublicKey for verification +type SigningMethodEd25519 struct{} + +// Specific instance for EdDSA +var ( + SigningMethodEdDSA *SigningMethodEd25519 +) + +func init() { + SigningMethodEdDSA = &SigningMethodEd25519{} + RegisterSigningMethod(SigningMethodEdDSA.Alg(), func() SigningMethod { + return SigningMethodEdDSA + }) +} + +func (m *SigningMethodEd25519) Alg() string { + return "EdDSA" +} + +// Verify implements token verification for the SigningMethod. +// For this verify method, key must be an ed25519.PublicKey +func (m *SigningMethodEd25519) Verify(signingString, signature string, key interface{}) error { + var err error + var ed25519Key ed25519.PublicKey + var ok bool + + if ed25519Key, ok = key.(ed25519.PublicKey); !ok { + return ErrInvalidKeyType + } + + if len(ed25519Key) != ed25519.PublicKeySize { + return ErrInvalidKey + } + + // Decode the signature + var sig []byte + if sig, err = DecodeSegment(signature); err != nil { + return err + } + + // Verify the signature + if !ed25519.Verify(ed25519Key, []byte(signingString), sig) { + return ErrEd25519Verification + } + + return nil +} + +// Sign implements token signing for the SigningMethod. +// For this signing method, key must be an ed25519.PrivateKey +func (m *SigningMethodEd25519) Sign(signingString string, key interface{}) (string, error) { + var ed25519Key crypto.Signer + var ok bool + + if ed25519Key, ok = key.(crypto.Signer); !ok { + return "", ErrInvalidKeyType + } + + if _, ok := ed25519Key.Public().(ed25519.PublicKey); !ok { + return "", ErrInvalidKey + } + + // Sign the string and return the encoded result + // ed25519 performs a two-pass hash as part of its algorithm. Therefore, we need to pass a non-prehashed message into the Sign function, as indicated by crypto.Hash(0) + sig, err := ed25519Key.Sign(rand.Reader, []byte(signingString), crypto.Hash(0)) + if err != nil { + return "", err + } + return EncodeSegment(sig), nil +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/ed25519_utils.go b/vendor/github.com/golang-jwt/jwt/v4/ed25519_utils.go new file mode 100644 index 00000000..cdb5e68e --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/ed25519_utils.go @@ -0,0 +1,64 @@ +package jwt + +import ( + "crypto" + "crypto/ed25519" + "crypto/x509" + "encoding/pem" + "errors" +) + +var ( + ErrNotEdPrivateKey = errors.New("key is not a valid Ed25519 private key") + ErrNotEdPublicKey = errors.New("key is not a valid Ed25519 public key") +) + +// ParseEdPrivateKeyFromPEM parses a PEM-encoded Edwards curve private key +func ParseEdPrivateKeyFromPEM(key []byte) (crypto.PrivateKey, error) { + var err error + + // Parse PEM block + var block *pem.Block + if block, _ = pem.Decode(key); block == nil { + return nil, ErrKeyMustBePEMEncoded + } + + // Parse the key + var parsedKey interface{} + if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil { + return nil, err + } + + var pkey ed25519.PrivateKey + var ok bool + if pkey, ok = parsedKey.(ed25519.PrivateKey); !ok { + return nil, ErrNotEdPrivateKey + } + + return pkey, nil +} + +// ParseEdPublicKeyFromPEM parses a PEM-encoded Edwards curve public key +func ParseEdPublicKeyFromPEM(key []byte) (crypto.PublicKey, error) { + var err error + + // Parse PEM block + var block *pem.Block + if block, _ = pem.Decode(key); block == nil { + return nil, ErrKeyMustBePEMEncoded + } + + // Parse the key + var parsedKey interface{} + if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil { + return nil, err + } + + var pkey ed25519.PublicKey + var ok bool + if pkey, ok = parsedKey.(ed25519.PublicKey); !ok { + return nil, ErrNotEdPublicKey + } + + return pkey, nil +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/errors.go b/vendor/github.com/golang-jwt/jwt/v4/errors.go new file mode 100644 index 00000000..10ac8835 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/errors.go @@ -0,0 +1,112 @@ +package jwt + +import ( + "errors" +) + +// Error constants +var ( + ErrInvalidKey = errors.New("key is invalid") + ErrInvalidKeyType = errors.New("key is of invalid type") + ErrHashUnavailable = errors.New("the requested hash function is unavailable") + + ErrTokenMalformed = errors.New("token is malformed") + ErrTokenUnverifiable = errors.New("token is unverifiable") + ErrTokenSignatureInvalid = errors.New("token signature is invalid") + + ErrTokenInvalidAudience = errors.New("token has invalid audience") + ErrTokenExpired = errors.New("token is expired") + ErrTokenUsedBeforeIssued = errors.New("token used before issued") + ErrTokenInvalidIssuer = errors.New("token has invalid issuer") + ErrTokenNotValidYet = errors.New("token is not valid yet") + ErrTokenInvalidId = errors.New("token has invalid id") + ErrTokenInvalidClaims = errors.New("token has invalid claims") +) + +// The errors that might occur when parsing and validating a token +const ( + ValidationErrorMalformed uint32 = 1 << iota // Token is malformed + ValidationErrorUnverifiable // Token could not be verified because of signing problems + ValidationErrorSignatureInvalid // Signature validation failed + + // Standard Claim validation errors + ValidationErrorAudience // AUD validation failed + ValidationErrorExpired // EXP validation failed + ValidationErrorIssuedAt // IAT validation failed + ValidationErrorIssuer // ISS validation failed + ValidationErrorNotValidYet // NBF validation failed + ValidationErrorId // JTI validation failed + ValidationErrorClaimsInvalid // Generic claims validation error +) + +// NewValidationError is a helper for constructing a ValidationError with a string error message +func NewValidationError(errorText string, errorFlags uint32) *ValidationError { + return &ValidationError{ + text: errorText, + Errors: errorFlags, + } +} + +// ValidationError represents an error from Parse if token is not valid +type ValidationError struct { + Inner error // stores the error returned by external dependencies, i.e.: KeyFunc + Errors uint32 // bitfield. see ValidationError... constants + text string // errors that do not have a valid error just have text +} + +// Error is the implementation of the err interface. +func (e ValidationError) Error() string { + if e.Inner != nil { + return e.Inner.Error() + } else if e.text != "" { + return e.text + } else { + return "token is invalid" + } +} + +// Unwrap gives errors.Is and errors.As access to the inner error. +func (e *ValidationError) Unwrap() error { + return e.Inner +} + +// No errors +func (e *ValidationError) valid() bool { + return e.Errors == 0 +} + +// Is checks if this ValidationError is of the supplied error. We are first checking for the exact error message +// by comparing the inner error message. If that fails, we compare using the error flags. This way we can use +// custom error messages (mainly for backwards compatability) and still leverage errors.Is using the global error variables. +func (e *ValidationError) Is(err error) bool { + // Check, if our inner error is a direct match + if errors.Is(errors.Unwrap(e), err) { + return true + } + + // Otherwise, we need to match using our error flags + switch err { + case ErrTokenMalformed: + return e.Errors&ValidationErrorMalformed != 0 + case ErrTokenUnverifiable: + return e.Errors&ValidationErrorUnverifiable != 0 + case ErrTokenSignatureInvalid: + return e.Errors&ValidationErrorSignatureInvalid != 0 + case ErrTokenInvalidAudience: + return e.Errors&ValidationErrorAudience != 0 + case ErrTokenExpired: + return e.Errors&ValidationErrorExpired != 0 + case ErrTokenUsedBeforeIssued: + return e.Errors&ValidationErrorIssuedAt != 0 + case ErrTokenInvalidIssuer: + return e.Errors&ValidationErrorIssuer != 0 + case ErrTokenNotValidYet: + return e.Errors&ValidationErrorNotValidYet != 0 + case ErrTokenInvalidId: + return e.Errors&ValidationErrorId != 0 + case ErrTokenInvalidClaims: + return e.Errors&ValidationErrorClaimsInvalid != 0 + } + + return false +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/hmac.go b/vendor/github.com/golang-jwt/jwt/v4/hmac.go new file mode 100644 index 00000000..011f68a2 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/hmac.go @@ -0,0 +1,95 @@ +package jwt + +import ( + "crypto" + "crypto/hmac" + "errors" +) + +// SigningMethodHMAC implements the HMAC-SHA family of signing methods. +// Expects key type of []byte for both signing and validation +type SigningMethodHMAC struct { + Name string + Hash crypto.Hash +} + +// Specific instances for HS256 and company +var ( + SigningMethodHS256 *SigningMethodHMAC + SigningMethodHS384 *SigningMethodHMAC + SigningMethodHS512 *SigningMethodHMAC + ErrSignatureInvalid = errors.New("signature is invalid") +) + +func init() { + // HS256 + SigningMethodHS256 = &SigningMethodHMAC{"HS256", crypto.SHA256} + RegisterSigningMethod(SigningMethodHS256.Alg(), func() SigningMethod { + return SigningMethodHS256 + }) + + // HS384 + SigningMethodHS384 = &SigningMethodHMAC{"HS384", crypto.SHA384} + RegisterSigningMethod(SigningMethodHS384.Alg(), func() SigningMethod { + return SigningMethodHS384 + }) + + // HS512 + SigningMethodHS512 = &SigningMethodHMAC{"HS512", crypto.SHA512} + RegisterSigningMethod(SigningMethodHS512.Alg(), func() SigningMethod { + return SigningMethodHS512 + }) +} + +func (m *SigningMethodHMAC) Alg() string { + return m.Name +} + +// Verify implements token verification for the SigningMethod. Returns nil if the signature is valid. +func (m *SigningMethodHMAC) Verify(signingString, signature string, key interface{}) error { + // Verify the key is the right type + keyBytes, ok := key.([]byte) + if !ok { + return ErrInvalidKeyType + } + + // Decode signature, for comparison + sig, err := DecodeSegment(signature) + if err != nil { + return err + } + + // Can we use the specified hashing method? + if !m.Hash.Available() { + return ErrHashUnavailable + } + + // This signing method is symmetric, so we validate the signature + // by reproducing the signature from the signing string and key, then + // comparing that against the provided signature. + hasher := hmac.New(m.Hash.New, keyBytes) + hasher.Write([]byte(signingString)) + if !hmac.Equal(sig, hasher.Sum(nil)) { + return ErrSignatureInvalid + } + + // No validation errors. Signature is good. + return nil +} + +// Sign implements token signing for the SigningMethod. +// Key must be []byte +func (m *SigningMethodHMAC) Sign(signingString string, key interface{}) (string, error) { + if keyBytes, ok := key.([]byte); ok { + if !m.Hash.Available() { + return "", ErrHashUnavailable + } + + hasher := hmac.New(m.Hash.New, keyBytes) + hasher.Write([]byte(signingString)) + + return EncodeSegment(hasher.Sum(nil)), nil + } + + return "", ErrInvalidKeyType +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/map_claims.go b/vendor/github.com/golang-jwt/jwt/v4/map_claims.go new file mode 100644 index 00000000..2700d64a --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/map_claims.go @@ -0,0 +1,151 @@ +package jwt + +import ( + "encoding/json" + "errors" + "time" + // "fmt" +) + +// MapClaims is a claims type that uses the map[string]interface{} for JSON decoding. +// This is the default claims type if you don't supply one +type MapClaims map[string]interface{} + +// VerifyAudience Compares the aud claim against cmp. +// If required is false, this method will return true if the value matches or is unset +func (m MapClaims) VerifyAudience(cmp string, req bool) bool { + var aud []string + switch v := m["aud"].(type) { + case string: + aud = append(aud, v) + case []string: + aud = v + case []interface{}: + for _, a := range v { + vs, ok := a.(string) + if !ok { + return false + } + aud = append(aud, vs) + } + } + return verifyAud(aud, cmp, req) +} + +// VerifyExpiresAt compares the exp claim against cmp (cmp <= exp). +// If req is false, it will return true, if exp is unset. +func (m MapClaims) VerifyExpiresAt(cmp int64, req bool) bool { + cmpTime := time.Unix(cmp, 0) + + v, ok := m["exp"] + if !ok { + return !req + } + + switch exp := v.(type) { + case float64: + if exp == 0 { + return verifyExp(nil, cmpTime, req) + } + + return verifyExp(&newNumericDateFromSeconds(exp).Time, cmpTime, req) + case json.Number: + v, _ := exp.Float64() + + return verifyExp(&newNumericDateFromSeconds(v).Time, cmpTime, req) + } + + return false +} + +// VerifyIssuedAt compares the exp claim against cmp (cmp >= iat). +// If req is false, it will return true, if iat is unset. +func (m MapClaims) VerifyIssuedAt(cmp int64, req bool) bool { + cmpTime := time.Unix(cmp, 0) + + v, ok := m["iat"] + if !ok { + return !req + } + + switch iat := v.(type) { + case float64: + if iat == 0 { + return verifyIat(nil, cmpTime, req) + } + + return verifyIat(&newNumericDateFromSeconds(iat).Time, cmpTime, req) + case json.Number: + v, _ := iat.Float64() + + return verifyIat(&newNumericDateFromSeconds(v).Time, cmpTime, req) + } + + return false +} + +// VerifyNotBefore compares the nbf claim against cmp (cmp >= nbf). +// If req is false, it will return true, if nbf is unset. +func (m MapClaims) VerifyNotBefore(cmp int64, req bool) bool { + cmpTime := time.Unix(cmp, 0) + + v, ok := m["nbf"] + if !ok { + return !req + } + + switch nbf := v.(type) { + case float64: + if nbf == 0 { + return verifyNbf(nil, cmpTime, req) + } + + return verifyNbf(&newNumericDateFromSeconds(nbf).Time, cmpTime, req) + case json.Number: + v, _ := nbf.Float64() + + return verifyNbf(&newNumericDateFromSeconds(v).Time, cmpTime, req) + } + + return false +} + +// VerifyIssuer compares the iss claim against cmp. +// If required is false, this method will return true if the value matches or is unset +func (m MapClaims) VerifyIssuer(cmp string, req bool) bool { + iss, _ := m["iss"].(string) + return verifyIss(iss, cmp, req) +} + +// Valid validates time based claims "exp, iat, nbf". +// There is no accounting for clock skew. +// As well, if any of the above claims are not in the token, it will still +// be considered a valid claim. +func (m MapClaims) Valid() error { + vErr := new(ValidationError) + now := TimeFunc().Unix() + + if !m.VerifyExpiresAt(now, false) { + // TODO(oxisto): this should be replaced with ErrTokenExpired + vErr.Inner = errors.New("Token is expired") + vErr.Errors |= ValidationErrorExpired + } + + if !m.VerifyIssuedAt(now, false) { + // TODO(oxisto): this should be replaced with ErrTokenUsedBeforeIssued + vErr.Inner = errors.New("Token used before issued") + vErr.Errors |= ValidationErrorIssuedAt + } + + if !m.VerifyNotBefore(now, false) { + // TODO(oxisto): this should be replaced with ErrTokenNotValidYet + vErr.Inner = errors.New("Token is not valid yet") + vErr.Errors |= ValidationErrorNotValidYet + } + + if vErr.valid() { + return nil + } + + return vErr +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/none.go b/vendor/github.com/golang-jwt/jwt/v4/none.go new file mode 100644 index 00000000..f19835d2 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/none.go @@ -0,0 +1,52 @@ +package jwt + +// SigningMethodNone implements the none signing method. This is required by the spec +// but you probably should never use it. +var SigningMethodNone *signingMethodNone + +const UnsafeAllowNoneSignatureType unsafeNoneMagicConstant = "none signing method allowed" + +var NoneSignatureTypeDisallowedError error + +type signingMethodNone struct{} +type unsafeNoneMagicConstant string + +func init() { + SigningMethodNone = &signingMethodNone{} + NoneSignatureTypeDisallowedError = NewValidationError("'none' signature type is not allowed", ValidationErrorSignatureInvalid) + + RegisterSigningMethod(SigningMethodNone.Alg(), func() SigningMethod { + return SigningMethodNone + }) +} + +func (m *signingMethodNone) Alg() string { + return "none" +} + +// Only allow 'none' alg type if UnsafeAllowNoneSignatureType is specified as the key +func (m *signingMethodNone) Verify(signingString, signature string, key interface{}) (err error) { + // Key must be UnsafeAllowNoneSignatureType to prevent accidentally + // accepting 'none' signing method + if _, ok := key.(unsafeNoneMagicConstant); !ok { + return NoneSignatureTypeDisallowedError + } + // If signing method is none, signature must be an empty string + if signature != "" { + return NewValidationError( + "'none' signing method with non-empty signature", + ValidationErrorSignatureInvalid, + ) + } + + // Accept 'none' signing method. + return nil +} + +// Only allow 'none' signing if UnsafeAllowNoneSignatureType is specified as the key +func (m *signingMethodNone) Sign(signingString string, key interface{}) (string, error) { + if _, ok := key.(unsafeNoneMagicConstant); ok { + return "", nil + } + return "", NoneSignatureTypeDisallowedError +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/parser.go b/vendor/github.com/golang-jwt/jwt/v4/parser.go new file mode 100644 index 00000000..0fc510a0 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/parser.go @@ -0,0 +1,206 @@ +package jwt + +import ( + "bytes" + "encoding/json" + "fmt" + "strings" +) + +const tokenDelimiter = "." + +type Parser struct { + // If populated, only these methods will be considered valid. + // + // Deprecated: In future releases, this field will not be exported anymore and should be set with an option to NewParser instead. + ValidMethods []string + + // Use JSON Number format in JSON decoder. + // + // Deprecated: In future releases, this field will not be exported anymore and should be set with an option to NewParser instead. + UseJSONNumber bool + + // Skip claims validation during token parsing. + // + // Deprecated: In future releases, this field will not be exported anymore and should be set with an option to NewParser instead. + SkipClaimsValidation bool +} + +// NewParser creates a new Parser with the specified options +func NewParser(options ...ParserOption) *Parser { + p := &Parser{} + + // loop through our parsing options and apply them + for _, option := range options { + option(p) + } + + return p +} + +// Parse parses, validates, verifies the signature and returns the parsed token. keyFunc will +// receive the parsed token and should return the key for validating. +func (p *Parser) Parse(tokenString string, keyFunc Keyfunc) (*Token, error) { + return p.ParseWithClaims(tokenString, MapClaims{}, keyFunc) +} + +// ParseWithClaims parses, validates, and verifies like Parse, but supplies a default object +// implementing the Claims interface. This provides default values which can be overridden and +// allows a caller to use their own type, rather than the default MapClaims implementation of +// Claims. +// +// Note: If you provide a custom claim implementation that embeds one of the standard claims (such +// as RegisteredClaims), make sure that a) you either embed a non-pointer version of the claims or +// b) if you are using a pointer, allocate the proper memory for it before passing in the overall +// claims, otherwise you might run into a panic. +func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc) (*Token, error) { + token, parts, err := p.ParseUnverified(tokenString, claims) + if err != nil { + return token, err + } + + // Verify signing method is in the required set + if p.ValidMethods != nil { + var signingMethodValid = false + var alg = token.Method.Alg() + for _, m := range p.ValidMethods { + if m == alg { + signingMethodValid = true + break + } + } + if !signingMethodValid { + // signing method is not in the listed set + return token, NewValidationError(fmt.Sprintf("signing method %v is invalid", alg), ValidationErrorSignatureInvalid) + } + } + + // Lookup key + var key interface{} + if keyFunc == nil { + // keyFunc was not provided. short circuiting validation + return token, NewValidationError("no Keyfunc was provided.", ValidationErrorUnverifiable) + } + if key, err = keyFunc(token); err != nil { + // keyFunc returned an error + if ve, ok := err.(*ValidationError); ok { + return token, ve + } + return token, &ValidationError{Inner: err, Errors: ValidationErrorUnverifiable} + } + + // Perform validation + token.Signature = parts[2] + if err := token.Method.Verify(strings.Join(parts[0:2], "."), token.Signature, key); err != nil { + return token, &ValidationError{Inner: err, Errors: ValidationErrorSignatureInvalid} + } + + vErr := &ValidationError{} + + // Validate Claims + if !p.SkipClaimsValidation { + if err := token.Claims.Valid(); err != nil { + // If the Claims Valid returned an error, check if it is a validation error, + // If it was another error type, create a ValidationError with a generic ClaimsInvalid flag set + if e, ok := err.(*ValidationError); !ok { + vErr = &ValidationError{Inner: err, Errors: ValidationErrorClaimsInvalid} + } else { + vErr = e + } + return token, vErr + } + } + + // No errors so far, token is valid. + token.Valid = true + + return token, nil +} + +// ParseUnverified parses the token but doesn't validate the signature. +// +// WARNING: Don't use this method unless you know what you're doing. +// +// It's only ever useful in cases where you know the signature is valid (because it has +// been checked previously in the stack) and you want to extract values from it. +func (p *Parser) ParseUnverified(tokenString string, claims Claims) (token *Token, parts []string, err error) { + var ok bool + parts, ok = splitToken(tokenString) + if !ok { + return nil, nil, NewValidationError("token contains an invalid number of segments", ValidationErrorMalformed) + } + + token = &Token{Raw: tokenString} + + // parse Header + var headerBytes []byte + if headerBytes, err = DecodeSegment(parts[0]); err != nil { + if strings.HasPrefix(strings.ToLower(tokenString), "bearer ") { + return token, parts, NewValidationError("tokenstring should not contain 'bearer '", ValidationErrorMalformed) + } + return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} + } + if err = json.Unmarshal(headerBytes, &token.Header); err != nil { + return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} + } + + // parse Claims + var claimBytes []byte + token.Claims = claims + + if claimBytes, err = DecodeSegment(parts[1]); err != nil { + return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} + } + dec := json.NewDecoder(bytes.NewBuffer(claimBytes)) + if p.UseJSONNumber { + dec.UseNumber() + } + // JSON Decode. Special case for map type to avoid weird pointer behavior + if c, ok := token.Claims.(MapClaims); ok { + err = dec.Decode(&c) + } else { + err = dec.Decode(&claims) + } + // Handle decode error + if err != nil { + return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} + } + + // Lookup signature method + if method, ok := token.Header["alg"].(string); ok { + if token.Method = GetSigningMethod(method); token.Method == nil { + return token, parts, NewValidationError("signing method (alg) is unavailable.", ValidationErrorUnverifiable) + } + } else { + return token, parts, NewValidationError("signing method (alg) is unspecified.", ValidationErrorUnverifiable) + } + + return token, parts, nil +} + +// splitToken splits a token string into three parts: header, claims, and signature. It will only +// return true if the token contains exactly two delimiters and three parts. In all other cases, it +// will return nil parts and false. +func splitToken(token string) ([]string, bool) { + parts := make([]string, 3) + header, remain, ok := strings.Cut(token, tokenDelimiter) + if !ok { + return nil, false + } + parts[0] = header + claims, remain, ok := strings.Cut(remain, tokenDelimiter) + if !ok { + return nil, false + } + parts[1] = claims + // One more cut to ensure the signature is the last part of the token and there are no more + // delimiters. This avoids an issue where malicious input could contain additional delimiters + // causing unecessary overhead parsing tokens. + signature, _, unexpected := strings.Cut(remain, tokenDelimiter) + if unexpected { + return nil, false + } + parts[2] = signature + + return parts, true +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/parser_option.go b/vendor/github.com/golang-jwt/jwt/v4/parser_option.go new file mode 100644 index 00000000..6ea6f952 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/parser_option.go @@ -0,0 +1,29 @@ +package jwt + +// ParserOption is used to implement functional-style options that modify the behavior of the parser. To add +// new options, just create a function (ideally beginning with With or Without) that returns an anonymous function that +// takes a *Parser type as input and manipulates its configuration accordingly. +type ParserOption func(*Parser) + +// WithValidMethods is an option to supply algorithm methods that the parser will check. Only those methods will be considered valid. +// It is heavily encouraged to use this option in order to prevent attacks such as https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/. +func WithValidMethods(methods []string) ParserOption { + return func(p *Parser) { + p.ValidMethods = methods + } +} + +// WithJSONNumber is an option to configure the underlying JSON parser with UseNumber +func WithJSONNumber() ParserOption { + return func(p *Parser) { + p.UseJSONNumber = true + } +} + +// WithoutClaimsValidation is an option to disable claims validation. This option should only be used if you exactly know +// what you are doing. +func WithoutClaimsValidation() ParserOption { + return func(p *Parser) { + p.SkipClaimsValidation = true + } +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/rsa.go b/vendor/github.com/golang-jwt/jwt/v4/rsa.go new file mode 100644 index 00000000..b910b19c --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/rsa.go @@ -0,0 +1,101 @@ +package jwt + +import ( + "crypto" + "crypto/rand" + "crypto/rsa" +) + +// SigningMethodRSA implements the RSA family of signing methods. +// Expects *rsa.PrivateKey for signing and *rsa.PublicKey for validation +type SigningMethodRSA struct { + Name string + Hash crypto.Hash +} + +// Specific instances for RS256 and company +var ( + SigningMethodRS256 *SigningMethodRSA + SigningMethodRS384 *SigningMethodRSA + SigningMethodRS512 *SigningMethodRSA +) + +func init() { + // RS256 + SigningMethodRS256 = &SigningMethodRSA{"RS256", crypto.SHA256} + RegisterSigningMethod(SigningMethodRS256.Alg(), func() SigningMethod { + return SigningMethodRS256 + }) + + // RS384 + SigningMethodRS384 = &SigningMethodRSA{"RS384", crypto.SHA384} + RegisterSigningMethod(SigningMethodRS384.Alg(), func() SigningMethod { + return SigningMethodRS384 + }) + + // RS512 + SigningMethodRS512 = &SigningMethodRSA{"RS512", crypto.SHA512} + RegisterSigningMethod(SigningMethodRS512.Alg(), func() SigningMethod { + return SigningMethodRS512 + }) +} + +func (m *SigningMethodRSA) Alg() string { + return m.Name +} + +// Verify implements token verification for the SigningMethod +// For this signing method, must be an *rsa.PublicKey structure. +func (m *SigningMethodRSA) Verify(signingString, signature string, key interface{}) error { + var err error + + // Decode the signature + var sig []byte + if sig, err = DecodeSegment(signature); err != nil { + return err + } + + var rsaKey *rsa.PublicKey + var ok bool + + if rsaKey, ok = key.(*rsa.PublicKey); !ok { + return ErrInvalidKeyType + } + + // Create hasher + if !m.Hash.Available() { + return ErrHashUnavailable + } + hasher := m.Hash.New() + hasher.Write([]byte(signingString)) + + // Verify the signature + return rsa.VerifyPKCS1v15(rsaKey, m.Hash, hasher.Sum(nil), sig) +} + +// Sign implements token signing for the SigningMethod +// For this signing method, must be an *rsa.PrivateKey structure. +func (m *SigningMethodRSA) Sign(signingString string, key interface{}) (string, error) { + var rsaKey *rsa.PrivateKey + var ok bool + + // Validate type of key + if rsaKey, ok = key.(*rsa.PrivateKey); !ok { + return "", ErrInvalidKey + } + + // Create the hasher + if !m.Hash.Available() { + return "", ErrHashUnavailable + } + + hasher := m.Hash.New() + hasher.Write([]byte(signingString)) + + // Sign the string and return the encoded bytes + if sigBytes, err := rsa.SignPKCS1v15(rand.Reader, rsaKey, m.Hash, hasher.Sum(nil)); err == nil { + return EncodeSegment(sigBytes), nil + } else { + return "", err + } +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/rsa_pss.go b/vendor/github.com/golang-jwt/jwt/v4/rsa_pss.go new file mode 100644 index 00000000..4fd6f9e6 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/rsa_pss.go @@ -0,0 +1,143 @@ +//go:build go1.4 +// +build go1.4 + +package jwt + +import ( + "crypto" + "crypto/rand" + "crypto/rsa" +) + +// SigningMethodRSAPSS implements the RSAPSS family of signing methods signing methods +type SigningMethodRSAPSS struct { + *SigningMethodRSA + Options *rsa.PSSOptions + // VerifyOptions is optional. If set overrides Options for rsa.VerifyPPS. + // Used to accept tokens signed with rsa.PSSSaltLengthAuto, what doesn't follow + // https://tools.ietf.org/html/rfc7518#section-3.5 but was used previously. + // See https://github.com/dgrijalva/jwt-go/issues/285#issuecomment-437451244 for details. + VerifyOptions *rsa.PSSOptions +} + +// Specific instances for RS/PS and company. +var ( + SigningMethodPS256 *SigningMethodRSAPSS + SigningMethodPS384 *SigningMethodRSAPSS + SigningMethodPS512 *SigningMethodRSAPSS +) + +func init() { + // PS256 + SigningMethodPS256 = &SigningMethodRSAPSS{ + SigningMethodRSA: &SigningMethodRSA{ + Name: "PS256", + Hash: crypto.SHA256, + }, + Options: &rsa.PSSOptions{ + SaltLength: rsa.PSSSaltLengthEqualsHash, + }, + VerifyOptions: &rsa.PSSOptions{ + SaltLength: rsa.PSSSaltLengthAuto, + }, + } + RegisterSigningMethod(SigningMethodPS256.Alg(), func() SigningMethod { + return SigningMethodPS256 + }) + + // PS384 + SigningMethodPS384 = &SigningMethodRSAPSS{ + SigningMethodRSA: &SigningMethodRSA{ + Name: "PS384", + Hash: crypto.SHA384, + }, + Options: &rsa.PSSOptions{ + SaltLength: rsa.PSSSaltLengthEqualsHash, + }, + VerifyOptions: &rsa.PSSOptions{ + SaltLength: rsa.PSSSaltLengthAuto, + }, + } + RegisterSigningMethod(SigningMethodPS384.Alg(), func() SigningMethod { + return SigningMethodPS384 + }) + + // PS512 + SigningMethodPS512 = &SigningMethodRSAPSS{ + SigningMethodRSA: &SigningMethodRSA{ + Name: "PS512", + Hash: crypto.SHA512, + }, + Options: &rsa.PSSOptions{ + SaltLength: rsa.PSSSaltLengthEqualsHash, + }, + VerifyOptions: &rsa.PSSOptions{ + SaltLength: rsa.PSSSaltLengthAuto, + }, + } + RegisterSigningMethod(SigningMethodPS512.Alg(), func() SigningMethod { + return SigningMethodPS512 + }) +} + +// Verify implements token verification for the SigningMethod. +// For this verify method, key must be an rsa.PublicKey struct +func (m *SigningMethodRSAPSS) Verify(signingString, signature string, key interface{}) error { + var err error + + // Decode the signature + var sig []byte + if sig, err = DecodeSegment(signature); err != nil { + return err + } + + var rsaKey *rsa.PublicKey + switch k := key.(type) { + case *rsa.PublicKey: + rsaKey = k + default: + return ErrInvalidKey + } + + // Create hasher + if !m.Hash.Available() { + return ErrHashUnavailable + } + hasher := m.Hash.New() + hasher.Write([]byte(signingString)) + + opts := m.Options + if m.VerifyOptions != nil { + opts = m.VerifyOptions + } + + return rsa.VerifyPSS(rsaKey, m.Hash, hasher.Sum(nil), sig, opts) +} + +// Sign implements token signing for the SigningMethod. +// For this signing method, key must be an rsa.PrivateKey struct +func (m *SigningMethodRSAPSS) Sign(signingString string, key interface{}) (string, error) { + var rsaKey *rsa.PrivateKey + + switch k := key.(type) { + case *rsa.PrivateKey: + rsaKey = k + default: + return "", ErrInvalidKeyType + } + + // Create the hasher + if !m.Hash.Available() { + return "", ErrHashUnavailable + } + + hasher := m.Hash.New() + hasher.Write([]byte(signingString)) + + // Sign the string and return the encoded bytes + if sigBytes, err := rsa.SignPSS(rand.Reader, rsaKey, m.Hash, hasher.Sum(nil), m.Options); err == nil { + return EncodeSegment(sigBytes), nil + } else { + return "", err + } +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/rsa_utils.go b/vendor/github.com/golang-jwt/jwt/v4/rsa_utils.go new file mode 100644 index 00000000..1966c450 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/rsa_utils.go @@ -0,0 +1,105 @@ +package jwt + +import ( + "crypto/rsa" + "crypto/x509" + "encoding/pem" + "errors" +) + +var ( + ErrKeyMustBePEMEncoded = errors.New("invalid key: Key must be a PEM encoded PKCS1 or PKCS8 key") + ErrNotRSAPrivateKey = errors.New("key is not a valid RSA private key") + ErrNotRSAPublicKey = errors.New("key is not a valid RSA public key") +) + +// ParseRSAPrivateKeyFromPEM parses a PEM encoded PKCS1 or PKCS8 private key +func ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error) { + var err error + + // Parse PEM block + var block *pem.Block + if block, _ = pem.Decode(key); block == nil { + return nil, ErrKeyMustBePEMEncoded + } + + var parsedKey interface{} + if parsedKey, err = x509.ParsePKCS1PrivateKey(block.Bytes); err != nil { + if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil { + return nil, err + } + } + + var pkey *rsa.PrivateKey + var ok bool + if pkey, ok = parsedKey.(*rsa.PrivateKey); !ok { + return nil, ErrNotRSAPrivateKey + } + + return pkey, nil +} + +// ParseRSAPrivateKeyFromPEMWithPassword parses a PEM encoded PKCS1 or PKCS8 private key protected with password +// +// Deprecated: This function is deprecated and should not be used anymore. It uses the deprecated x509.DecryptPEMBlock +// function, which was deprecated since RFC 1423 is regarded insecure by design. Unfortunately, there is no alternative +// in the Go standard library for now. See https://github.com/golang/go/issues/8860. +func ParseRSAPrivateKeyFromPEMWithPassword(key []byte, password string) (*rsa.PrivateKey, error) { + var err error + + // Parse PEM block + var block *pem.Block + if block, _ = pem.Decode(key); block == nil { + return nil, ErrKeyMustBePEMEncoded + } + + var parsedKey interface{} + + var blockDecrypted []byte + if blockDecrypted, err = x509.DecryptPEMBlock(block, []byte(password)); err != nil { + return nil, err + } + + if parsedKey, err = x509.ParsePKCS1PrivateKey(blockDecrypted); err != nil { + if parsedKey, err = x509.ParsePKCS8PrivateKey(blockDecrypted); err != nil { + return nil, err + } + } + + var pkey *rsa.PrivateKey + var ok bool + if pkey, ok = parsedKey.(*rsa.PrivateKey); !ok { + return nil, ErrNotRSAPrivateKey + } + + return pkey, nil +} + +// ParseRSAPublicKeyFromPEM parses a PEM encoded PKCS1 or PKCS8 public key +func ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error) { + var err error + + // Parse PEM block + var block *pem.Block + if block, _ = pem.Decode(key); block == nil { + return nil, ErrKeyMustBePEMEncoded + } + + // Parse the key + var parsedKey interface{} + if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil { + if cert, err := x509.ParseCertificate(block.Bytes); err == nil { + parsedKey = cert.PublicKey + } else { + return nil, err + } + } + + var pkey *rsa.PublicKey + var ok bool + if pkey, ok = parsedKey.(*rsa.PublicKey); !ok { + return nil, ErrNotRSAPublicKey + } + + return pkey, nil +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/signing_method.go b/vendor/github.com/golang-jwt/jwt/v4/signing_method.go new file mode 100644 index 00000000..241ae9c6 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/signing_method.go @@ -0,0 +1,46 @@ +package jwt + +import ( + "sync" +) + +var signingMethods = map[string]func() SigningMethod{} +var signingMethodLock = new(sync.RWMutex) + +// SigningMethod can be used add new methods for signing or verifying tokens. +type SigningMethod interface { + Verify(signingString, signature string, key interface{}) error // Returns nil if signature is valid + Sign(signingString string, key interface{}) (string, error) // Returns encoded signature or error + Alg() string // returns the alg identifier for this method (example: 'HS256') +} + +// RegisterSigningMethod registers the "alg" name and a factory function for signing method. +// This is typically done during init() in the method's implementation +func RegisterSigningMethod(alg string, f func() SigningMethod) { + signingMethodLock.Lock() + defer signingMethodLock.Unlock() + + signingMethods[alg] = f +} + +// GetSigningMethod retrieves a signing method from an "alg" string +func GetSigningMethod(alg string) (method SigningMethod) { + signingMethodLock.RLock() + defer signingMethodLock.RUnlock() + + if methodF, ok := signingMethods[alg]; ok { + method = methodF() + } + return +} + +// GetAlgorithms returns a list of registered "alg" names +func GetAlgorithms() (algs []string) { + signingMethodLock.RLock() + defer signingMethodLock.RUnlock() + + for alg := range signingMethods { + algs = append(algs, alg) + } + return +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/staticcheck.conf b/vendor/github.com/golang-jwt/jwt/v4/staticcheck.conf new file mode 100644 index 00000000..53745d51 --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/staticcheck.conf @@ -0,0 +1 @@ +checks = ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1023"] diff --git a/vendor/github.com/golang-jwt/jwt/v4/token.go b/vendor/github.com/golang-jwt/jwt/v4/token.go new file mode 100644 index 00000000..786b275c --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/token.go @@ -0,0 +1,143 @@ +package jwt + +import ( + "encoding/base64" + "encoding/json" + "strings" + "time" +) + +// DecodePaddingAllowed will switch the codec used for decoding JWTs respectively. Note that the JWS RFC7515 +// states that the tokens will utilize a Base64url encoding with no padding. Unfortunately, some implementations +// of JWT are producing non-standard tokens, and thus require support for decoding. Note that this is a global +// variable, and updating it will change the behavior on a package level, and is also NOT go-routine safe. +// To use the non-recommended decoding, set this boolean to `true` prior to using this package. +var DecodePaddingAllowed bool + +// DecodeStrict will switch the codec used for decoding JWTs into strict mode. +// In this mode, the decoder requires that trailing padding bits are zero, as described in RFC 4648 section 3.5. +// Note that this is a global variable, and updating it will change the behavior on a package level, and is also NOT go-routine safe. +// To use strict decoding, set this boolean to `true` prior to using this package. +var DecodeStrict bool + +// TimeFunc provides the current time when parsing token to validate "exp" claim (expiration time). +// You can override it to use another time value. This is useful for testing or if your +// server uses a different time zone than your tokens. +var TimeFunc = time.Now + +// Keyfunc will be used by the Parse methods as a callback function to supply +// the key for verification. The function receives the parsed, +// but unverified Token. This allows you to use properties in the +// Header of the token (such as `kid`) to identify which key to use. +type Keyfunc func(*Token) (interface{}, error) + +// Token represents a JWT Token. Different fields will be used depending on whether you're +// creating or parsing/verifying a token. +type Token struct { + Raw string // The raw token. Populated when you Parse a token + Method SigningMethod // The signing method used or to be used + Header map[string]interface{} // The first segment of the token + Claims Claims // The second segment of the token + Signature string // The third segment of the token. Populated when you Parse a token + Valid bool // Is the token valid? Populated when you Parse/Verify a token +} + +// New creates a new Token with the specified signing method and an empty map of claims. +func New(method SigningMethod) *Token { + return NewWithClaims(method, MapClaims{}) +} + +// NewWithClaims creates a new Token with the specified signing method and claims. +func NewWithClaims(method SigningMethod, claims Claims) *Token { + return &Token{ + Header: map[string]interface{}{ + "typ": "JWT", + "alg": method.Alg(), + }, + Claims: claims, + Method: method, + } +} + +// SignedString creates and returns a complete, signed JWT. +// The token is signed using the SigningMethod specified in the token. +func (t *Token) SignedString(key interface{}) (string, error) { + var sig, sstr string + var err error + if sstr, err = t.SigningString(); err != nil { + return "", err + } + if sig, err = t.Method.Sign(sstr, key); err != nil { + return "", err + } + return strings.Join([]string{sstr, sig}, "."), nil +} + +// SigningString generates the signing string. This is the +// most expensive part of the whole deal. Unless you +// need this for something special, just go straight for +// the SignedString. +func (t *Token) SigningString() (string, error) { + var err error + var jsonValue []byte + + if jsonValue, err = json.Marshal(t.Header); err != nil { + return "", err + } + header := EncodeSegment(jsonValue) + + if jsonValue, err = json.Marshal(t.Claims); err != nil { + return "", err + } + claim := EncodeSegment(jsonValue) + + return strings.Join([]string{header, claim}, "."), nil +} + +// Parse parses, validates, verifies the signature and returns the parsed token. +// keyFunc will receive the parsed token and should return the cryptographic key +// for verifying the signature. +// The caller is strongly encouraged to set the WithValidMethods option to +// validate the 'alg' claim in the token matches the expected algorithm. +// For more details about the importance of validating the 'alg' claim, +// see https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/ +func Parse(tokenString string, keyFunc Keyfunc, options ...ParserOption) (*Token, error) { + return NewParser(options...).Parse(tokenString, keyFunc) +} + +// ParseWithClaims is a shortcut for NewParser().ParseWithClaims(). +// +// Note: If you provide a custom claim implementation that embeds one of the standard claims (such as RegisteredClaims), +// make sure that a) you either embed a non-pointer version of the claims or b) if you are using a pointer, allocate the +// proper memory for it before passing in the overall claims, otherwise you might run into a panic. +func ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc, options ...ParserOption) (*Token, error) { + return NewParser(options...).ParseWithClaims(tokenString, claims, keyFunc) +} + +// EncodeSegment encodes a JWT specific base64url encoding with padding stripped +// +// Deprecated: In a future release, we will demote this function to a non-exported function, since it +// should only be used internally +func EncodeSegment(seg []byte) string { + return base64.RawURLEncoding.EncodeToString(seg) +} + +// DecodeSegment decodes a JWT specific base64url encoding with padding stripped +// +// Deprecated: In a future release, we will demote this function to a non-exported function, since it +// should only be used internally +func DecodeSegment(seg string) ([]byte, error) { + encoding := base64.RawURLEncoding + + if DecodePaddingAllowed { + if l := len(seg) % 4; l > 0 { + seg += strings.Repeat("=", 4-l) + } + encoding = base64.URLEncoding + } + + if DecodeStrict { + encoding = encoding.Strict() + } + return encoding.DecodeString(seg) +} diff --git a/vendor/github.com/golang-jwt/jwt/v4/types.go b/vendor/github.com/golang-jwt/jwt/v4/types.go new file mode 100644 index 00000000..ac8e140e --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/v4/types.go @@ -0,0 +1,145 @@ +package jwt + +import ( + "encoding/json" + "fmt" + "math" + "reflect" + "strconv" + "time" +) + +// TimePrecision sets the precision of times and dates within this library. +// This has an influence on the precision of times when comparing expiry or +// other related time fields. Furthermore, it is also the precision of times +// when serializing. +// +// For backwards compatibility the default precision is set to seconds, so that +// no fractional timestamps are generated. +var TimePrecision = time.Second + +// MarshalSingleStringAsArray modifies the behaviour of the ClaimStrings type, especially +// its MarshalJSON function. +// +// If it is set to true (the default), it will always serialize the type as an +// array of strings, even if it just contains one element, defaulting to the behaviour +// of the underlying []string. If it is set to false, it will serialize to a single +// string, if it contains one element. Otherwise, it will serialize to an array of strings. +var MarshalSingleStringAsArray = true + +// NumericDate represents a JSON numeric date value, as referenced at +// https://datatracker.ietf.org/doc/html/rfc7519#section-2. +type NumericDate struct { + time.Time +} + +// NewNumericDate constructs a new *NumericDate from a standard library time.Time struct. +// It will truncate the timestamp according to the precision specified in TimePrecision. +func NewNumericDate(t time.Time) *NumericDate { + return &NumericDate{t.Truncate(TimePrecision)} +} + +// newNumericDateFromSeconds creates a new *NumericDate out of a float64 representing a +// UNIX epoch with the float fraction representing non-integer seconds. +func newNumericDateFromSeconds(f float64) *NumericDate { + round, frac := math.Modf(f) + return NewNumericDate(time.Unix(int64(round), int64(frac*1e9))) +} + +// MarshalJSON is an implementation of the json.RawMessage interface and serializes the UNIX epoch +// represented in NumericDate to a byte array, using the precision specified in TimePrecision. +func (date NumericDate) MarshalJSON() (b []byte, err error) { + var prec int + if TimePrecision < time.Second { + prec = int(math.Log10(float64(time.Second) / float64(TimePrecision))) + } + truncatedDate := date.Truncate(TimePrecision) + + // For very large timestamps, UnixNano would overflow an int64, but this + // function requires nanosecond level precision, so we have to use the + // following technique to get round the issue: + // 1. Take the normal unix timestamp to form the whole number part of the + // output, + // 2. Take the result of the Nanosecond function, which retuns the offset + // within the second of the particular unix time instance, to form the + // decimal part of the output + // 3. Concatenate them to produce the final result + seconds := strconv.FormatInt(truncatedDate.Unix(), 10) + nanosecondsOffset := strconv.FormatFloat(float64(truncatedDate.Nanosecond())/float64(time.Second), 'f', prec, 64) + + output := append([]byte(seconds), []byte(nanosecondsOffset)[1:]...) + + return output, nil +} + +// UnmarshalJSON is an implementation of the json.RawMessage interface and deserializses a +// NumericDate from a JSON representation, i.e. a json.Number. This number represents an UNIX epoch +// with either integer or non-integer seconds. +func (date *NumericDate) UnmarshalJSON(b []byte) (err error) { + var ( + number json.Number + f float64 + ) + + if err = json.Unmarshal(b, &number); err != nil { + return fmt.Errorf("could not parse NumericData: %w", err) + } + + if f, err = number.Float64(); err != nil { + return fmt.Errorf("could not convert json number value to float: %w", err) + } + + n := newNumericDateFromSeconds(f) + *date = *n + + return nil +} + +// ClaimStrings is basically just a slice of strings, but it can be either serialized from a string array or just a string. +// This type is necessary, since the "aud" claim can either be a single string or an array. +type ClaimStrings []string + +func (s *ClaimStrings) UnmarshalJSON(data []byte) (err error) { + var value interface{} + + if err = json.Unmarshal(data, &value); err != nil { + return err + } + + var aud []string + + switch v := value.(type) { + case string: + aud = append(aud, v) + case []string: + aud = ClaimStrings(v) + case []interface{}: + for _, vv := range v { + vs, ok := vv.(string) + if !ok { + return &json.UnsupportedTypeError{Type: reflect.TypeOf(vv)} + } + aud = append(aud, vs) + } + case nil: + return nil + default: + return &json.UnsupportedTypeError{Type: reflect.TypeOf(v)} + } + + *s = aud + + return +} + +func (s ClaimStrings) MarshalJSON() (b []byte, err error) { + // This handles a special case in the JWT RFC. If the string array, e.g. used by the "aud" field, + // only contains one element, it MAY be serialized as a single string. This may or may not be + // desired based on the ecosystem of other JWT library used, so we make it configurable by the + // variable MarshalSingleStringAsArray. + if len(s) == 1 && !MarshalSingleStringAsArray { + return json.Marshal(s[0]) + } + + return json.Marshal([]string(s)) +} diff --git a/vendor/github.com/magodo/armid/LICENSE b/vendor/github.com/magodo/armid/LICENSE new file mode 100644 index 00000000..a612ad98 --- /dev/null +++ b/vendor/github.com/magodo/armid/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/vendor/github.com/magodo/aztft/internal/client/client.go b/vendor/github.com/magodo/aztft/internal/client/client.go index 10300305..1ba1a64a 100644 --- a/vendor/github.com/magodo/aztft/internal/client/client.go +++ b/vendor/github.com/magodo/aztft/internal/client/client.go @@ -47,6 +47,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) @@ -366,6 +367,14 @@ func (b *ClientBuilder) NewStreamAnalyticsFunctionsClient(subscriptionId string) ) } +func (b *ClientBuilder) NewStreamAnalyticsJobsClient(subscriptionId string) (*armstreamanalytics.StreamingJobsClient, error) { + return armstreamanalytics.NewStreamingJobsClient( + subscriptionId, + b.Cred, + &b.ClientOpt, + ) +} + func (b *ClientBuilder) NewMonitorScheduledQueryRulesClient(subscriptionId string) (*armmonitor.ScheduledQueryRulesClient, error) { return armmonitor.NewScheduledQueryRulesClient( subscriptionId, @@ -722,3 +731,7 @@ func (b *ClientBuilder) NewHybridKubernetesConnectedClient(subscriptionId string func (b *ClientBuilder) NewSqlJobsClient(subscriptionId string) (*armsql.JobsClient, error) { return armsql.NewJobsClient(subscriptionId, b.Cred, &b.ClientOpt) } + +func (b *ClientBuilder) NewWebPubSubsClient(subscriptionId string) (*armwebpubsub.Client, error) { + return armwebpubsub.NewClient(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 2e1135c7..cc9100e3 100644 --- a/vendor/github.com/magodo/aztft/internal/populate/populate.go +++ b/vendor/github.com/magodo/aztft/internal/populate/populate.go @@ -23,6 +23,7 @@ var populaters = map[string]populateFunc{ "azurerm_lb": populateLoadBalancer, "azurerm_container_app_environment": populateContainerAppEnv, "azurerm_mssql_job": populateMssqlJob, + "azurerm_stream_analytics_job": populateStreamAnalyticsJob, } func NeedsAPI(rt string) bool { diff --git a/vendor/github.com/magodo/aztft/internal/populate/populate_stream_analytics_job.go b/vendor/github.com/magodo/aztft/internal/populate/populate_stream_analytics_job.go new file mode 100644 index 00000000..d3214fb0 --- /dev/null +++ b/vendor/github.com/magodo/aztft/internal/populate/populate_stream_analytics_job.go @@ -0,0 +1,38 @@ +package populate + +import ( + "context" + "fmt" + + "github.com/magodo/armid" + "github.com/magodo/aztft/internal/client" +) + +func populateStreamAnalyticsJob(b *client.ClientBuilder, id armid.ResourceId) ([]armid.ResourceId, error) { + resourceGroupId := id.RootScope().(*armid.ResourceGroup) + client, err := b.NewStreamAnalyticsJobsClient(resourceGroupId.SubscriptionId) + if err != nil { + return nil, err + } + resp, err := client.Get(context.Background(), resourceGroupId.Name, id.Names()[0], nil) + if err != nil { + return nil, fmt.Errorf("retrieving %q: %v", id, err) + } + props := resp.StreamingJob.Properties + if props == nil { + return nil, nil + } + + if props.JobStorageAccount == nil { + return nil, nil + } + + if props.JobStorageAccount.AccountName == nil { + return nil, nil + } + + sid := id.Clone().(*armid.ScopedResourceId) + sid.AttrTypes = append(sid.AttrTypes, "storageAccounts") + sid.AttrNames = append(sid.AttrTypes, *props.JobStorageAccount.AccountName) + 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 3509327c..daf6a4a1 100644 --- a/vendor/github.com/magodo/aztft/internal/resmap/map.json +++ b/vendor/github.com/magodo/aztft/internal/resmap/map.json @@ -5989,6 +5989,20 @@ ] } }, + "azurerm_function_app_flex_consumption": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Web", + "types": [ + "sites" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Web/sites" + ] + } + }, "azurerm_function_app_function": { "management_plane": { "scopes": [ @@ -9717,6 +9731,21 @@ ] } }, + "azurerm_network_manager_ipam_pool": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Network", + "types": [ + "networkManagers", + "ipamPools" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Network/networkManagers/ipamPools" + ] + } + }, "azurerm_network_manager_management_group_connection": { "management_plane": { "scopes": [ @@ -9806,6 +9835,21 @@ ] } }, + "azurerm_network_manager_verifier_workspace": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Network", + "types": [ + "networkManagers", + "verifierWorkspaces" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Network/networkManagers/verifierWorkspaces" + ] + } + }, "azurerm_network_profile": { "management_plane": { "scopes": [ @@ -12075,6 +12119,22 @@ ] } }, + "azurerm_servicebus_namespace_customer_managed_key": { + "is_removed": true, + "remove_reason": "This is a property rather than a resource", + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.ServiceBus", + "types": [ + "namespaces" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.ServiceBus/namespaces" + ] + } + }, "azurerm_servicebus_namespace_disaster_recovery_config": { "management_plane": { "scopes": [ @@ -13771,6 +13831,21 @@ ] } }, + "azurerm_stream_analytics_job_storage_account": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.StreamAnalytics", + "types": [ + "streamingJobs", + "storageAccounts" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.StreamAnalytics/streamingJobs" + ] + } + }, "azurerm_stream_analytics_managed_private_endpoint": { "management_plane": { "scopes": [ @@ -14574,6 +14649,20 @@ ] } }, + "azurerm_system_center_virtual_machine_manager_virtual_machine_instance": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups/Microsoft.HybridCompute/machines" + ], + "provider": "Microsoft.ScVmm", + "types": [ + "virtualMachineInstances" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.HybridCompute/machines/Microsoft.ScVmm/virtualMachineInstances" + ] + } + }, "azurerm_system_center_virtual_machine_manager_virtual_machine_template": { "management_plane": { "scopes": [ @@ -15539,6 +15628,20 @@ ] } }, + "azurerm_web_pubsub_socketio": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.SignalRService", + "types": [ + "webPubSub" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.SignalRService/webPubSub" + ] + } + }, "azurerm_windows_function_app": { "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 b142436a..f8d25474 100644 --- a/vendor/github.com/magodo/aztft/internal/resmap/map_gen.json +++ b/vendor/github.com/magodo/aztft/internal/resmap/map_gen.json @@ -5971,6 +5971,20 @@ ] } }, + "azurerm_function_app_flex_consumption": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Web", + "types": [ + "sites" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Web/sites" + ] + } + }, "azurerm_function_app_function": { "management_plane": { "scopes": [ @@ -7479,9 +7493,6 @@ "types": [ "workspaces", "linkedServices" - ], - "import_specs": [ - "/subscriptions/resourceGroups/Microsoft.OperationalInsights/workspaces/linkedServices" ] } }, @@ -9598,6 +9609,21 @@ ] } }, + "azurerm_network_manager_ipam_pool": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Network", + "types": [ + "networkManagers", + "ipamPools" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Network/networkManagers/ipamPools" + ] + } + }, "azurerm_network_manager_management_group_connection": { "management_plane": { "scopes": [ @@ -9687,6 +9713,21 @@ ] } }, + "azurerm_network_manager_verifier_workspace": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Network", + "types": [ + "networkManagers", + "verifierWorkspaces" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Network/networkManagers/verifierWorkspaces" + ] + } + }, "azurerm_network_profile": { "management_plane": { "scopes": [ @@ -11956,6 +11997,20 @@ ] } }, + "azurerm_servicebus_namespace_customer_managed_key": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.ServiceBus", + "types": [ + "namespaces" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.ServiceBus/namespaces" + ] + } + }, "azurerm_servicebus_namespace_disaster_recovery_config": { "management_plane": { "scopes": [ @@ -13637,6 +13692,20 @@ ] } }, + "azurerm_stream_analytics_job_storage_account": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.StreamAnalytics", + "types": [ + "streamingJobs" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.StreamAnalytics/streamingJobs" + ] + } + }, "azurerm_stream_analytics_managed_private_endpoint": { "management_plane": { "scopes": [ @@ -14444,6 +14513,20 @@ ] } }, + "azurerm_system_center_virtual_machine_manager_virtual_machine_instance": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups/Microsoft.HybridCompute/machines" + ], + "provider": "Microsoft.ScVmm", + "types": [ + "virtualMachineInstances" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.HybridCompute/machines/Microsoft.ScVmm/virtualMachineInstances" + ] + } + }, "azurerm_system_center_virtual_machine_manager_virtual_machine_template": { "management_plane": { "scopes": [ @@ -15391,6 +15474,20 @@ ] } }, + "azurerm_web_pubsub_socketio": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.SignalRService", + "types": [ + "webPubSub" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.SignalRService/webPubSub" + ] + } + }, "azurerm_windows_function_app": { "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 fd2a3d96..a4ab4c8a 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve.go @@ -217,6 +217,9 @@ var Resolvers = map[string]map[string]resolver{ "/MICROSOFT.MACHINELEARNINGSERVICES/WORKSPACES": { "/SUBSCRIPTIONS/RESOURCEGROUPS": machineLearningWorkspaceResolver{}, }, + "/MICROSOFT.SIGNALRSERVICE/WEBPUBSUB": { + "/SUBSCRIPTIONS/RESOURCEGROUPS": webPubSubResolver{}, + }, } type ResolveError struct { diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_appservice_site.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_appservice_site.go index 75c23955..1bd801f1 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_appservice_site.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_appservice_site.go @@ -18,6 +18,9 @@ func (appServiceSitesResolver) ResourceTypes() []string { "azurerm_windows_function_app", "azurerm_linux_web_app", "azurerm_windows_web_app", + + // Although this is put here, it won't be resolved to for now. + "azurerm_function_app_flex_consumption", } } @@ -55,6 +58,7 @@ func (appServiceSitesResolver) Resolve(b *client.ClientBuilder, id armid.Resourc if m["functionapp"] { if m["linux"] { + return "azurerm_linux_function_app", nil } return "azurerm_windows_function_app", nil diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_web_pub_sub.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_web_pub_sub.go new file mode 100644 index 00000000..f5640075 --- /dev/null +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_web_pub_sub.go @@ -0,0 +1,39 @@ +package resolve + +import ( + "context" + "fmt" + + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub" + "github.com/magodo/armid" + "github.com/magodo/aztft/internal/client" +) + +type webPubSubResolver struct{} + +func (webPubSubResolver) ResourceTypes() []string { + return []string{"azurerm_web_pubsub_socketio", "azurerm_web_pubsub"} +} + +func (webPubSubResolver) Resolve(b *client.ClientBuilder, id armid.ResourceId) (string, error) { + resourceGroupId := id.RootScope().(*armid.ResourceGroup) + client, err := b.NewWebPubSubsClient(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.ResourceInfo.Kind + if kind == nil { + return "", fmt.Errorf("unexpected nil kind in response") + } + + switch *kind { + case armwebpubsub.ServiceKindSocketIO: + return "azurerm_web_pubsub_socketio", nil + default: + return "azurerm_web_pubsub", nil + } +} diff --git a/vendor/github.com/magodo/aztft/internal/tfid/tfid.go b/vendor/github.com/magodo/aztft/internal/tfid/tfid.go index 4a8d9db5..753d0755 100644 --- a/vendor/github.com/magodo/aztft/internal/tfid/tfid.go +++ b/vendor/github.com/magodo/aztft/internal/tfid/tfid.go @@ -160,7 +160,8 @@ func StaticBuild(id armid.ResourceId, rt string) (string, error) { "azurerm_subnet_nat_gateway_association", "azurerm_subnet_network_security_group_association", "azurerm_subnet_route_table_association", - "azurerm_mssql_job_schedule": + "azurerm_mssql_job_schedule", + "azurerm_stream_analytics_job_storage_account": id = id.Parent() } diff --git a/vendor/golang.org/x/net/http2/frame.go b/vendor/golang.org/x/net/http2/frame.go index 81faec7e..97bd8b06 100644 --- a/vendor/golang.org/x/net/http2/frame.go +++ b/vendor/golang.org/x/net/http2/frame.go @@ -225,6 +225,11 @@ var fhBytes = sync.Pool{ }, } +func invalidHTTP1LookingFrameHeader() FrameHeader { + fh, _ := readFrameHeader(make([]byte, frameHeaderLen), strings.NewReader("HTTP/1.1 ")) + return fh +} + // ReadFrameHeader reads 9 bytes from r and returns a FrameHeader. // Most users should use Framer.ReadFrame instead. func ReadFrameHeader(r io.Reader) (FrameHeader, error) { @@ -503,10 +508,16 @@ func (fr *Framer) ReadFrame() (Frame, error) { return nil, err } if fh.Length > fr.maxReadSize { + if fh == invalidHTTP1LookingFrameHeader() { + return nil, fmt.Errorf("http2: failed reading the frame payload: %w, note that the frame header looked like an HTTP/1.1 header", err) + } return nil, ErrFrameTooLarge } payload := fr.getReadBuf(fh.Length) if _, err := io.ReadFull(fr.r, payload); err != nil { + if fh == invalidHTTP1LookingFrameHeader() { + return nil, fmt.Errorf("http2: failed reading the frame payload: %w, note that the frame header looked like an HTTP/1.1 header", err) + } return nil, err } f, err := typeFrameParser(fh.Type)(fr.frameCache, fh, fr.countError, payload) diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index 7434b878..51fca38f 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -1068,7 +1068,10 @@ func (sc *serverConn) serve(conf http2Config) { func (sc *serverConn) handlePingTimer(lastFrameReadTime time.Time) { if sc.pingSent { - sc.vlogf("timeout waiting for PING response") + sc.logf("timeout waiting for PING response") + if f := sc.countErrorFunc; f != nil { + f("conn_close_lost_ping") + } sc.conn.Close() return } @@ -2233,25 +2236,25 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*responseWriter, *http.Request, error) { sc.serveG.check() - rp := requestParam{ - method: f.PseudoValue("method"), - scheme: f.PseudoValue("scheme"), - authority: f.PseudoValue("authority"), - path: f.PseudoValue("path"), - protocol: f.PseudoValue("protocol"), + rp := httpcommon.ServerRequestParam{ + Method: f.PseudoValue("method"), + Scheme: f.PseudoValue("scheme"), + Authority: f.PseudoValue("authority"), + Path: f.PseudoValue("path"), + Protocol: f.PseudoValue("protocol"), } // extended connect is disabled, so we should not see :protocol - if disableExtendedConnectProtocol && rp.protocol != "" { + if disableExtendedConnectProtocol && rp.Protocol != "" { return nil, nil, sc.countError("bad_connect", streamError(f.StreamID, ErrCodeProtocol)) } - isConnect := rp.method == "CONNECT" + isConnect := rp.Method == "CONNECT" if isConnect { - if rp.protocol == "" && (rp.path != "" || rp.scheme != "" || rp.authority == "") { + if rp.Protocol == "" && (rp.Path != "" || rp.Scheme != "" || rp.Authority == "") { return nil, nil, sc.countError("bad_connect", streamError(f.StreamID, ErrCodeProtocol)) } - } else if rp.method == "" || rp.path == "" || (rp.scheme != "https" && rp.scheme != "http") { + } else if rp.Method == "" || rp.Path == "" || (rp.Scheme != "https" && rp.Scheme != "http") { // See 8.1.2.6 Malformed Requests and Responses: // // Malformed requests or responses that are detected @@ -2265,15 +2268,16 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res return nil, nil, sc.countError("bad_path_method", streamError(f.StreamID, ErrCodeProtocol)) } - rp.header = make(http.Header) + header := make(http.Header) + rp.Header = header for _, hf := range f.RegularFields() { - rp.header.Add(sc.canonicalHeader(hf.Name), hf.Value) + header.Add(sc.canonicalHeader(hf.Name), hf.Value) } - if rp.authority == "" { - rp.authority = rp.header.Get("Host") + if rp.Authority == "" { + rp.Authority = header.Get("Host") } - if rp.protocol != "" { - rp.header.Set(":protocol", rp.protocol) + if rp.Protocol != "" { + header.Set(":protocol", rp.Protocol) } rw, req, err := sc.newWriterAndRequestNoBody(st, rp) @@ -2282,7 +2286,7 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res } bodyOpen := !f.StreamEnded() if bodyOpen { - if vv, ok := rp.header["Content-Length"]; ok { + if vv, ok := rp.Header["Content-Length"]; ok { if cl, err := strconv.ParseUint(vv[0], 10, 63); err == nil { req.ContentLength = int64(cl) } else { @@ -2298,84 +2302,38 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res return rw, req, nil } -type requestParam struct { - method string - scheme, authority, path string - protocol string - header http.Header -} - -func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp requestParam) (*responseWriter, *http.Request, error) { +func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp httpcommon.ServerRequestParam) (*responseWriter, *http.Request, error) { sc.serveG.check() var tlsState *tls.ConnectionState // nil if not scheme https - if rp.scheme == "https" { + if rp.Scheme == "https" { tlsState = sc.tlsState } - needsContinue := httpguts.HeaderValuesContainsToken(rp.header["Expect"], "100-continue") - if needsContinue { - rp.header.Del("Expect") - } - // Merge Cookie headers into one "; "-delimited value. - if cookies := rp.header["Cookie"]; len(cookies) > 1 { - rp.header.Set("Cookie", strings.Join(cookies, "; ")) - } - - // Setup Trailers - var trailer http.Header - for _, v := range rp.header["Trailer"] { - for _, key := range strings.Split(v, ",") { - key = http.CanonicalHeaderKey(textproto.TrimString(key)) - switch key { - case "Transfer-Encoding", "Trailer", "Content-Length": - // Bogus. (copy of http1 rules) - // Ignore. - default: - if trailer == nil { - trailer = make(http.Header) - } - trailer[key] = nil - } - } - } - delete(rp.header, "Trailer") - - var url_ *url.URL - var requestURI string - if rp.method == "CONNECT" && rp.protocol == "" { - url_ = &url.URL{Host: rp.authority} - requestURI = rp.authority // mimic HTTP/1 server behavior - } else { - var err error - url_, err = url.ParseRequestURI(rp.path) - if err != nil { - return nil, nil, sc.countError("bad_path", streamError(st.id, ErrCodeProtocol)) - } - requestURI = rp.path + res := httpcommon.NewServerRequest(rp) + if res.InvalidReason != "" { + return nil, nil, sc.countError(res.InvalidReason, streamError(st.id, ErrCodeProtocol)) } body := &requestBody{ conn: sc, stream: st, - needsContinue: needsContinue, + needsContinue: res.NeedsContinue, } - req := &http.Request{ - Method: rp.method, - URL: url_, + req := (&http.Request{ + Method: rp.Method, + URL: res.URL, RemoteAddr: sc.remoteAddrStr, - Header: rp.header, - RequestURI: requestURI, + Header: rp.Header, + RequestURI: res.RequestURI, Proto: "HTTP/2.0", ProtoMajor: 2, ProtoMinor: 0, TLS: tlsState, - Host: rp.authority, + Host: rp.Authority, Body: body, - Trailer: trailer, - } - req = req.WithContext(st.ctx) - + Trailer: res.Trailer, + }).WithContext(st.ctx) rw := sc.newResponseWriter(st, req) return rw, req, nil } @@ -3270,12 +3228,12 @@ func (sc *serverConn) startPush(msg *startPushRequest) { // we start in "half closed (remote)" for simplicity. // See further comments at the definition of stateHalfClosedRemote. promised := sc.newStream(promisedID, msg.parent.id, stateHalfClosedRemote) - rw, req, err := sc.newWriterAndRequestNoBody(promised, requestParam{ - method: msg.method, - scheme: msg.url.Scheme, - authority: msg.url.Host, - path: msg.url.RequestURI(), - header: cloneHeader(msg.header), // clone since handler runs concurrently with writing the PUSH_PROMISE + rw, req, err := sc.newWriterAndRequestNoBody(promised, httpcommon.ServerRequestParam{ + Method: msg.method, + Scheme: msg.url.Scheme, + Authority: msg.url.Host, + Path: msg.url.RequestURI(), + Header: cloneHeader(msg.header), // clone since handler runs concurrently with writing the PUSH_PROMISE }) if err != nil { // Should not happen, since we've already validated msg.url. diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index f2c166b6..f26356b9 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -1286,6 +1286,19 @@ func (cc *ClientConn) responseHeaderTimeout() time.Duration { return 0 } +// actualContentLength returns a sanitized version of +// req.ContentLength, where 0 actually means zero (not unknown) and -1 +// means unknown. +func actualContentLength(req *http.Request) int64 { + if req.Body == nil || req.Body == http.NoBody { + return 0 + } + if req.ContentLength != 0 { + return req.ContentLength + } + return -1 +} + func (cc *ClientConn) decrStreamReservations() { cc.mu.Lock() defer cc.mu.Unlock() @@ -1310,7 +1323,7 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) reqCancel: req.Cancel, isHead: req.Method == "HEAD", reqBody: req.Body, - reqBodyContentLength: httpcommon.ActualContentLength(req), + reqBodyContentLength: actualContentLength(req), trace: httptrace.ContextClientTrace(ctx), peerClosed: make(chan struct{}), abort: make(chan struct{}), @@ -1318,7 +1331,7 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) donec: make(chan struct{}), } - cs.requestedGzip = httpcommon.IsRequestGzip(req, cc.t.disableCompression()) + cs.requestedGzip = httpcommon.IsRequestGzip(req.Method, req.Header, cc.t.disableCompression()) go cs.doRequest(req, streamf) @@ -1349,7 +1362,7 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) } res.Request = req res.TLS = cc.tlsState - if res.Body == noBody && httpcommon.ActualContentLength(req) == 0 { + if res.Body == noBody && actualContentLength(req) == 0 { // If there isn't a request or response body still being // written, then wait for the stream to be closed before // RoundTrip returns. @@ -1596,12 +1609,7 @@ func (cs *clientStream) encodeAndWriteHeaders(req *http.Request) error { // sent by writeRequestBody below, along with any Trailers, // again in form HEADERS{1}, CONTINUATION{0,}) cc.hbuf.Reset() - res, err := httpcommon.EncodeHeaders(httpcommon.EncodeHeadersParam{ - Request: req, - AddGzipHeader: cs.requestedGzip, - PeerMaxHeaderListSize: cc.peerMaxHeaderListSize, - DefaultUserAgent: defaultUserAgent, - }, func(name, value string) { + res, err := encodeRequestHeaders(req, cs.requestedGzip, cc.peerMaxHeaderListSize, func(name, value string) { cc.writeHeader(name, value) }) if err != nil { @@ -1617,6 +1625,22 @@ func (cs *clientStream) encodeAndWriteHeaders(req *http.Request) error { return err } +func encodeRequestHeaders(req *http.Request, addGzipHeader bool, peerMaxHeaderListSize uint64, headerf func(name, value string)) (httpcommon.EncodeHeadersResult, error) { + return httpcommon.EncodeHeaders(req.Context(), httpcommon.EncodeHeadersParam{ + Request: httpcommon.Request{ + Header: req.Header, + Trailer: req.Trailer, + URL: req.URL, + Host: req.Host, + Method: req.Method, + ActualContentLength: actualContentLength(req), + }, + AddGzipHeader: addGzipHeader, + PeerMaxHeaderListSize: peerMaxHeaderListSize, + DefaultUserAgent: defaultUserAgent, + }, headerf) +} + // cleanupWriteRequest performs post-request tasks. // // If err (the result of writeRequest) is non-nil and the stream is not closed, @@ -2186,6 +2210,13 @@ func (rl *clientConnReadLoop) cleanup() { } cc.cond.Broadcast() cc.mu.Unlock() + + if !cc.seenSettings { + // If we have a pending request that wants extended CONNECT, + // let it continue and fail with the connection error. + cc.extendedConnectAllowed = true + close(cc.seenSettingsChan) + } } // countReadFrameError calls Transport.CountError with a string @@ -2278,9 +2309,6 @@ func (rl *clientConnReadLoop) run() error { if VerboseLogs { cc.vlogf("http2: Transport conn %p received error from processing frame %v: %v", cc, summarizeFrame(f), err) } - if !cc.seenSettings { - close(cc.seenSettingsChan) - } return err } } diff --git a/vendor/golang.org/x/net/internal/httpcommon/headermap.go b/vendor/golang.org/x/net/internal/httpcommon/headermap.go index ad3fbacd..92483d8e 100644 --- a/vendor/golang.org/x/net/internal/httpcommon/headermap.go +++ b/vendor/golang.org/x/net/internal/httpcommon/headermap.go @@ -5,7 +5,7 @@ package httpcommon import ( - "net/http" + "net/textproto" "sync" ) @@ -82,7 +82,7 @@ func buildCommonHeaderMaps() { commonLowerHeader = make(map[string]string, len(common)) commonCanonHeader = make(map[string]string, len(common)) for _, v := range common { - chk := http.CanonicalHeaderKey(v) + chk := textproto.CanonicalMIMEHeaderKey(v) commonLowerHeader[chk] = v commonCanonHeader[v] = chk } @@ -104,7 +104,7 @@ func CanonicalHeader(v string) string { if s, ok := commonCanonHeader[v]; ok { return s } - return http.CanonicalHeaderKey(v) + return textproto.CanonicalMIMEHeaderKey(v) } // CachedCanonicalHeader returns the canonical form of a well-known header name. diff --git a/vendor/golang.org/x/net/internal/httpcommon/request.go b/vendor/golang.org/x/net/internal/httpcommon/request.go index 34391477..4b705531 100644 --- a/vendor/golang.org/x/net/internal/httpcommon/request.go +++ b/vendor/golang.org/x/net/internal/httpcommon/request.go @@ -5,10 +5,12 @@ package httpcommon import ( + "context" "errors" "fmt" - "net/http" "net/http/httptrace" + "net/textproto" + "net/url" "sort" "strconv" "strings" @@ -21,9 +23,21 @@ var ( ErrRequestHeaderListSize = errors.New("request header list larger than peer's advertised limit") ) +// Request is a subset of http.Request. +// It'd be simpler to pass an *http.Request, of course, but we can't depend on net/http +// without creating a dependency cycle. +type Request struct { + URL *url.URL + Method string + Host string + Header map[string][]string + Trailer map[string][]string + ActualContentLength int64 // 0 means 0, -1 means unknown +} + // EncodeHeadersParam is parameters to EncodeHeaders. type EncodeHeadersParam struct { - Request *http.Request + Request Request // AddGzipHeader indicates that an "accept-encoding: gzip" header should be // added to the request. @@ -47,11 +61,11 @@ type EncodeHeadersResult struct { // It validates a request and calls headerf with each pseudo-header and header // for the request. // The headerf function is called with the validated, canonicalized header name. -func EncodeHeaders(param EncodeHeadersParam, headerf func(name, value string)) (res EncodeHeadersResult, _ error) { +func EncodeHeaders(ctx context.Context, param EncodeHeadersParam, headerf func(name, value string)) (res EncodeHeadersResult, _ error) { req := param.Request // Check for invalid connection-level headers. - if err := checkConnHeaders(req); err != nil { + if err := checkConnHeaders(req.Header); err != nil { return res, err } @@ -73,7 +87,10 @@ func EncodeHeaders(param EncodeHeadersParam, headerf func(name, value string)) ( // isNormalConnect is true if this is a non-extended CONNECT request. isNormalConnect := false - protocol := req.Header.Get(":protocol") + var protocol string + if vv := req.Header[":protocol"]; len(vv) > 0 { + protocol = vv[0] + } if req.Method == "CONNECT" && protocol == "" { isNormalConnect = true } else if protocol != "" && req.Method != "CONNECT" { @@ -107,9 +124,7 @@ func EncodeHeaders(param EncodeHeadersParam, headerf func(name, value string)) ( return res, fmt.Errorf("invalid HTTP trailer %s", err) } - contentLength := ActualContentLength(req) - - trailers, err := commaSeparatedTrailers(req) + trailers, err := commaSeparatedTrailers(req.Trailer) if err != nil { return res, err } @@ -123,7 +138,7 @@ func EncodeHeaders(param EncodeHeadersParam, headerf func(name, value string)) ( f(":authority", host) m := req.Method if m == "" { - m = http.MethodGet + m = "GET" } f(":method", m) if !isNormalConnect { @@ -198,8 +213,8 @@ func EncodeHeaders(param EncodeHeadersParam, headerf func(name, value string)) ( f(k, v) } } - if shouldSendReqContentLength(req.Method, contentLength) { - f("content-length", strconv.FormatInt(contentLength, 10)) + if shouldSendReqContentLength(req.Method, req.ActualContentLength) { + f("content-length", strconv.FormatInt(req.ActualContentLength, 10)) } if param.AddGzipHeader { f("accept-encoding", "gzip") @@ -225,7 +240,7 @@ func EncodeHeaders(param EncodeHeadersParam, headerf func(name, value string)) ( } } - trace := httptrace.ContextClientTrace(req.Context()) + trace := httptrace.ContextClientTrace(ctx) // Header list size is ok. Write the headers. enumerateHeaders(func(name, value string) { @@ -243,19 +258,19 @@ func EncodeHeaders(param EncodeHeadersParam, headerf func(name, value string)) ( } }) - res.HasBody = contentLength != 0 + res.HasBody = req.ActualContentLength != 0 res.HasTrailers = trailers != "" return res, nil } // IsRequestGzip reports whether we should add an Accept-Encoding: gzip header // for a request. -func IsRequestGzip(req *http.Request, disableCompression bool) bool { +func IsRequestGzip(method string, header map[string][]string, disableCompression bool) bool { // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere? if !disableCompression && - req.Header.Get("Accept-Encoding") == "" && - req.Header.Get("Range") == "" && - req.Method != "HEAD" { + len(header["Accept-Encoding"]) == 0 && + len(header["Range"]) == 0 && + method != "HEAD" { // Request gzip only, not deflate. Deflate is ambiguous and // not as universally supported anyway. // See: https://zlib.net/zlib_faq.html#faq39 @@ -280,22 +295,22 @@ func IsRequestGzip(req *http.Request, disableCompression bool) bool { // // Certain headers are special-cased as okay but not transmitted later. // For example, we allow "Transfer-Encoding: chunked", but drop the header when encoding. -func checkConnHeaders(req *http.Request) error { - if v := req.Header.Get("Upgrade"); v != "" { - return fmt.Errorf("invalid Upgrade request header: %q", req.Header["Upgrade"]) +func checkConnHeaders(h map[string][]string) error { + if vv := h["Upgrade"]; len(vv) > 0 && (vv[0] != "" && vv[0] != "chunked") { + return fmt.Errorf("invalid Upgrade request header: %q", vv) } - if vv := req.Header["Transfer-Encoding"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && vv[0] != "chunked") { + if vv := h["Transfer-Encoding"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && vv[0] != "chunked") { return fmt.Errorf("invalid Transfer-Encoding request header: %q", vv) } - if vv := req.Header["Connection"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && !asciiEqualFold(vv[0], "close") && !asciiEqualFold(vv[0], "keep-alive")) { + if vv := h["Connection"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && !asciiEqualFold(vv[0], "close") && !asciiEqualFold(vv[0], "keep-alive")) { return fmt.Errorf("invalid Connection request header: %q", vv) } return nil } -func commaSeparatedTrailers(req *http.Request) (string, error) { - keys := make([]string, 0, len(req.Trailer)) - for k := range req.Trailer { +func commaSeparatedTrailers(trailer map[string][]string) (string, error) { + keys := make([]string, 0, len(trailer)) + for k := range trailer { k = CanonicalHeader(k) switch k { case "Transfer-Encoding", "Trailer", "Content-Length": @@ -310,19 +325,6 @@ func commaSeparatedTrailers(req *http.Request) (string, error) { return "", nil } -// ActualContentLength returns a sanitized version of -// req.ContentLength, where 0 actually means zero (not unknown) and -1 -// means unknown. -func ActualContentLength(req *http.Request) int64 { - if req.Body == nil || req.Body == http.NoBody { - return 0 - } - if req.ContentLength != 0 { - return req.ContentLength - } - return -1 -} - // validPseudoPath reports whether v is a valid :path pseudo-header // value. It must be either: // @@ -340,7 +342,7 @@ func validPseudoPath(v string) bool { return (len(v) > 0 && v[0] == '/') || v == "*" } -func validateHeaders(hdrs http.Header) string { +func validateHeaders(hdrs map[string][]string) string { for k, vv := range hdrs { if !httpguts.ValidHeaderFieldName(k) && k != ":protocol" { return fmt.Sprintf("name %q", k) @@ -377,3 +379,89 @@ func shouldSendReqContentLength(method string, contentLength int64) bool { return false } } + +// ServerRequestParam is parameters to NewServerRequest. +type ServerRequestParam struct { + Method string + Scheme, Authority, Path string + Protocol string + Header map[string][]string +} + +// ServerRequestResult is the result of NewServerRequest. +type ServerRequestResult struct { + // Various http.Request fields. + URL *url.URL + RequestURI string + Trailer map[string][]string + + NeedsContinue bool // client provided an "Expect: 100-continue" header + + // If the request should be rejected, this is a short string suitable for passing + // to the http2 package's CountError function. + // It might be a bit odd to return errors this way rather than returing an error, + // but this ensures we don't forget to include a CountError reason. + InvalidReason string +} + +func NewServerRequest(rp ServerRequestParam) ServerRequestResult { + needsContinue := httpguts.HeaderValuesContainsToken(rp.Header["Expect"], "100-continue") + if needsContinue { + delete(rp.Header, "Expect") + } + // Merge Cookie headers into one "; "-delimited value. + if cookies := rp.Header["Cookie"]; len(cookies) > 1 { + rp.Header["Cookie"] = []string{strings.Join(cookies, "; ")} + } + + // Setup Trailers + var trailer map[string][]string + for _, v := range rp.Header["Trailer"] { + for _, key := range strings.Split(v, ",") { + key = textproto.CanonicalMIMEHeaderKey(textproto.TrimString(key)) + switch key { + case "Transfer-Encoding", "Trailer", "Content-Length": + // Bogus. (copy of http1 rules) + // Ignore. + default: + if trailer == nil { + trailer = make(map[string][]string) + } + trailer[key] = nil + } + } + } + delete(rp.Header, "Trailer") + + // "':authority' MUST NOT include the deprecated userinfo subcomponent + // for "http" or "https" schemed URIs." + // https://www.rfc-editor.org/rfc/rfc9113.html#section-8.3.1-2.3.8 + if strings.IndexByte(rp.Authority, '@') != -1 && (rp.Scheme == "http" || rp.Scheme == "https") { + return ServerRequestResult{ + InvalidReason: "userinfo_in_authority", + } + } + + var url_ *url.URL + var requestURI string + if rp.Method == "CONNECT" && rp.Protocol == "" { + url_ = &url.URL{Host: rp.Authority} + requestURI = rp.Authority // mimic HTTP/1 server behavior + } else { + var err error + url_, err = url.ParseRequestURI(rp.Path) + if err != nil { + return ServerRequestResult{ + InvalidReason: "bad_path", + } + } + requestURI = rp.Path + } + + return ServerRequestResult{ + URL: url_, + NeedsContinue: needsContinue, + RequestURI: requestURI, + Trailer: trailer, + } +} diff --git a/vendor/golang.org/x/sync/errgroup/errgroup.go b/vendor/golang.org/x/sync/errgroup/errgroup.go index b8322598..a4ea5d14 100644 --- a/vendor/golang.org/x/sync/errgroup/errgroup.go +++ b/vendor/golang.org/x/sync/errgroup/errgroup.go @@ -46,7 +46,7 @@ func (g *Group) done() { // returns a non-nil error or the first time Wait returns, whichever occurs // first. func WithContext(ctx context.Context) (*Group, context.Context) { - ctx, cancel := withCancelCause(ctx) + ctx, cancel := context.WithCancelCause(ctx) return &Group{cancel: cancel}, ctx } diff --git a/vendor/golang.org/x/sync/errgroup/go120.go b/vendor/golang.org/x/sync/errgroup/go120.go deleted file mode 100644 index f93c740b..00000000 --- a/vendor/golang.org/x/sync/errgroup/go120.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2023 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.20 - -package errgroup - -import "context" - -func withCancelCause(parent context.Context) (context.Context, func(error)) { - return context.WithCancelCause(parent) -} diff --git a/vendor/golang.org/x/sync/errgroup/pre_go120.go b/vendor/golang.org/x/sync/errgroup/pre_go120.go deleted file mode 100644 index 88ce3343..00000000 --- a/vendor/golang.org/x/sync/errgroup/pre_go120.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2023 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.20 - -package errgroup - -import "context" - -func withCancelCause(parent context.Context) (context.Context, func(error)) { - ctx, cancel := context.WithCancel(parent) - return ctx, func(error) { cancel() } -} diff --git a/vendor/modules.txt b/vendor/modules.txt index f919b75f..9c198a52 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,8 +1,8 @@ # dario.cat/mergo v1.0.1 ## explicit; go 1.13 dario.cat/mergo -# github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 -## explicit; go 1.18 +# github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1 +## explicit; go 1.23.0 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/arm/internal/resource @@ -24,8 +24,8 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming github.com/Azure/azure-sdk-for-go/sdk/azcore/to github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing -# github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 -## explicit; go 1.18 +# github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.0 +## explicit; go 1.23.0 github.com/Azure/azure-sdk-for-go/sdk/internal/diag github.com/Azure/azure-sdk-for-go/sdk/internal/errorinfo github.com/Azure/azure-sdk-for-go/sdk/internal/exported @@ -33,16 +33,16 @@ github.com/Azure/azure-sdk-for-go/sdk/internal/log github.com/Azure/azure-sdk-for-go/sdk/internal/poller github.com/Azure/azure-sdk-for-go/sdk/internal/temporal github.com/Azure/azure-sdk-for-go/sdk/internal/uuid -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.8.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.10.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement v1.1.1 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.0.0-beta.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.0.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.1.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform v1.1.0-beta.1 @@ -51,22 +51,22 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice v1.0.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation v0.8.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation v0.9.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice v1.1.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice v1.2.0 ## explicit; go 1.18 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 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2 v2.0.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2 v2.1.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2 # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7 v7.0.0 @@ -75,40 +75,40 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection v1.0.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare v1.1.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization v1.0.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs v1.1.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins v1.1.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices v1.1.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor v1.2.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor v1.4.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight v1.1.1 +# 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.1.1 +# 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 -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 -## explicit; go 1.18 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.5.0 +## explicit; go 1.23.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto v1.3.1 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic v1.1.1 +# 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/v4 v4.0.0 @@ -123,10 +123,10 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.1.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw v1.0.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw v1.1.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup v1.0.0 @@ -138,13 +138,13 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecove # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts v1.0.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2 v2.0.0-beta.3 +# 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.3.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.7.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache v1.0.0 @@ -153,18 +153,21 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecac # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover v1.1.1 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool v1.1.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics v1.1.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse v0.7.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse v0.8.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights v1.1.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub v1.3.0 +## explicit; go 1.18 +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads v1.1.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads @@ -203,8 +206,9 @@ github.com/fatih/color github.com/gertd/go-pluralize # github.com/go-git/go-git/v5 v5.13.2 ## explicit; go 1.21 -# github.com/golang-jwt/jwt/v5 v5.2.2 -## explicit; go 1.18 +# github.com/golang-jwt/jwt/v4 v4.5.2 +## explicit; go 1.16 +github.com/golang-jwt/jwt/v4 # github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 ## explicit; go 1.20 # github.com/golang/protobuf v1.5.4 @@ -299,10 +303,10 @@ github.com/hashicorp/terraform-plugin-sdk/v2/terraform # github.com/huandu/xstrings v1.5.0 ## explicit; go 1.12 github.com/huandu/xstrings -# github.com/magodo/armid v0.0.0-20230511151020-27880e5961c3 +# 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.20250220225137-662088a9e6d6 +# github.com/magodo/aztft v0.3.1-0.20250331004505-d5aff7c777d4 ## explicit; go 1.19 github.com/magodo/aztft/aztft github.com/magodo/aztft/internal/client @@ -364,8 +368,6 @@ github.com/shopspring/decimal # github.com/spf13/cast v1.7.0 ## explicit; go 1.19 github.com/spf13/cast -# github.com/stretchr/testify v1.10.0 -## explicit; go 1.17 # github.com/vmihailenco/msgpack v4.0.4+incompatible ## explicit github.com/vmihailenco/msgpack @@ -389,7 +391,7 @@ github.com/zclconf/go-cty/cty/function/stdlib github.com/zclconf/go-cty/cty/gocty github.com/zclconf/go-cty/cty/json github.com/zclconf/go-cty/cty/set -# golang.org/x/crypto v0.35.0 +# golang.org/x/crypto v0.36.0 ## explicit; go 1.23.0 golang.org/x/crypto/bcrypt golang.org/x/crypto/blowfish @@ -401,22 +403,22 @@ golang.org/x/mod/internal/lazyregexp golang.org/x/mod/modfile golang.org/x/mod/module golang.org/x/mod/semver -# golang.org/x/net v0.35.0 -## explicit; go 1.18 +# golang.org/x/net v0.38.0 +## explicit; go 1.23.0 golang.org/x/net/http/httpguts golang.org/x/net/http2 golang.org/x/net/http2/hpack golang.org/x/net/idna golang.org/x/net/internal/httpcommon -# golang.org/x/sync v0.11.0 -## explicit; go 1.18 +# golang.org/x/sync v0.12.0 +## explicit; go 1.23.0 golang.org/x/sync/errgroup -# golang.org/x/sys v0.30.0 -## explicit; go 1.18 +# golang.org/x/sys v0.31.0 +## explicit; go 1.23.0 golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/text v0.22.0 -## explicit; go 1.18 +# golang.org/x/text v0.23.0 +## explicit; go 1.23.0 golang.org/x/text/secure/bidirule golang.org/x/text/transform golang.org/x/text/unicode/bidi