From 0d56d5d714613667d19b4fb1a42e756493d24464 Mon Sep 17 00:00:00 2001 From: stephybun Date: Thu, 16 Feb 2023 09:16:13 +0100 Subject: [PATCH] update go-azure-sdk (#20499) --- go.mod | 2 +- go.sum | 4 ++-- .../method_listbyresourcegroup_autorest.go | 16 +++++++++++++--- .../method_listbysubscription_autorest.go | 16 +++++++++++++--- .../hashicorp/go-azure-sdk/sdk/odata/errors.go | 1 + .../hashicorp/go-azure-sdk/sdk/odata/types.go | 13 ++++++++----- vendor/modules.txt | 2 +- 7 files changed, 39 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index ba9114ff649e..b3d0ab73dfea 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.1.2 github.com/hashicorp/go-azure-helpers v0.51.0 - github.com/hashicorp/go-azure-sdk v0.20230214.1122756 + github.com/hashicorp/go-azure-sdk v0.20230215.1153645 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-uuid v1.0.3 github.com/hashicorp/go-version v1.6.0 diff --git a/go.sum b/go.sum index 433dd15fc401..181ed7007034 100644 --- a/go.sum +++ b/go.sum @@ -207,8 +207,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.51.0 h1:8KSDGkGnWH6zOT60R3KUqsi0fk1vA7AMunaOUJZMM6k= github.com/hashicorp/go-azure-helpers v0.51.0/go.mod h1:lsykLR4KjTUO7MiRmNWiTiX8QQtw3ILjyOvT0f5h3rw= -github.com/hashicorp/go-azure-sdk v0.20230214.1122756 h1:5cRwmNR2QwATfmnsWe8HQJcxbm8tyyjuE2MK2YTzk8Q= -github.com/hashicorp/go-azure-sdk v0.20230214.1122756/go.mod h1:aHinadEuBi04I1i+yvpPMZUxvxRxl5JgBOwlzIIxozU= +github.com/hashicorp/go-azure-sdk v0.20230215.1153645 h1:Sh5Zw8xBPKnD4A4X0ZQ00B9zk+grCsSvzLo6WJfB0kc= +github.com/hashicorp/go-azure-sdk v0.20230215.1153645/go.mod h1:aHinadEuBi04I1i+yvpPMZUxvxRxl5JgBOwlzIIxozU= 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/resources/2020-10-01/deploymentscripts/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbyresourcegroup_autorest.go index abcfa4ee5e1f..71df468848f3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbyresourcegroup_autorest.go @@ -2,6 +2,7 @@ package deploymentscripts import ( "context" + "encoding/json" "fmt" "net/http" "net/url" @@ -104,8 +105,8 @@ func (c DeploymentScriptsClient) preparerForListByResourceGroupWithNextLink(ctx // closes the http.Response Body. func (c DeploymentScriptsClient) responderForListByResourceGroup(resp *http.Response) (result ListByResourceGroupOperationResponse, err error) { type page struct { - Values []DeploymentScript `json:"value"` - NextLink *string `json:"nextLink"` + Values []json.RawMessage `json:"value"` + NextLink *string `json:"nextLink"` } var respObj page err = autorest.Respond( @@ -114,7 +115,16 @@ func (c DeploymentScriptsClient) responderForListByResourceGroup(resp *http.Resp autorest.ByUnmarshallingJSON(&respObj), autorest.ByClosing()) result.HttpResponse = resp - result.Model = &respObj.Values + temp := make([]DeploymentScript, 0) + for i, v := range respObj.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 result.nextLink = respObj.NextLink if respObj.NextLink != nil { result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListByResourceGroupOperationResponse, err error) { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbysubscription_autorest.go index 7921668c0d59..4caaa7af6126 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/method_listbysubscription_autorest.go @@ -2,6 +2,7 @@ package deploymentscripts import ( "context" + "encoding/json" "fmt" "net/http" "net/url" @@ -104,8 +105,8 @@ func (c DeploymentScriptsClient) preparerForListBySubscriptionWithNextLink(ctx c // closes the http.Response Body. func (c DeploymentScriptsClient) responderForListBySubscription(resp *http.Response) (result ListBySubscriptionOperationResponse, err error) { type page struct { - Values []DeploymentScript `json:"value"` - NextLink *string `json:"nextLink"` + Values []json.RawMessage `json:"value"` + NextLink *string `json:"nextLink"` } var respObj page err = autorest.Respond( @@ -114,7 +115,16 @@ func (c DeploymentScriptsClient) responderForListBySubscription(resp *http.Respo autorest.ByUnmarshallingJSON(&respObj), autorest.ByClosing()) result.HttpResponse = resp - result.Model = &respObj.Values + temp := make([]DeploymentScript, 0) + for i, v := range respObj.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 result.nextLink = respObj.NextLink if respObj.NextLink != nil { result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListBySubscriptionOperationResponse, err error) { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/odata/errors.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/odata/errors.go index c7857a62dd25..468b3c56a645 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/odata/errors.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/odata/errors.go @@ -15,6 +15,7 @@ const ( ErrorCannotDeleteOrUpdateEnabledEntitlement = "Permission (scope or role) cannot be deleted or updated unless disabled first" ErrorConflictingObjectPresentInDirectory = "A conflicting object with one or more of the specified property values is present in the directory" ErrorNotValidReferenceUpdate = "Not a valid reference update" + ErrorPropertyValuesAreInvalid = "One or more property values specified are invalid" ErrorResourceDoesNotExist = "Resource '.+' does not exist or one of its queried reference-property objects are not present" ErrorRemovedObjectReferencesDoNotExist = "One or more removed object references do not exist" ErrorServicePrincipalAppInOtherTenant = "When using this permission, the backing application of the service principal being created must in the local tenant" diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/odata/types.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/odata/types.go index 14e28940b70d..70b1ee01393f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/odata/types.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/odata/types.go @@ -49,13 +49,14 @@ type Type = string const ( TypeAccessPackage Type = "#microsoft.graph.accessPackage" TypeAccessPackageAssignmentPolicy Type = "#microsoft.graph.accessPackageAssignmentPolicy" - TypeAccessPackageQuestion Type = "#microsoft.graph.accessPackageQuestion" - TypeAccessPackageTextInputQuestion Type = "#microsoft.graph.accessPackageTextInputQuestion" - TypeAccessPackageMultipleChoiceQuestion Type = "#microsoft.graph.accessPackageMultipleChoiceQuestion" TypeAccessPackageCatalog Type = "#microsoft.graph.accessPackageCatalog" + TypeAccessPackageMultipleChoiceQuestion Type = "#microsoft.graph.accessPackageMultipleChoiceQuestion" + TypeAccessPackageQuestion Type = "#microsoft.graph.accessPackageQuestion" TypeAccessPackageResourceRequest Type = "#microsoft.graph.accessPackageResourceRequest" + TypeAccessPackageTextInputQuestion Type = "#microsoft.graph.accessPackageTextInputQuestion" TypeAdministrativeUnit Type = "#microsoft.graph.administrativeUnit" TypeApplication Type = "#microsoft.graph.application" + TypeAzureActiveDirectoryTenant Type = "#microsoft.graph.azureActiveDirectoryTenant" TypeConditionalAccessPolicy Type = "#microsoft.graph.conditionalAccessPolicy" TypeConnectedOrganizationMembers Type = "#microsoft.graph.connectedOrganizationMembers" TypeConnectionInfo Type = "#microsoft.graph.connectionInfo" @@ -64,15 +65,17 @@ const ( TypeDirectoryRole Type = "#microsoft.graph.directoryRole" TypeDirectoryRoleTemplate Type = "#microsoft.graph.directoryRoleTemplate" TypeDomain Type = "#microsoft.graph.domain" + TypeDomainIdentitySource Type = "#microsoft.graph.domainIdentitySource" TypeEmailAuthenticationMethod Type = "#microsoft.graph.emailAuthenticationMethod" + TypeExternalDomainFederation Type = "#microsoft.graph.externalDomainFederation" TypeExternalSponsors Type = "#microsoft.graph.externalSponsors" TypeFido2AuthenticationMethod Type = "#microsoft.graph.fido2AuthenticationMethod" TypeGroup Type = "#microsoft.graph.group" TypeGroupMembers Type = "#microsoft.graph.groupMembers" - TypeIpNamedLocation Type = "#microsoft.graph.ipNamedLocation" TypeInternalSponsors Type = "#microsoft.graph.internalSponsors" - TypeNamedLocation Type = "#microsoft.graph.namedLocation" + TypeIpNamedLocation Type = "#microsoft.graph.ipNamedLocation" TypeMicrosoftAuthenticatorAuthenticationMethod Type = "#microsoft.graph.microsoftAuthenticatorAuthenticationMethod" + TypeNamedLocation Type = "#microsoft.graph.namedLocation" TypeOrganization Type = "#microsoft.graph.organization" TypePasswordAuthenticationMethod Type = "#microsoft.graph.passwordAuthenticationMethod" TypePhoneAuthenticationMethod Type = "#microsoft.graph.phoneAuthenticationMethod" diff --git a/vendor/modules.txt b/vendor/modules.txt index a25ebe3235a4..0ae9f8caec45 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -160,7 +160,7 @@ github.com/hashicorp/go-azure-helpers/resourcemanager/zones github.com/hashicorp/go-azure-helpers/resourceproviders github.com/hashicorp/go-azure-helpers/sender github.com/hashicorp/go-azure-helpers/storage -# github.com/hashicorp/go-azure-sdk v0.20230214.1122756 +# github.com/hashicorp/go-azure-sdk v0.20230215.1153645 ## explicit; go 1.19 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