From da7b42e4a435957124963224ad615ed3d755a200 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Wed, 17 Jan 2024 17:38:37 +0100 Subject: [PATCH] dependencies: updating to `v0.20240117.1163544` of `github.com/hashicorp/go-azure-sdk` --- go.mod | 2 +- go.sum | 4 ++-- .../cosmosdb/2022-11-15/mongorbacs/constants.go | 8 ++++---- .../2019-11-01/dataset/method_listbyshare.go | 16 ++++++++++++++-- .../synchronizationsetting/method_listbyshare.go | 16 ++++++++++++++-- .../2023-08-15/databases/method_listbycluster.go | 16 ++++++++++++++-- .../network/2023-06-01/adminrules/method_list.go | 16 ++++++++++++++-- .../method_listbyresourcegroup.go | 16 ++++++++++++++-- .../method_listbysubscription.go | 16 ++++++++++++++-- .../go-azure-sdk/sdk/client/pollers/poller.go | 12 ++++++++++++ vendor/modules.txt | 2 +- 11 files changed, 104 insertions(+), 20 deletions(-) diff --git a/go.mod b/go.mod index 99ff358865d6..adc5c908d1b4 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.3.1 github.com/hashicorp/go-azure-helpers v0.65.1 - github.com/hashicorp/go-azure-sdk v0.20240112.1120540 + github.com/hashicorp/go-azure-sdk v0.20240117.1163544 github.com/hashicorp/go-hclog v1.5.0 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-uuid v1.0.3 diff --git a/go.sum b/go.sum index 7934b63a468a..bfa7370f84ee 100644 --- a/go.sum +++ b/go.sum @@ -114,8 +114,8 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-azure-helpers v0.12.0/go.mod h1:Zc3v4DNeX6PDdy7NljlYpnrdac1++qNW0I4U+ofGwpg= github.com/hashicorp/go-azure-helpers v0.65.1 h1:MLfd6MqCthMbop4N7OKsF8qn61Pe3Vyw30LjEEJkW5Q= github.com/hashicorp/go-azure-helpers v0.65.1/go.mod h1:kJxXrFtJKJdOEqvad8pllAe7dhP4DbN8J6sqFZe47+4= -github.com/hashicorp/go-azure-sdk v0.20240112.1120540 h1:mDhUa6TVl0VDW/kgPjuCBqymHx1Ijk5t3HarktoDisA= -github.com/hashicorp/go-azure-sdk v0.20240112.1120540/go.mod h1:m5lGAt22BNeuIAgBZFnA7I9E4Gm9h4PflqFbR/Ey7Fs= +github.com/hashicorp/go-azure-sdk v0.20240117.1163544 h1:af8d6M+NESF60ZOT6RAPU5KqndAWIhAeiDM8RB6qvdM= +github.com/hashicorp/go-azure-sdk v0.20240117.1163544/go.mod h1:txHCdAIIyuDyQdPHgztJAoboIYO4ObG4Vwla/ekMylE= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/constants.go index 6f0897f6b738..9406856770fa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/constants.go @@ -6,13 +6,13 @@ package mongorbacs type MongoRoleDefinitionType int64 const ( - MongoRoleDefinitionTypeOne MongoRoleDefinitionType = 1 - MongoRoleDefinitionTypeZero MongoRoleDefinitionType = 0 + MongoRoleDefinitionTypeBuiltInRole MongoRoleDefinitionType = 0 + MongoRoleDefinitionTypeCustomRole MongoRoleDefinitionType = 1 ) func PossibleValuesForMongoRoleDefinitionType() []int64 { return []int64{ - int64(MongoRoleDefinitionTypeOne), - int64(MongoRoleDefinitionTypeZero), + int64(MongoRoleDefinitionTypeBuiltInRole), + int64(MongoRoleDefinitionTypeCustomRole), } } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/dataset/method_listbyshare.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/dataset/method_listbyshare.go index 67359f95c191..4e6b5d33a0a7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/dataset/method_listbyshare.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/dataset/method_listbyshare.go @@ -2,6 +2,7 @@ package dataset import ( "context" + "encoding/json" "fmt" "net/http" @@ -82,13 +83,24 @@ func (c DataSetClient) ListByShare(ctx context.Context, id ShareId, options List } var values struct { - Values *[]DataSet `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]DataSet, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalDataSetImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for DataSet (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/synchronizationsetting/method_listbyshare.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/synchronizationsetting/method_listbyshare.go index 01cf752ea997..e4eec6d08742 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/synchronizationsetting/method_listbyshare.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/synchronizationsetting/method_listbyshare.go @@ -2,6 +2,7 @@ package synchronizationsetting import ( "context" + "encoding/json" "fmt" "net/http" @@ -50,13 +51,24 @@ func (c SynchronizationSettingClient) ListByShare(ctx context.Context, id ShareI } var values struct { - Values *[]SynchronizationSetting `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]SynchronizationSetting, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalSynchronizationSettingImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for SynchronizationSetting (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_listbycluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_listbycluster.go index 409eb47ba3c0..8f40d5223d0f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_listbycluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_listbycluster.go @@ -2,6 +2,7 @@ package databases import ( "context" + "encoding/json" "fmt" "net/http" @@ -79,13 +80,24 @@ func (c DatabasesClient) ListByCluster(ctx context.Context, id commonids.KustoCl } var values struct { - Values *[]Database `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]Database, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalDatabaseImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for Database (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules/method_list.go index ae864c773c20..977c19ec5407 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules/method_list.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules/method_list.go @@ -2,6 +2,7 @@ package adminrules import ( "context" + "encoding/json" "fmt" "net/http" @@ -50,13 +51,24 @@ func (c AdminRulesClient) List(ctx context.Context, id RuleCollectionId) (result } var values struct { - Values *[]BaseAdminRule `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]BaseAdminRule, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalBaseAdminRuleImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for BaseAdminRule (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbyresourcegroup.go index 279571e54063..7e3e669eebe3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbyresourcegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbyresourcegroup.go @@ -2,6 +2,7 @@ package deploymentscripts import ( "context" + "encoding/json" "fmt" "net/http" @@ -51,13 +52,24 @@ func (c DeploymentScriptsClient) ListByResourceGroup(ctx context.Context, id com } var values struct { - Values *[]DeploymentScript `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]DeploymentScript, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalDeploymentScriptImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for DeploymentScript (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbysubscription.go index 9dc7992e31b5..030148dfcd25 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbysubscription.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbysubscription.go @@ -2,6 +2,7 @@ package deploymentscripts import ( "context" + "encoding/json" "fmt" "net/http" @@ -51,13 +52,24 @@ func (c DeploymentScriptsClient) ListBySubscription(ctx context.Context, id comm } var values struct { - Values *[]DeploymentScript `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]DeploymentScript, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalDeploymentScriptImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for DeploymentScript (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/pollers/poller.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/pollers/poller.go index b8a18da4a9c2..d468fa5f0f55 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/pollers/poller.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/pollers/poller.go @@ -211,3 +211,15 @@ func (p *Poller) PollUntilDone(ctx context.Context) error { return p.latestError } + +// FinalResult attempts to unmarshal the final result into the provided model +// model should be a pointer to the type you wish to unmarshal into +func (p *Poller) FinalResult(model interface{}) error { + if latestResponse := p.LatestResponse(); latestResponse != nil { + if err := latestResponse.Unmarshal(model); err != nil { + return fmt.Errorf("unmarshalling latest response: %+v", err) + } + } + + return nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index b3ac5d754e8f..0a7afee91ae1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -157,7 +157,7 @@ github.com/hashicorp/go-azure-helpers/resourcemanager/tags github.com/hashicorp/go-azure-helpers/resourcemanager/zones github.com/hashicorp/go-azure-helpers/sender github.com/hashicorp/go-azure-helpers/storage -# github.com/hashicorp/go-azure-sdk v0.20240112.1120540 +# github.com/hashicorp/go-azure-sdk v0.20240117.1163544 ## explicit; go 1.21 github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview